The Autodesk.Revit.DB.IntersectionResultArrayIterator
class provides an iterator for a collection of IntersectionResult
objects.
There are no properties for this class.
The following public methods are available for this class:
MoveNext()
Moves the iterator to the next IntersectionResult
object.
Returns: Boolean
. Returns true
if there is a next IntersectionResult
object available, and false
if the end of the collection has been reached.
Reset()
Resets the iterator to its initial state, before the first IntersectionResult
object.
Dispose()
Disposes the iterator and releases any resources associated with it.
// Create a new IntersectionResultArrayIterator
IntersectionResultArray results = ...;
IntersectionResultArrayIterator iterator = results.ForwardIterator();
// Use the iterator to loop through each IntersectionResult
while (iterator.MoveNext())
{
IntersectionResult result = iterator.Current;
// use the intersection result
}
// Dispose the iterator when finished
iterator.Dispose();
This class is typically used when analyzing intersections between geometry objects in Revit. It provides a convenient way to iteratively access each IntersectionResult
object in an IntersectionResultArray
. The iterator can be used to loop through each result and retrieve data, such as the intersection point, distance, or intersecting element.