Display full version of the post: Change shx text type?
Hi.I need to change several text styles with diferents shx names (romas.shx, txt.shx, etc) to an unic ttf name (arial.ttf).Ther is any lisp to do this.Thank you
John Connor
11.12.2019, 13:00
Individually or as a group?
Kent Cooper
11.12.2019, 22:06
This replaces the font in all Style definitions that use any .shx fonts with Arial.ttf, if that's what you want:(defun C:SHXtoArial (/ sty stydata) (while (setq sty (tblnext "style" (not sty))); step through Style table (if (wcmatch (cdr (assoc 3 sty)) "*.shx"); Style uses an .shx font (progn ; then -- replace that with arial.ttf (setq stydata (entget (tblobjname "style" (cdr (assoc 2 sty))))) (entmod (subst '(3 . "arial.ttf") (assoc 3 stydata) stydata)) ) ) ) (princ))It could be modified to apply to a list of specific Style names instead, or those of only selected Text/Mtext objects, or in other ways.
Kent Cooper2019-12-12 16:18:10