IntelliCAD 11.1 Object Library
CalculateDistance Method
See Also 
Point1
The first Point object.
Point2
The second Point object.
Library Object : CalculateDistance Method

Description

Calculates the distance between two user specified points.

Syntax

Visual Basic
Public Function CalculateDistance( _
   ByVal Point1 As Point, _
   ByVal Point2 As Point _
) As Double

Parameters

Point1
The first Point object.
Point2
The second Point object.

Example

Private Sub CalculateDistance_Example()

Dim icadDoc As IntelliCAD.Document

     Dim Pt1 As IntelliCAD.Point

     Dim Pt2 As IntelliCAD.Point

     Dim dist As Double

Set icadDoc = ActiveDocument

Set Pt1 = Library.CreatePoint(0, 0, 0)

     Set Pt2 = Library.CreatePoint(2, 2, 0)

     dist = Library.CalculateDistance(Pt1, Pt2)

     MsgBox "Distance = " & dist

End Sub

See Also

© 2022 IntelliCAD Technology Consortium. All Rights Reserved.