cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

JLINK - get all the csys origins in the assembly?

lylebeidler
1-Newbie

JLINK - get all the csys origins in the assembly?

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 2
bfrandsen
6-Contributor
(To:lylebeidler)

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

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.

Top Tags