Hide Table of Contents
GetSplineParams Method (ISketchBlockDefinition)

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

.NET Syntax

Visual Basic (Declaration) 
Function GetSplineParams() As Object
Visual Basic (Usage) 
Dim instance As ISketchBlockDefinition
Dim value As Object
 
value = instance.GetSplineParams()
C# 
object GetSplineParams()
C++/CLI 
Object^ GetSplineParams(); 

Return Value

Array of doubles, containing spline parameters (see Remarks)

Remarks

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

  0

Dim

Order

  1

nCtrlPoints

Periodic

 

where: 

  • 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:

 

Periodic:

numKnots = nCtrlPoints + 1

Non-Periodic:

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

  i

Color

lineStyle

  i+1

lineWidth

Layer

  i+2

layerOverride

Not used

 

where: 

  • 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

Availability

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

 
*Email:  
Subject:   Feedback on Help Topics
Page:   GetSplineParams Method (ISketchBlockDefinition)
*Comment:  
*   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:

x

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
x

Web Help Content Version: API Help (English only) 2010 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.