改了几句,后面打;;处- ;; dmvl = 块定义修改法-固定标注文字! v1.2-----by无痕. (第二版)
- ;; 支持所有标注类型.
- (defun c:dmvl (/ ss n dm dml)
- (princ "\n选择要固定文字的标注:")
- (setq ss (ssget '((0 . "DIMENSION"))))
- (repeat (setq n (sslength ss))
- (setq dm (ssname ss (setq n (1- n))))
- (vla-put-textoverride (vlax-ename->vla-object dm) (getdimtext dm)) ;;
- )(princ)
- )
- ;;取标注文本.
- (defun getdimtext (dm / e el)
- (setq e (tblobjname "block" (cdr (assoc 2 (entget dm)))));;
- (while (and (setq e (entnext e))
- (not (member '(100 . "AcDbMText") (setq el (entget e))))
- )
- )
- (if e (cdr (assoc 1 el)) " ")
- )
|