Create Method (Plane, Double, Double, Double)


Creates a new geometric arc object based on plane, radius, and angles.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2014

Syntax

C#
public static Arc Create(
	Plane plane,
	double radius,
	double startAngle,
	double endAngle
)
Visual Basic
Public Shared Function Create ( _
	plane As Plane, _
	radius As Double, _
	startAngle As Double, _
	endAngle As Double _
) As Arc
Visual C++
public:
static Arc^ Create(
	Plane^ plane, 
	double radius, 
	double startAngle, 
	double endAngle
)

Parameters

plane
Type: Autodesk.Revit.DBPlane
The plane which the arc resides. The plane's origin is the center of the arc.
radius
Type: SystemDouble
The radius of the arc.
startAngle
Type: SystemDouble
The start angle of the arc (in radians).
endAngle
Type: SystemDouble
The end angle of the arc (in radians).

Return Value

The new arc.

Remarks

If the angle range is equal to or greater than 2 * PI, the curve will be automatically converted to an unbounded circle.

Examples

CopyC#
Arc CreateArcByGivingPlane(Autodesk.Revit.ApplicationServices.Application application, Plane plane)
{
    // Create an arc which is placed on the plane and whose center is the plane's origin
    double radius = 10;
    double startAngle = 0;      // The unit is radian
    double endAngle = 2 * Math.PI;        // this arc will be a circle
    return Arc.Create(plane, radius, startAngle, endAngle);
}
CopyVB.NET
Private Function CreateArcByGivingPlane(application As Autodesk.Revit.ApplicationServices.Application, plane As Plane) As Arc
    ' Create an arc which is placed on the plane and whose center is the plane's origin
    Dim radius As Double = 10
    Dim startAngle As Double = 0
    ' The unit is radian
    Dim endAngle As Double = 2 * Math.PI
    ' this arc will be a circle
    Return Arc.Create(plane, radius, startAngle, endAngle)
End Function

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was NULL
Autodesk.Revit.ExceptionsArgumentOutOfRangeException The given value for radius must be greater than 0 and no more than 30000 feet.
Autodesk.Revit.ExceptionsArgumentsInconsistentException Start angle must be less than end angle. -or- Curve length is too small for Revit's tolerance (as identified by Application.ShortCurveTolerance).

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →