BeginClose event - catch 'Save?' dialog

Discussion in 'AutoCAD' started by rjlohan, Oct 7, 2004.

  1. rjlohan

    rjlohan Guest

    I am using the Document_BeginClose event to do some document management work, however it seems this event doesn't actually fire at the *start* of a close event.

    Before the event fires, AutoCAD first asks if you want to save the drawing. This is a pain, because this is basically what I want to do (save the drawing in a special way). So the user is seeing 2 lots of 'do you want to save?' dialogs, and more annoyingly - the first one is not mine - gonna cause alot of confusion.

    This is completely different to how other VBA-aware apps work. BeginClose (or DocumentClose-type events) are raised before anything else happens...

    Is there a way around this?
     
    rjlohan, Oct 7, 2004
    #1
  2. Hi,

    I you are using AutoCAD 2005, there is a new event called BeginDocClose.
    This one lets you cancel the close if you wish. My guess is that it occurs
    before the user is asked the document.

    I checked with AutoCAD 2004, this event is not documented. So new to 2005,
    or a kept secret for the past versions...

    Gilles

    work, however it seems this event doesn't actually fire at the *start* of a
    close event.
    drawing. This is a pain, because this is basically what I want to do (save
    the drawing in a special way). So the user is seeing 2 lots of 'do you want
    to save?' dialogs, and more annoyingly - the first one is not mine - gonna
    cause alot of confusion.
    (or DocumentClose-type events) are raised before anything else happens...
     
    Gilles Plante, Oct 7, 2004
    #2
  3. I tried it and it does fire earlier than the BeginClose but still only fires after prompting the user if they want to save.
    Regards - Nathan
     
    Nathan Taylor, Oct 8, 2004
    #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.