Text Result Control

The Text Result control allows you to display one of a series of user-specified text strings based on the value of an output (e.g., if the value is less than 10, display “Low”, if the value is between 10 and 30 display “Medium”, and if the value is greater than 30 display “High”).

This can be used to visually indicate the state of a variable in your Dashboard (e.g., whether a pump is on or off; whether a variable has reached a dangerous level). It behaves similarly to (and can be used in conjunction with) a Result Status Display control. A Result Status Display control displays different icons based on the value of an output; a Text Result control displays different text strings based on the value of an output.

The toolbar button looks like this:

Text Result Control Button

The Text Result control looks like this when it is first added to a Dashboard and selected:

The eight handles allow you to resize the control. For more precise changes, you can also change the width of the control using Ctrl-Left and Ctrl-Right, and change the height using Ctrl-Up and Ctrl-Down. (The default change is 1 pixel at a time. If you press the Shft key, the change is 5 pixels).

Double-clicking on the control displays the following properties dialog:

Within the Display portion of the dialog, the output to which the control is to be linked is specified.  Before doing so, however, you must specify the type of result you wish to display:

Monitor Output Value: This is the default, and will display the actual value of the selected output.

Display Monte Carlo Result: This should be selected if you wish to display a statistical result for an output from a Monte Carlo simulation (e.g., the mean value or a particular percentile). 

After selecting the type of result you wish to display, you select the specific output by pressing <Click to select>.  This will display a browser for selecting the element of interest.  If you have selected “Monitor Output Value”, the browser will contain all elements in the model. In this case, any scalar output can be selected. If you have selected “Display Monte Carlo Result”, the browser will contain only the Distribution Result elements in the model (i.e., in this case, you must link to a Distribution Result element, and the first result in the element will be used).

Once you have linked the control to an element, the linked element will be listed:

You can remove the linkage (by pressing the red X button), or reassign the linkage (by pressing the name of the element itself).

Note that if you have selected “Display Monte Carlo Result”, you must also display the type of statistical result to display:

   Note: Text Result controls can be linked to both values and conditions.  If the control is linked to a condition and “Monitor Output Value” is selected, text strings must be selected for True and False.  If the control is linked to a condition and “Display Monte Carlo Result” is selected, however, statistics are generated by assuming True = 1 and False = 0 (and hence text strings are chosen for values ranging from 0 to 1).

Once you have selected the element that will be monitored, you must then define the text strings that will be used to indicate various states.  In the example above (the default setting), the control represents two states: if the value is less than or equal to 0, the text “Non-positive” will be displayed; if the value is greater than 0, the text “Positive” will be displayed.

You can add as many states as you want (using the Add button).  States can be deleted (using the Remove button) or moved up and down (using Move Up and Move Down).

You must assign the conditions pertaining to each state (i.e., the set of values that results in each text being displayed).  You do not assign a condition for the final string.  If all the other conditions are false, the last text string is displayed.

For example, in this case, four different states have been selected, with four different text strings:

In this example,

   “Negative” is displayed if the value is < 0;

   “Low” is displayed if the value is >= 0 and  <= 10;

   “Medium” is displayed if the value is > 10 and  <= 20; and

   “High” is displayed if the value is > 20.

The conditional operators (<, <=, >, >=) can be controlled via drop-lists.  Note, however, that GoldSim ensures that they are consistent in terms of whether the choices change with increasing or decreasing values.  That is, if one operator is > or >=, all the other conditions must also be > or >=.

The Value fields to the right of each conditional operator only accept numbers without units.  If the element has dimensions, these fields assume that the value is being specified in the display units of the element (which is displayed at the top of the dialog).

Text Result controls can be linked to both values and conditions.  If the control is linked to a condition (and “Monitor Output Value” is selected such that only two outcomes are possible),, the number of states is fixed at 2 (the Add, Remove, Move Up and Move Down buttons are grayed out), and the first text string is shown when the element is False, and the second text string is displayed when the image is True:

The Test and Value columns cannot be changed when the control is linked to a condition.  Only the Display Text can be edited.

The Appearance section of the properties dialog allows you to modify the Text Color, Background (color), text Alignment, and type of Border for the display. These options are self-explanatory, and you may want to experiment with them to see how they change the control’s appearance. 

The size of the text is controlled by the size of the control (GoldSim scales up the font size to match the control size).

   Note: You cannot select the font for a Text Result control. GoldSim always uses the default GUI font used by the operating system. The font is dynamically scaled based on the height of the control.

The bottom section of the dialog allows you to enter a tool tip, which will be displayed whenever the Dashboard user holds the mouse cursor over the control.

The Attributes tab of the dialog provides tools that allow you to hide or disable the control dynamically based on the values of various model outputs. This allows you, for example, to hide the control if it was not applicable under certain situations.

Related Topics…

Learn more about: