VLISP provides functions to modify reactor definitions:
(vlr-reaction-set reactor callback-condition 'callback-function)
circleReactor reactor to call the print-area function when an object is modified:
For example, the following command changes the$ (vlr-reaction-set circleReactor :vlr-modified 'print-area)
PRINT-AREA
$ (vlr-data-set circleReactor "Circle Area Reactor")
"Circle Area Reactor"
Inspecting Reactors is still displayed in your VLISP session, right-click in the window's object line and choose Update. If you've modified the circleReactor reactor as shown in this section, the updated Inspect window will look like the following:
You can verify that the reactor has changed by using the VLISP Inspect feature. If the Inspect window shown in
$ (vlr-owner-add circleReactor archie)
#<VLA-OBJECT IAcadArc 03ad0bcc>
archie object, the callback function defined for reactor circleReactor is invoked. You can verify this by inspecting the reactor. Update the Inspect window for the circleReactor reactor, then right-click on the list item that begins with {Owners} and choose Inspect:
Now, if a user modifies the
Both the Arc and Circle objects are listed in the Inspect window.
$ (vlr-owner-remove circleReactor archie)
#<VLA-OBJECT IAcadArc 03ad0bcc>