Placeholders

Placeholders are variables that stand in for other variables when used in input and output objects such as graphs and tables. By using a placeholder you can then switch between the different selections and have the new information displayed (or input set) without have to define a new object specific to the choice you are making. This is a useful way to have collections of objects (or entire interface pages) be set up to easily switch between contexts.

Placeholders do not use connectors into them to determine what they can represent, instead placeholder choices are determined by creating a list as described below. Placeholders are not part of the computation of the model, and can have no connectors going out of them.

To put a placeholder on the diagram

  1. In the Build toolbar, choose a placeholder type from the Module dropdown menu.
  2. Click the placeholder tool. The cursor will change to a placeholder icon.
  3. Click anywhere to drop the placeholder.
  4. In the properties panel (Equation Tab as List), select the variables for which the placeholder can stand in.

    For more information about placing, naming, and editing objects, see Working with Building Blocks.

Working with Placeholders

You can use placeholders in the definition of all input and output objects including graphs and tables just as you would any other variable. Simple select the placeholder from the list of possible variables when choosing what to display or change.

Note Placeholders are not available for the Group Input (Interface), Array Input (Interface), or Spatial Map (Interface) as these objects depend directly on the array characteristics of the variable they work on.

Adding Placeholders to a Graph, Table or other Object

When editing the object click on the then select the placeholder from the Find window by clicking on it. If you are working with a specialized input, such as a switch or graphical input, the placeholder will be available in the list only if every possible choice for the placeholder would work. For example, if you are setting up a graphical input, only placeholders for which all of the choices are themselves graphicals will be shown.

The placeholder name will show up directly in the definition of the object:

But when it is displayed, the value for one of its potential choices will be shown:

Changing Placeholder Selections

In the Model Window

On the model you change the placeholder selection by opening the Results Panel on the placeholder and selecting which you want to see:

The choices are the variables in the order you place them in the Equation Tab as List, including any wildcard (?) array values you may have selected. Choose one from the list and the results panel, and any graphs, tables, or numeric displays using the placeholder variable will update.

On the Interface

When working on the interface, published or on the desktop, placeholders can be changed in one of two ways. You can use the Button (Interface) to set the value, possibly in conjunction with other actions. You can also place a Selector (Interface) on the page allowing the interface user to choose what to see where the placeholder is used.