"Specified Cast is Not Valid" when assigning family type parameters

I have a door family with a number of nested generic models for the panels. There is a “Family Type” parameter in the door family that allows you to switch between the different nested generic models.
image

I am trying to change this parameter with grasshopper, but when I try and input a value, I get the error “Specified Cast is Not Valid.”

Hey…your input should be a family type and not text… also keep in mind the category should be matching as well…

Ok. This makes sense, but the problem is that the nested panel family doesn’t exist in the project that the door family is loaded into, so I can’t query it. Is there a workaround?

Hi Liam,

In this example there is a scripted component that can provide the Nested Family Types.

Hi @Japhy,

I’m a little confused on what the P input of that component is asking for.

That is the Family Type Parameter Name, which will provide the Family Types for the element (which don’t show in the project browser)

I’m getting a null value…

You are inputting a Type, a single instance of the family will suffice.