How to replace a component based on its position in the model tree?

How to replace a component based on its position in the model tree?

Anonymous
Not applicable
327 Views
0 Replies
Message 1 of 1

How to replace a component based on its position in the model tree?

Anonymous
Not applicable

When I replace parts using iLogic, I have been calling them by using;

ThisDoc.Document.ComponentDefinition.Occurrences.Item(1)

I did this because after I replace the part, the part has a new name. In order to run the rule again I need the new name and not the old one.

 

I have run into a problem because I have added components to a copy of this assembly to create a new generator. I re-ordered the new parts in with the old parts assuming that the occurrence item # is always in line with the positiong of the component in the model tree. This is not the case I have found, and cannot seem to figure out the method Inventor uses to order them. I can only assume it assigns the # based on the time it was placed in the model because nothing else makes sense. 

 

Is there a better way to go about what I am trying to accomplish? Help is appreciated!

 

 

0 Likes
328 Views
0 Replies
Replies (0)