Smart Object Event

The primary purpose of a Smart Object event is to create a Smart Object that a user can double-click in a CimEdit screen and display a simple Smart Object Configuration dialog box instead of the detailed Properties dialog box. The user enters one or more values, as determined by the Smart Object event configuration. The Smart Object is ready for runtime use with no more configuration required.

Note: When the object is assigned a Smart Object event, a screen designer can select the object on the CimEdit screen and click Trigger Smart Object in the Home>Properties group on the CimEdit Ribbon bar to open the Smart Object Configuration dialog box.

You can protect your proprietary Smart Objects by preventing the interior logic from being examined. You do this by saving your CimEdit Screen as a runtime-only screen.






Contains a drop-down list of existing procedures and scripts.

Use either of the following.




Create or use an existing procedure.




Create or use an existing script.

The default code begins as follows.

Sub OnSmart Object()



These entry points have no parameters.


Debounce event


(Default) Debouncing is enabled.

When the action for an event is not completed and a duplicate event is triggered, the duplicate will not trigger an action.




Debouncing is disabled.

Multiple events can be queued.

 Tip: The Object Explorer library contains several pre-configured Smart Objects that you may want to review before you take the time to create a new Smart Object. You can also place any Smart Objects you create in the Object Explorer library so they will be available for frequent use.

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 Smart Object, but not copy it or view the code.

 Note: In order to provide developers with maximum flexibility when a developer configures Smart Object events, the CimView screen provides a Trigger Smart Object option on its popup menu when a Smart Object is right-clicked during runtime. As a result, a CimView operator might open and enter values in the:

Same Smart Object Configuration dialog box that the CimEdit screen designer uses or,

A dialog box that bypasses the CimEdit screen designer.

If you want to prohibit the CimView operator from opening the dialog box, you need to disable it through scripting.

More information

Basic extensions for CimEdit scripts.

Object events overview.

Available events.