Hide Table of Contents
CreateSpline Method (IModelDoc2)

Obsolete. Superseded by ISketchManager::CreateSpline.

.NET Syntax

Visual Basic (Declaration) 
Function CreateSpline( _
   ByVal PointData As System.Object _
) As System.Object
Visual Basic (Usage) 
Dim instance As IModelDoc2
Dim PointData As System.Object
Dim value As System.Object
 
value = instance.CreateSpline(PointData)
C# 
System.object CreateSpline( 
   System.object PointData
)
C++/CLI 
System.Object^ CreateSpline( 
&   System.Object^ PointData
) 

Parameters

PointData

Set of X,Y,Z point coordinates to use in creating the spline (see Remarks)

Return Value

Newly created spline

Example

Remarks

This method creates a spline in the active 2D sketch. If a sketch is not active, then a new sketch is created. Use IModelDoc2::GetActiveSketch2 or IModelDoc2::IGetActiveSketch2 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. For the COM interface, the total number of points in the array must be passed in. For the OLE interface, the total number of points are determined automatically, by taking the UBound of the PointData VARIANT and dividing by 3, so be careful to dimension that array correctly.

For COM applications, you can use the object pointer returned from this method to call any APIs on the ISketchSegment interface. You can obtain the underlying ISketchSpline object by using QueryInterface on the returned ISketchSegment object.

OLE applications can define a new ISketchSegment or ISketchSpline object using the returned Dispatch pointer. Visual Basic applications interpret the pointer for you automatically, so you can use the returned object to call SketchSegment or ISketchEllipse APIs.

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

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

 

See Also

Availability

SOLIDWORKS 2001Plus FCS, Revision Number 10.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:   CreateSpline Method (IModelDoc2)
*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) 2015 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.