FilteredElementCollector.GetElementIterator Method

FilteredElementCollectorGetElementIterator Method

Returns an element iterator to the elements passing the filters.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public FilteredElementIterator GetElementIterator()
Public Function GetElementIterator As FilteredElementIterator
public:
FilteredElementIterator^ GetElementIterator()
member GetElementIterator : unit -> FilteredElementIterator 

Return Value

FilteredElementIterator
Exceptions
ExceptionCondition
InvalidOperationException The collector does not have a filter applied. Extraction or iteration of elements is not permitted without a filter.
Remarks
Calling this when you have an active iterator to this same collector will result in the first iterator being stopped by this call.
See Also