global font change

Discussion in 'AutoCAD' started by chall73, Mar 24, 2005.

  1. chall73

    chall73 Guest

    Got another lisp question.

    We get multiply drawings in our office that we need to clean up for reference. Is there a way to write a lisp routine that will change all fonts to "romans" without changing the style.
     
    chall73, Mar 24, 2005
    #1
  2. chall73

    Paul Turvill Guest

    You can't change all "fonts" to anything, but you could change the font used
    in all Text *Styles* to Romans. That's what this routine does:

    (defun C:CHSTYLE (/ stl dta)
    (command "_.undo" "_be")
    (setq stl (cdr (assoc 2 (tblnext "style" T))))
    (while stl
    (setq dta (entget (tblobjname "style" stl))
    dta (subst (cons 3 "romans")(assoc 3 dta) dta)
    stl (cdr (assoc 2 (tblnext "style")))
    );;setq
    (entmod dta)
    );;while)
    (command "_.regenall"
    "_.undo" "_e"
    );;command
    (princ)
    );;defun
    ___
     
    Paul Turvill, Mar 24, 2005
    #2
  3. chall73

    chall73 Guest

    Thank you very much.
    That does excatly what I wanted.
     
    chall73, Mar 24, 2005
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.