Please enable JavaScript to view this site.

Vensim Help

MODVAR allows the user to type in a new value for a variable. txt contains the name of the Constant or Game Input for gaming.  A | separates the name from prompt information. acc, optionally, contains range information used in the validation of the user's input.

MODVAR,"PERCENT BUDGET ADV",25,44,15,0,L,[0|10|6]

Here the value 6 (the original model value) is used for missing to allow entry of only changed assumptions.  When this variable takes on a value of 6 the editing box created for the modification of the variable will be left empty.

If you ask to modify a variable that is not contained in the model you are working with MODVAR will display error in the editing window.  If you ask to modify a Game variable and the game is not running MODVAR will display Game Over in the editing window.

Note that for String Variables MODVAR will let the user set a string value for the variable.  This can later be used with SHOWVAR to display the user defined label.