Message 1 of 7
How to filter all created elements in Doc?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
For example, only one wall has been created in my new project. I want to obtain this wall. Generally speaking, for this wall, I will directly filter out this wall by using methods such as ofclass or ofcategory, but now if I don't know whether the elements in this project are a wall, window or others, how can I obtain all these created elements?
The following code is effective for a view, but it will filter out a lot of other contents only for doc.
So do you have a better way?
thank you
FilteredElementCollector collectorAll = new FilteredElementCollector(doc, doc.ActiveView.Id);
var eles = collectorAll.WherePasses(new LogicalOrFilter(new ElementIsElementTypeFilter(false), new ElementIsElementTypeFilter(true))).ToList();