Skip to end of metadata
Go to start of metadata

The Type Properties can also be used to define triggered events. Events can be found in the Functional section after Contain Flows. Events linked to the project root can be accessed directly through a right-click in RulesEvents.

Actions can be triggered on the following types of events:

  • On adding a child object - called for parent object
  • On adding an instance of an existing object - called for added object (thus cannot be applied to the root object)
  • On adding a new object instance - called for added object (thus, cannot be applied to the root object)
  • On the change of an attribute value - called for object where attribute value is changed
  • On the change of direction of a link - called for link which direction is changed (thus cannot be applied to the root object)
  • On the deletion of an object - called for object before it is deleted (see below)
  • On the removal of a child object - called for parent object
  • On the renaming of an object - called for object which name is changed
  • On activating a view diagram - called when a view diagram is activated
  • On changing object properties - called for object which graphical properties are changed
  • On changing active projection - called when active projection is changed

The Program drop-down list is used to select a Program attribute of the type. This script is executed at occurrence of the related event. If there are no available Program attributes, the list is empty.

Icon

To use an event in the projection, ensure that the linked Program attribute is checked there.

To remove a triggered event, select the empty line in the Program list.

Icon

Before closing the window, do not forget to click on Save to save your changes.

Icon

The script triggered by the delete event may veto the delete by returning Py_False. This functionality is available for the GUI only. Moreover, the OnDelete script is not called for children recursively.

The following code will always prevent the deletion from the GUI:

Icon

Some events have an additional parameter to get the event type and the related object. For example, this code in event OnAddChild will print the new child name

  • No labels