Hide Table of Contents
Distance Method (IMathUtility)
Result[out]
Distance between the specified objects

Gets the distance between the specified mathematical objects. Also gets the points used to measure the distance.

.NET Syntax

Visual Basic (Declaration) 
Function Distance( _
   dsObject* Object1 As System.Object, _
   dsObject* Object2 As System.Object, _
   dsMathPoint** Point1 As MathPoint, _
   dsMathPoint** Point2 As MathPoint _
) As System.Double
C# 
System.double Distance( 
   System.object Object1,
   System.object Object2,
   out MathPoint Point1,
   out MathPoint Point2
)
JavaScript 
Distance( 
   Object1 : Object,
   Object2 : Object
) : {
   Point1 : dsMathPoint,
   Point2 : dsMathPoint,
   Result : Number
}
COM native C++ 
HRESULT Distance( 
   IDispatch* Object1,
   IDispatch* Object2,
   IMathPoint** Point1,
   IMathPoint** Point2,
   DOUBLE* Result
) 
C++ 
DSRESULT Distance( 
   dsObject* Object1,
   dsObject* Object2,
   dsMathPoint** Point1,
   dsMathPoint** Point2,
   double* Result
) 

Parameters

Object1
Math object (see Remarks)
Object2
Math object (see Remarks)
Point1[out]
IMathPoint on Object1 used to measure the distance
Point2[out]
IMathPoint on Object2 used to measure the distance
Result[out] or Return Value
Distance between the specified objects

Example

Remarks

The possible Object1-Object2 distance types:

  • IMathPoint - IMathPoint
  • IMathLine - IMathPoint
  • IMathLine - IMathLine
  • IMathLine - IMathCircArc
  • IMathLine - IMathEllipArc
  • IMathCircArc - IMathPoint
  • IMathCircArc - IMathLine
  • IMathCircArc - IMathCircArc
  • IMathCircArc - IMathEllipArc
  • IMathEllipArc - IMathPoint
  • IMathEllipArc - IMathLine
  • IMathEllipArc - IMathCircArc
  • IMathEllipArc - IMathEllipArc
  • IMathPlane - IMathPoint
 

See Also

Availability

DraftSight V1R1.4


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:   Distance Method (IMathUtility)
*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) 2023 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.