:vlr-beginSave event occurs. When you complete the save process, a :vlr-saveComplete event occurs. In designing a reactor-based application, it is up to you to determine the events you are interested in, and to write the callback functions to be triggered when these events occur.
For each reactor type there are a number of events that can cause the reactor to notify your application. These events are known as callback events, because they cause the reactor to call a function you associate with the event. For example, when you issue the Save command to save a drawing, avlr-reaction-names function returns a list of all available events for a given reactor type:
The(vlr-reaction-names reactor type)
For example, the following command returns a list of all events related to Object reactors:
$ (vlr-reaction-names :VLR-Object-Reactor)
(:VLR-cancelled :VLR-copied :VLR-erased :VLR-unerased :VLR-goodbye :VLR-openedForModify :VLR-modified :VLR-subObjModified :VLR-modifyUndone :VLR-modifiedXData :VLR-unappended :VLR-reappended :VLR-objectClosed)
You can print out a list of all available reactor events, sorted by reactor type, by loading and running the following code in VLISP:
(defun print-reactors-and-events ()
(foreach rtype (vlr-types)
(princ (strcat "\n" (vl-princ-to-string rtype)))
(foreach rname (vlr-reaction-names rtype)
(princ (strcat "\n\t" (vl-princ-to-string rname)))))
(princ))
vlr-acdb-reactor creates a database reactor, vlr-toolbar-reactor creates a toolbar reactor, and so on.
The AutoLISP Reference lists each event available for a reactor type. For each reactor type, you can find this information by looking up the description of the function you use to define a reactor of that type. These functions have the same name as the reactor type, minus the leading colon. For example,