Snap settings and precision in acad.lsp

Discussion in 'AutoCAD' started by David Allen, Apr 8, 2005.

  1. David Allen

    David Allen Guest

    I am thinking of enforcing a company standard of 1/2 snap settings for all linework
    I am thinking of using

    (if (= (getvar "TILEMODE") 1)
    (progn
    (command "snap" "0.5")
    (command "grid" "snap")
    )
    )

    So that if you open a sheet you do not get the snap settings in paperspace
    But if you open a base drawing then you get the settings.

    How can I set the unit precision to the max 8 places.
    I don't want to use (command "-units" "4" "256" "1" "8" "0" "Y") as you might be using decimal instead of architectural.

    Also how can I modify all of my dimension styles to use 256 level of accuracy?
    This code only modifys the current style

    (setq dimstyle (getvar "dimstyle"))
    (setvar "dimdec" 8)
    (command "dim" "save" dimstyle "y" "e")

    Any comments or reasons not to set this?


    David
     
    David Allen, Apr 8, 2005
    #1
  2. The LUPREC system variable is a single one that controls precision in all
    the different kinds of Units -- if set to 8, you get 8 decimal places in
    Decimal units or down to 1/256" in Architectural units. So you can (setvar
    "LUPREC" 8) and not go through the Units command. (You could also do it
    through Units if you put in returns to accept the current settings for the
    other variables.) But it doesn't control precision within Dimensions, so
    your use of DIMDEC is appropriate (see also DIMRND, though I'm not quite
    sure what the difference is). I don't have any bright ideas for updating
    all styles, but I think there's related stuff in the newsgroup history
    somewhere.
     
    Kent Cooper, AIA, Apr 8, 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.