- ;;; 切断尺寸关联,可在尺寸放缩后不改变尺寸数值,望需要着共同享用,
- ;;; cdim1为将关联尺寸取消,cdim2为将关联还原。
- ;;; 将尺寸值改为固定数值, 不适应直径、角度等标注
- (DEFUN C:CHDIM1 (/ s n k a b c h1 h2)
- (princ "\n选取要改为人为尺寸值的那些尺寸标注: ")
- (setq s (ssget '((0 . "DIMENSION"))))
- (if s
- (progn
- (setq n (sslength s))
- (setq k 0 )
- (while (< k n)
- (setq name (ssname s k))
- (setq a (entget name))
- (setq b (cdr (assoc '0 a)))
- (setq c (cdr (assoc '1 a)))
- (if (= b "DIMENSION")
- (progn
- (setq h1 (assoc '42 a))
- (setq h1 (cdr h1))
- (setq h1 (rtos h1 2 (getvar "dimdec")))
- (setq h2 (assoc '1 a))
- (setq h1 (cons 1 H1))
- (setq a (subst h1 h2 a))
- (entmod a)
- ))
- (setq k (+ k 1))
- )
- )
- (princ "\n未选取尺寸!")
- )
- (princ (strcat "\n共有" (itoa k) "个标注改成了固定值(人为尺寸)。"))
- (PRINC)
- )
|