- ;; dmvl ==锁定dim标注数值==明经通道==2004.3.11.
- ;;
- (defun c:dmvl (/ ss i ent e e1 intpnt blkname blk obj txt)
- (vl-load-com)
- (setq ss (ssget '((0 . "DIMENSION")))
- i 0
- )
- (repeat (sslength ss)
- (setq ent (ssname ss i)
- e (entget ent)
- e1 (cdr (assoc 1 e))
- intpnt (cdr (assoc 11 e))
- blkname (cdr (assoc 2 e))
- blk (vla-item (vla-get-blocks
- (vla-get-Activedocument (vlax-get-acad-object))
- )
- blkname
- )
- )
- (vlax-for obj blk
- (if (= (vla-get-objectname obj) "AcDbMText")
- (progn
- (setq txt (vla-get-textstring obj)
- )
- (if (or (= "" e1) (wcmatch e1 "*<>*"))
- (progn
- (setq e (subst (cons 1 txt) (assoc 1 e) e))
- (entmod e)
- (entupd ent)
- )
- )
- )
- )
- ) (setq i (1+ i))
- )
- (princ)
- )
|