本帖最后由 qcw911 于 2012-2-24 14:02 编辑
- (defun c:dlg ()
- (setq dcl_id (load_dialog "dlg.dcl"))
- (setq do_what 2)
- (while (>= do_what 2)
- (if (= null (new_dialog "dlg" dcl_id))
- (progn
- (princ "\n没有对话框")
- (setq dialogshow nil)
- (exit)
- ) ;_ end of progn
- ) ;_ end of if
- (action_tile "button_A" "(done_dialog 1)")
- (action_tile "button_B" "(done_dialog 2)")
- (action_tile "button_C" "(done_dialog 3)")
- (action_tile "button_T" "(done_dialog 4)")
- ;;; (action_tile "accept" "(done_dialog 1)")
- (setq do_what (start_dialog))
- (cond
- ((= do_what 1)
- (next1)
- )
- ((= do_what 2)
- (next2)
- )
- ((= do_what 3)
- (next3)
- )
- ((= do_what 4)
- (next4)
- )
- ;;; ((= do_what 5)
- ;;; (next5)
- ;;; )
- ) ;_ end of cond
- ) ;_ end of while
- (unload_dialog dcl_id)
- ) ;_ end of defun
- (defun next1 ()
- (new_dialog "dlg_A" dcl_id)
- (action_tile "A_1" "(done_dialog 1)")
- (action_tile "return" "(done_dialog 2)(load_dialog dlg)")
- (setq dial (start_dialog))
- (if (= dial 1)
- ;;; (alert "调用A")
- (command "line" (getpoint) (getpoint) "")
- ) ;_ end of if
- ;;; (unload_dialog dcl_i)
- ) ;_ end of defun
- (defun next2 ()
- (new_dialog "dlg_B" dcl_id)
- (action_tile "B_1" "(done_dialog 1)")
- (setq dial (start_dialog))
- (if (= dial 1)
- (alert "调用B")
- ) ;_ end of if
- ;;; (unload_dialog dcl_i)
- )
- (defun next3 ()
- (new_dialog "dlg_C" dcl_id)
- (action_tile "C_1" "(done_dialog 1)")
- (setq dial (start_dialog))
- (if (= dial 1)
- (alert "调用C")
- ) ;_ end of if
- ;;; (unload_dialog dcl_i)
- )
- (defun next4 ()
- (new_dialog "dlg_T" dcl_id)
- (action_tile "T_1" "(done_dialog 1)")
- (setq dial (start_dialog))
- (if (= dial 1)
- (alert "调用T")
- ) ;_ end of if
- ;;; (unload_dialog dcl_i)
- )
大家好
请大家帮帮忙
再二级对话框得界面
如何点击返回按钮
返回到一级去呢?
lisp 里面的(action_tile "return" "(done_dialog 2)(load_dialog dlg)")句话
怎么改呢?
|