The Autodesk.Revit.DB.DimensionSegmentArrayIterator
is a class that provides a means to iterate through a DimensionSegmentArray
. It allows the developer to access the individual DimensionSegment
objects that make up the array. This class is part of the Revit API and is used for automating tasks within Revit.
DimensionSegment
object in the iteration.DimensionSegment
object in the array. Returns true if successful, false if at the end of the array.To use the DimensionSegmentArrayIterator
class, first create an instance of the class and pass in the DimensionSegmentArray
you wish to iterate through:
DimensionSegmentArrayIterator iterator = new DimensionSegmentArrayIterator(dimSegmentArray);
Then, to access each DimensionSegment
object in the array, use the MoveNext()
method in a loop:
while(iterator.MoveNext())
{
DimensionSegment segment = iterator.Current;
// Do something with this segment
}
The Autodesk.Revit.DB.DimensionSegmentArrayIterator
class is a useful tool for accessing the individual DimensionSegment
objects within a DimensionSegmentArray
. By using it, developers can automate tasks within Revit that involve working with dimension segments.