I am trying to replace values containing “Doors” with “DB” which is not working! Help please. ([https://imgur.com/a/E6mDZWh])
This is basically an “if”-statement… saying "if x = doors then DB else x
You cannot use “less or equal” to evaluate a string that should be used for values
You might be able to use the “equal” node instead though…
Hello, thanks for the input. i just checked and found its working fine with codeblock but not with my list.
Have a look at what kind of object you’re dealing with:
use the “Object.Type” node and connect that to your flatten node
I am little confused here. Basically what i need to do is, i want to feed a value to a new project parameter depending on what category it is. Its working fine with single category. But when I’m combining more than one categories its not working. Kindly advice.
Below script is for single category. New project parameter is A and DR values are fed to it.
Now i need to feed WN for project parameter A for Windows.
I can run this script multiple times changing its category but it will not be efficient.
That in itself wouldn’t work But my suspision is confirmed as to why my first suggestion does not work… You’re trying to compare “Revit.Elements.Category” elements to “strings” (called “doors”) that will not work, you could use “Object.ToString” but you might not be able to subsequently reuse the name “door”/“db” as it is now string and not an Revit.Elements.Category element…
ok so one quick question:
when i am replacing with replaceitematindex its working fine.
And is there a way so i can create a list with “Doors” replaced by “DB”?
Its working with the node string from object.
Thank you so much!!