OK, I'm fairly new to the world of reactors and have run into a problem which I'm hoping somebody can help me with.
<snip>
Is there anybody out there who can confirm whether they get the same errors as me or whether I am doing something fundamentally wrong in the way I am handling reactors?
Welcome to the world of Reactors!
I've tested the code you posted, and while I would not code it that way personally, the code tests fine using Civil 3D 2011:
Command: mvsetup
Initializing...
Enable paper space? [No/Yes] <Y>: *Cancel*
Command: !abc
123
As for the issue you are experiencing, I am unfamiliar with Architecture (being a Civil guy)... But I do use Reactors for several purposes in our setup. Is there something specific you'd like assistance with?
As the code James has posted illustrates, Reactors can be utilized to perform several different tasks, and in different circumstances; they're not all powerful, but they pack quite a punch.
You have to code for ANY event that can happen: CommandStart, CommandEnded, CommandCancelled.
This statement is incorrect... One need only code for the Events which one intends to monitor, or react to, and _not_
"ANY event that can happen."However, as a minimum standard (IMO)... A responsible developer will implement
CommandCancelled,
CommandEnded, and
CommandFailed Event Callback(s) when modifying the end-user's environment (i.e., settings, sysvars, etc.) via the
CommandWillStart Event.
While a best practice, these are _not_ necessary for the
CommandWillStart Callback to perform.