Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Catia API to display or change a solid name

Status
Not open for further replies.

Kevintp

Electrical
Feb 20, 2004
8
0
0
US
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.
 
Replies continue below

Recommended for you

Language="VBSCRIPT"

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
 
Status
Not open for further replies.
Back
Top