CreateCurve Method


Creates a new geometric ellipse or elliptical arc object.

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

Syntax

C#
public static Curve CreateCurve(
	XYZ center,
	double xRadius,
	double yRadius,
	XYZ xAxis,
	XYZ yAxis,
	double startParameter,
	double endParameter
)
Visual Basic
Public Shared Function CreateCurve ( _
	center As XYZ, _
	xRadius As Double, _
	yRadius As Double, _
	xAxis As XYZ, _
	yAxis As XYZ, _
	startParameter As Double, _
	endParameter As Double _
) As Curve
Visual C++
public:
static Curve^ CreateCurve(
	XYZ^ center, 
	double xRadius, 
	double yRadius, 
	XYZ^ xAxis, 
	XYZ^ yAxis, 
	double startParameter, 
	double endParameter
)

Parameters

center
Type: Autodesk.Revit.DBXYZ
The center.
xRadius
Type: SystemDouble
The x vector radius of the ellipse.
yRadius
Type: SystemDouble
The y vector radius of the ellipse.
xAxis
Type: Autodesk.Revit.DBXYZ
The x axis to define the ellipse plane. Must be normalized.
yAxis
Type: Autodesk.Revit.DBXYZ
The y axis to define the ellipse plane. Must be normalized.
startParameter
Type: SystemDouble
The raw parameter value at the start of the ellipse.
endParameter
Type: SystemDouble
The raw parameter value at the end of the ellipse.

Return Value

The new ellipse or elliptical arc.

Remarks

If the angle range is equal to or greater than 2 * PI, the curve will be automatically converted to an unbounded ellipse. If xRadius and yRadius are almost equal, the curve will be returned as an arc.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was NULL
Autodesk.Revit.ExceptionsArgumentOutOfRangeException The given value for xRadius must be greater than 0 and no more than 30000 feet. -or- The given value for yRadius must be greater than 0 and no more than 30000 feet. -or- xAxis is not length 1.0. -or- yAxis is not length 1.0.
Autodesk.Revit.ExceptionsArgumentsInconsistentException The vectors xAxis and yAxis are not perpendicular. -or- Start parameter must be less than end parameter. -or- Curve length is too small for Revit's tolerance (as identified by Application.ShortCurveTolerance).

See Also