本帖最后由 zhb236623 于 2012-7-25 17:03 编辑
- 这个比较直观,扩展也快点……
- (defun c:gzg ()
- (setq ss (ssget '((0 . "text"))))
- (setq i 0)
-
- (if (not (setq tt (getreal "\n请输入文字高度 <1.5>: ")))
- (setq tt 1.5)
- )
- (repeat (sslength ss)
- (setq ssn (ssname ss i)
- endata (entget ssn)
- endata (subst (cons 40 tt) (assoc 40 endata) endata)
- i (1+ i)
- )
- (entmod endata)
- )
- ) ;end defun
- ;;;更改文字宽度gzk
- (defun c:gzk ()
- (setq ss (ssget '((0 . "text"))))
- (if (not (setq tt (getreal "\n请输入字宽 <0.8>: ")))
- (setq tt 0.8)
- )
- (setq i 0)
- (repeat (sslength ss)
- (setq ssn (ssname ss i)
- endata (entget ssn)
- endata (subst (cons 41 tt) (assoc 41 endata) endata)
- i (1+ i)
- )
- (entmod endata)
- )
- ) ;end defun
|