Creates a new instance of an unbound linear curve.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.1.0.0 (26.1.0.34)
Syntax
C#
public static Line CreateUnbound( XYZ origin, XYZ direction )
Parameters
Return Value
LineThe new unbound line.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | A non-optional argument was NULL |
ArgumentOutOfRangeException | direction has zero length. |
ArgumentsInconsistentException | Vector and origin cannot form a proper unbound line. |
Example
C#
// 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);
VB
' 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)