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 with inputbox

Status
Not open for further replies.

HarunMusic

Computer
Nov 21, 2014
71
BA
Hi, i have problem with this script, i dont know how to use text from input Box,i want to taype name or part of name(prefix, sufix) and change it with the name also from input box, pls help
Sub CATMain()
Dim partDocument1 'As PartDocument
Set partDocument1 = CATIA.ActiveDocument
set selection1=CATIA.ActiveDocument.Selection

Window1 = InputBox("Type the name u want change: ", "Change the name of body,point, etc")

selection1.search="Name= &Window1&*,all"
Window = InputBox("Type the new name: ", "Change the name of body,point, etc")

For I = 1 To selection1.Count

selection1.Item(I).Value.Name = Replace(selection1.Item(I).Value.Name, " & Window1 & ",Prozor)

next
End Sub
 
Replies continue below

Recommended for you

Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top