这应该是一个相当复杂的过程,原程序复杂,实现这样的功能,就会时程序更加复杂,而且应该是呈指数关系增长,,,不建议这样做,取消了,就退出算了- (defun err(msg)
- (setq *error* errtmp)
- (showdlg)
- )(defun ShowDlg(/ dcl_id what_next cnt)
- (setq errtmp *error*)
- (setq *error* err)
- (setq dcl_id (load_dialog "hidedcl.dcl")) ;加载对话框
- (setq what_next 2)
- (setq cnt 1)
- (while (>= what_next 2) ;开始显示循环
- (if (null (new_dialog "hidedcl" dcl_id)) ;初始化对话框
- (exit) ;如果返回 nil 则退出
- ) ; endif (action_tile "accept" "(done_dialog 1)") ;设置 OK 的动作
- (action_tile "hide" "(done_dialog 4)") ;设置 PickMe的动作
- (setq what_next (start_dialog)) ;显示对话框
- ;
- (cond
- ((= what_next 4) ;提示用户
- (getpoint "\npick a point") ;拾取 pt
- )
- ((= what_next 0)
- (prompt "\nuser cancelled dialog")
- )
- )
- )
- (unload_dialog dcl_id)
- (setq *error* errtmp)
- (princ)
- )
|