Creates a new instance of an unbound linear curve.

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

Syntax

C#
public static Line CreateUnbound(
	XYZ origin,
	XYZ direction
)
Visual Basic
Public Shared Function CreateUnbound ( _
	origin As XYZ, _
	direction As XYZ _
) As Line
Visual C++
public:
static Line^ CreateUnbound(
	XYZ^ origin, 
	XYZ^ direction
)

Parameters

origin
Type: Autodesk.Revit.DB..::..XYZ
The origin of the unbound line.
direction
Type: Autodesk.Revit.DB..::..XYZ
The direction of the unbound line.

Return Value

The new unbound line.

Examples

CopyC#
// define start point and direction for unbound line
XYZ startPoint = new XYZ(0, 0, 0);
XYZ directionPt = new XYZ(10, 10, 10);

// create line
Line line = Line.CreateUnbound(startPoint, directionPt);
CopyVB.NET
' define start point and direction for unbound line
Dim startPoint As New XYZ(0, 0, 0)
Dim directionPt As New XYZ(10, 10, 10)

' create line
Dim line__1 As Line = Line.CreateUnbound(startPoint, directionPt)

Exceptions

ExceptionCondition
Autodesk.Revit.Exceptions..::..ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions..::..ArgumentOutOfRangeException direction has zero length.
Autodesk.Revit.Exceptions..::..ArgumentsInconsistentException Vector and origin cannot form a proper unbound line.

See Also