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 Overview
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 ObjectInserted event triggers a procedure or calls a script that creates several variables for your CimEdit screen.
- Removed from the screen an ObjectRemoved 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.
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.