The Autodesk.Revit.DB.CurveByPointsArrayIterator class represents an iterator over an array of points that defines a curve.
CurrentCurve: Returns the Curve object that is represented by the current position of the iterator.CurrentPoint: Returns the XYZ object that is representing the current point in the array.Clone(): Creates a copy of the iterator.Dispose(): Deallocates any resources used by the iterator.MoveNext(): Advances the iterator to the next position in the array.CurveByPointsArrayIterator class is used for iterating over an array of points that define a curve.CurrentCurve property is only valid if MoveNext() has been called and returned true.Dispose() method should be called when the iterator is no longer needed.CurveByPointsArray curve = new CurveByPointsArray(points.ToArray());
CurveByPointsArrayIterator iter = curve.GetIterator();
while (iter.MoveNext())
{
Curve currentCurve = iter.CurrentCurve;
// Do something with the current curve, for example draw it
// or calculate its length.
}
iter.Dispose();
Autodesk.Revit.DB.CurveAutodesk.Revit.DB.CurveByPointsAutodesk.Revit.DB.CurveByPointsArray