Setting material to none?

Hi everyone,

Is it possible to set the material of an element to ‘none’ or to ‘by category’?
I can’t find a material in dynamo that represents nothing, and when I try to use setparametervalue for my material it throws an error because I am trying to use a string to represent a null value for material.
I’ve tried ‘null’, ‘none’, ‘’ and “”… Again, they are all strings not actual materials. Could anyone point me in the right direction?
Thank you.

Try setting it to -1 as an integer value and see or use python and use ElementId.InvalidElementId.

Hi Sean,

The “-1” integer approach just returns “Storage type is not a number”. I will try and figure out what the link you sent is saying.

Could you post the related portion of your graph? The error message you posted would indicate other issues as Materials are stored as a ElememtId which is a number.

Hi Sean,

Sure, here it is:
test nested families.dyn (46.5 KB)

Just to give you a bit of background, I am trying to get the duct which is attached to either an Air Terminal or a piece of Mechanical Equipment, Extract the 4 parameters you see in the graph, and give it to the Air Terminal or Mech Equipment itself.
Some of the ducts have no material parameter or it is . Whatever the duct material is set to, I want the Air Terminal/Mech Equip to be set to.
Thanks for your time here!