RVTDocs.com

FilteredElementCollector.OfCategory

Method
Description:
Applies an ElementCategoryFilter to the collector.
Remarks:
Only elements of this category id will pass the collector.
Syntax
Examples
// Use OfCategory method to apply an ElementCategoryFilter and fine elements in the Doors category
FilteredElementCollector collector = new FilteredElementCollector(document);
ICollection<Element> doors = collector.OfCategory(BuiltInCategory.OST_Doors).ToElements();
Parameters
Parameter Type Description
category BuiltInCategory The category.
Return Value
Type Description
FilteredElementCollector This collector.