Element.Collector for doors, how?

Hello Dynos,

My collector works fine for systemfamilies like Walls, but Doors doesn`t work, so how does it work?

doc = DocumentManager.Instance.CurrentDBDocument

collector = FilteredElementCollector(doc)
ofClass = collector.OfClass(Door).ToElements()

OUT = ofClass

Is there anywhere a list of “Revit-Classes” i mean correct written?

KR

Andreas

Hi @Draxl_Andreas,

The class correspond to a Dynamo Element Type :

So for doors, it is :

doc = DocumentManager.Instance.CurrentDBDocument

collector = FilteredElementCollector(doc).OfClass(FamilyInstance).ToElements()

OUT = collector
1 Like


…but it lists all instances of all categories, so how can i get just doors?

Use .OfCategory(BuiltInCategory.OST_Doors).WhereElementIsNotElementType() instead OfClass(FamilyInstance) if you want the category doors.

collector

1 Like

Well! that works

OUT=
FilteredElementCollector(doc).
OfCategory(BuiltInCategory.OST_Doors).
WhereElementIsNotElementType().ToElements()

by the way what is the name for the category “detailcomponent”? OST_Detail…

OST_DetailComponents

BuiltInCategories

3 Likes