未测试,修改文字高宽比
(defun c:tt (/ w ss n en)
(if (null **texthw**)
(setq **texthw** 0.8))
(setq w (getreal (strcat "\n高宽比:<" (rtos **texthw** 2 2) ">"))
w (if w
w
**texthw**)
**texthw** w
ss (ssget '((0 . "text"))))
(repeat (setq n (sslength ss))
(setq en (ssname ss (setq n (1- n)))
en (entget en)
en (subst (cons 41 w) (assoc 41 en) en))
(entmod en))
(princ))
修改文字高
(defun c:tt1 (/ h ss n en)
(if (null **texth**)
(setq **texth** 300.0))
(setq h (getreal (strcat "\n字高:<" (rtos **texth** 2 2) ">"))
h (if h
h
**texth**)
**texthw** h
ss (ssget '((0 . "text"))))
(repeat (setq n (sslength ss))
(setq en (ssname ss (setq n (1- n)))
en (entget en)
en (subst (cons 40 h) (assoc 40 en) en))
(entmod en))
(princ))
(setq w 0.7)
(setq ss (ssget '((0 . "text"))))
(setq n (sslength ss))
(repeat n
(setq n (1- n)
en (ssname ss n)
en (entget en)
en (subst (cons 41 w) (assoc 41 en) en))
(entmod en))