程序文件

- (defun adv(dcl_id / a)
- (if (not (new_dialog "test2" dcl_id)) (exit))
- (action_tile "getp" "(done_dialog 2)")
- (setq a (start_dialog))
- a
- )
- (defun l_dlg( / dcl_id what_next pt)
- (if (< (setq dcl_id (load_dialog "test")) 0) (exit))
- (setq what_next 2)
- (while (>= what_next 2)
- (if (not (new_dialog "test1" dcl_id)) (exit))
- (if pt (set_tile "txt" (strcat "坐标为:" (rtos (car pt) 2 3) "," (rtos (cadr pt) 2 3))))
- (action_tile "adv" "(if (= (adv dcl_id) 2) (done_dialog 4))")
- (setq what_next (start_dialog))
- (if (= what_next 4) (setq pt (getpoint "\n选择点...")))
- )
- (unload_dialog dcl_id)
- (princ)
- )
对话框文件:

- test1:dialog{
- :text{label = ""; key = "txt";}
- :button{label="高级...";key = "adv";}
- ok_cancel;
- }
- test2:dialog{
- :button{label="点取坐标";key = "getp";}
- ok_cancel;
- }
|