AddReferenceCurve Method (Curve, DirectShapeReferenceOptions)


Adds a reference curve to the DirectShapeType.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2022

Syntax

C#
public void AddReferenceCurve(
	Curve refCurve,
	DirectShapeReferenceOptions options
)
Visual Basic
Public Sub AddReferenceCurve ( _
	refCurve As Curve, _
	options As DirectShapeReferenceOptions _
)
Visual C++
public:
void AddReferenceCurve(
	Curve^ refCurve, 
	DirectShapeReferenceOptions^ options
)

Parameters

refCurve
Type: Autodesk.Revit.DB Curve
The geometry of the new reference curve. First case: The input curve's bounds are set. The resulting reference curve that is added to the DirectShapeType will be displayed with those bounds. Note that the specified bounds must not be degenerate. Second case: The input curve is unbounded. Reasonable bounds are therefore automatically calculated and applied to the input curve. The automatic bounds are based on the host direct shape's geometry. Note that only lines and splines may be unbounded. You must specify valid bounds for all other curve types.
options
Type: Autodesk.Revit.DB DirectShapeReferenceOptions
The options that are used to configure the new reference curve.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException refCurve cannot be used for creating a reference curve.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null

See Also