cancel
Showing results for 
Search instead for 
Did you mean: 

Finding an occurrance of a sub-assembly component in an upper assembly.

Experimenter
Experimenter

I have  a 3 tiered assembly.  I want to change the reference set of a component on the 3rd level of the assembly.  I have a pointer to the occurance of the component within the sub-assembly (meaning the 2-tiered assembly that has its immediate parent as its root). 

 

Basically I need to get the occurance of the component whose OwningPart is the displayPart rather than its immediate parent.  Is there some way to find the occurance of this component that exists in the larger assembly.  (I don't know if occurance is the right word... or instance.... or prototype... that all is confusing to me).

2 REPLIES

Re: Finding an occurrance of a sub-assembly component in an upper assembly.

Legend
Legend

You can cycle through all the components from top level assembly recursively.  Compare the prototype of each component with the prototype of component pointer you have.  If there is only one occurrence it is easy.  If you have more than one occurrence of the component you may need to compare their position in absolute space.

Re: Finding an occurrance of a sub-assembly component in an upper assembly.

Phenom
Phenom

If I'm reading your question correctly, I think you want the .MapComponentFromSubassembly method.