How to find the top assy from an occurrence?

How to find the top assy from an occurrence?

JBEDsol
Collaborator Collaborator
434 Views
3 Replies
Message 1 of 4

How to find the top assy from an occurrence?

JBEDsol
Collaborator
Collaborator

I've got a situation where I'm traversing a an assy but the when I need the global CG the best I can do retrieve the first parent assy.  I have an assy 3 to 4 levels deep.  While I'm traversing I'm trying to pull CG data relating to the original assy.  Problem is the I can only get the CG of the assy one level above.  So I have Assy1>Assy2>Assy3>Part1.  The CG I need is not the CG location of Part1 in Assy3 but of Part1 in Assy1.  I don't know how to find the top level assy from the part.

0 Likes
435 Views
3 Replies
Replies (3)
Message 2 of 4

marcin_otręba
Advisor
Advisor

 you always start from top level assembly somake it global, and instead looking for it just use global variable.

Hi, maybe you want to check my apps:


DrawingTools   View&ColoringTools   MRUFolders

0 Likes
Message 3 of 4

DRoam
Mentor
Mentor

This should be easy to do but it would help a lot to see your code. That will determine the simplest way to do it.

0 Likes
Message 4 of 4

JamieVJohnson2
Collaborator
Collaborator

Actually component occurrences have a map option...

Check out ComponentOccurrence.OccurrencePath property, it is a ComponentOccurrenceEnumerator that climbs the tree.

Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
0 Likes