auto SAVE drawing when user closes it

Discussion in 'AutoCAD' started by vindimy, Apr 28, 2005.

  1. vindimy

    vindimy Guest

    user closes the drawing (unsaved). i want to make sure that drawing
    is saved no matter what, even if user said 'no' on 'save file?'
    dialog... i know it can be done in objectarx (and i've tried), but it's
    too complicated. anyone knows quick (or not quick but working) way to
    do that? thanks for any suggestions or comments...

    why do i need that: we're doing GIS, so changes in drawing are
    reflected in database, and if drawing is not saved - we have
    inconsistency...
     
    vindimy, Apr 28, 2005
    #1
  2. vindimy

    aryan2000 Guest

    In VBA, open the VBA editor and in ThisDrawing under the AutoCAD
    objects in any project.

    Create the BeginClose event and place the code ThisDrawing.Save

    eg.
    Private Sub AcadDocument_BeginClose()

    ThisDrawing.Save
    End Sub

    Regardless of what the user chooses 'Yes' or 'No' to saving the file
    upon closing the drawing, the drawing will be saved


    I hope this helps

    Anthony Ryan
     
    aryan2000, May 10, 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.