changing fonts for styles many times

Discussion in 'AutoCAD' started by mkh, Mar 17, 2005.

  1. mkh

    mkh Guest

    I have been given some dwgs from a consultant. These dwgs must have 40 or 50
    text styles defined, some of which I don't have the correct font file. Is
    there a quick way to change all the defined styles in a drawing to the same
    font? It would shure save me time.

    Mike
     
    mkh, Mar 17, 2005
    #1
  2. mkh

    Paul Turvill Guest

    This one's brief and "brute force." Change "romans" in the fifth line to
    whatever font you want to use:

    (defun C:CHSTYLE (/ stl dta)
    (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")
    (princ)
    );;defun
    ___
     
    Paul Turvill, Mar 17, 2005
    #2
  3. mkh

    mkh Guest

    Perfect!!
    Just what I needed. I appreciate it very much.

    Mike
     
    mkh, Mar 17, 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.