Object Events Overview

Object Inserted, Object Removed events

Object Inserted, Object Removed Overview

Object Inserted and Smart Object example

Trigger a Smart Object

Object Inserted, Object Removed events

Object Inserted

Object Removed

Smart Object

Object Inserted, Object Removed Overview

 Note: The object events are very useful if you want to trigger actions, that are as simple or as complex as you specify, by simply inserting or removing a SmartObject from a screen. The object can be a frame container, group or object.

All object events that are configured for objects in a frame container or group will trigger their accompanying procedures or scripts anytime the frame container or group is inserted (pasted, dragged).

You can make these objects trigger actions, for example, create a point that goes beyond the scope of the CimEdit screen. Therefore, make sure you anticipate what will happen if you insert an object more than once, on either the same or different screens and then remove one from a screen.

Example Object Inserted and Object Removed Application

An object can be configured so that when it is:

Inserted on a screen, an Object Inserted event triggers a procedure or calls a script that creates several variables for your CimEdit screen.

Removed from the screen an Object Removed event triggers a procedure or calls a script that deletes the variables from the screen.

Whenever the object is inserted, the variables are created. When the object is removed, the variables are deleted.

 Tip: Configure several objects with the ObjectInserted and / or ObjectRemoved event on one or more CimEdit screens. Create your own object library that will display in the Object Explorer. You can then easily find and insert them when you need them.

Configure a SmartObject event with the same script as the Object Inserted event. This creates Smart Objects that a designer can trigger both when the object is inserted on a CimEdit screen and during the design process when the screen is open.

To protect your named Smart Object from being decomposed, you can save the CimEdit screen as a runtime-only screen (.cimrt ). As a result, another designer will be able to link the protected SmartObject, but not copy it or view the code.

More information

Available events.