Hide Table of Contents
IGetSplineParams Method (ISketchBlockDefinition)

Gets all the parameters of the splines in the sketch block definition.

.NET Syntax

Visual Basic (Declaration) 
Function IGetSplineParams( _
   ByVal ArraySize As Integer _
) As Double
Visual Basic (Usage) 
Dim instance As ISketchBlockDefinition
Dim ArraySize As Integer
Dim value As Double
value = instance.IGetSplineParams(ArraySize)
double IGetSplineParams( 
   int ArraySize
double IGetSplineParams( 
&   int ArraySize


Size of the array needed to hold the spline parameters data

Return Value

  • in-process, unmanaged C++: Pointer to an array of doubles, containing spline parameters (see Remarks)
  • VBA, VB.NET, C#, and C++/CLI: Not supported
  • See In-process Methods for details about this type of method.


    Call ISketchBlockDefinition::GetSplineParamsCount before calling this method to get the value for ArraySize.

    The return value is an array of doubles containing data for all the splines in the sketch block definitioni.

    The first two array elements for each spline contain 4 integer values holding information that describes the rest of the data in that splines parameters:


     Spline Element

    Packed Data

    low part

    high part









    • Dim is the number of dimensions the spline is defined in

    • Order is the order of the spline

    • nCtrlPoints is the number of control points

    • Periodic is 1 for a closed spline or 0 for an open spline

    The number of knots depends on whether the spline is periodic or not:



    numKnots = nCtrlPoints + 1


    numKnots = nCtrlPoints + Order


    The last three array elements for each spline contain 5 integer values holding style and layer information:


     Spline Element

    Packed Data

    low part

    high part









    Not used



    • i is the index following the last Knot or [2 + numKnots + numControlPointDoubles * Dim]

    • Color is the COLORREF value describing the color used for the ith spline

    • lineStyle is the line style used for the ith spline. Valid values can be found in the swLineStyles_e enumeration

    • lineWidth is line width used for the ith spline. Valid values can be found in the swLineWeights_e enumeration

    • Layer is an integer index to the layer that the ith spline is on

    • layerOverride is integer with bit flags set to determine which properties, if any, have been overridden or should be overridden.

    Therefore, the size of the data for each spline is given by:

    2 + numKnots + numControlPointDoubles * Dim + 3

    The ControlPoint data (in the sketch coordinate system) follows the 2 packed data elements, the Knot points, and, finally, the last 3 packed data elements. Subsequent splines follow one another in the array.

    [ packedDouble1, packedDouble2, ControlPoint1[Dimension elements], ControlPoint2[Dimension elements],... knot1, knot2,..., packedDouble3, packedDouble4, packedDouble5, ]

    For information about unpacking double arrays into integer pairs, see:


    See Also


    SolidWorks 2007 SP2, Revision Number 15.2

    Provide feedback on this topic

    SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

    * Required

    Subject:   Feedback on Help Topics
    Page:   IGetSplineParams Method (ISketchBlockDefinition)
    *   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

    Print Topic

    Select the scope of content to print:


    We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

     Never show this message again

    Web Help Content Version: API Help (English only) 2012 SP05

    To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

    To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.