I am handling BeginDocumentClose event of a Document but before my code executes MessageBox pops up asking me if a want to save my changes. Any idea how can i suppress it? Because i am asking use to end the process for this Document and if the user chooses No i am Vetoing the close so no need to Save changes.
Okay Here's a possible trick:
VBA Command way... meaning you just use .SendCommand(blah blah blah)
I took the idea from here... Forum Topic - Close without save
(command "._VBASTMT" "ThisDrawing.Application.ActiveDocument.Close(vbFa
(command "_.vbastmt" "thisdrawing.close vbfalse")
-But then you have to VBA enabled... hmmm that might not work for you.
Or close the document before Autocad can.
Sean has some stuff on this:
Hmm... see code & methods would be ... ah ...
Something along those lines.
Why are you using the begindocumentclose event anyhow?
Is any of this along the lines of what you're looking for? Best of luck.
although none of them is working for me , the way you wrote them may help making my mood
thanks anyway. here is a brief explanation ;
i am executing a command that shows a paletteset and allow user to make modifications by the commands on paletteset. if the user clicks the close button on my paletteset there is no problem. but if the user clicks the x button of document i want to ask user if he/she wants to exit modification process that i am serving. but the autocads save changes messagebox first pops up then mine. it makes an ignoring step when the user refuses to close my modification process.
i think it is clearer now.
But i can use the "DBMOD" variable and store its current value and if i can set it to no modifications made constant then no popup . if it can be set ofcourse. but i think i got the qlue.
bad news autocad invokes dialog before BeginDocumentClose event. i better try to set DBMOD in CommandWillStart event.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register