Search code examples
vbacatia

distinguish between bodies in Catia


How to distinguish between bodies in Catia (i.e name of the 2 bodies can be the same) and there are no other properties in the properties tab. Is it possible to distinguish using catvba?

The image shows the properties tab


Solution

  • Therefor you can read (with undocumented methods) the internal name of a feature/object (which can not be changed):

    Dim oModelElement As Object
    Dim sInternalName As String
    
    Set oModelElement = oBody.GetItem("ModelElement")
    sInternalName = oModelElement.InternalName
    
    MsgBox sInternalName