Help! Lisp to do "Close without save"

Discussion in 'AutoCAD' started by Medeziner, Jun 26, 2005.

  1. Medeziner

    Medeziner Guest

    I have an old set of drawings that I want to open and extract the text. I
    have a lisp
    routine that does then job but I have quite a few drawings where I need to
    unfreeze
    layers before doing the text extract. I want to then close the drawing
    without saving
    and without having to answer the question "Save changes". I have tried the
    following
    but even after setting expert to 5 they still won't close without the "Save
    changes" prompt.

    (command "close" "Y") <Enters the close command and then gives me [Y
    Unknown command "Y". Press F1 for help.]
    (command "exit" "Y") <Enters the exit command and then gives me [Y
    Unknown command "Y". Press F1 for help.]
    (command "quit" "Y") <works but exits AutoCad. Not what I want to do.

    I have over two thousand drawings and I need these files to remain
    unchanged.
    Anyone got an answer?

    Thanks
    Richard
     
    Medeziner, Jun 26, 2005
    #1
  2. Medeziner

    medeziner Guest

    I found that I could use a simple script file to do the trick

    *** script file with the following
    close
    y
    *** end of script file
     
    medeziner, Jul 19, 2005
    #2
  3. Medeziner

    Bill H Guest

    When I get something similar, I sometimes put a (Command "undo" "B" "Y") at
    the end of the lisp routine, just for peace of mind.
    Doesn't really accomplish anything, but it sets the drawing back to the
    state it was in when I opened it and somehow that makes me feel safe.
     
    Bill H, Aug 25, 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.