Find and change characters for Named Selections inside Spaceclaim

Erik Kostson
Member, Moderator, Employee Posts: 311
✭✭✭✭
Say we have a some Named Selections inside Spaceclaim with the "." character inside their name.
We would like to replace this character by "_".
Can we use scripting to do that?
0
Comments
-
Below is a Spaceclaim script that finds . in the groups/Named Selections, and replaces it with _
- groups = GetActiveWindow().ActiveWindow.Groups
- for ns in groups:
- nm=ns.GetName()
- if nm.find(".") !=-1:
- print(nm)
- newnm = nm.replace(".", "_")
- NamedSelection.Rename(nm, newnm)
0
This discussion has been closed.