Setting Nested Families Materials To Match Main

Hi all,

Is it possible to set the nested families material to match the family which it is loaded into?

For example, the cylinders are nested families of the brick work family, is it possible to allow them to inherit the brick work family without making adjustments to the families?

This is what I have so far, but I cannot seem to retrieve the material from the nested family.
Any ideas?


Hi @Sigma

Try using Element.Materials node:

Hi @Kulkul

Thanks for your response. I tried the node and get the following:

I don’t actually have any materials assigned to the nested families yet, nor do I want a material assigned by default…
I want to be able to take the main family material and push that through to the nested family… But I cant seem to get access to the nested families material…
I have the nested family as “Shared” as that seems to be the only way that Dynamo picks up sub-components, but with the “Shared” tick box selected, I lose the ability to associate the material parameter of my nested family to the main family…
Seems like a catch 22 situation?

Do you mind dropping here rvt file with this family?

testing.rvt (1.6 MB) body.rfa (424 KB)

Sure no problem, thank you for your time!

@Sigma i opened your files. The reason why it was showing emptylist because material was not applied. After applying the material you will see everything works:

@Kulkul I do have the material applied in my project though?

I have associated the material parameter to a type parameter in my project, can this work?

You need to hit tab and select subcomponent to set. Below is the process in action:

Hi Kulkul,

Sorry for the late reply.

Thank you for the effort, this scenario perfectly explains what I would like to achieve. Is there any way of applying the main family material (as I have done in my previous reply), to the spigot family without having to apply it in Revit? I am trying to assign the main family material to the nested family without any Revit intervention.
Is this possible?

ElementType Node -> SetParameterByName with Parameter name as SpigotMaterial.

Thank you very much Kulkul!