DirectShapeTypeAddReferenceCurve(Curve, DirectShapeReferenceOptions) Method |
Adds a reference curve to the DirectShapeType.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic void AddReferenceCurve(
Curve refCurve,
DirectShapeReferenceOptions options
)
Public Sub AddReferenceCurve (
refCurve As Curve,
options As DirectShapeReferenceOptions
)
public:
void AddReferenceCurve(
Curve^ refCurve,
DirectShapeReferenceOptions^ options
)
member AddReferenceCurve :
refCurve : Curve *
options : DirectShapeReferenceOptions -> unit
Parameters
- refCurve Curve
-
The geometry of the new reference curve.
- options DirectShapeReferenceOptions
-
The options that are used to configure the new reference curve.
ExceptionsException | Condition |
---|
ArgumentException |
refCurve cannot be used for creating a reference curve.
-or-
options cannot be used to add a reference object to this DirectShapeType.
|
ArgumentNullException |
A non-optional argument was null
|
Remarks
There are two cases to consider:
- 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. Permitted curve types are those for which [!:Autodesk::Revit::DB::DirectShapeType::isValidReferenceCurve] returns true.
- The input curve is unbounded. Reasonable bounds are automatically calculated and applied to the input curve.
The automatic bounds are based on the host DirectShapeType's geometry.
Note that only lines and splines may be unbounded. You must specify valid bounds for all other curve types.
See Also