一部の AutoCAD のコマンド(TRIM[トリム]、EXTEND[延長]、FILLET[フィレット]など)では、オブジェクトだけでなくクリックした点も指定する必要があります。
PAUSE を使用せずに、オブジェクトおよび点データを command および command-s 関数に渡すことができますが、まず値を変数に格納する必要があります。点は、command および command-s 関数内で文字列として渡すことも、次の例に示すように、変数として渡すこともできます。
次のサンプル コードは、図形名とクリックした点を command 関数に渡すための 1 つの方法です。
(command "._circle" "5,5" "2") ;Draws a circle (command "._line" "3,5" "7,5" "") ;Draws a line (setq el (entlast)) ;Gets the last entity ; added to the drawing (setq pt '(5 7)) ;Sets the trim point (command "._trim" el "" pt "") ;Performs the trim
これらの文が呼び出されたとき、AutoCAD のコマンド プロンプトがアイドル状態だった場合、AutoCAD は次のように動作します。