Hi:
I'm trying to run a program, when the document i about to close, but before it is save, so the changes of my program are saved.
If if use the Begin Save reactor the program happens each time I save, but using BeginClose the program run after the document is sved, son my changes are lost.
I founf here in the forum an answer recommending to use the Beginsave and the "cmdnames" and the "SDI" variables, but I really didn't undestand. What is SDI???
Does someone knows how to do something just before closing the document and before the last save?
Thank you
Silvia
Solved! Go to Solution.
Hi Silvia,
SDI stands for Single Document Interface and MDI stands for Multiple Document Interface. If the reactors are built in a correct manner, it should work. The reactor you are looking for is :vlr-commandWillStart and the attached LSIP file define a reactor construct that is "listening" for the CLOSE command and it is based on the suggestion and explanations of Tony Tanzillo about how to use reactors efficiently.
Load the file and that's all. You can add it to the Startup Suite in ACADAPP dialog box, so it will load in each and every document. And when you will close the document, the reactor will fire and execute the instructions, i.e. it will zoom extents the active layout and will pop up an alert box saying that the command CLOSE was issued.
You will see that this happens before you are asked to save the changes, so you can add your own code between the marks you will find in the file. Just remember that (command ...) calls do not work with reactors.
Good luck.
Thank you very much!!!!!!!!!!!!!!
It was perfect!!!!!!!!!!!
Even if I still do not undertand how it really works.