FamilyName thru ElementType, how?

Hello,

there is just a small step missing i think…


all_speakers_in_view = FilteredElementCollector(doc, doc.ActiveView.Id).OfCategory(BuiltInCategory.OST_ElectricalEquipment).WhereElementIsNotElementType().ToElements()

#all_speakers = UnwrapElement(all_speakers_in_view)
#all_ids = [ i.Id for i in all_speakers]
#all_ElementIDs = [doc.GetElement(i) for i in all_ids]

#speakers_famName = [i.ElementType.FamilyName for i in all_speakers_in_view ]


OUT = all_speakers_in_view,# speakers_famName

here are my trys :wink:

KR

Andreas

Hi,

Is this what you are looking for ?

all_speakers_in_view = FilteredElementCollector(doc, doc.ActiveView.Id).OfCategory(BuiltInCategory.OST_ElectricalEquipment).WhereElementIsNotElementType().ToElements()


OUT = [i.Symbol.FamilyName for i in all_speakers_in_view]

Hope it helps.

1 Like