Element.SetName Node False Success

Hi, I am trying to rename specific family types of certain categories. The graph I have is successful all the way until set.name. Any help is appreciated.

Hi @ChrisGamble , you’ll need to filter out your wall types to feed into the elements set Name. You current feeding the string in believe.

your changing the wall type name, might as well access the walltype class itself, try this, it has a simple python code just to filter out properly


walltype_typename.dyn (20.8 KB)

Hi, what nodes would you use to do that, I’ve been trying everything with no success.

That works great but I need the python script to do the opposite where it filters out walls with a prefix already. I need to rename walls that dont have the prefix, but the filter bool node puts out a list rather than elements so the set.name doesnt change. How could I filter your graph? Is there a “does not contain” code block"

open the python script, add this word not and it will reverse the whole script

image

Bingo! You’re a lifesaver, thank you!

1 Like

I’ll give you a better one, you can get the output of both true and false, you just need to pick what you want to change

I changed the line to search a little bit since it seems like you’re only looking for the starting characters. else, if you’re searching for the characters at the middle of the string then just use the previous one
walltype_typename_2.dyn (27.4 KB)