Help: Exporting XLSX from VDFX via CMD script
Help: Exporting XLSX from VDFX via CMD script
Should the following script work to export to XLSX? When I call it Vensim opens but then quickly closes. All the files are in the same directory. A XLSX file with the same name does already exist (and I'd like this script to always replace it).
[code]
SPECIAL>NOINTERACTION
MENU>VDF2XLSX|BAU.vdfx|BAU.xlsx|SaveList.lst|{||||
MENU>EXIT
[/code]
[code]
SPECIAL>NOINTERACTION
MENU>VDF2XLSX|BAU.vdfx|BAU.xlsx|SaveList.lst|{||||
MENU>EXIT
[/code]
-
- Super Administrator
- Posts: 4827
- Joined: Wed Mar 05, 2003 3:10 am
Re: Help: Exporting XLSX from VDFX via CMD script
Try running "MENU>VDF2XLSX|BAU.vdfx|BAU.xlsx|SaveList.lst|{||||" by itself and see if any error messages appear.
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: Help: Exporting XLSX from VDFX via CMD script
I ran that single line in a new CMD file. Vensim opened with an error dialog what said, "Unable to open SaveList.lst to read variable names."
The LST file is in the same directory as the CMD, MDL, and VDFX files.
The LST file is in the same directory as the CMD, MDL, and VDFX files.
Re: Help: Exporting XLSX from VDFX via CMD script
Aside: Is there a way to add comments to CMD files? "#" at the beginning of a line or something like that? This would be a nice feature, to comment code and/or comment command lines.
Re: Help: Exporting XLSX from VDFX via CMD script
I tried removing the LST file from the line and now the error message says, "Unable to open BAU.vdfx to read data." Could it be some path issue?
Re: Help: Exporting XLSX from VDFX via CMD script
Does this work on Windows? Is this a macOS problem? We'd love to have a workflow that runs the model and exports the data, but can't get by this step.
-
- Super Administrator
- Posts: 4827
- Joined: Wed Mar 05, 2003 3:10 am
Re: Help: Exporting XLSX from VDFX via CMD script
How are you using this (step by step please)?
Do you have a model open, then open the CMD script? Or some other way?
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: Help: Exporting XLSX from VDFX via CMD script
Right now the test is simply the single line script that was suggested.
1. VensimDSS is closed.
2. In Terminal, I call the CMD script using the Vensim app, calling it with:
[code]
/Applications/VensimDSS.app/Contents/MacOS/VensimDSS "/full/path/in/quotes/script.cmd"
[/code]
3. Vensim opens and I get the above error message(s).
Note: I call another script the exact same way (to run scenarios) and it works. It is this exporting step that doesn't work.
1. VensimDSS is closed.
2. In Terminal, I call the CMD script using the Vensim app, calling it with:
[code]
/Applications/VensimDSS.app/Contents/MacOS/VensimDSS "/full/path/in/quotes/script.cmd"
[/code]
3. Vensim opens and I get the above error message(s).
Note: I call another script the exact same way (to run scenarios) and it works. It is this exporting step that doesn't work.
-
- Senior Member
- Posts: 193
- Joined: Sun Oct 21, 2018 7:09 am
- Vensim version: DSS
Re: Help: Exporting XLSX from VDFX via CMD script
Shouldn't there be a 'dot' before the file path? Like "./full/path/in/quotes/script.cmd"?
-
- Super Administrator
- Posts: 4827
- Joined: Wed Mar 05, 2003 3:10 am
Re: Help: Exporting XLSX from VDFX via CMD script
I'll need to debug to test, but I think it's because there is no model loaded (and so, the active folder is not set correctly). I'll test at some point next week.Travis wrote: ↑Fri May 17, 2024 3:43 pm Right now the test is simply the single line script that was suggested.
1. VensimDSS is closed.
2. In Terminal, I call the CMD script using the Vensim app, calling it with:
3. Vensim opens and I get the above error message(s).Code: Select all
/Applications/VensimDSS.app/Contents/MacOS/VensimDSS "/full/path/in/quotes/script.cmd"
Note: I call another script the exact same way (to run scenarios) and it works. It is this exporting step that doesn't work.
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: Help: Exporting XLSX from VDFX via CMD script
This morning even my script to run a scenario won't work, with an error stating it can't find the model file. Appreciate your help.
Re: Help: Exporting XLSX from VDFX via CMD script
Any update on this? Anything else I can do to test?
-
- Super Administrator
- Posts: 4827
- Joined: Wed Mar 05, 2003 3:10 am
Re: Help: Exporting XLSX from VDFX via CMD script
Not yet. I'm back in the office next Wednesday, so will get to it then (I don't have my Mac with me).
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: Help: Exporting XLSX from VDFX via CMD script
(Hope your time away was for fun!)
I'm happy to help pick this up when you're ready. Just let me know what to test.
I'm happy to help pick this up when you're ready. Just let me know what to test.
Re: Help: Exporting XLSX from VDFX via CMD script
I've installed the newer build that you sent me but I still can't get VDF2XLSX to work. I can simulate a scenario again (which was broken a few posts earlier in this thread).
Can you send me a script in which VDF2XLSX works on macOS?
Can you send me a script in which VDF2XLSX works on macOS?