- ;;标注统一
- ;;by edata@mjtd 2015-7-21
- (defun c:tt(/ elist a dim_a dim_lst en obj ss)
- (setq dim_a(tblnext "dimstyle" t) dim_lst '())
- (setq dim_lst(cons (cdr(assoc 2 dim_a)) dim_lst))
- (while(setq dim_a(tblnext "dimstyle"))
- (setq dim_lst(cons (cdr(assoc 2 dim_a)) dim_lst))
- )
- (print dim_lst)
- (while(setq a(car dim_lst))
- (setq elist (entget(tblobjname"dimstyle" a)))
- (if(assoc 140 elist)
- (setq elist(subst(cons 140 9)(assoc 140 elist)elist))
- (setq elist(reverse(cons(cons 140 9)(reverse elist))))
- )
- (if(assoc 41 elist)
- (setq elist(subst(cons 41 0.5)(assoc 41 elist)elist))
- (setq elist(reverse(cons(cons 41 0.5)(reverse elist))))
- )
- (if(assoc 179 elist)
- (setq elist(subst(cons 179 2)(assoc 179 elist)elist))
- (setq elist(reverse(cons(cons 179 2)(reverse elist))))
- )
- (entmod elist)
- (setq dim_lst(cdr dim_lst))
- )
- (setvar 'dimadec 2)
- (setvar 'dimtxt 9.0)
- (setvar 'dimasz 0.5)
- (if (setq ss (ssget "x" '((0 . "DIMENSION"))))
- (while (setq en (ssname ss 0))
- (setq obj (vlax-ename->vla-object en))
- (vla-put-ArrowheadSize obj 0.5)
- (vla-put-TextHeight obj 9.0)
- (if (= (vla-get-objectname obj) "AcDb2LineAngularDimension")
- (vla-put-TextPrecision obj 2)
- )
- (setq ss (ssdel en ss))
- )
- )
- (princ)
- )
|