3 Replies Latest reply on Dec 1, 2010 7:14 AM by johnw

    Extracting Multicore data for custom report


      I am trying to create a report where I want to extract all the multicores from a harness design in order to compile a wire twisting report containing wire cut lengths and twist lengths. Does anyone perhaps have sample code showing how to get this information from a harness design. I have tried multiple solutions but with no success. I have attached my java file to show my latest attempt, but I keep getting the NullPointerException in line 166 and I can't figure out where I am going wrong. Any help in this regard would be appreciated.




      Johan  van Rooyen

        • 1. Re: Extracting Multicore data for custom report

          Hi Johan,


          This may be nothing, but I notice that right at the top of the file you have a member variable 'context' which is never assigned but is referenced at the very top of the createReport method.

          This should be causing the NPE, not line 166.

          In fact there is nothing on line 166 that should ever cause an exception, its only creating an empty set.


          I take it you really meant to reference the context parameter thats passed into the method, in which case just remove the 'this' keyword.


          Let me know if I have missed somethign else.





          • 2. Re: Extracting Multicore data for custom report

            Hi Dave,


            Thanks for your reply. I removed the "this" as per your suggestion and also commented out the declaration of the member variable. By doing this I keep on receiving errors and when I leave it as it was, I don't even receive a warning that there are unused variables.


            Maybe there is an easier way to do what I want so let me explain what I want to achieve:


            I need to extract all the multicores from a harness design. From there I need to extract only the twisted pair multicores in order to report on the cut lengths and twist lengths associated with the wires contained in the twisted pair multicores.


            Your input and advice will be greatly appreciated.


            Kind regards,


            Johan van Rooyen

            • 3. Re: Extracting Multicore data for custom report

              Hi Johan,


              Dave & I got our heads together - here's an example report that does what you need.  It displays a table of info for each multicore in the design.  The table lists all the wires for the particular multicore.  I've added comments to explain what's happening - you should be able to adapt and extend the report to suit a variety of reports that need a "nested" data structure rather than a flat listing