版大"DIMPOST"是可以在标注文本前后加字符没错~ 可是好像不能实现我的问题! 小弟不才~ 我的程序如下~版大帮我看看~ 在一个问题? 我设了一个恢复默认值按钮~当我按了就会恢复成0值~ 那我要按确定时,把有公差标注恢复成没有公差标注的状态要如何作~ (defun c:toleranc () (princ "\nTOLERANC 尺寸公差标注") (princ "\n初始化.....") (setq e1 (entsel "\n选定尺寸标注:")) (setq dcl_id (load_dialog "toleranc.dcl")) (new_dialog "toleranc" dcl_id) (if (< dcl_id 0) (exit)) (set_tile "dimtp" "0") (set_tile "dimtm" "0") (action_tile "comeback" "(u)");恢复默认值 (action_tile "accept" "(ok)") (action_tile "cancel" "(done_dialog 0)") (defun u() (set_tile "dimtp" "0") (set_tile "dimtm" "0") ) (defun ok() (setq tp (atof (get_tile "dimtp"))) (setq tm (atof (get_tile "dimtm"))) (done_dialog 1) ) (setq act (start_dialog)) (unload_dialog dcl_id) (if (= act 1) (cond ((= tp tm) (command "dimoverride" "dimtol" "on" "dimtdec" "3" "dimtzin" "8" "dimtolj" "0" "dimtfac" "1" "dimtp" tp "dimtm" tm "" e1 "")) ((= tp 0) (command "dimoverride" "dimtol" "on" "dimtdec" "3" "dimtzin" "8" "dimtolj" "0" "dimtfac" "0.6" "dimtp" "+0.00001" "dimtm" tm "" e1 "")) ((= tm 0) (command "dimoverride" "dimtol" "on" "dimtdec" "3" "dimtzin" "8" "dimtolj" "0" "dimtfac" "0.6" "dimtp" tp "dimtm" "-0.00001" "" e1 "")) ((/= tp 0) (command "dimoverride" "dimtol" "on" "dimtdec" "3" "dimtzin" "8" "dimtolj" "0" "dimtfac" "0.6" "dimtp" tp "dimtm" tm "" e1 "")) ((/= tm 0) (command "dimoverride" "dimtol" "on" "dimtdec" "3" "dimtzin" "8" "dimtolj" "0" "dimtfac" "0.6" "dimtp" tp "dimtm" tm "" e1 ""))) ) (princ) ) |