Getting associated Parameter through a nested family parameter

Hello everyone,
I have a revit family that is built from a shared family and 2 nested families, which are both the same family. The nested families have a string parameter, which I cannot edit once I put the family in the model, so I associated the parameter with 2 family parameters, one for each nested parameter.

I built a dynamo code which finds the distance between the nested elements, and then sets a value for the nested parameter that changes if the elements are too close to each other. For this to work, I need to reach the associated family parameter through the nested parameter of each element, so that when the nested element is too close, the code will automatically insert a specific value to the right associated parameter.

Does anyone have any ideas/know any packages that have nodes where I can reach the associated parameter through a nested parameter?

thank you

Hi,

It is great to see you in the community. Hopefully, you will find answers for your problem. I suggest you check Dynamo Forum Guidelines that will help you structure your questions so that you can find answers much quicker.

Is it possible for you to share what nodes you tried until now?

Normally, if the Associated Family Parameter is set as an Instance parameter you will access it directly using Element.GetParameterByName. If it is created as a Type parameter, firstly I use Element.ElementType to look for type parameters and check the accessible parameters with Element.Parameters. Then, I use again Element.GetParameterByName.

Please let me know if you need further help!

You can use IF statement formula. No need to use Dynamo

Hey! Thank you for your reply!
After sitting on the code for several hours, I found a fitting solution to the problem!
I first added an instance parameter to the nested family, loaded it into the shared family, and gave a different value to each of the nested families. When I loaded the shared family to the project, the values of the parameter were set for both of the nested families, and couldn’t be changed. Then I just used dynamo to filter between the nested families using that instance parameter, and the code now works perfectly!

1 Like