- 积分
- 7038
- 明经币
- 个
- 注册时间
- 2010-4-10
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2025-10-18 10:39:42
|
显示全部楼层
;;;标注文字还原位置
(defun c:ded(/ ent)
(command "DIMEDIT" "")
(princ)
)
;;;尺寸标注增加1行(需设置DIMDLI间距:比例x6)
(defun c:ad(/ ent)
(command "DIMBASELINE")
(princ)
)
;;;将尺寸值改为固定数值
(defun C:dgg ()
(if (and (princ "\nselect object:")
(setq s (ssget '((0 . "DIMENSION"))))) (progn
(setq k 0)
(repeat (sslength s)
(setq a (entget (ssname s k)))
(setq a (subst (cons 1 (rtos (cdr(assoc 42 a)) 2 0)) (assoc 1 a) a))
(entmod a)
(setq k (1+ k))
)
))
(princ)
)
;;;标注更新,四舍五入=0
(defun c:sdaa (/ ent)
(setq $orr *error*)
(setq *error* #errxts)
(setvar "CMDECHO" 0)
(command ".undo" "be")
(setvar "DIMRND" 0)
(if (setq ss (ssget (list '(0 . "DIMENSION,leader"))))
(progn
(command "_chprop" ss ""
"la" "0-PS-标注-尺寸"
"c" "bylayer"
"lt" "bylayer"
"s" "0.9"
""
)
(vl-cmdf "-dimstyle" "a" ss "")
)
);if
(command ".undo" "e")
(setvar "CMDECHO" 1)
(princ)
)
;;;标注更新d5
(defun c:sda (/ ent)
(setq $orr *error*)
(setq *error* #errxts)
(setvar "CMDECHO" 0)
(command ".undo" "be")
(setvar "DIMRND" 5)
(if (setq ss (ssget (list '(0 . "DIMENSION,leader"))))
(progn
(command "_chprop" ss ""
"la" "0-PS-标注-尺寸"
"c" "bylayer"
"lt" "bylayer"
"s" "0.9"
""
)
(vl-cmdf "-dimstyle" "a" ss "")
)
);if
(command ".undo" "e")
(setvar "CMDECHO" 1)
(princ)
)
;;;标注更新d10
(defun c:sd1 (/ ent)
(setq $orr *error*)
(setq *error* #errxts)
(setvar "CMDECHO" 0)
(command ".undo" "be")
(setvar "DIMRND" 10)
(if (setq ss (ssget (list '(0 . "DIMENSION,leader"))))
(progn
(command "_chprop" ss ""
"la" "0-PS-标注-尺寸"
"c" "bylayer"
"lt" "bylayer"
"s" "0.9"
""
)
(vl-cmdf "-dimstyle" "a" ss "")
)
);if
(command ".undo" "e")
(setvar "CMDECHO" 1)
(princ)
)
|
|