Trevor,
You're the man. Thanks for the final help. It finally worked like a charm. Great!!! Thank you very much.
Here's the final code that worked.
Macro rename_assembly_name
Define el as Element
Define where as Integer
Define Output as String
Define bad as integer
Define good as integer
Define total as integer
select if Object_info exists
subselect if OBJECT_ID Contains "-"
el=ActiveDoc.FirstSelectedElement
WHILE (Exists (el) = true)
total=Len(el.info.id)
where=Find(el.info.id,"-",1)
good=(total - where)
If (where <> 0)
Output=Right(el.info.id,good)
el.info.id=Output
el.info.name=Output
end if
el = el.nextSelectedElement
End While
message "Assemblies have been renamed."
select none
End Macro
Welcome to the PTC Community
No account yet? Create an account
Please use your PTC eSupport account.
LoginEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.

