×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Using Catia API to display or change a solid name

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.

RE: Using Catia API to display or change a solid name

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources