Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BeginClose or Begin save Reactor?

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
ssoonets
1228 Views, 3 Replies

BeginClose or Begin save Reactor?

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 

3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: ssoonets

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.

Message 3 of 4
ssoonets
in reply to: Anonymous

Thank you very much!!!!!!!!!!!!!!

It was perfect!!!!!!!!!!!

 

Even if I still do not undertand how it really works.Smiley Very Happy

Message 4 of 4
Anonymous
in reply to: ssoonets

You are welcome 🙂

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost