Change Nested Family Type Instance Parameter

I have a door family with a nested family inside that indicates swing angle (45, 90, 180…). Each angle is a different family that is ties to a parameter called “Swing Angle” so they’re not strings values. Can someone point me in the direction to be able to change all nested families in a Revit project from say “90 Degrees” (actual nested family name) to “45 Degrees” for the swing angles. I’d like to avoid selecting each door.

BTW the Swing Angle parameter is an instance parameter.

Thanks!

When you get the parameter value for the “Swing Angle” what do you see?

1 Like

Thanks for the reply. I’m having trouble getting the value in Dynamo. The actual value could be one of three nested families. “90 Degrees”, “45 Degrees”, or “180 Degrees”

If you want to get the values of parameters of nested families, let them be controlled by parameters of the parent family and read those out.
Revit doesn’t really work the other way around, and I’m not sure how you’d be supposed to get these with Dynamo either.

Thanks. They are controlled by the parent family via a “Swing Angle” parameter.

Then it shouldn’t be a problem to simply find them by using the Element.GetParameterValueByName node.

1 Like

Thanks. Does it matter that the parameter is an instance parameter? “No parameter found by that name.”

Attaching image…

It shouldn’t matter if it’s in instance in that case, as you should be dealing with instances there not types. Can you share a basic .rvt with a minimal number of doors in it?

You’re cunnrently setting the value as a string, that barely ever works, it accepts the value 45 as degrees.

I vaguely got the idea that the different angles are different nested families, and the type is set through a parameter, if so, use the FamilyType.ByName node to get the family, the Element.SetParameterByName node accepts that as a value input.

1 Like

That is getting the parameter value but as soon as I plug in the string value “45 Degrees” (which is probably the wrong thing to do) the Element.SetParameterBy Name blows up. Dereferencing a non-pointer error.

Try to find out, what kind of parameter you have:

T%C3%BCren

Thanks. Got it. Not sure what to do with the information though.

So the parameter storage type is a element id, and you try to fill in a string, this will not work

Right, different data types. Any ideas how I swap one “Swing Angle” value for another? 90 Degrees to 45 Degrees know it’s not a string?

You need to find the element ID of the swing angle family which you want to use. If you post the .rvt file as I previously requested this will speed things along.

Hmm… I missed that. Thanks. Will do tomorrow morning. Thank you!

Here it is. Thanks Jacob!

TestFile.rvt (2.7 MB)

I’ll try and squeeze this in tonight. No promises though.

I understand. Thank you.