Vensim error: unable to read commands from .cmd

Use this forum to post Vensim related questions.
Post Reply
Amelys
Junior Member
Posts: 2
Joined: Tue Aug 19, 2025 9:25 am
Vensim version: DSS

Vensim error: unable to read commands from .cmd

Post 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 271 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
Administrator
Super Administrator
Posts: 4864
Joined: Wed Mar 05, 2003 3:10 am

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

Post 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?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Amelys
Junior Member
Posts: 2
Joined: Tue Aug 19, 2025 9:25 am
Vensim version: DSS

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

Post 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 258 times
tomfid
Administrator
Posts: 4027
Joined: Wed May 24, 2006 4:54 am

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

Post by tomfid »

Can you upload your test case?
Post Reply