CAD2008中轴测图如何标注?谢谢了,大神帮忙啊

2024-11-08 11:34:38
推荐回答(1个)
回答(1):

(defun c:ZC (/ os d date one tow three rotate-angle) (command "dimaligned" PAUSE PAUSE PAUSE) (setq os (getvar "osmode" ))(setvar "cmdecho" 0)(setvar "osmode" 0) (setq d (entlast)) (setq date (entget d)) (setq one (cdr(assoc 13 date))) (setq tow (cdr(assoc 14 date))) (setq three (cdr(assoc 10 date))) (setq rotate-anngle(angtos(angle one tow))) (if (or (= rotate-anngle "210") (= rotate-anngle "30")) (progn (if(>(cadr three)(cadr tow)) (command "dimedit" "o" d "" "90" "") (command "dimedit" "o" d "" "-30" "")))) (if (or (= rotate-anngle "330") (= rotate-anngle "150")) (progn (if(>(cadr three)(cadr tow)) (command "dimedit" "o" d "" "90" "") (command "dimedit" "o" d "" "30" "")))) (if (or (= rotate-anngle "270") (= rotate-anngle "90")) (progn (if(>(car three)(car one)) (command "dimedit" "o" d "" "-30" "") (command "dimedit" "o" d "" "30" "")))) (setvar "cmdecho" 1)(setvar "osmode" os) (princ)) 把这段代码存成LSP文件,加载一下,命令ZC