Create Method (XYZ, XYZ, XYZ)


Creates a new geometric arc object based on three points.

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(
	XYZ end0,
	XYZ end1,
	XYZ pointOnArc
)
Visual Basic
Public Shared Function Create ( _
	end0 As XYZ, _
	end1 As XYZ, _
	pointOnArc As XYZ _
) As Arc
Visual C++
public:
static Arc^ Create(
	XYZ^ end0, 
	XYZ^ end1, 
	XYZ^ pointOnArc
)

Parameters

end0
Type: Autodesk.Revit.DBXYZ
The start point of the arc.
end1
Type: Autodesk.Revit.DBXYZ
The end point of the arc.
pointOnArc
Type: Autodesk.Revit.DBXYZ
A point on the arc.

Return Value

The new arc.

Examples

CopyC#
// Create a new arc using two ends and a point on the curve
XYZ end0 = new XYZ(1, 0, 0);    // start point of the arc
XYZ end1 = new XYZ(10, 10, 10); // end point of the arc
XYZ pointOnCurve = new XYZ(10, 0, 0);   // point along arc

Arc arc = Arc.Create(end0, end1, pointOnCurve);
CopyVB.NET
' Create a new arc using two ends and a point on the curve
Dim end0 As New XYZ(1, 0, 0)
' start point of the arc
Dim end1 As New XYZ(10, 10, 10)
' end point of the arc
Dim pointOnCurve As New XYZ(10, 0, 0)
' point along arc
Dim arc__1 As Arc = Arc.Create(end0, end1, pointOnCurve)

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was NULL
Autodesk.Revit.ExceptionsArgumentsInconsistentException The vectors end0 and end1 are coincident. -or- The vectors end0 and pointOnArc are coincident. -or- The vectors end1 and pointOnArc are coincident. -or- Cannot create an arc. -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 →