标注恢复原值
将手工修改过的尺寸标注恢复原值。;;===============================================;;;; 【标注复原】 ;;
;;===============================================;;
;;功能:尺寸标注恢复原值
(defun c:dfy ()
(princ "\n->标注复原,选择需要恢复原值的标注:")
(setq ss (ssget '((0 . "dimension")))
ssm (sslength ss)
ssn 0
);setq
(repeat ssm
(setq ss1 (ssname ss ssn)
ssn (1+ ssn)
);setq
(command ".dim1" "new" "<>" ss1 "") ;;文字替代置空"<>"
);repeat
(princ)
)
;;尺寸标注数值还原
(defun C:dd0 (/ ss i ent elist)
(princ "\n选择要还原数值的标注:")
(if(setq ss (ssget '((0 . "DIMENSION"))))
(progn
(setq i -1)
(while (setq ent (ssname ss (setq i (1+ i))))
(setq elist (entget ent))
(if (= (cdr(assoc 0 elist)) "DIMENSION")
(entmod (subst (cons 1 "") (assoc 1 elist) elist))
)
)
)
)
(princ "\n所选标注还原数值完成!")
(princ)
) 1028695446 发表于 2020-5-1 20:06
;;尺寸标注数值还原
(defun C:dd0 (/ ss i ent elist)
(princ "\n选择要还原数值的标注:")
抛砖引玉,把大神引来了:lol,多谢大神优化!
页:
[1]