Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear All,
can you please help me on this? My aim is to create a Lisp that converts all Mtext to Dtext in Model and every Layout and also that changes the font of each Text Style available into Simplex.shx.
By searching around this forum I have been able to find the following codes:
- changes all the Mtext to Dtext for all the texts in the layouts but it does not work on the texts in the model space:
(defun c:xplodemtext (/ myss) (foreach layout (layoutlist) (setvar "ctab" layout) (setq myss (ssget "X" '((0 . "MTEXT")))) (setvar "qaflags" 1) (command "EXPLODE" myss "") (setvar "qaflags" 0) (princ) ) (setq myss (ssget "X" '((0 . "MTEXT")))) (setvar "qaflags" 1) (command "EXPLODE" myss "") (setvar "qaflags" 0) (princ) ) )
- Applies the selected font to every Text Style (using the command "(styles2one "simplex.shx")" )
(defun styles2one (newfont / styl) (while (setq styl (tblnext "STYLE" (not styl))) (setq styl (entget (tblobjname "STYLE" (cdr (assoc 2 styl))))) (entmod (subst (cons 3 newfont) (assoc 3 styl) styl)) ) (command "_.regen") (princ) )
Is it possible to adjust the first script and to merge it with the second one?
Thanks in advance for the answers 🙂
Solved! Go to Solution.