Get object reference based on a product instance when walking a tree on CATIA
When iterating through the tree in CATIA, it is very common the need to operate with geometrical elements at instance level.
A very common task is copying bodies from an instance to another keeping the link.
Considering that various instances might point to the same part, getting the reference to the specific instance it’s key in order to maintain positions.
At any instance of the loop, having the product instance and the element we want to copy, here is how we might create the reference:
The returned reference can then be added to a selection object, in order to copy the specific instance.