Hi.
I need a way to catch the AUTO_SAVE before saving the document to change a bool variable to false due to saving process fires the ObjectModified event always and I have some operations in this last event.
Note: CommandWillStart event doesn´t work with "AUTO_SAVE" command.
Thanks in advance.
Solved! Go to Solution.
Solved by mcicognani. Go to Solution.
Yes, right now I have tried it:
static void callback_BeginSave(object sender, DatabaseIOEventArgs e) { variables_globales.GuardadoDibujo = true; } static void callback_SaveComplete(object sender, DatabaseIOEventArgs e) { variables_globales.GuardadoDibujo = false; }
BeginSave event works fine, but the trouble is with SaveComplete event.
I have other events such as ObjectErased, ObjectModified and they are fired in the last moment after SaveComplete event, but then my global variable is false and it should be still true.
I don´t know where I should change it back in false value again.
In both events handler, the DatabaseIOEventArgs e.Filename property contains the name of the file being saved, if it's an autosave, the extension should be .sv$
Given that, you always know if you're dealing with an autosave or a user save command.