CreateBound Method


Creates a new instance of a bound linear curve.

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

Syntax

C#
public static Line CreateBound(
	XYZ endpoint1,
	XYZ endpoint2
)
Visual Basic
Public Shared Function CreateBound ( _
	endpoint1 As XYZ, _
	endpoint2 As XYZ _
) As Line
Visual C++
public:
static Line^ CreateBound(
	XYZ^ endpoint1, 
	XYZ^ endpoint2
)

Parameters

endpoint1
Type: Autodesk.Revit.DB XYZ
The first line endpoint.
endpoint2
Type: Autodesk.Revit.DB XYZ
The second line endpoint.

Return Value

The new bound line.

Examples

Copy C#
// define start and end for bound line
XYZ startPoint = new XYZ(0, 0, 0);
XYZ endPoint = new XYZ(10, 10, 10);

// create line
Line line = Line.CreateBound(startPoint, endPoint);
Copy VB.NET
' define start and end for bound line
Dim startPoint As New XYZ(0, 0, 0)
Dim endPoint As New XYZ(10, 10, 10)

' create line
Dim line__1 As Line = Line.CreateBound(startPoint, endPoint)

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions ArgumentsInconsistentException Curve length is too small for Revit's tolerance (as identified by Application.ShortCurveTolerance).

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →