闲着也是闲着,写一个:
-
- (defun c:tt(/ ss len i hh sc en ent e40)
- (princ "\n选择需要改变高度的文本:")
- (setq ss(ssget '((0 . "*text"))))
- (if ss
- (progn
- (setq len (sslength ss) i -1)
- (initget 1 "S")
- (setq hh (getdist "\n输入文本新高度或[比例缩放(S)]:"))
- (cond
- ((= hh "S")
- (initget 5)
- (setq sc (getreal "\n文字放缩倍数:"))
- (repeat len
- (setq i (1+ i)
- en(ssname ss i)
- ent(entget en)
- e40(cdr (assoc 40 ent))
- ent(subst (cons 40 (* sc e40)) (assoc 40 ent) ent)
- )
- (entmod ent)
- )
- )
- (t
- (repeat len
- (setq i (1+ i)
- en(ssname ss i)
- ent(entget en)
- ent(subst (cons 40 hh) (assoc 40 ent) ent)
- )
- (entmod ent)
- )
- )
- )
- (princ (strcat "\n共修改" (itoa len) "个文本。"))
- )
- (princ "\n未选择文本。")
- )
- (princ)
- )
|