A command file is a file containing a list of commands. These files have extension .cmd. You can run these command scripts by opening the file with the File>Open Model command, loading the file in the Text Editor and executing File>Run Command or by naming the file when Vensim is called as in:
c:\Program Files\vensim\vensim "c:\mydirectory\dobook.cmd"
open -a /Applications/Vensim/VensimDSS.app /Users/Shared/DemoModel/command.cmd
The file itself is a simple text file with a single command on each line. The commands are a subset of the commands use in Venapps. The list of available commands is described in Supported Commands . More detail is provided in the Command Descriptions section.
NOTE: If you have a path that has spaces in it as the above path does then you will need to put double quotes around the argument to Vensim as shown above. If there are not spaces in the path names the double quotes are not necessary.
A command file might contain:
This file will load big.mdl, simulate it, and put the results in the ASCII file bob1.dat. Vensim will then close. The first command means that the process will not stop for user interaction such as might occur if, for example, the model big.mdl had a .vif file that referenced a dataset you had deleted.
Because you can start Vensim with a command script that will in turn close Vensim, you can treat Vensim as a batch processor. Call Vensim with a command file that does a few things and then closes itself. When the NOINTERACTION option is used, a history of each command executed is written to vensim.err.