Change/Access nested family type

Hi all,

Is it possible to access a nested family type? I want to access it’s parameters and change the value.

I have a generic model family with a nested structural column in it.
As you can see below I can choose a type of column in the generic model. I want to access this nested family via Grasshopper so I can fetch some parameter values of the nested family and change the type.


I’ve tried some things but it seems that nothing really works. I get an Revit element from the properties of the generic model but when I want to get the properties of that element it returns null values. The inspect node also returns nothing.
The element parameter node gives the warning that the parameter HEA does not exist. It does exist but that might have to do something with the addition of “structural column” in the type editor in Revit.

The Family Type Parameter is a more specific workflow than generally used. Here is an early example that does something similar. Note the python script that gets the Family Types available for that parameter.

In addition to the above where you can pick the family type and apply it to the parameter…if you want to get a list of nested families and there parameters and adjust those params?..

If so i think the easiest way without setting up custom scripts would be to actually make the nested families as “Shared” families so you can access them/create new types/edit there parameters from within the project itself, and then use the script Japhy shared to pick which type you want to assign. (let me know if I wasn’t clear and will try to rephrase xD)

Hi @Japhy and @M.Tarabishy,

Thanks for your answers.
@Japhy what I understand from your answer is that I can change the parameter with some python code but I can’t get the properties of the nested family. I’ll give changing the parameter a try.

@M.Tarabishy, what I got from your answer is to set the nested family to ‘Shared’ and edit type/parameters in the project. But I don’t think that’s possible because the nested family types are in loaded into the family and not in the project.
One way I can get over that is linking the desired parameter from the nested family to the ‘regular’ family and fetch it from there. But than I’m creating extra properties just for fetching and that’s not desired. I prefer to fetch it directly from the nested family.
@Japhy do you thank that’s possible with some python?

Hi Pim, That is what the Python component is doing, getting a list of the possible choices of nested families for the Family Type Parameter.

When you set nested families to “shared” once the parent family is loaded into the project, the nested shared family will also be loaded inside the project (that’s how “shared” families work in revit)… once they are part of the project you can access their parameters and add new types as needed.

Will try to explain with some example later.

aaaah :bulb:, got your point. I think that should indead work. I’m gonna try that next week.