HarunMusic
Computer
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
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