Hide Table of Contents
IGetDistance Method (IEntity)

Gets the minimum or maximum distance between this entity and the given face or edge entity (see Remarks).

.NET Syntax

Visual Basic (Declaration) 
Function IGetDistance( _
   ByVal BaseEntity As Entity, _
   ByVal MinDistance As System.Boolean, _
   ByRef Parameter As System.Double, _
   ByRef Position1 As System.Double, _
   ByRef Position2 As System.Double, _
   ByRef Distance As System.Double _
) As System.Integer
Visual Basic (Usage) 
Dim instance As IEntity
Dim BaseEntity As Entity
Dim MinDistance As System.Boolean
Dim Parameter As System.Double
Dim Position1 As System.Double
Dim Position2 As System.Double
Dim Distance As System.Double
Dim value As System.Integer
 
value = instance.IGetDistance(BaseEntity, MinDistance, Parameter, Position1, Position2, Distance)
C# 
System.int IGetDistance( 
   Entity BaseEntity,
   System.bool MinDistance,
   ref System.double Parameter,
   out System.double Position1,
   out System.double Position2,
   out System.double Distance
)
C++/CLI 
System.int IGetDistance( 
&   Entity^ BaseEntity,
&   System.bool MinDistance,
&   System.double% Parameter,
&   [Out] System.double Position1,
&   [Out] System.double Position2,
&   [Out] System.double Distance
) 

Parameters

BaseEntity
IEntity of another edge or face to get distance from this entity (see Remarks)
MinDistance
True to return minimum distance; false to return maximum distance
Parameter

For in-process, unmanaged C++:

If MinDistance = False,

  • and BaseEntity is an edge or curve, specify an array of two doubles (Min, Max), where Min and Max make up the U-parameter range of BaseEntity
  • and BaseEntity is a face, specify an array of four doubles (UMin, VMin, UMax, VMax), where UMin, VMin, UMax, and VMax make up the UV-parameter range of the surface of BaseEntity

If MinDistance = True,

  • and BaseEntity is an edge or curve, optionally specify an array of two doubles (Min, Max), where Min and Max make up the U-parameter range of BaseEntity
  • and BaseEntity is a face, optionally specify an array of four doubles (UMin, VMin, UMax, VMax), where UMin, VMin, UMax, and VMax make up the UV-parameter range of the surface of BaseEntity

For VBA, VB.NET, C#, and C++/CLI: Not supported

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

Position1
  • For in-process, unmanaged C++: pointer to an array of doubles (coordinates of this entity that were used to measure the distance)
  • For VBA, VB.NET, C#, and C++/CLI: Not supported

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

Position2
  • For in-process, unmanaged C++: pointer to an array of doubles (coordinates of BaseEntity that were used to measure the distance)
  • For VBA, VB.NET, C#, and C++/CLI: Not supported

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

  • Distance
    Minimum or maximum distance between entities; if Parameter is not specified, the minimum distance

    Return Value

    0 if success; -1 if failure

    Remarks

    Only face and edge entities are supported.

    To populate Parameter you can find the UV parameter ranges as follows:

     

    See Also

    Availability

    SOLIDWORKS 2009 SP5, Revision Number 17.5


    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:   IGetDistance Method (IEntity)
    *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.