Hide Table of Contents
ICreateSpline2 Method (ISketchManager)

Creates a spline passing through the given points.

.NET Syntax

Visual Basic (Declaration) 
Function ICreateSpline2( _
   ByVal PointCount As System.Integer, _
   ByRef PointData As System.Double, _
   ByVal SimulateNaturalEnds As System.Boolean _
) As SketchSegment
Visual Basic (Usage) 
Dim instance As ISketchManager
Dim PointCount As System.Integer
Dim PointData As System.Double
Dim SimulateNaturalEnds As System.Boolean
Dim value As SketchSegment
value = instance.ICreateSpline2(PointCount, PointData, SimulateNaturalEnds)
SketchSegment ICreateSpline2( 
   System.int PointCount,
   ref System.double PointData,
   System.bool SimulateNaturalEnds
SketchSegment^ ICreateSpline2( 
&   System.int PointCount,
&   System.double% PointData,
&   System.bool SimulateNaturalEnds


Number of points in the spline
  • in-process, unmanaged C++: Pointer to an array of X,Y,Z point coordinates to use in creating the spline (see Remarks)
  • VBA, VB.NET, C#, and C++/CLI: Not supported

    See In-process Methods for details about this type of method.

  • SimulateNaturalEnds
    True to simulate natural ends, false to not

    Return Value

    Sketch segment for the spline


    This method creates a spline in the active 2D sketch. If a sketch is not active, then a new sketch is created. Use ISketchManager::ActiveSketch to check if the sketch active.

    The PointData array is a set of, at least, two X, Y, Z values. The X value for the start point of the spline is PointData[0], the Y value for the start point is PointData[1], and the Z value for the start point is PointData[2]. The X value for the next point is PointData[3], and so on.

    This method does not work with ISketchManager::AddToDB or ISketchManager::DisplayWhenAdded. It always adds the spline directly to the database (as if ISketchManager::AddToDB(True) was in effect), and you must redraw your document window to see the entities that you added (as if ISketchManager::DisplayWhenAdded(False) was in effect).

    In 2D sketches, SolidWorks ignores the Z value in PointData.


    See Also


    SolidWorks 2009 FCS, Revision Number 17.0

    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:   ICreateSpline2 Method (ISketchManager)
    *   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) 2013 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.