If I understand your question correctly, you don’t really need any python script.
Either your family has the Parameters like “Length”, “height” etc, or you can measure the boundingbox, which gives you the maximum height length and width (So it is not accurate depending on what your purpose is)
If there is already a parameter for that in the Family then use only getparametervaluebyname and in case the parameter is not an instance parameter you might need to use it twice to reach the parameter.
I get results but can figure out yet how to make it to accept multiple elements .
Now if I do multiple it give me error “Expected Family instance got List”
if it works for individual families then my guess is that you need to define a “for loop” that operates on each member of the list and then define the FamilyInstance.GetReferenceByName(elements,“Centre”)
The input won’t accept a list, so you simply need to access each element in the list and define it.
like:
for i in yourlist:
FamilyInstance.GetReferenceByName(i,“Centre”)
Can someone show me how to get a reference from a Door family in Dynamo. I would like to get the Weak Reference (see image) to create dimensions.
Thanx in advance.
This is a new question. Can you make a new post for it instead of continuing a solved thread? You can make a link or reference to this one. It helps to keep things organized.