Reactor that detects when you will close a drawing, but then cancelled
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
G'day,
I have a reactor that detects when you are about to close AutoCAD which then updates some information. It works well, however when the file are modified so you get an alert with the option to cancel the close and you select it, only the information gets updated when you are effectively canceling the close.
The reactor is a command reactor and it has to use the command will begin option.
Is it possible to somehow nest the two reactors so that the comandCancelled function can be triggered after the command will begin one?
Thanks.
This is part of the reactor code
(if (not wai:acad_close)
(progn
(setq wai:acad_close (vlr-command-reactor nil '((:vlr-commandWillStart . wai:acadclose))))
)
)
This is wai:acadclose does
(defun wai:acadclose (calling_reactor command_list)
(if (member (nth 0 command_list) (list "CLOSE"))
(if (member "doslib20x64.arx" (arx))
(progn
(dos_capslock)
)
)
)
)
The example is trivial, but I use it to update a whole lot of information including this. How do I detect that the command has been cancelled and this does not need to be done?
I tried to use :vlr-commandCancelled but the :vlrcommandWillStart has already been handled control so is ignored.
Can the reactors be nested?
Thanks.