GetElementsByCategory
IEnumerable<Element> GetElementsByCategory(this Workset workset, Document doc, List<BuiltInCategory> categories)Gets instance elements in the workset filtered by specific categories.
Parameters
- worksetWorkset
Workset to collect from.
- docDocument
Host workshared document.
- categoriesList<BuiltInCategory>
Categories to include.
Returns: Elements in the workset matching any of the categories.
Example
var els = ws.GetElementsByCategory(doc, new List<BuiltInCategory>{ BuiltInCategory.OST_Walls });