Please enable JavaScript to view this site.

Vensim Help

Commands are actions you can ask Vensim to take. They are used in Venapps, command scripts, DDE requests and through the Vensim DLL, in response to a user choice or as part of setting things up.

Each command is written as a class, the specific command and its options: class>command|option1|option2... Commands can be combined with an ampersand &. To include an ampersand in a command, write two, &&. The Venapp editor does this for you.

Not every command works everywhere. Supported Commands lists the ones a command script accepts, and the Command Use Summary shows each command against Venapps, command scripts, DDE and the DLL.

The classes are:

•BRANCH>BranchName makes a Venapp branch to another location on the same screen. BranchName is defined with the BRANCH control.

•CANCEL stops the inputs on the current screen from being read. It has no commands.

•CUSTOM>GraphName creates the custom graph or report GraphName.

•ERROR>placeholder places error output in a window, normally in a TOOL control.

•EXPORT>GraphLab copies tool output, or a sketch on the screen, to the clipboard. Tool output is labeled when it is put on the screen, and exporting uses that label.

•FILE>command works with files and converts models between formats. The FILE commands are COMBINESUBMODELS, COPY, CREATE, DECRYPT, DELETE, ENCRYPT, EXISTS, MDL2VMF, MDL2VMFX, MDL2XML, MDL2XMILE, MEMFILE, PUBLISH, PUBLISH_WEB, RENAME, SHELL, VCD2VCF, VGD2VGF, VMF2MDL, VMFX2MDL, VMF2XML and VMF2XMILE.

•GAME>command controls a game. GAME commands cannot be used in a command script. The GAME commands are BACKUP, ENDGAME, GAMEINTERVAL, GAMEON, READGIN, READGVARS, READVDF, RELOAD, WRITEGIN and WRITEGVARS.

•IFTHENELSE starts a logical branch. It has no commands, and must be followed by three more commands separated by &.

•LOG>command writes to a log file. The LOG commands are CREATE, MESSAGE, TIMESTAMP and INFO_....

•MENU>command runs the commands found on the main Vensim menus: simulations and data conversions. The MENU commands are ABOUT, CSV2VDF, DAT2VDF, DLIST2VDF, EXIT, GAME, LOAD_RUN, REALITY_CHECK, REALITY_CHECK_TEST_ALL, REDO_GRAPHS, RUN, RUN1, RUN_MCMC, RUN_OPTIMIZE, RUN_SENS2ALL, RUN_SENSITIVITY, RUNCOMPARE, SENS2FILE, SENS2TAB, SYNTHESIM, TAB2VDF, TIDY2VDF, VDF2CSV, VDF2DAT, VDF2DLIST, VDF2TAB, VDF2TIDY, VDF2WK1, VDF2XLS, VDF2XLSX, WK12VDF and XLS2VDF.

•PRINT>GraphLab prints tool output or a sketch on the screen, using the label the output was given. It can also print the current screen.

•SETTING>command changes settings normally made in the Options dialog. The SETTING commands are EURONUMBER, EXPORTSIZE, EXTERNALFUNCTION, HOVERCOMMENT, PRINTOPTQUERY, SHOWINITIAL, SHOWLOOKUP, SHOWMACRO, SHOWWARNING and SIZEINCHES.

•SIMULATE>command sets up a simulation, much as the Simulation Control dialog does. The SIMULATE commands are 1TABCHG, ADDCIN, ADDDATA, BASED, CHGFILE, COMPILE, DATA, GETCNSTCHG, GETTABCHG, INTEGTYPE, KALMAN, KALMANPARAMETER, KALMANPAYOFF, KALMANSTEPS, LINEARIZE, LIN_HEART, LIN_INTEL, MCMCPARM, MCMCPAYOFF, OPTPARM, OVERRIDE, OVERWRITE_GET_CONST, PAYOFF, POSTPROCESS, PREPROCESS, PROCESS_CIN_AS_DP, RC_FILE_OUTPUT, READCIN, READRUNCHG, REPORT, PAYOFF_REPORT, RESUME, RUNCOMMENT, RUNNAME, SAVELIST, SENSITIVITY, SENSSAVELIST, SETVAL, SPREADALIAS and WRITECIN.

•SKETCH>command works on a visible sketch. The SKETCH commands are CHOOSEVIEW, NEXTVIEW, PREVVIEW, RUNVISIBLE, SHOWBEHAVIOR, SHOWHIDDEN, SYNTHVISIBLE and ZOOM.

•SPECIAL>command covers loading models and runs, controlling a script, and working with the Venapp screen. The SPECIAL commands are ALIASSCREEN, APPEND_TEXT_TO_FILE, ASKYESNO, BUTTONFOCUS, CLEARRUNS, CONTINUEONERROR, EXIT1, EXTERNAL, GETINFO, GETRUNINFO, GETVARATTRIB, GETVARNAMES, LOADAPPINT, LOADDLL, LOADMODEL, LOADRUN, LOADTOOLSET, MESSAGE, NOINTERACTION, PROCESS, READCUSTOM, READINI, LOADINI, REFRESH, RESETINPUT, RUNCOMMAND, SAVEMODEL, SECONDCLICK, SETFOCUS, SETTITLE, SETWBITEM, STOP, STOPSIM, SUBSCRIPT, VARSELECT and WINHELP, HTMLHELP.

•SYNTHESIM>command controls SyntheSim. The SYNTHESIM commands are AUTO, GO and RESET.

•TEST>condition tests input constants and computed variables against a condition. It is normally used with IFTHENELSE.

•TIMEAXIS>command controls the time axis used in graphs and tables. The TIMEAXIS commands are ASDATE, DATEDISPLAY, RESET, SPECIALTIME, STARTTIME, STOPTIME and TIMEBASE.

•TIMER>command sets up timers without a TIME control. The TIMER commands are CREATE, EXECUTE, SHIFTTO, COMMAND, SET, KILL, DELETE, PERMANENT.

•WORKBENCH>ToolName displays the output of a workbench tool.

NOTE CANCEL and IFTHENELSE always appear on their own, with no > or command name.

The classes and commands are described in more detail in the topics that follow, alphabetically by class and then by command.