Function Entry: GETANGLE
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: GETANGLE
Name
getangle
Class
Function
Syntax
(getangle [pt] [msg])
Arguments and Values
pt: optional base pointmsg: optional prompt string
Autodesk documents pt as a 2D base point in the current UCS; a 3D point may be supplied, but measurement remains in the current construction plane.
Description
Prompts the user to specify an angle.
Return Values
Real or nil.
The returned angle is in radians.
Side Effects
- prompts the user
- consumes interactive input
Affected By
- current angle conventions
- current unit settings
- optional base point
Exceptional Situations
Cancel and interactive-input errors are host-dependent.
Compatibility
Part of the standard user-input family and closely related to angle conversion functions such as angtof and angtos.
Availability
- AutoCAD 2026: documented (per Autodesk reference page).
- BricsCAD V26: presumed compatible (no contradicting page found).
- Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.
Source Notes
Notes
- Autodesk documents that the returned value is measured in radians with respect to the current construction plane.
- Autodesk documents that zero direction is ANGBASE, with positive angles increasing counterclockwise.
- Autodesk documents that the user cannot respond with another AutoLISP expression.
clautolisp
clautolisp implementation deviation — not part of the normative
specification above. AutoCAD and BricsCAD collect this angle through the
graphical drawing editor: a command-line prompt combined with
pointer/keyboard interaction in the drawing window (implicitly a GUI).
clautolisp has no drawing editor — it writes the prompt to the standard
output and reads the answer as one line of text from the standard input
(a TUI interaction). Interactively this is the REPL's terminal; for
scripted, deterministic runs it is the file attached with --mock-input.
A live CAD host, when connected, restores the native GUI behavior.
On the TUI the angle is typed as text and returned in radians. Accepted forms:
- a bare number — taken as radians (e.g.
0.5); - degrees —
deg/degree/degrees(e.g.45 deg,45.3321 degree); - degrees-minutes-seconds —
'for minutes and"for seconds, summed with the degrees, markers accepted in any order (e.g.43 deg 23' 15"); - radians —
rd/rad/radian/radians, where the magnitude may be an integer, a decimal, or a rational (a/b) and may be multiplied bypi(e.g.2.34 rd,pi rd,2pi rd,4/3 pi rd,-3/2 pi rd).
Unrecognized text returns nil rather than re-prompting. (Angles are
parsed textually; the optional base point pt is accepted but not
used to derive the angle graphically on the TUI.)