simlpe acad.lsp routine

Discussion in 'AutoCAD' started by Stephen J, Oct 28, 2004.

  1. Stephen J

    Stephen J Guest

    I am trying to set my 'viewres" in my acad.lsp so everytime I open a drawing
    the viewres is set to 10000

    Could someone please tell me what I need to do?

    TIA
     
    Stephen J, Oct 28, 2004
    #1
  2. Stephen J

    Paul Turvill Guest

    (command "_.viewres" "_y" 10000)(princ)
    ___
     
    Paul Turvill, Oct 28, 2004
    #2
  3. Stephen J

    Jim Dee Guest

    Is this what you're looking for?

    (command "_.viewres" "y" "10000")

    Jim Dee
    www.caddee.com
     
    Jim Dee, Oct 28, 2004
    #3
  4. Stephen J

    Tom Smith Guest

    I am trying to set my 'viewres" in my acad.lsp so everytime I open a
    drawing the viewres is set to 10000

    Put it in acaddoc.lsp, not acad.lsp.

    (acad-push-dbmod)
    (setvar "viewres" 10000)
    (acad-pop-dbmod)

    Unless you're always working in somebody else's drawings, you could simply
    set viewres in your drawing template and be done with it.
     
    Tom Smith, Oct 28, 2004
    #4
  5. Stephen J

    Tom Smith Guest

    Sorry, I should have looked before leaping. It's not a variable, you need to
    run the command as others noted.

    acaddoc.lsp:

    (acad-push-dbmod)
    (command "_.viewres" "_y" 10000)
    (acad-pop-dbmod)
    (princ)

    The push and pop are to prevent acad from seeing the database change on
    opening the drawing. Otherwise you'll always be prompted for saving your
    changes, even though you haven't done anything.
     
    Tom Smith, Oct 28, 2004
    #5
  6. (defun s::STARTUP ()
    (setvar "viewres" 1000)
    )


    I am trying to set my 'viewres" in my acad.lsp so everytime I open a drawing
    the viewres is set to 10000

    Could someone please tell me what I need to do?

    TIA
     
    Al Strominger, Oct 28, 2004
    #6
  7. Stephen J

    Stephen J Guest

    Thanks - Its been a while since I tried doing lisp and forgot the "" around
    the y
     
    Stephen J, Oct 28, 2004
    #7
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.