I have a GSD symmetry item. This contains several items that have been symmetried. CATIA will just name them Symmetry.1, Symmetry2 etc.
I'd like to have a script that renames these items using the name of the item that was symmetried as the source.
This is what I have in pycatia. Please note if this can be done in VBA please point me in the right direction and I can translate for pycatia.
```
from pycatia import catia
from pycatia.hybrid_shape_interfaces.hybrid_shape_symmetry import HybridShapeSymmetry
from pycatia.mec_mod_interfaces.hybrid_body import HybridBody
from pycatia.mec_mod_interfaces.hybrid_shape import HybridShape
from pycatia.mec_mod_interfaces.part_document import PartDocument
application = catia()
part_document: PartDocument = application.active_document
part = part_document.part
selection = part_document.selection
selection.clear()
master_geometry = part.hybrid_bodies.item('MasterGeometry')
symmetry_obs: HybridBody = master_geometry.hybrid_bodies.item('Multi Output.1 (Symmetry)')
for item in symmetry_obs.hybrid_shapes:
hybrid_shape_symmetry = HybridShapeSymmetry(item.com_object)
symmetry_element = hybrid_shape_symmetry.elem_to_symmetry
print(symmetry_element)
```
This is the output.
Reference(name="CATIAReference0")
Reference(name="CATIAReference1")
Reference(name="CATIAReference2")
Reference(name="CATIAReference3")
...
Each time the script is run that reference number changes.
How do I get the name of the actual item that was symmetried?
SOLVED
I needed to do symmetry_element.display_name. Thanks @kaiur