Creating a Reaction: AttributeModification Event

This task explains how to use the AttributeModification event in a reaction feature. In the scenario below, you are going to create a reaction based on the activity (activated or deactivated) of a point. If the point is activated, a message box is displayed.
This reaction is designed to react to attributes modification (state, name, thickness...).

Modification events are not available for all features. If it is the case with the feature you have selected, select the attribute in the Select a source... window and use the ValueChange event. The reaction will be launched when the attribute is modified.

For more information about the Reaction feature window, see Using the Reaction Feature Window.

  1. Open the KwrAttributeModificationEvent.CATPart file. This file contains a point that is deactivated.

  2. From the Start > Knowledgeware menu, access the Knowledge Advisor workbench and click the Reaction icon () to create a reaction. The reaction dialog box opens. 

    • In the Source type field, select Selection and select Point.1 in the specification tree.
    • From the Available events scrolling list, select AttributeModification.
    • From the AttributesLabel scrolling list, select Activity for the reaction to be launched when the point is activated or deactivated.
    • In the Action field, select VB action and enter the following text into the editor: MsgBox "Point.1 activated"
    • Click OK when done. The reaction is created and is displayed below the Relations node in the specification tree.
  3. Double-click Point.1 in the geometry to access the Generative Shape Design workbench.

  4. Right-click Point.1 and select Point.1 object > Activate. A dialog box is displayed indicating that Point.1 is activated.

  1. Click OK. Point.1 is activated.