I have a list of 300+ families which have a material parameter that needs a specific value. I’d like to get a Dynamo script working for this because I can see this being used in the future. Here’s what I have so far.
I don’t understand why the script isn’t seeing the parameter when it is clearly there. The only reasons I can think that this is happening is because I need to get a list of family types from the filtered list of families and then set the parameter.
Please let me know if I understand correctly, @sovitek . A shared parameter is an element. The element in the Element.SetParameterByName is the shared parameter, NOT the family/family type that contains the shared parameter.
Hi again…not sure 100…the first node i select a fitting as instance, the second i get its types.
Then i just write to its type parametr…as its what you need in your case…for material you need to ffed in the real material and not the string
the two lowest codeblock its just to show difference between instance/type parameter
Many things could be done to optimize your graph, however, you need to provide the values by the right type. Your parameter is a material parameter, meaning don’t give it a string.
Thank you for the reply, @erfajo . Unfortunately I am new to Dynamo, and unfortunately removing the Material.Name node did not work. The Element.SetParameterByName still does not recognize that Fitting Material parameter is loaded into every pipe fitting in my project. Does it make a difference that the parameter is shared?
I apologize, @sovitek . You were correct with the script needing an Element.ElementType node. I revised the script a little bit, but here is the final result.