creating DIM styles with lisp

Discussion in 'AutoCAD' started by martin, Jan 20, 2004.

  1. martin

    martin Guest

    i'm looking for a way to create Dim styles in lisp, i have done that for
    text styles, but with (-style) you have the option to fill all the variables
    for the new text-style, but that option is not in (-dimstyle) and there is
    no special file for
    DIM-styles like those in linetype files (.lin). you can get all
    specifications of a Dim style with (-dimstyle/status) but how to put these
    into a new style or updating existing ones? the exprsstools have a dialog
    version for that but no command line version.
    martin
     
    martin, Jan 20, 2004
    #1
  2. martin

    R.K. McSwain Guest

    You could set the desired variables as needed (i.e.: DIMSCALE, DIMASO, etc), then run (command "._dimstyle" "_s" "myname")

    If you do this in a drawing where "myname" is already defined, you will get a prompt to overwrite. To avoid this, set EXPERT to 5 before trying to save the dimstyle.
     
    R.K. McSwain, Jan 20, 2004
    #2
  3. martin

    RichardG Guest

    martin
    might not be the answer you need but I use a script file in conjunction with
    a small lisp that sets dimscale, ltscale and a text style for dimensions and
    then runs a script to set all of my other dim vars. All the user needs to do
    is enter the desired scale factor and the rest is taken care of. Here's a
    part of it:
    CMDECHO
    0
    DIM
    DIMADEC
    4
    DIMALT
    OFF
    DIMALTD
    2
    DIMALTF
    1.00
    DIMALTRND
    0.00
    DIMALTTD
    2
    etc


    HTH
    Richard
     
    RichardG, Jan 20, 2004
    #3
  4. martin

    Rudy Tovar Guest

    You can use visual lisp or entmake to create the dimstyle, but be aware that
    certain dimstyle values must be accessed via the object id.

    Examples are provided in the documentation for VB, but can be accessed via
    the VL-functions.
    --

    AUTODESK
    Authorized Developer
    www.Cadentity.com
    MASi
     
    Rudy Tovar, Jan 20, 2004
    #4
  5. martin

    James Buzbee Guest

    I take a little different approach:

    All my standards; layers, textstyles, dimstyles, and ADT styles are saved in
    a drawing located on the server. I then use ObjectDBX to "import" the
    styles as neccessary. This allows me to use AutoCAD's resident tools to
    modify and manage said standards. Works great!

    jb
     
    James Buzbee, Jan 21, 2004
    #5
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.