I’m trying to retrieve all the “Filled Regions” in the view and then get their type name. No matter what I try, it doesn’t work. Latest attempt:
def get_filledregion_type_name(filled_region):
if isinstance(filled_region, FilledRegion):
fr_type = doc.GetElement(filled_region.GetTypeId())
return fr_type.Name if fr_type else None
return None
collector = FilteredElementCollector(doc, view.Id).OfClass(FilledRegion).WhereElementIsNotElementType().ToElements()
for i in collector:
print(get_filledregion_type_name(i))