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
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