Pauses for user input of a distance
(getdist [pt] [msg])
getdist function always returns the distance as a real.
The user can specify the distance by selecting two points, or by specifying just the second point, if a base point is provided. The user can also specify a distance by entering a number in the AutoCAD current distance units format. Although the current distance units format might be in feet and inches (architectural), thegetdist function draws a rubber-band line from the first point to the current crosshairs position to help the user visualize the distance.
Thegetdist request.
The user cannot enter another AutoLISP expression in response to aArguments
A 2D or 3D point to be used as the base point in the current UCS. If pt is provided, the user is prompted for the second point.
A string to be displayed to prompt the user. If no string is supplied, AutoCAD does not display a message.
Return Values
initget function instructs getdist to ignore the Z component of 3D points and to return a 2D distance.
A real number. If a 3D point is provided, the returned value is a 3D distance. However, setting the 64 bit of theExamples
(setq dist (getdist))
(setq dist (getdist '(1.0 3.5)))
(setq dist (getdist "How far "))
(setq dist (getdist '(1.0 3.5) "How far? "))
initget function. The getxxx Functions in the AutoLISP Developer's Guide.
The