Prompts the user to select a single object (entity) by specifying a point
(entsel [msg])
A list whose first element is the entity name of the chosen object and whose second element is the coordinates (in terms of the current UCS) of the point used to pick the object.
The pick point returned by entsel does not represent a point that lies on the selected object. The point returned is the location of the crosshairs at the time of selection. The relationship between the pick point and the object will vary depending on the size of the pickbox and the current zoom scale.
The following AutoCAD command sequence illustrates the use of the entsel function and the list returned:
Command: line
From point: 1,1
To point: 6,6
To point: ENTER
Command: (setq e (entsel "Please choose an object: "))
Please choose an object: 3,3
(<Entity name: 60000014> (3.0 3.0 0.0))
When operating on objects, you may want to simultaneously select an object and specify the point by which it was selected. Examples of this in AutoCAD can be found in Object Snap and in the BREAK, TRIM, and EXTEND commands in the Command Reference. The entsel function allows AutoLISP programs to perform this operation. It selects a single object, requiring the selection to be a pick point. The current Osnap setting is ignored by this function unless you specifically request it while you are in the function. The entsel function honors keywords from a preceding call to initget.