Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Rename Hole feature with VBScript (Knowledgeware)

Status
Not open for further replies.

honu

Aerospace
Jul 18, 2003
1
CA
Hello,

I need to rename a Hole feature with VBScript!

So far I can rename everything else (sketchs, points, curves, open bodies, bodies etc.) but features such as pads and holes I can not. In general the script looks like this:

Dim hole1 As Shapes
Set hole1 = shapes1.Item(Hole.1)
hole1.Name = "TEST"

The script editor does not except hole1.Name = "TEST"

I am also able to see the name:

MsgBox "NAME = " & hole1.Name

but I can't rename it!!!


Any ideas?

Chris
 
Replies continue below

Recommended for you

hi,
Sub CATMain()
Set PartDocument1 = CATIA.ActiveDocument

Set Part1 = PartDocument1.Part

Set bodies1 = Part1.bodies

Set body1 = bodies1.Item("PartBody")

Set Shapes1 = body1.Shapes

Set hole1 = Shapes1.Item("Hole.1")
hole1.name = "Test"

End Sub

it works perfectly for V5R12 SP3
bye
Naveen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor