Close Command

Discussion in 'AutoCAD' started by Xolo, Feb 2, 2004.

  1. Xolo

    Xolo Guest

    Anyone know the answer to this one?

    I'm creating a toolbar button that will plot out drawings to a selected
    paper size and then close the drawing without saving it. However, the
    problem I'm coming up with is that every time it closes a drawing, it asks
    if I want to save it. I thought that this would work;

    ^C^C-plot;y;;DesignJet 430 C4713A CAD.pc3;ANSI B (17.00 x 11.00
    Inches);Inches;Landscape;n;Extents;Fit;Center;y;MFL Standard Plot
    Style.ctb;y;n;n;n;y;_Close;n

    But the n at the end does nothing. Is there a different command other than
    close that will allow me to do this? I've forgotten something small.

    Thanks for the help in advance,

    Xolo
     
    Xolo, Feb 2, 2004
    #1
  2. Xolo

    ECCAD Guest

    You working with SDI 1 or SDI 0 ?
     
    ECCAD, Feb 2, 2004
    #2
  3. Xolo

    ECCAD Guest

    You might want to change the _close;n; to:
    _qsave;_close;
    Shouldn't harm anything, since it was saved / not changed anyway.
    Bob
     
    ECCAD, Feb 2, 2004
    #3
  4. Xolo

    Mark Propst Guest

    Xolo,
    you might look into this...maybe it can help
    quote from acad2002 readme.hlp:
    New functions provided to prevent a document from being marked "Updated"

    Two new functions, acad-push-dbmod and acad-pop-dbmod, can be used to
    suspend and resume the $DBMOD recording mechanism that AutoCAD uses to track
    changes to a drawing. These functions allow applications to make changes to
    a document as part of their initialization process without setting flags in
    $DBMOD and triggering unwanted save drawing queries.

    (acad-push-dbmod) pushes the current value of the $DBMOD system variable for
    the document onto an internal stack. The function always returns T.

    (acad-pop-dbmod) restores the value of $DBMOD to the most recently pushed
    value on the document's internal stack. The function returns T for a
    successful stack pop and nil if the stack is empty.

    The acad-push-dbmod and acad-pop-dbmod functions are implemented in
    acadapp.arx, which is loaded by default on AutoCAD startup, but can be
    disabled, if desired.
    To use the new functions, precede program actions that should not affect the
    value of $DBMOD with calls to push the $DBMOD value, then pop the value
    after performing the action. Here is a simple LISP example:

    (acad-push-dbmod)
    (setq new_line '((0 . "LINE") (100 . "AcDbEntity") (8 . "0")
    (100 . "AcDbLine") (10 1.0 2.0 0.0) (11 2.0 1.0 0.0)
    (210 0.0 0.0 1.0)))
    (entmake new_line) ; Sets $DBMOD 1 flag
    (command "_color" "2") ; Sets $DBMOD 4 flag
    (command "_-vports" "_SI") ; Sets $DBMOD 8 flag
    (command "_vpoint" "0,0,1") ; Sets $DBMMOD 16 flag
    (acad-pop-dbmod) ; $DBMOD will again have the same value it had before
    ; the call to acad-push-dbmod
    end quote
    hth
    Mark

    single document interface (as opposed to multiple document interface - MDI)
     
    Mark Propst, Feb 3, 2004
    #4
  5. Xolo

    Joe Burke Guest

    Hi Mark,

    That's interesting. Thanks for the pointer.

    Joe Burke
     
    Joe Burke, Feb 3, 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.