rodrigo_sjc_sp Posted October 17, 2012 Share Posted October 17, 2012 Is there any way to identify the execution of a command? And do a procedure to execute a command supplement? A practical example would be: When you call Qsave, run and Qsave then then display a message on the screen? thank you Quote Link to comment Share on other sites More sharing options...
rodrigo_sjc_sp Posted October 17, 2012 Author Share Posted October 17, 2012 Could used the command "_.undefine" "_qsave" and define what I want within a new procedure qsave, more to lost the functionality is not good to me I need that when a certain command is executed, I can identify that the command was executed and run some other commands Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted October 17, 2012 Share Posted October 17, 2012 Use a Command Reactor with a callback function triggered by the :vlr-commandended event. Here is an introduction tutorial on reactors (from AfraLISP): http://www.afralisp.net/visual-lisp/tutorials/reactors-part-1.php Quote Link to comment Share on other sites More sharing options...
rodrigo_sjc_sp Posted October 17, 2012 Author Share Posted October 17, 2012 Thanks Lee Below the code running in the future for those who want: (if (null *save-reactor*) (setq *save-reactor* (vlr-editor-reactor nil '((:vlr-savecomplete . savedrawing)))) ) (defun savedrawing ( reactor params ) (Alert "aaaaa") (princ) ) To learn more events that you can access, follow the link: http://www.bricsys.com/bricscad/help/en_US/V12/DevRef/source/Lisp_vlr.html the key is to change the 2 items in this command (setq * save *-reactor (vlr-editor-reactor nil '((: vlr-savecomplete. savedrawing)))) vlr-editor-reactor and vlr-savecomplete In my case vlr-editor-reactor to pick stocks editing the file and vlr-savecomplete to run after save the DWG file Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.