The OnEnvironmentChange event notifies the client when the active environment switches from one environment to another.
Name | Type | Description |
Environment | Environment | The environment object whose state is changing. |
EnvironmentState | EnvironmentStateEnum | Indicates the transition state the environment is going through. |
BeforeOrAfter | EventTimingEnum | Input EventTimingEnum indicating when the event is being fired. Notification is sent before and after the environment change. |
Context | NameValueMap | Input NameValueMap object that contains additional information about the event. Name = "Document". Value = The Document object this environment is associated with. Name = "Reason for event". Value = "Undo" or "Redo". The activation of environments is transacted so environments can be activated as a result of an undo or redo operation. If this value is " " then the activation is occurring from an explicit action either from the end-user or through the API. If this value is "Undo" then the activation occurred as the result of an undo operation and if it is "Redo" then it is the result of a redo operation. |
HandlingCode | HandlingCodeEnum | Output HandlingCodeEnum that indicates how you are handling the event. You can cancel the environment change by changing this value to kEventCanceled. |