Filtering
The Revit API provides a mechanism for filtering and iterating elements in a Revit document. This is the best way to get a set of related elements, such as all walls or doors in the document. Filters can also be used to find a very specific set of elements, such as all beams of a specific size.
The basic steps to get elements passing a specified filter are as follows:
- Create a new FilteredElementCollector
- Apply one or more filters to it
- Get filtered elements or element ids (using one of several methods)
The following sample covers the basic steps to filtering and iterating elements in the document.
| Code Region 6-1: Use element filtering to get all wall instances in document |
|
