Hide Table of Contents
Evaluate2 Method (IEdge)

Evaluates the edge for the specified U parameter.

.NET Syntax

Visual Basic (Declaration) 
Function Evaluate2( _
   ByVal Parameter As System.Double, _
   ByVal NumberOfDerivatives As System.Integer _
) As System.Object
Visual Basic (Usage) 
Dim instance As IEdge
Dim Parameter As System.Double
Dim NumberOfDerivatives As System.Integer
Dim value As System.Object
value = instance.Evaluate2(Parameter, NumberOfDerivatives)
System.object Evaluate2( 
   System.double Parameter,
   System.int NumberOfDerivatives
System.Object^ Evaluate2( 
&   System.double Parameter,
&   System.int NumberOfDerivatives


Curve parameter U value (see Remarks)
Number of derivatives (see Remarks)

Return Value

Array of doubles  (see Remarks)


  1. Open a part in SOLIDWORKS.
  2. Open an Immediate window.
  3. Select an edge.
  4. Run this VBA macro:
Option Explicit
Dim swApp As SldWorks.SldWorks
Dim Part As SldWorks.ModelDoc2
Dim boolstatus As BooleanDim longstatus As Long, longwarnings As Long
Type DoubleRec   
dValue As Double '64 bits, 8 bytes
End Type
Type Int2Rec 
iLower As Long '4 bytes
iUpper As Long '4 bytes
End Type
' Unpack the status double
Function DoubleToLong(ByVal dVal As Double) As Long
Dim dr As DoubleRec
Dim i2r As Int2Rec
' Set the double value
dr.dValue = dVal
' Copy the values
LSet i2r = dr
' Extract the status value
DoubleToLong = i2r.iLower
End Function
Sub main()
    Dim status As Long
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Dim myModelView As SldWorks.ModelView
Set myModelView = Part.ActiveView
myModelView.FrameState = swWindowState_e.swWindowMaximized
Dim swSelectMgr As SldWorks.SelectionMgr
Set swSelectMgr = Part.SelectionManager
Dim swEdge As SldWorks.Edge
Set swEdge = swSelectMgr.GetSelectedObject6(1, -1)
Dim swCurve As SldWorks.Curve
Dim swCurveParamData As SldWorks.CurveParamData
Set swCurve = swEdge.GetCurve
Set swCurveParamData = swEdge.GetCurveParams3
Debug.Print "The maximum U parameter value is: " & swCurveParaData.UMaxValue
Debug.Print "The minimum U parameter value is: " & swCurveParaData.UMinValue
Dim pt As Variant
pt = swEdge.Evaluate2(swCurveParaData.UMaxValue, 0)
status = DoubleToLong(pt(UBound(pt)))
If status Then
Debug.Print " The evaluated point at UMax is: = " & pt(0) & ", " & pt(1) & ", " & pt(2)
Debug.Print "***** Error!"
End If
End Sub


Use IEdge::GetCurveParams3 to determine the valid range of U parameter values for Parameter.

The returned array contains ((NumberOfDerivatives + 1) * 3) + 1 doubles:

[evaluated_point], [evaluated_derivative_1],...[evaluated_derivative_NumberOfDerivatives, [status_code]

where status_code is a packed double. After unpacking status_code into two longs, the lower long value is 1 for success or 0 for error. See the Example. 

If curve type ICurve::Identity is...

Then the maximum number of derivatives is...



Intersection curve


Constant parameter line

Determined by underlying surface




Any number


For a curve of type swCurveTypes_e::TRIMMED_TYPE, the number of derivatives is determined by the base curve as obtained from ICurve::GetBaseCurve.


See Also

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:   Evaluate2 Method (IEdge)
*   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) 2018 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.