Please enable JavaScript to view this site.

Vensim Help

This component is used for two purposes according to which control is being used.  Accelerators allow keystrokes to be translated to menu selections.  Ranges are used for setting the minimum and maximum values for a variable.

Accelerator

Accelerators are used for TEXTMENU and BUTTON controls only.  They invoke the command and new screen for the corresponding control in response to the corresponding key being typed.  You can have any number of keys accelerate to the same command (for example Esc, X, x, E and e are all acceptable ending characters for the Vensim demo).  To use button accelerators the Alt key must be held down.  Note that accelerators are case sensitive.  If you want both lower and upper case, then enter them.

If you want to include the Esc key as an accelerator, use \027.  In general \xxx will be read as a decimal ASCII code.  Note that Tabs and Carriage returns are captured elsewhere and not available as accelerators.

Range

Ranges are used for input controls to test to see if the input value falls within a reasonable range.  If it does not, the user will be given a message telling them what the range is.  Range specification takes the form

[min|max|missing]

for example

[0|100.0|999]

where 0 is the minimum and 100 the maximum, and 999 indicates a missing value.  The missing value would normally not be within the range.  To specify only a minimum use a single number (as in [0]) to specify only a maximum use the form [|100].  To specify only a missing value use the form [||999].  The obvious combinations also work.

The missing value is used to signal the input control to be left blank.  Conversely, if the input control is blank when it is read, or contains NA the missing value is returned.  If you do not specify a missing value an empty input control will return an error message.  The missing value is only used for the MODVAR control.

By default input controls display values using Vensim's pretty notation (1,000, 100M, etc.).  To use scientific notation instead, you can put a percent % at the beginning of the Range field as in:

%[0|10|999]

Input controls all take numbers in Vensim's pretty format, or in scientific notation.

Range for Axis Labels

The MODTABLE and GRAPHVAR controls use the range field to determine whether or not to put labels on their output and how to scale those labels.  In this case the range label should take the form:

xl[xmin|xmax]yl[ymin|ymax] ALL LOWER CASE!

x refers to the x-axis, y to the y-axis.  The l (lower case L) refers to labeling.  If you include l, the axis will be labeled, if not it will not be labeled.  If you specify a maximum or minimum in square brackets after the axis name these will be used in setting up the scales for the axes.  For example

GRAPHVAR,"Inventory",10,10,20,80,,xlyl[0|1000]

GRAPHVAR,"Inventory",40,10,20,80,,y[0|1000]

GRAPHVAR,"Inventory",70,10,20,80,,xl

would yield

If you follow x or y by a % then scientific notation will be used for the label numbers.  This can be very useful for x axis in the range 1900-2100 as, for example:

GRAPHVAR,"Population",40,10,20,80,,x%l[1900|2000]