Change the material of a family with dynamo?

Hello guys,
this is my first post on this forum where I’ve always found solutions to my revit problems!
But today I’m facing a very huge problem. I’ve got a Revit architectural model in which all the balusters of the railings have the wrong material applied. I can go through all the families and change it manually, but it will require ages cause there a lot of different family types (it’s a bim survey model).
I tried to change the material with dynamo, but it’s not a parameter of the category “baluster”, so I could not change it by the nodes “get parameters by name”-“change parameters by name” .
Is there a way to do it? Some packages? Or with a Python code? (I’ve a little knowledge of it).

Thank you for any helps.

Can you isolate the elements and use to Select Model elements node?

Yes, I can isolate all the balausters type families

Hi, where is this Material parameter located? Type properties or Instance properties? Because on most elements you can change Material parameters using SetParameterByName or get Values by GetParameterValueByName.

The material is in type properties but I have to edit the family to see it !
It doesn’t appear in the parameters of the element!
I can retrieve with the get.material node, but I want to change it

Create a property in the family for the material, IF its nested, make sure its mapped through to the top family. Then it should be changeable in the project. Then its a simple case of setting the parameter

Does this mean that I have to enter in all the nested families within the project?

Sounds like it. Can you post a small section of the project with a few families to check this? Likely saving out the families and batch editing via Dynamo for automation ( or similar is the best way forward.

Open an parameter in your family as instance one and set it like above shot.

I can’t actually, I’m sorry. I will give a look to that it seems very interesting thank you. Do you know if are there some possibilities with the unwrapping?

I can’t do this as I’ve nested families

Not sure what you mean by that.

I mean to code a script that allow me to access to more option. For example to access the width of the wall in dynamo we need to Unwrap, don’t we? Sorry if it’s not clear. Thanks for the help anyway!

If you were doing this via python, the unwrapping may be required. I haven’t seen any such Python so far in the conversation and we don’t have any sample file showing your current condition so it’s unclear of this would be required.