iCAx开思网
标题:
DTOL.lsp修正版
[打印本页]
作者:
Joseph Lin
时间:
2003-8-26 13:40
标题:
DTOL.lsp修正版
只增加兩行敘述,DTOL.lsp便可以在輸入上下公差後提示輸入公差的字高。並一次完成較理想的公差標註作業。
增加的敘述:
setq txth(getreal "\n[$#63384]Tolerance Text High :"))
與 (setvar "dimtfac" txth)
如須更改上下公差的設定值和字高只須在Comm.:提示下再輸入DTOL即可。
請用文書編輯程式修改原DTOL.lsp。
修正後之DTOL.lsp
(defun c:dtol()
(setq upv(getstring "\n[$#63384]Upper Tolerance :"))
(setq lowerv(getstring "\n[$#63384]Lower Tolerance :"))
(setq txth(getreal "\n[$#63384]Tolerance Text High :"))
(if lowerv
(if (= (substr lowerv 1 1) "+")
(progn
(setq lowerv(atof lowerv))
(setq lowerv(- 0 lowerv))
)
(setq lowerv (abs (atof lowerv)))
)
(setq lowerv(atof lowerv))
)
(setq upv(atof upv))
(setvar "dimtfac" txth)
(setvar "dimtol" 1)
(setvar "dimalttz" 1)
(setvar "dimtp" upv)
(setvar "dimtm" lowerv)
(command "dim" "update" pause "" "exit")
(setvar "dimtol" 0)
)
欢迎光临 iCAx开思网 (https://www.icax.org/)
Powered by Discuz! X3.3