Returns the distance between the XYZ positions of two Cartesian Location Objects.
...Location.Distance(location_object1, location_object2)
Prerequisites
location_object1 and location_object2 must both be Cartesian Location Objects.
Parameters
location_object1
A required Cartesian Location Object or a method or property that returns a Cartesian Location Object value.
location_object2
A required Cartesian Location Object or a method or property that returns a Cartesian Location Object value.
Remarks
Computes the distance between the positions of two Cartesian Location Objects and returns the result as a Double. The result is always a positive number.
Examples
Dim a As New Location ' Create Locations and allocate
Dim b As New Location
Dim dist As Double
a.XYZ(10,23,-17,0,0,90) ' Define A, orientation doesn't matter
b.XYZ(21,8,12) ' Define B
dist = Location.Distance(a,b) ' dist set equal to 34.45287
See Also