Quit Dialog Box

Discussion in 'AutoCAD' started by Cadillac Joe, Aug 12, 2004.

  1. Cadillac Joe

    Cadillac Joe Guest

    I have a question about a script routine I've created. This routine opens a drawing, of which I have read-only access. It then changes some layer settings and other things in the drawing, and sends a plot to our printer. The end of the script routine is basically the AutoCAD QUIT command. The QUIT command calls for a popup dialog box about saving changes.

    Is there any way that I can QUIT a drawing automatically without saving changes and without the dialog box? FILEDIA does not control this box.
     
    Cadillac Joe, Aug 12, 2004
    #1
  2. Cadillac Joe

    T.Willey Guest

    How about cmddia?

    Tim
     
    T.Willey, Aug 12, 2004
    #2
  3. Cadillac Joe

    Cadillac Joe Guest

    I forgot to mention that. CMDDIA doesn't control it, either.
     
    Cadillac Joe, Aug 12, 2004
    #3
  4. Cadillac Joe

    T.Willey Guest

    I'm not that familar with scripts, but you can use lisp type wording in them right? Would something like (command "_.quit" "_y") work. The "y" says to disreguard changes, in essence quit without saving.

    After trying it on my comp, copy/paste that line to the command line, it quits, but also errors out.

    Sorry i'm not much help, but someone here knows what to do.
    Tim
     
    T.Willey, Aug 12, 2004
    #4
  5. Have you looked into using the (acad-push-dbmod) fucntion in your script?
    I'd add the line to your script just before calling Quit so that it "tricks" autocad into thinking
    no changes were made.
    I haven't tried it with scripts, but it might work.

    See AutoCAD Help:
    This function is used with acad-pop-dbmod to control the DBMOD system variable. You can use this
    function to change a drawing without changing the DBMOD system variable. The DBMOD system variable
    tracks changes to a drawing and triggers save-drawing queries.

    This function is implemented in acapp.arx, which is loaded by default. This function pushes the
    current value of the DBMOD system variable onto an internal stack. To use acad-push-dbmod and
    acad-pop-dbmod, precede operations with acad-push-dbmod and then use acad-pop-dbmod to restore the
    original value of the DBMOD system variable.
     
    Allen Johnson, Aug 12, 2004
    #5
  6. Cadillac Joe

    Jim Claypool Guest

    (command ".quit" "y")

    a drawing, of which I have read-only access. It then changes some layer
    settings and other things in the drawing, and sends a plot to our printer.
    The end of the script routine is basically the AutoCAD QUIT command. The
    QUIT command calls for a popup dialog box about saving changes.
    changes and without the dialog box? FILEDIA does not control this box.
     
    Jim Claypool, Aug 12, 2004
    #6
  7. Cadillac Joe

    R.K. McSwain Guest

    Jim's got it...
    (command ".quit" "y")
     
    R.K. McSwain, Aug 12, 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.