Page 1 of 1

Vensim error: unable to read commands from .cmd

Posted: Tue Aug 19, 2025 10:28 am
by Amelys
Hi,

I'm using Vensim DSS 10.3.2. I'm trying to run a command script through a .cmd file and either a .bat file or a VBA script to launch Vensim. However, when Vensim launches, this error message appears:
error_message.png
error_message.png (3.35 KiB) Viewed 270 times
When I open the command file directly in the Vensim interface via 'File > Open Model', the simulation runs without any issues.

I don't understand why this error message appears when I try to launch the command file outside of the Vensim interface.

Here is my commands lines:

Code: Select all

SPECIAL>NOINTERACTION
SPECIAL>LOADMODEL|model_test.mdl
SPECIAL>CLEARRUNS
MENU>TAB2VDF|IN_test.tab|||
SPECIAL>CLEARRUNS
SIMULATE>DATA|IN_test.vdfx
SIMULATE>RUNNAME|Scen_test
SIMULATE>SETVAL|INITIAL TIME = 2000
SIMULATE>SETVAL|FINAL TIME = 2050
MENU>RUN|o
SPECIAL>CLEARRUNS
MENU>EXIT

Re: Vensim error: unable to read commands from .cmd

Posted: Tue Aug 19, 2025 10:46 am
by Administrator
That looks like you are passing a blank filename to Vensim. Can you debug you vba to see what you are actually running?

Re: Vensim error: unable to read commands from .cmd

Posted: Tue Aug 19, 2025 11:53 am
by Amelys
I've checked my VBA code, and it does refer to the name and path of the .cmd file that I tried to launch. As this did not work with a simple .bat file either, I don't think the error comes from my VBA code.

I've tried this line of command in my .bat file

Code: Select all

START C:\PROGRA~1\Vensim\vendss64MC "test.cmd"
Capture.PNG
Capture.PNG (8.64 KiB) Viewed 257 times

Re: Vensim error: unable to read commands from .cmd

Posted: Tue Aug 26, 2025 12:29 am
by tomfid
Can you upload your test case?