I want to do the equivalent of the FamilyInstance.GetFamily node. I am fundamentally missing a python design pattern to achieve this result. The attached image is what I want to achieve in Python. My custom python node gets the architects linked title-block(s). Many times there is more than one title-block. I dig through them and find the one used on the primary sheets. Now I have a FamilyInstance but need the Family. I struggle to make the connection of how to get the Family, of the instance from the filter using the
OfClass(FamilySymbol) . I see
<FamilyInstance>.GetType but the result is not the element. Any help is appreciated.
famInstance = FilteredElementCollector(linkDoc).OfCategory(BuiltInCategory.OST_TitleBlocks).WhereElementIsNotElementType().ToElements() famSymbol = FilteredElementCollector(linkDoc).OfCategory(BuiltInCategory.OST_TitleBlocks).OfClass(FamilySymbol).ToElements()
I am aware of the following similar question,https://forum.dynamobim.com/t/python-help-family-from-familytype/20574/3?u=darickbrokaw. However the shinny Out of the box node FamilyInstance.GetFamily makes it look so easy and wonder if there is a better way.