Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski 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
Joined
Jul 18, 2003
Messages
1
Location
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
 
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

Back
Top