Autodesk.Revit.DB.CurveArrArray is a class in the Autodesk Revit API that represents an array of CurveArray objects. Each CurveArray represents a collection of curves that form a continuous loop or a series of connected segments in a plane.
The properties of the Autodesk.Revit.DB.CurveArrArray class are:
The methods of the Autodesk.Revit.DB.CurveArrArray class are:
The following code example demonstrates how to create an instance of the Autodesk.Revit.DB.CurveArrArray class and add CurveArray objects to it:
// Create a CurveArrArray object
CurveArrArray curveArrArray = new CurveArrArray();
// Create two CurveArray objects
CurveArray curveArray1 = new CurveArray();
curveArray1.Append(Line.CreateBound(new XYZ(0, 0, 0), new XYZ(10, 0, 0)));
curveArray1.Append(Line.CreateBound(new XYZ(10, 0, 0), new XYZ(10, 10, 0)));
curveArray1.Append(Line.CreateBound(new XYZ(10, 10, 0), new XYZ(0, 10, 0)));
curveArray1.Append(Line.CreateBound(new XYZ(0, 10, 0), new XYZ(0, 0, 0)));
CurveArray curveArray2 = new CurveArray();
curveArray2.Append(Line.CreateBound(new XYZ(0, 0, 0), new XYZ(0, 10, 0)));
curveArray2.Append(Line.CreateBound(new XYZ(0, 10, 0), new XYZ(-10, 10, 0)));
curveArray2.Append(Line.CreateBound(new XYZ(-10, 10, 0), new XYZ(-10, 0, 0)));
curveArray2.Append(Line.CreateBound(new XYZ(-10, 0, 0), new XYZ(0, 0, 0)));
// Add the CurveArray objects to the CurveArrArray object
curveArrArray.Append(curveArray1);
curveArrArray.Append(curveArray2);
In the above example, a new instance of the Autodesk.Revit.DB.CurveArrArray class is created using the default constructor. Two instances of the Autodesk.Revit.DB.CurveArray class are created and their properties are set using the Append method. Finally, the two instances of the Autodesk.Revit.DB.CurveArray class are added to the Autodesk.Revit.DB.CurveArrArray object using the Append method.
The Autodesk.Revit.DB.CurveArrArray class provides a convenient way to represent an array of CurveArray objects in Autodesk Revit. It provides methods for adding, inserting, removing, and accessing CurveArray objects in the array. It is a useful class for creating and manipulating curves in Autodesk Revit.