Displays the value of a model variable. txt contains the variable name to be displayed. If the variable specified uses Subscript Ranges the first selected element in the range will be used. The name can also be followed by special delimiters. In brief those delimiters are:
• | @time - specifies the time at which the value is to be taken. Can have values SPECIAL, START, END or a number. If not specified this is SPECIAL. |
• | #time_base - names a Time Base to be used with the associated time. (It only makes sense to set #time_base if @time is used with a number). If not specified the Time Base currently selected in the Globals>Time Axis box is used. |
• | &dataset - names the dataset to be used. *1 name the first loaded dataset, *2 the second and so on. If not specified the first loaded dataset is assumed, or the value is read from the current simulation state if possible (e.g. in gaming or during simulation setup). |
• | %-3.3g etc. - specifies the format for the output number using C language formatting rules. If not specified the number is output in Vensim's pretty number format. |
• | ?value=label?value=label... - specifies that for the stated special values a label string is to be substituted. This is especially useful for switch variables. You can have as many ? labels as you want, but they must be contiguous. (The COLORCIRCLE and COLORRECT control interpret the labels as Red Green Blue value specifications). |
These conventions are the same as those used in custom graphs and reports to determine the appropriate dataset and time.
If just the variable name is used, the value at special time from the first loaded run will be used. For Gaming interfaces the use of just a variable name will give you that value at the current position in the game.
SHOWVAR,"SwitchPSCSensitivit?0=Low?1=Medium?2=High",25,13,0,0,L
Note that for String Variables SHOWVAR will show the string value of the variable. This can be useful in making labels.