getpoint
 
 
 

Pauses for user input of a point, and returns that point

(getpoint [pt] [msg]) 

The user can specify a point by pointing or by entering a coordinate in the current units format. If the pt argument is present, AutoCAD draws a rubber-band line from that point to the current crosshairs position.

The user cannot enter another AutoLISP expression in response to a getpoint request.

Arguments

pt

A 2D or 3D base point in the current UCS.

Note that getpoint will accept a single integer or real number as the pt argument, and use the AutoCAD direct distance entry mechanism to determine a point. This mechanism uses the value of the LASTPOINT system variable in the Command Reference as the starting point, the pt input as the distance, and the current cursor location as the direction from LASTPOINT. The result is a point that is the specified number of units away from LASTPOINT in the direction of the current cursor location.

msg

A string to be displayed to prompt the user.

Return Values

A 3D point, expressed in terms of the current UCS.

Examples

(setq p (getpoint)) 
(setq p (getpoint "Where? ")) 
(setq p (getpoint '(1.5 2.0) "Second point: ")) 
See Also