(defun c:dimreassoc ( / ss )
(acet-error-init
 (list nil
       T
 );list
);acet-error-init
(princ "\n使用不连续的文本选择维数对象。")
(if (and (setq ss (ssget '((0 . "DIMENSION")
                           (-4 . "<AND")
                            (-4 . "<NOT") (1 . "") (-4 . "NOT>")     ;get dimensions with non-assoc text
                            (-4 . "<NOT") (1 . "*<>*") (-4 . "NOT>") ;
                           (-4 . "AND>")
                          )
                  );ssget
         );setq
         (setq ss (car (bns_ss_mod ss 3 T)));setq dis-allow locked layers and non-current space
    );and
    (progn
     (acet-dimreassoc ss)
     (princ (strcat "\n" (itoa (sslength ss)) "个对象已修改。"))
    );progn then
    (princ "\n没有选择到有效对象。")
);if
(acet-error-restore)
);defun c:dimreassoc
(defun acet-dimreassoc ( ss / n na e1 )
 (setq n 0)
(repeat (sslength ss)
(setq na (ssname ss n)
      e1 (entget na '("*"))
      e1 (subst '(1 . "") (assoc 1 e1) e1)
);setq
(entmod e1)
(entupd na)
(setq n (+ n 1));setq
);repeat
);defun acet-dimreassoc
(princ)
