Adding & Setting Dim and Text Styles via Lisp???

Discussion in 'AutoCAD' started by ccyc, Mar 25, 2005.

  1. ccyc

    ccyc Guest

    I have our office standards setup in a template file: S:\Templates\Template.dwt - lets' say.

    What would I add to the acaddoc.lsp to auto load our standard Dimstyle and 3 Text styles into every dwg from the dwt? Particularly, so that our standards would be inserted into the old dwgs created back before our current standards.
    And set one text style and the dim style as current??

    Thanks for any help.

    Chris
     
    ccyc, Mar 25, 2005
    #1
  2. ccyc

    ECCAD Guest

    Easiest way I know is to make a drawing..from your template.
    And, insert at 0,0. This will bring in the text styles..and Dim's.

    OR, in your acaddoc.lsp, add-in something like this:
    ;; Note, last 'style' defined will be current
    (defun setup_styles ()
    (command "_style" "P60" "arial.ttf" "0.06" "1" "0" "N" "N")
    (command "_style" "P100" "arial.ttf" "0.10" "1" "0" "N" "N")
    (command "_style" "P120" "arial.ttf" "0.12" "1" "0" "N" "N")
    (princ)
    ); end function setup_styles
    (setup_styles); set Text Styles
    (if (tblsearch "dimstyle" "MYSTYLENAME")
    (progn
    (command "-insert" "mystandard" "0,0" "" "")
    (command "_explode" "l")
    (command "-dimstyle" "_r" "MYSTYLENAME")
    ); progn
    ); if
     
    ECCAD, Mar 25, 2005
    #2
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.