Renaming Filled regions ( Detail Items )

Greetings,

This should be easy/boring one especially for Gurus…

Want to rename certain characters in Filled region Type naming convention from:

example :

01 W- Diagonal Crosshatch
01 W- Diagonal Crosshatch-Small
01 W- Diagonal Down
etc.

to:
WC - Diagonal Crosshatch
WC - Diagonal Crosshatch-Small
WC - Diagonal Down
etc.

Here is where im now :

Here is Find_Replace_View Name.dyn to download

Hi,

Could you zoom in slightly more on your screenshot so we can see the names of the node

Your list of Detail Items is a list of instances. You want to change the name on a list of types. You just need to get and filter the correct list of elements.

Either use the existing list of Types (duplicated for all instances) and filter down to unique values only, or change your method of gathering elements to be specific to Filled Region Types from the beginning.

There’s also no need to filter for types with your string condition. String.Replace will only replace the substring value where it exists. If it doesn’t exist, the string will remain unchanged.

image updated

Thanks,

filtering but not renaming…

Thanks,

Does the name perhaps already exist?

Yes, it does exist. Somehow it got renamed.
But when trying to rename other types it’s filtering but not renaming.

Yeah but, it looks like the name already exists, so you cant change another name to that same name as they are unique:
image

You first have to Rename any possible duplicates with a temporary suffix, then rename the one you want to rename, and then rename your placeholder again

You need to filter the element and not the string name. Again, there’s no need to pre-filter your list since you’re just changing specific values.