;切断尺寸关联，可在尺寸放缩后不改变尺寸数值，望需要着共同享用，cdim1为将关联尺寸取消，cdim2为将关联还原。
;将尺寸值改为固定数值
(DEFUN C:CHDIM1 ()
 (princ "\nselect object:")
 (setq s (ssget))
 (setq n (sslength s))
 (setq k 0 )
 (while (< k n) 
      (setq name (ssname s k))
      (setq a (entget name))
      (setq b (assoc '0 a))
      (setq b (cdr b))
      (if (= b "DIMENSION")(progn
        (setq h1 (assoc '42 a))
        (setq h1 (cdr h1))
        (setq h1 (rtos h1 2 0))
        (setq h2 (assoc '1 a))
        (setq h1 (cons 1 H1))
        (setq a (subst h1 h2 a))
        (entmod a)
        ))
      (setq k (+ k 1))
 )
)


;将尺寸值改为可变数值
(DEFUN C:CHDIM2 ()
 (princ "\nselect object:")
 (setq s (ssget))
 (setq n (sslength s))
 (setq k 0 )
 (while (< k n) 
      (setq name (ssname s k))
      (setq a (entget name))
      (setq b (assoc '0 a))
      (setq b (cdr b))
      (if (= b "DIMENSION")(progn
        (setq h2 (assoc '1 a))
        (setq h1 (cons 1 ""))
        (setq a (subst h1 h2 a))
        (entmod a)
        ))
      (setq k (+ k 1))
 )
)
