distance

AutoCad AutoLISP Functions

 
distance
 
 
 

Returns the 3D distance between two points

(distance pt1 pt2)

Arguments

pt1

A 2D or 3D point list.

pt1

A 2D or 3D point list.

Return Values

The distance.

If one or both of the supplied points is a 2D point, then distance ignores the Z coordinates of any 3D points supplied and returns the 2D distance between the points as projected into the current construction plane.

Examples

Command: (distance '(1.0 2.5 3.0) '(7.7 2.5 3.0))

6.7

Command: (distance '(1.0 2.0 0.5) '(3.0 4.0 0.5))

2.82843

See Also