Using Catia API to display or change a solid name
Using Catia API to display or change a solid name
(OP)
Hi,
I have a CATIA drawing with some solid bodies in the middle of screen and on the left there is a specification (reference to all the solid bodies)
1) When I use the mouse to select the 1st body from the specification, then click on the "+", it will show "solid.1"
2) use the mouse to select "solid.1"
3) right click on it and go into Properties -> Feature Properties . In the Feature name box: it will show: solid.1
My questions are:
a)When we use the mouse to select this body in the drawing (not the specification), is there any CATIA API that we can use to get/retrieve this name "solid.1"?
b) Is there any CATIA API that will take a new input string to replace this "solid.1"?
I really appreciate any help in this case.
Thanks.
I have a CATIA drawing with some solid bodies in the middle of screen and on the left there is a specification (reference to all the solid bodies)
1) When I use the mouse to select the 1st body from the specification, then click on the "+", it will show "solid.1"
2) use the mouse to select "solid.1"
3) right click on it and go into Properties -> Feature Properties . In the Feature name box: it will show: solid.1
My questions are:
a)When we use the mouse to select this body in the drawing (not the specification), is there any CATIA API that we can use to get/retrieve this name "solid.1"?
b) Is there any CATIA API that will take a new input string to replace this "solid.1"?
I really appreciate any help in this case.
Thanks.





RE: Using Catia API to display or change a solid name
Sub CATMain()
Set partDocument1 = CATIA.ActiveDocument
Set part1 = partDocument1.Part
Set bodies1 = part1.Bodies
Set body1 = bodies1.Item("PartBody")
Set shapes1 = body1.Shapes
Set Solid1 = shapes1.Item("Solid.1")
Solid1.Name="GiveNewNameHere"
Eric N.
catiav5@softhome.net