Event Commands

Commands can be attached to GraphWorX64 overall events, dynamics, and GraphWorX64 Viewers.

 

To configure GraphWorX64 event commands:

  1. Ensure you are in advanced mode (View ribbon > Application Mode > Advanced Mode).
  2. Select the object or dynamic with the event in question, such as:
    1. The ThisDisplay object (i.e. deselect all objects).
    2. A layer.
    3. A dynamic on an object.
    4. A GraphWorX64 Viewer.
  3. On the Properties panel (for This Display, layers, or GraphWorX64 viewers) or Dynamics panel (for dynamics), find the Runtime – Event Commands section.
  4. Edit the EventCommands property.  
  5. In the dialog that opens, choose your event from the dropdown and add commands to it.  

The configured commands will now be executed automatically when the event occurs. Multiple commands configured for the same event will be executed in parallel. To ensure a particular order, use a batch command.  

 

Many events have associated context variables. For example, commands attached to the DataEntryValueEntered event can use "@@valueentered.value" to get the value that was written. These context variables are available in the expression editor within a command. Open the expression editor, select Variables, then go to the Context Variables tab.

 

Starting V10.97.2, context variables in control commands offer e. g., @@control.comandingname , which, when assigned to the Target property of a command, execute the command on the control itself (even if that control does not have a commanding name).

 

It is possible to disable the commands on an object without completely removing them. Simply set EnableEventCommands to false. Set it back to true when you are ready for your commands to work again.

 

These commands will execute in both the desktop (WPF) and HTML5 platforms.