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?
Asked
Active
Viewed 148 times
1 Answers
1
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

Shrotter
- 350
- 3
- 9
-
thankyou, This is a good bit of information, but I need to distinguish between bodies, not between model elements. (or) I am not understanding it properly. – Naveen Prajapati Apr 28 '22 at 12:31
-
If both bodies have the same name, you can compare their internal name. Maybe explain when you have to distinguish these bodies. How do you access these bodies? – Shrotter Apr 28 '22 at 12:56
-
Hello Shrotter, if i have internal name can i select a body with it? – Naveen Prajapati Apr 29 '22 at 09:44
-
Try Method _FindObjectByName_ from the Part. You already have the body (before reading the internal name), why don't you use this object/body? – Shrotter Apr 29 '22 at 11:45