command function without the use of a PAUSE, you must first store them as variables. Points can be passed as strings within the command function or can be defined outside the function and passed as variables, as shown in the following example. This code fragment shows one method of passing an entity name and a pick point to the command function.
Some AutoCAD commands (such as TRIM, EXTEND, and FILLET) require the user to specify a pick point as well as the object itself. To pass such pairs of object and point data by means of the(command "circle" "5,5" "2") Draws circle
(command "line" "3,5" "7,5" "") Draws line
(setq el (entlast)) Gets last entity name
(setq pt '(5 7)) Sets point pt
(command "trim" el "" pt "") Performs trim
If AutoCAD is at the Command prompt when these functions are called, AutoCAD performs the following actions: