Changes for command scripts for Vensim 8+?
Changes for command scripts for Vensim 8+?
I have some commmand scripts that run fine in Vensim 6.4 (x32) but that do not run in Vensim 8+
Have there been any changes to syntax? Or the way that the syntax is interpreted by Vensim?
Is there a documentation on these changes available?
I am attaching an example.
In Vensim 8.2.1 I get an error message "Unable to read commands from .cmd."
Note that I had not loaded a model. If I load a model, the error message is:
"Unable to read commands from ModelFileName.cmd."
Have there been any changes to syntax? Or the way that the syntax is interpreted by Vensim?
Is there a documentation on these changes available?
I am attaching an example.
In Vensim 8.2.1 I get an error message "Unable to read commands from .cmd."
Note that I had not loaded a model. If I load a model, the error message is:
"Unable to read commands from ModelFileName.cmd."
- Attachments
-
- HDV-EV-Data_XLS2VDF.zip
- (271 Bytes) Downloaded 516 times
-
- Super Administrator
- Posts: 4710
- Joined: Wed Mar 05, 2003 3:10 am
Re: Changes for command scripts for Vensim 8+?
Do you have the VDF and XLS files so we can test?
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Changes for command scripts for Vensim 8+?
There haven't been any changes (other than a few additions that wouldn't affect this). Syntax checking might have become more picky somewhere.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Changes for command scripts for Vensim 8+?
In the current v9 beta, this can be run (but fails because I don't have the source xls files). There's no indication of a syntax problem. I get the same result in 8.2.1 x64 and x32. I think we need the xls for further testing - you can email if sensitive.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Changes for command scripts for Vensim 8+?
Hi! I'm having the same problem - though let me know if I should start a new post. The .cmd file was working fine yesterday morning, and by afternoon I was getting the same message as above, with two separate .cmd files. This is one we always run when the mdl file is closed.
In an attempt to fix this, I upgraded from DSS 9.3.3 to 9.3.4 but that didn't help. I haven't yet been able to see if it happens to anyone else on our team (all traveling/out of office), but they are unfamiliar with this particular error.
We run a sensitivity analysis, then use a cmd file to create a tab file, to convert into csv for analysis in RStudio. The files aren't sensitive per se (they'll all be available publicly eventually), but several are needed if you wanted to run the mdl separately (not sure if that's necessary) so I'm not sure attaching them all here makes sense. Emailing a zip folder might be easiest.
Also, it might be relevant to know that BEFORE the "Unable to read commands from .cmd" message, I was getting "unable to open...\vensimdp.ini to read/record initilization [sic] information." I'd get that popup, but it would create the .tab file anyway. Now it just goes straight to the .cmd error.
In an attempt to fix this, I upgraded from DSS 9.3.3 to 9.3.4 but that didn't help. I haven't yet been able to see if it happens to anyone else on our team (all traveling/out of office), but they are unfamiliar with this particular error.
We run a sensitivity analysis, then use a cmd file to create a tab file, to convert into csv for analysis in RStudio. The files aren't sensitive per se (they'll all be available publicly eventually), but several are needed if you wanted to run the mdl separately (not sure if that's necessary) so I'm not sure attaching them all here makes sense. Emailing a zip folder might be easiest.
Also, it might be relevant to know that BEFORE the "Unable to read commands from .cmd" message, I was getting "unable to open...\vensimdp.ini to read/record initilization [sic] information." I'd get that popup, but it would create the .tab file anyway. Now it just goes straight to the .cmd error.
-
- Super Administrator
- Posts: 4710
- Joined: Wed Mar 05, 2003 3:10 am
Re: Changes for command scripts for Vensim 8+?
We need to see the command script.
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Changes for command scripts for Vensim 8+?
I'm trying to attach it but being told it's an invalid file extension
Re: Changes for command scripts for Vensim 8+?
I also tried uploading as a .txt file but got the same message. Best I can do is copy-paste the code unless there's someone I can email.
I'm using Notepad++ to edit - which, I just remembered I also updated yesterday so don't know if that could have changed something.
SPECIAL>NOINTERACTION
SPECIAL>LOADMODEL|OSM_Master_CURRENT_PULSE_policy.mdl
SPECIAL>LOADRUN|Treatment analysis pulse.vdfx
MENU>SENS2FILE|Treatment analysis pulse|export_manual_control_tx_analysis_pulse|T
SPECIAL>CLEARRUNS
MENU>EXIT
I'm using Notepad++ to edit - which, I just remembered I also updated yesterday so don't know if that could have changed something.
SPECIAL>NOINTERACTION
SPECIAL>LOADMODEL|OSM_Master_CURRENT_PULSE_policy.mdl
SPECIAL>LOADRUN|Treatment analysis pulse.vdfx
MENU>SENS2FILE|Treatment analysis pulse|export_manual_control_tx_analysis_pulse|T
SPECIAL>CLEARRUNS
MENU>EXIT
-
- Super Administrator
- Posts: 4710
- Joined: Wed Mar 05, 2003 3:10 am
Re: Changes for command scripts for Vensim 8+?
The script does not report any errors for me.
What happens if you comment out the first and last lines so you can see what it's failing on?
What happens if you comment out the first and last lines so you can see what it's failing on?
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Changes for command scripts for Vensim 8+?
I get the exact same popup - Unable to read commands from .cmd.
-
- Super Administrator
- Posts: 4710
- Joined: Wed Mar 05, 2003 3:10 am
Re: Changes for command scripts for Vensim 8+?
Can you email the files to us? Make sure you include your licence details.
You will probably need to rename the command script so it has a txt extension.
You will probably need to rename the command script so it has a txt extension.
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Changes for command scripts for Vensim 8+?
Sure, what email address should I send it to?
Re: Changes for command scripts for Vensim 8+?
vensim at vensim.com
If you .zip things, the cmd scipts usually come across OK.
If you .zip things, the cmd scipts usually come across OK.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
-
- Senior Member
- Posts: 149
- Joined: Sun Oct 21, 2018 7:09 am
- Vensim version: DSS
Re: Changes for command scripts for Vensim 8+?
I am facing a similar issue, and since the solution was not discussed here, I'm bringing up this post. I have been running a script over the past few months to run a cmd file, but now (I think after updating Vensim or macOS), I get the same error. I can run Vensim (not even the model) to run the cmd below manually using the file menu:
SPECIAL>NOINTERACTION
SPECIAL>LOADMODEL|randomWalk.mdl
SIMULATE>payoff|
SIMULATE>sensitivity|Sens.vsc
SIMULATE>optparm|
SIMULATE>savelist|
SIMULATE>senssavelist|sens.lst
SIMULATE>DATA|""
SIMULATE>SETVAL|Final Time=99
SIMULATE>RUNNAME|SIMS
SIMULATE>REPORT|1
MENU>RUN_SENSITIVITY|o
MENU>SENS2FILE|!|!|T|
SPECIAL>CLEARRUNS
But through the script, I get the Unable to read commands from cmd. error.
When I run (/Applications/VensimDSS.app/Contents/MacOS/VensimDSS "/path/SIMS.cmd") in the terminal, Vensim opens, but nothing happens (and instead of the white model window, I see a grayed out, like deactivated environment).
As I said, I can manually, using trackpad, open the cmd and run it.
SPECIAL>NOINTERACTION
SPECIAL>LOADMODEL|randomWalk.mdl
SIMULATE>payoff|
SIMULATE>sensitivity|Sens.vsc
SIMULATE>optparm|
SIMULATE>savelist|
SIMULATE>senssavelist|sens.lst
SIMULATE>DATA|""
SIMULATE>SETVAL|Final Time=99
SIMULATE>RUNNAME|SIMS
SIMULATE>REPORT|1
MENU>RUN_SENSITIVITY|o
MENU>SENS2FILE|!|!|T|
SPECIAL>CLEARRUNS
But through the script, I get the Unable to read commands from cmd. error.
When I run (/Applications/VensimDSS.app/Contents/MacOS/VensimDSS "/path/SIMS.cmd") in the terminal, Vensim opens, but nothing happens (and instead of the white model window, I see a grayed out, like deactivated environment).
As I said, I can manually, using trackpad, open the cmd and run it.
-
- Super Administrator
- Posts: 4710
- Joined: Wed Mar 05, 2003 3:10 am
Re: Changes for command scripts for Vensim 8+?
I'm back in the office next Wednesday, so will take a look then (I don't have my Mac with me at the moment).
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559