When using Text boxes or the Annotation Button (Interface) you can include the values of variables, and other attributes such as the equation or documentation. To do this insert the variable name and attribute you would like to display inside of ${}. For example ${Population:Documentation} would display the content of the Documentation Tab for the variable Population.
The syntax for this is
${varname:attribute@time!run}
varname is the name of the variable to show values or attributes for.
:attribute is one of the attributes described below, or it can be blank to show the variable value.
@time is the time at which to get the value from. If blank the last value in the run will be reported.
!run is the run from which to get the value (or run name). This uses the same run identification convention as the HISTORY function described in Data builtins - 1,2,3... for the first, second, or third run and -1... for the previous run. If no run is specified the current run is used. If the run does not exist the returned value will be blank.
Note If you do not include any attribute (as in ${Population} or ${Population@1995} the value of Population (or the value of Population at time 1995) will be displayed.
The attribute is separated from the name by a colon : with no spaces. The list of attributes that can be displayed is:
ARRAY will display the comma separated list of array elements in the variable being displays without brackets as in large,red. If the variable is not arrayed this will be blank.
ARRAY1...ARRAY8 will display the individual array elements at the associated position. No punctuation will be added.
DOCUMENTATION will display the documentation for the variable as it was entered.
EQUATION will display the equation for the variable as it would appear in the Equation Tab (though summing converters will show something like a+b).
NAME will show the name of the variable. This is most useful for Placeholders, where it will show the selected Placeholder member.
RANGEMAX will show the maximum value on the input range (
) as specified in the Scales and Ranges Tab.
RANGEMIN will show the minimum value on the input range.
RUNNAME will display the name of the run which values would be drawn from for the VALUE attribute, normally simply the current run. This does not actually depend on the variable, so any valid variable name will work. If the run does not exist, it will be blank.
SCALEMAX will show the maximum value on the global scale (
) as specified in the Scales and Ranges Tab.
SCALEMIN will show the minimum value on the global scale.
TAGS will show a comma separated list of tags active for the variable as set on the Documentation Tab. If no tags are active it will be blank.
UNITS will show the units of measure for the variable.
VALUE will show the value for the variable, formatted according to the settings on the Scales and Ranges Tab. it can be followed by an option @ to specify a time as in ${sales:value@20}. If you do not specify any attribute the values will be reported as in ${sales@20}.
Note The substitution will occur when you finish editing. If you are editing in the panel the old substituted text will remain on the page until you finish editing.
${Population} - the value of population from the current run at the end of the run (or beginning if the run has not yet happened).
${Population@50} - the value of population at time 50 or NaN if the current run has not yet happened.
${Population!-1} - the value of population in the previous run or blank if there is no previous run.
${Population:RUNNAME!1} - the name of the first run.
An info text box for an arrayed placeholder (reminder a 1 dimensional placeholder can hold higher dimension variables) might look like:
Name: ${arrayed_placeholder[?]:name}
Array: ${arrayed_placeholder[?]:array}
Array1: ${arrayed_placeholder[?]:array1}
Array2: ${arrayed_placeholder[?]:array2}
Array3: ${arrayed_placeholder[?]:array3}
Array4: ${arrayed_placeholder[?]:array4}
Array5: ${arrayed_placeholder[?]:array5}
Equation: ${arrayed_placeholder[?]:equation}
Units: ${arrayed_placeholder[?]:units}
Value: ${arrayed_placeholder[?]:value}
Documentation: ${arrayed_placeholder[?]:documentation}
Tags: ${arrayed_placeholder[?]:tags}
ScaleMin: ${arrayed_placeholder[?]:ScaleMin}
ScaleMax: ${arrayed_placeholder[?]:ScaleMax}
RangeMin: ${arrayed_placeholder[?]:RangeMin}
RangeMax: ${arrayed_placeholder[?]:RangeMax}
Runname: ${arrayed_placeholder[?]:runname}