Skip to main content
1-Visitor
April 23, 2012
Question

JLINK - get all the csys origins in the assembly?

  • April 23, 2012
  • 2 replies
  • 1616 views
I'm working on programmatically constraining some components, and I need to
get a list of all the CSYS origins in the entire assembly (components &
subassemblies too).

I tried

ModelItems asmItems = assembly.ListItems
(ModelItemType.ITEM_COORD_SYS);

But this just gets the ones in the top level.

Is there an easy way to get all the CSYS, or do I need to brute-force access
every component & evaluate it?



--



Lyle Beidler
MGS Inc
178 Muddy Creek Church Rd
Denver PA 17517
717-336-7528
Fax 717-336-0514
<">mailto:-> -
<">http://www.mgsincorporated.com>
This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.

2 replies

10-Marble
April 24, 2012
Lyle,
You have to traverse the assembly structure and search each component for CSYS and add them up in a Collection for the full assembly.
See the section Assemblies and Components for sample code traverses the assembly structure.

Best Regards,
Bjarne Frandsen
14-Alexandrite
April 25, 2012

Hello Lyle


In order to get all the cys in every item in the assembly then you will need to loop to each item in the assembly to collect all cys. There is not a method to collect all cys for each component in an assembly.