getangle
(getangle [point] [prompt])
The getangle function prompts the user to specify an angle. The user can enter the angle as a numerical value at the keyboard or identify the angle in the drawing.
Arguments
point
specifies the base point in the current CCS to compute the angle. If the argument is supplied, the user specifies the angle by entering or identifying a second point.
If point is not specified or nil, the user has to specify two points, where the first point entered is assumed to be the base point for the angle inquiry.
To visualize the angle specification, the function draws a "rubber band" from the base point to the current cursor position. The user can keyboard angles in a format recognized by the angtof function.
prompt
If the optional argument prompt contains a valid string, it is displayed in the Command Window; otherwise, no prompt is displayed.
The computed angle is returned in radians.
Zero radians (zero direction of angles) is defined by the local system variable ANGBASE (Angle Base). Normally, an angle increases in a counter-clockwise direction.
The angle returned is based upon the current construction plane. The function interprets an angle entered via the keyboard under recognition of the local system variable AUNITS (Angle Units).
: ANGBASE
New value for ANGBASE <0.0000>: 0
: ANGDIR
New value for ANGDIR <1>: 0
: (getangle)
0,0
Next point: 0,1
1.5708
: ANGDIR
New value for ANGDIR <0>: 1
: (getangle)
0,0
Next point: 0,1
-1.5708
getorient, initget