Replacing material with other material

I am trying to make a tool that replaces all instances of 1 material to a other material i have gotten pretty far but i am getting stuck at how i can best setup the replacing of the parameters.


this is the script i have so far for getting the different type of elements that have the input value of the materials that need to be replaced, and the place [1,2,3] of where that material is located. But i am a bit lost on how to get the parameter name for replacing it. any idea how to do that? My second question is how can i make this script not only placed elements? I was thinking about selecting family type but i cant find a node to get the material value of the element.

I think my biggest problem rn is the fact that there are multiple type of parameters that need to be changed, but i am just lost for now how to proceed.
image
image
replacing materials dynamo.dyn (100.4 KB)

Tip: When you export a workspace, zoom in so that the node titles are visible before saving - that will assist with users on the forum being able to understand your graph

1 Like