Courses: Introduction to GoldSim:

Unit 16 - Creating Dashboards and Player Files

Lesson 5 - Understanding Dashboard and Player Views

Now that we have created a Dashboard and a Player file, let’s take a step back and look a bit closer at those two files (.gsm and .gsp) to make sure we understand how Dashboards work in GoldSim and the Player.

Let’s start with the GoldSim model file (.gsm). Open the model again (if it is not already open). The model will likely be displaying the Dashboard (since that is where we left off last time we looked at it). Navigate out of the Dashboard back to the main portion of the model, and then double-click on the Inflow element:


What you will notice is because it is linked to an input control, you can no longer edit the element here.  So what if you want to edit it? Once an element is linked to an input control, the only way to edit the element in GoldSim is through the control itself.  If you press the Go to Control button, it will close the dialog and jump directly to the control on the Dashboard and select it:

In order to change the value of the Inflow (by using the Slider), we need to understand that within GoldSim, Dashboards can be in one of two views: Design view and Active view.  So far, we have only been in Design view (the default view). Within this view, you can add and edit controls, and add other objects (e.g., images and text) to your Dashboard.

When a Dashboard is in Design view (like this one), you will note the following:

  • The Drawing Tools toolbar is available for adding new objects such as text and images;
  • The Dashboard toolbar is available for adding new controls; and
  • You can edit the properties of the controls by double-clicking on them, but you can’t actually use the controls (like we did in the Player).

If we want to actually use the Dashboard (such that it appears just as it would in the Player), we need to place the Dashboard into Active view. You can do this by pressing the Dashboard Active button in the Controls toolbar:

or alternatively, by right-clicking in any empty spot in the Dashboard and selecting Dashboard Active from the context menu. Do that now, and the Dashboard will look like this:

In Active view, the various input and button controls can be used, and the Dashboard appears as it will when viewed within the GoldSim Player.  When in Active view, the controls cannot be resized, their properties cannot be edited, and new controls (or graphics and text) cannot be added (e.g., with the exception of the button for toggling between the views, the buttons in the Controls toolbar are grayed out).  You will see, for example, that you can change the values in the two sliders.  Moreover, if you run the model, the thermometer works (just like it does in the Player), and you can press the “View Result” button to display the time history result.

Note: Active view only applies to Dashboards and has no meaning outside of a Dashboard in GoldSim.  If you navigate out of the Dashboard to a Container, you will be able to edit the contents of the Container.  If you then return to a Dashboard, it will still be in Active view.

There are two reasons why you would want to use Active view within GoldSim:

  1. While you are designing your Dashboard(s) for use in a Player file, you will often want to see how the Dashboard will appear when it is viewed in the Player.
  2. As pointed out above, once an element has been linked to an input control, it can only be edited via the control on the Dashboard.

Note: It is worth pointing out that in some cases, you may want to add Dashboards to your model even if you do not plan to create a Player file.  This is because Dashboards can provide a quick and effective way to change inputs and run your model.

We can return to Design view (so that the Dashboard controls can be edited again), by toggling the Dashboard Active button in the Controls toolbar, or right-clicking in the Dashboard and de-selecting Dashboard Active from the context menu. 

Return to Edit Mode (if you ran the model), and then return to Design view.

Next, right-click on one of the Slider controls.  You will see that it provides an option to Go to referenced element:

If you click this, GoldSim will jump to (and select) the referenced element.

Now that we understand how Dashboards can be viewed in GoldSim, let’s briefly revisit the same model in the Player.  If the Player file (.gsp) is no longer open, navigate to it using File Explorer and double-click on it to open it again:

Note: This model is in Result Mode.  You could reset the model (so the sliders can be used) by pressing the Reset button or F4.

The size of the Dashboard itself is fixed (i.e., it cannot be resized by the Player user).  Recall that we defined it within GoldSim before we created the Player file in the Properties dialog for the Dashboard.

The Player will open such that the Dashboard exactly fits inside the window that is displayed. Note, however, that the Player user can expand or shrink the window (by dragging the edges).  If the Player user expands the window, the Player simply displays gray empty space around the Dashboard (since the Dashboard itself is of fixed size). If the Player user shrinks the window, scrollbars appear:

If the Dashboard is too large to fit on the Player user’s screen (e.g., the Dashboard was 1024 by 768, but the Player user’s screen was only 800 by 600), the Dashboard fills the screen and scrollbars are automatically added.

When viewing a Dashboard within the Player, the interface seen by the user is completely determined by the author.  Other than menu and two toolbars at the top, none of the regular GoldSim interface is visible.  Hence, as pointed out previously, the Dashboard has the appearance of a custom application.

Note: As seen earlier in this Lesson, when the Dashboard is viewed within GoldSim (e.g., by the author), it appears differently than it does within the Player.  In particular, it is embedded within the GoldSim interface (which has additional toolbars and menu options).

So if a user is only interacting with Dashboards in a Player file, they need know nothing at all about GoldSim, and can edit and run the model without being familiar with the underlying GoldSim model structure. 

In some cases, however, you may also want the Player user to view the GoldSim model structure (and, in fact, all of the element dialogs).  You may recall that when we created the Player file in the previous Lesson, there was an option to Allow the user to browse the model. This option was cleared (the default).  Because of this, we can’t currently browse the model using the Player.  To do so, we need to change that option and recreate the Player file. Let’s do this now:

  1. Close the Player file.
  2. Return to the GoldSim model file.
  3. Press File|Save Player File… from the main menu.
  4. On the third page of the wizard, make sure Allow the user to browse the model is checked.
  5. Finish saving the Player file.

Now navigate to the Player file using File Explorer and double-click on it to open it again.  As you can see, the top of the Player file now looks a bit different:

In particular, the Container navigation controls are now present below the toolbars. Recall that prior to recreating the Player file (with Allow the user to browse the model cleared) the top of the Player looked like this:

Now that these navigation tools are present, we can click on the Go Up button at the top of the screen:

When you do so, you will jump over to the top level of the entire model:

Note: We could also have added a Button control to the Dashboard with an action that jumped directly to the top level Container (or if other Containers existed, any Container) when the button was pressed.

Spend a little time browsing and you will notice that you can move around the model and open element dialogs.  If the model had multiple Containers, you could also browse to them.  You cannot, however, edit or change the model in any way.  The only way to edit the model is via the input controls on the Dashboard.

It is worth noting that you can actually create a Player file that has no Dashboards at all.  In this case, of course, Allow the user to browse the model must be checked.  If you did so, the Player user could not actually change any inputs, but they could browse the model structure (and run the model with the current inputs and view results).

Before leaving this Lesson, it should be pointed out that in addition to double-clicking on a Player file to open the Player, you can also open the Player directly, and then select a file to open.  If you open the Player (e.g., by selecting the application from the Windows Start menu), the Player will open like this (with no model selected):

You can then choose to open a Recent Model or browse to another model.

You can close both the GoldSim model and the Player file now.