
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have about 500 drawings that have a text style SansSerif_Bold that use the SansSerif font and I need to change these all to use the romans.shx font. I know that there are lots of posts about LISPs for changing the text style font from one font to another. I think that I have read them all. I have a bat file that calls a scrip that call my LISP for a directory of drawings. The problem is that my LISP file isn't working. It appears to change the font to romans but when I go back into the drawing to check it; when I go to style and select the SansSerif_Bold, it has romans in the font name but it wants me to Apply it when exiting text style. I don't have to select romans I just have to click Apply. So for some reason my LISP isn't doing the Apply. I tried changing romans to romans.shx in my LISP but that caused not to work at all. Below is the LISP that I am using. Any help here would be greatly appreciated as I am pretty weak when it comes to this stuff. The LISP I am using was found on another forum and I modified with the text styles/fonts that I need to change.
(defun C:P6()
(vl-load-com)
(vla-setfont
(vla-item
(vla-get-textstyles
(setq adoc (vla-get-activedocument
(vlax-get-acad-object))))
"SansSerif_Bold"
)
"Romans" ; font name
:vlax-false ; non-bold (otherwise :vlax-true)
:vlax-true ; italic (otherwise :vlax-false)
0 ; symbol's flag
66 ;; sum of flag values for ticks and characters
)
(vla-regen adoc acallviewports)
(princ)
)
Solved! Go to Solution.