Pauses for user input of an angle, and returns that angle in radians

(getangle [pt] [msg]) 



A 2D base point in the current UCS.

The pt argument, if specified, is assumed to be the first of two points, so the user can show AutoLISP the angle by pointing to one other point. You can supply a 3D base point, but the angle is always measured in the current construction plane.


A string to be displayed to prompt the user.

Return Values

The angle specified by the user, in radians.

The getangle function measures angles with the zero-radian direction (set by the ANGBASE system variable in the Command Reference) with angles increasing in the counterclockwise direction. The returned angle is expressed in radians with respect to the current construction plane (the XY plane of the current UCS, at the current elevation).


The following code examples show how different arguments can be used with getangle:

Command: (setq ang (getangle))

Command: (setq ang (getangle '(1.0 3.5)))

Command: (setq ang (getangle "Which way? "))

Command: (setq ang (getangle '(1.0 3.5) "Which way? "))

Usage Notes

Users can specify an angle by entering a number in the AutoCAD current angle units format. Although the current angle units format might be in degrees, grads, or some other unit, this function always returns the angle in radians. The user can also show AutoLISP the angle by pointing to two 2D locations in the drawing area. AutoCAD draws a rubber-band line from the first point to the current crosshairs position to help you visualize the angle.

It is important to understand the difference between the input angle and the angle returned by getangle. Angles that are passed to getangle are based on the current settings of ANGDIR and ANGBASE in the Command Reference. However, once an angle is provided, it is measured in a counterclockwise direction (ignoring ANGDIR) with zero radians as the current setting of ANGBASE.

The user cannot enter another AutoLISP expression as the response to a getangle request.

See Also