Assign material by paramater value

Good day everyone,
i am a beginner in Dynamo but i am learning as i go.
i have a model with about 6000 generic in place models. i have created a parameter called
“Status (BIM 360)” for all 6000 generic models. i also have assigned 2 different values for this parameter which are “Delivered” and “Installed”
i would like to assign the material “2R1n” to all models that have the value “Delivered”
and i would like to assign the material “3R1n” to all models that have the value “Installed”

i have done up a portion of it based on my little knowledge of Dynamo, but do not know how to continue, any help is really appreciated.

assign material.dyn (11.7 KB)

Hello there!
You need to add a Filter by Bool Mask node to separate the elements based on the parameter value, and the use the Set Parameter By Name node

The elements will be in the IN or the OUT output based on the == node.

1 Like

thank you. that worked amazingly!

1 Like

If another parameter value is added (e.g. “Procured”), you may have to chain List.FilterByBoolMask nodes together. However, you may also want to look into dictionaries as an alternative which will allow you to account for additional possibilities quite easily.

1 Like

thank you, i will study more in depth, currently im still very much a beginner.
Currently i merely duplicated the whole script below and change the value for the 2nd parameter