INFORMIX
Visionary User's Guide
Chapter 11: Adding Resources and Global Parameters to a World
Home Contents Index Master Index New Book

Adding Global Parameters

A global parameter is available to all scenes in a world and to the user in Visionary Viewer. Visionary provides four built-in global parameters:

Each of these built-in global parameters has a default value that is used when the parameter is called, if no value is specified. For example, after you publish your world, the default values for ViewerZoom and ViewerClass specify the initial level of detail and the viewer class, unless you set different parameter values.

You can also create additional global parameters and set default values for them, as described in the following section.

Inserting Global Parameters into a World

Use the Insert Resource dialog box to insert and define global parameters.

To insert a global parameter

    1. In the Scenes panel of the World Manager, right-click the world where you want to insert the parameter and select
    Insert Global Parameter from the popup menu to display the Insert Parameter dialog box.

    2. Type a parameter name in the Name text box.

    3. Select a data type from the Data type list box.

    4. Optionally, you can provide descriptive text in the Description text box.

    5. Check the Has default value check box and type the default value.

    6. Optionally, check the Make public at runtime check box if you want the parameter to be available to the end user in Visionary Viewer.

The new parameter appears in the Global Parameters folder in the Scenes panel.

Using Global Parameters in Property Expressions

You can use global parameters when you write property expressions to modify object properties.

Suppose you want to restrict viewing access of a data element in a layout to a particular viewer class. You could use the ViewerClass global parameter in a property expression to specify the visibility property of the data element.

To use the ViewerClass global parameter in a property expression

    1. Insert the global parameter you want to use.

    2. In the Scenes panel, select the layout that contains the data element.

    3. Select the data element in the Object Inspector list box.

    4. Type the property expression IsViewer(ViewerClass) in the visibility property cell as shown in Figure 11-5

    Figure 11-5
    Specifying ViewerClass Global Parameter in Visibility Property

    .

For more information about the IsViewer( ) function, see Appendix C, "Functions and Support Syntax." For more information about viewer classes, refer to the on-line help. For more information about property expressions, see Chapter 7, "Modifying Object Properties."

Using Global Parameters in Event Actions

You can use global parameters when you create event actions. Suppose you have a scene that contains a pie chart to show the percentages of sales per customer. You might want to allow users to click on a wedge and jump to another scene that shows more details about the wedge. You can use global parameters when you define the event action in the Object Behavior dialog box. Here is an example of how you might do that.

To set global parameters in an event action on a Wedge object:

    1. Insert the global parameter you want to use.

    2. Select the pie chart in the scene where you want to create the event action.

    3. Choose View Data Element to display the data element in the Data Element Editor.

    4. Select the Wedge object in the Object Inspector list box.

    5. Click the Events tab in the Object Inspector to display the Events page, as shown in Figure 11-6.

    Figure 11-6
    Selecting the Click Event

    6. Double-click the Click event cell to display the Object Behavior dialog box, as shown in Figure 11-7

    Figure 11-7
    Setting a Jump Action on a Wedge Object

    .

    7. Select Jump to new location in the Action list box.

    8. Select a scene in the Scene list box.

    9. Select a viewpoint from the Viewpoint list box.

    10. Click Apply.

    11. Click the Set Parameters tab to display the Set Parameters page.

    12. Click New and then click one of the grid cells in the Parameter column to display a list box and select a global parameter from the list box, as shown in Figure 11-8

    Figure 11-8
    Setting Global Parameters in an Event Action

    .

    13. Select a column name in the Value list box.

    14. Click OK to close the dialog box.

    15. In the Data Element Editor, click Runtime Mode and test the event action by clicking on one of the pie chart wedges.




Visionary User's Guide, version 1.0
Copyright © 1998, Informix Software, Inc. All rights reserved.