有没逐级调整字宽的程序,就像鼠标增减数字那样的
本帖最后由 yangist 于 2015-2-14 09:56 编辑宽度因子0.7 0.65 0.6 0.55 这样逐级跳的程序
不要0.7~0.65之间的数
没有动态的!
;;;修改字符宽度比例,默认0.7
;;;author feng_tan feng_tan@21cn.comGP略有修改
(Defun c:tk (/ text textwidth len n e ed h)
(command "undo" "be")
(command "redraw")
(princ)
(setq text (ssget '((0 . "text")))) ;选择要修改的文字
(setq textwidth (getreal "\n请输入字符宽度比例<0.7>:")
textwidth (if textwidth
textwidth
0.7
)
)
(setq len (sslength text))
(setq n 0)
(while (<= n (- len 1))
(progn
(setq e (ssname text n))
(if (= "TEXT" (cdr (assoc 0 (setq ed (entget e)))))
(progn
(setq h textwidth)
(setq ed (subst (cons 41 h) (assoc 41 ed) ed))
(setq n (+ 1 n))
(entmod ed)
)
(setq n (+ 1 n))
)
)
)
(prompt "已修改字符宽度比例")
(command "undo" "e")
(princ)
) GamIng 发表于 2015-2-13 10:25 static/image/common/back.gif
没有动态的!
这个俺已经有啦,还是谢谢
这个用起来不直观,有时要改几次才能最合适
页:
[1]