getpoint (AutoLISP)

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

Supported Platforms: Windows and Mac OS

Signature

(getpoint [pt] [msg])
pt

Type: List

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

Note: 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 AutoCAD LASTPOINT system variable 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

Type: String

Message to be displayed to prompt the user.

Return Values

Type: List

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

Remarks

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.

Examples

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