CMD script macOS problem
CMD script macOS problem
I can't get a command script to work on macOS 14.4.1 with VensimDSS 10.1.2.
[code]
SPECIAL>NOINTERACTION
#SPECIAL>LOADMODEL|model.mdl
MENU>VDF2XLSX|BAU.vdfx|BAU.xlsx|SaveListForGraphs.lst
MENU>EXIT
[/code]
The command script, the MDL, LST, and VDFX are all in the same directory. I've made sure there aren't spaces and tried different locations on my disk. You can see I've tried with and without LOADMODEL (since I don't need to run a model -- just trying to automate data export).
I get no feedback. Vensim opens and nothing happens. No files are created in the folder with CMD script.
I'm calling it from Terminal (and my code editor app, but I've tried both) with
[code]
open -a /Applications/VensimDSS.app Export-XLS.cmd
[/code]
(NOTE: The path to VensimDSS on the Vensim documentation website (https://vensim.com/documentation/25670.html) needs to be updated since Vensim isn't installed in a Vensim folder any more.)
[code]
SPECIAL>NOINTERACTION
#SPECIAL>LOADMODEL|model.mdl
MENU>VDF2XLSX|BAU.vdfx|BAU.xlsx|SaveListForGraphs.lst
MENU>EXIT
[/code]
The command script, the MDL, LST, and VDFX are all in the same directory. I've made sure there aren't spaces and tried different locations on my disk. You can see I've tried with and without LOADMODEL (since I don't need to run a model -- just trying to automate data export).
I get no feedback. Vensim opens and nothing happens. No files are created in the folder with CMD script.
I'm calling it from Terminal (and my code editor app, but I've tried both) with
[code]
open -a /Applications/VensimDSS.app Export-XLS.cmd
[/code]
(NOTE: The path to VensimDSS on the Vensim documentation website (https://vensim.com/documentation/25670.html) needs to be updated since Vensim isn't installed in a Vensim folder any more.)
-
- Super Administrator
- Posts: 4667
- Joined: Wed Mar 05, 2003 3:10 am
Re: CMD script macOS problem
What happens if you turn off
SPECIAL>NOINTERACTION
SPECIAL>NOINTERACTION
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
-
- Super Administrator
- Posts: 4667
- Joined: Wed Mar 05, 2003 3:10 am
Re: CMD script macOS problem
This fires up the command script successfully for me (run from a terminal prompt)
/Applications/VensimDSS.app/Contents/MacOS/VensimDSS /Users/tony/Downloads/TravisForumProblem/SampleCMDScript.cmd
/Applications/VensimDSS.app/Contents/MacOS/VensimDSS /Users/tony/Downloads/TravisForumProblem/SampleCMDScript.cmd
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: CMD script macOS problem
Ah, that is definitely a different way at calling the script. I shouldn't use the "open -a..." command from Terminal. Just call the Vensim binary directly with "/Applications/VensimDSS.app/Contents/MacOS/VensimDSS".
I got my first script to work now.
Please update the documentation to help the next person.
https://vensim.com/documentation/25670.html
Thanks for the help!
I got my first script to work now.
Please update the documentation to help the next person.
https://vensim.com/documentation/25670.html
Thanks for the help!
Re: CMD script macOS problem
Quick aside: Is there a way to comment a line in a CMD file? I tried # but that gave an error. I don't see any comments in the examples.
-
- Senior Member
- Posts: 134
- Joined: Sun Oct 21, 2018 7:09 am
- Vensim version: DSS
Re: CMD script macOS problem
Also, if I remember it correctly, ''MENU>EXIT'' does not exist on macOS.
Re: CMD script macOS problem
Yeah, I'm not getting Vensim to quit/close at the end of my script, so I think MENU>EXIT is not working.
Re: CMD script macOS problem
As of DSS version 10.2.0 today, MENU>EXIT is working for me on Mac.
Re: CMD script macOS problem
Exclamation point works for comments.
/*
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: 134
- Joined: Sun Oct 21, 2018 7:09 am
- Vensim version: DSS
Re: CMD script macOS problem
After updating to DSS 10.2.1, I cannot run the same cmd I've been using for the past few weeks on macOS. It feels that it gets stuck in a loop, and 'cancel' doesn't work (the OS doesn't say Vensim isn't responding). I have to force quit Vensim. I checked again, and the script works fine on DSS 10.2.0 on Windows (and it worked on 10.2.0 on macOS too).
- Attachments
-
- Screenshot 2024-07-25 at 8.15.11 PM.png (112.62 KiB) Viewed 5560 times
-
- Senior Member
- Posts: 134
- Joined: Sun Oct 21, 2018 7:09 am
- Vensim version: DSS
Re: CMD script macOS problem
I couldn't figure out a way to make it 100% replicable, but I have a hunch that this issue happens when there are a lot of datasets in the folder (which is what I had in my original model).
A similar error was happening when working with my original model, and I thought there might be something wrong with the variable names. But it's now isolated. It gets stuck here and won't move forward. Vensim doesn't crash either. 'Cancel' doesn't work.
A similar error was happening when working with my original model, and I thought there might be something wrong with the variable names. But it's now isolated. It gets stuck here and won't move forward. Vensim doesn't crash either. 'Cancel' doesn't work.
- Attachments
-
- Test Model.zip
- (90.94 KiB) Downloaded 164 times
-
- Super Administrator
- Posts: 4667
- Joined: Wed Mar 05, 2003 3:10 am
Re: CMD script macOS problem
Can you let us know exactly how you run the script? Do you start it via a terminal command or edit the CMD script and hit the run button?
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
-
- Senior Member
- Posts: 134
- Joined: Sun Oct 21, 2018 7:09 am
- Vensim version: DSS
Re: CMD script macOS problem
edit the CMD script and hit the run button
-
- Super Administrator
- Posts: 4667
- Joined: Wed Mar 05, 2003 3:10 am
Re: CMD script macOS problem
I'm rebuilding now, and will hopefully get an update to you today.
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
-
- Senior Member
- Posts: 134
- Joined: Sun Oct 21, 2018 7:09 am
- Vensim version: DSS
Re: CMD script macOS problem
Thank you!
-
- Super Administrator
- Posts: 4667
- Joined: Wed Mar 05, 2003 3:10 am
Re: CMD script macOS problem
I've updated the DSS Mac installer, it should fix this issue.
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