Create Method (IList(XYZ), IList(Double))


Creates a new geometric NurbSpline object using the same calculations that Revit uses when sketching splines in the user interface.

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

Syntax

C#
[ObsoleteAttribute("This function will be obsolete in Revit 2017. Use NurbSpline.CreateCurve(controPoints, weights) instead")]
public static NurbSpline Create(
	IList<XYZ> controlPoints,
	IList<double> weights
)
Visual Basic
<ObsoleteAttribute("This function will be obsolete in Revit 2017. Use NurbSpline.CreateCurve(controPoints, weights) instead")> _
Public Shared Function Create ( _
	controlPoints As IList(Of XYZ), _
	weights As IList(Of Double) _
) As NurbSpline
Visual C++
[ObsoleteAttribute(L"This function will be obsolete in Revit 2017. Use NurbSpline.CreateCurve(controPoints, weights) instead")]
public:
static NurbSpline^ Create(
	IList<XYZ^>^ controlPoints, 
	IList<double>^ weights
)

Parameters

controlPoints
Type: System.Collections.Generic IList XYZ
The control points of the NURBSpline.
weights
Type: System.Collections.Generic IList Double
The weights of the NURBSpline.

Return Value

The new NurbSpline object.

Remarks

Knots and degree of the spline are computed from the control points and weights.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions ArgumentsInconsistentException The control points array must contain at least 4 points. -or- The weights array must be the same size as the control points array. -or- Curve length is too small for Revit's tolerance (as identified by Application.ShortCurveTolerance).

See Also