Using the timer object
You use the Timer object to dictate or automate the occurrence of an event action based on time intervals.
You can find the Timer object in the Miscellaneous palette.
About this task
To insert a Timer object:
- In the editor window, select the visual dashboard scene to which you want to add the Timer object. If the scene is not open in the editor, then double-click the scene in the Project Explorer view.
- From the Palette view, select the Timer object and click the editor window. The Timer object is drawn on the canvas in the editor window and it is added as a node in the Project Explorer.
- From the Properties view, set the EventInterval property value. You will specify a time value in this property. The default is set to one (1) second.
- You can create multiple Timer objects each having a different value for the EventInterval property. For example, one Timer object can have an EventInterval set to one second. Another Timer object can have an EventInterval set to five seconds.
- In order for the Timer object to have any effect, you must set an event action to occur each time the EventInterval time elapses. For example, if you set the EventInterval property to one second, the event action that you assign to the specific Timer object will occur every one second.
- To set an event action for the Timer object, select the Timer object from the Project Explorer view.
- Double-click Tick from the Events view. The [timerobjectname] Behavior window opens.
- Click the Add New Action icon. The Add
New Action wizard opens. You can choose one of the following
actions to occur on every tick of the EventInterval:
- Jump to new location
- Navigate to embedded sceneNote: The Navigate to embedded scene action is only available to objects other than the Embedded Scene object if the Embedded Scene object is in the current scene.
- Execute SQL statementNote: The Execute SQL statement action is only available to objects if one or more repository connections have been defined for the visual project in the Connections folder.
- Execute procedure
- Set values
- Navigate back
- Print scene
- Execute shell command
- Show message
- Execute Java™Script
- Export to Excel
- Set focus
- Reload scene
- End session
- Export to PDF
- Send Email
- Send Event to Embedded Scene
- Save Cookie
- Load Cookie
- Click Next. The next window that opens depends on the action that you selected. If you selected the Set values action, the Set values action parameters window opens.
- Double-click the Parameter cell. The Expression Designer opens.
- The Expression Designer tree lists each object that is included in the selected visual dashboard. Expand the node for the object whose behavior will be changed at each tick interval. A list of the object's properties is displayed.
- Select the property of the object that will change at each tick interval. For example, if the object is a Label object, select the Text property. Specify what the value of the text property will be at each tick of the interval using one or more of the available functions.
- Click OK. At runtime, with a tick interval of one second, the content of the Label object will change to the new value that you specified every one second.