getdist
(getdist [point] [prompt])
The getdist function pauses for user input to retrieve the distance between a given base point and a second point or between two points to be specified by the user.
The distance computed by the function is returned in the variable DISTANCE.
Arguments
The argument point specifies the base point for finding the distance. The base point is specified in coordinates of the current CCS. 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 distance inquiry. To visualize the distance specification, the function draws a "rubber band" from the base point to the current cursor position.
If the optional argument prompt contains a valid string, it is displayed in the Command Window; otherwise, no prompt is displayed.
The function attempts to interpret keyboard input as point specification.
Return Value
The function returns the computed distance.
: (getdist)
: (getdist "Enter a distance: ")
: (getdist '(0 0) "Length: ")
initget