Hide Table of Contents
CreateSpline3 Method (ISketchManager)

Creates either a 2D spline or a spline constrained to a surface.

.NET Syntax

Visual Basic (Declaration) 
Function CreateSpline3( _
   ByVal PointData As System.Object, _
   ByVal Surfs As System.Object, _
   ByVal Direction As System.Object, _
   ByVal SimulateNaturalEnds As System.Boolean, _
   ByRef Status As System.Object _
) As System.Object
Visual Basic (Usage) 
Dim instance As ISketchManager
Dim PointData As System.Object
Dim Surfs As System.Object
Dim Direction As System.Object
Dim SimulateNaturalEnds As System.Boolean
Dim Status As System.Object
Dim value As System.Object
 
value = instance.CreateSpline3(PointData, Surfs, Direction, SimulateNaturalEnds, Status)
C# 
System.object CreateSpline3( 
   System.object PointData,
   System.object Surfs,
   System.object Direction,
   System.bool SimulateNaturalEnds,
   out System.object Status
)
C++/CLI 
System.Object^ CreateSpline3( 
&   System.Object^ PointData,
&   System.Object^ Surfs,
&   System.Object^ Direction,
&   System.bool SimulateNaturalEnds,
&   [Out] System.Object^ Status
) 

Parameters

PointData
Array of X,Y,Z coordinates of the spline points (see Remarks)
Surfs
Array of ISurface objects; null or Nothing for 2D splines (see Remarks)
Direction
Array of IMathVector objects; valid only for on-surface splines (see Remarks)
SimulateNaturalEnds
True to simulate natural ends, false to not; valid only for 2D splines (see Remarks)
Status
Array of boolean values; empty for 2D splines (see Remarks)

Return Value

ISketchSegment or null if an error

Example

Remarks

This method allows you to create:

  • 2D splines.
  • On-surface splines as can also be created using Tools > Sketch Entities > Spline on Surface.

To create a 2D spline, specify:

  • PointData with at least six coordinates (for the start and end points of the spline):

          [start_pt_x, start_pt_y, start_pt_z, end_pt_x, end_pt_y, end_pt_z]

    For 2D sketches, SOLIDWORKS assumes PointData contains no Z values.
  • SimulateNaturalEnds with true for zero curvature end conditions or false to maintain curvature at the ends. 
  • All other parameters with null or Nothing.

To create an on-surface spline, specify:

  • PointData with two or more points anywhere in 3D space. Each spline point will project onto a surface in the Surf array, depending on the direction vector specified for each point in the Direction array.
  • Surf with an array of surfaces onto which the PointData is projected.
  • Direction with an array of vectors, which are projection directions for every point in the PointData array. If Direction is Nothing or null, then the view vector for the current screen view is used to project each point onto a surface.

For on-surface splines only, Status contains an array of statuses, one for each point in PointArray. True indicates that the point successfully projects onto one of the surfaces. False indicates either:

  • the point does not "hit" any of the specified surfaces using the direction that the point is mapped to in the Direction array,

   - or -

  • the spline cannot be continued at that point where the surfaces are no longer contiguous.

This method:

  • Creates the 2D spline in the active sketch. If a sketch is not active, then a new sketch is created. Use ISketchManager::ActiveSketch to check if the sketch active.
  • Creates a new 3D sketch to create the on-surface spline. Call ISketchManager::InsertSketch to finalize the sketch.
  • 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).
 

See Also

Availability

SOLIDWORKS 2018 FCS, Revision Number 26.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

 
*Email:  
Subject:   Feedback on Help Topics
Page:   CreateSpline3 Method (ISketchManager)
*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) 2019 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.