Creates a new instance of an unbound linear curve.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2014
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
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

// 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);

' 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
Exception | Condition |
---|---|
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. |