GetNumberOfKnots

Categories

modeling drawing

Description

Gets the number of distinct knots on a curve. The multiplicity of a knot is not taken into account.

Note: This command uses output arguments. C# and some scripting languages (such as JScript, PerlScript and Python) don't support arguments passed by reference so you need to use the best workaround for your situation:

For scripting languages this command returns an ISIVTCollection which you can use to get the output arguments.

For C# you can use the XSIApplication.ExecuteCommand method to call this command. ExecuteCommand packs the output arguments into a C# System.Object containing an Array of the output arguments (see Calling Commands from C#).

Scripting Syntax

GetNumberOfKnots( InputObj, [NbItems] );

Parameters

Parameter Type Description
InputObj String Curve to evaluate.
NbItems Integer Returns the number of knots.

Examples

VBScript Example

'This example shows how to get the number of distinct knots from a curve
newscene
dim nbKnots
'Create a standard spiral with 16 subdivisions.
CreatePrim "Spiral", "NurbsCurve"       
' Get the number of knots. 
GetNumberOfKnots "Spiral", nbKnots 
logmessage "Number of Knots: " & nbKnots

See Also

GetCurveLength GetCurvePercentageAtKnotIndex EvaluateCurveAt