About Geometric Utilities (AutoLISP)

A group of functions allows applications to obtain pure geometric information and geometric data from the drawing.

The following lists some of the commonly used geometric related functions:

The following code example demonstrates calls to the geometric utility functions:

(setq pt1 '(3.0 6.0 0.0))
(setq pt2 '(5.0 2.0 0.0))
(setq base '(1.0 7.0 0.0))
(setq rads (angle pt1 pt2))   ; Angle in XY plane of current UCS - value
                              ; is returned in radians

(setq len (distance pt1 pt2)) ; Distance in 3D space
(setq endpt (polar base rads len))

The call to polar sets endpt to a point that is the same distance from (1,7) as pt1 is from pt2, and at the same angle from the X axis as the angle between pt1 and pt2.