Vensim - GitHub Model Integration

Use this forum to post Vensim related questions.
Post Reply
james.m.rollins
Junior Member
Posts: 14
Joined: Thu Jul 26, 2018 7:12 pm
Vensim version: DSS

Vensim - GitHub Model Integration

Post by james.m.rollins »

I am attempting to integrate a Vensim model in text form (.mdl) into GitHub. That will enable us to also integrate dependent markdown documents elsewhere in the repository. However, since the model is executed in Forio-Epicenter, it must also be saved as a binary (.vmf) file. Can anyone tell me if there is a utility that will allow me to covert a .mdl into a .vmf outside of the Vensim client application? That would be extremely helpful for our continuous integration efforts. Thank you.
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Vensim - GitHub Model Integration

Post by tomfid »

There isn't, but using Vensim DSS, I think you could script the conversion and call it from the command line.
james.m.rollins
Junior Member
Posts: 14
Joined: Thu Jul 26, 2018 7:12 pm
Vensim version: DSS

Re: Vensim - GitHub Model Integration

Post by james.m.rollins »

Thank you @tomfid for the advice.

We are attempting to script the conversion to run from the command line using Vensim DLL commands. We are running Vensim DSS on Windows 10, 64 Bit. We have run other commands like "FILE>COPY" and "FILE>DELETE" successfully. However, the mdl to vmf converter command doesn't seem to work for us. As per the documentation, the command FILE>MDL2VMF|filename would work only with command files (See image below).
commandfiles.png
commandfiles.png (16.32 KiB) Viewed 2252 times
After that we followed Vensim instructions (see image below) and used windows dos command and set "C:\Program Files (x86)\Vensim" this path into environment variable.
path.png
path.png (62.71 KiB) Viewed 2252 times
We created and ran "test.cmd" batch file and got an error (See image below). Then we tried directly in the command line "FILE>MDL2VMF|D:\TEST\agg_v15_2019_06_14.mdl" but we are still getting an error, " 'FILE' is not recognized as an internal or external command,operable program or batch file."
error.png
error.png (25.02 KiB) Viewed 2252 times
Is there an issue with any of our path constructions or vensim.exe?

Please advise us - thank you.
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Vensim - GitHub Model Integration

Post by tomfid »

I think the problem is that your call to the cmd script is not using correct syntax. This is not entirely surprising, since the bits you've quoted from the Help are clearly using dated paths that are no longer valid in Win10. We'll have to update that.

I haven't had a chance to try it, but I think the call from the c:> prompt should look like:

"c:\program files\vensim\vensim.exe" "c:\path\to\cmd\script\fileconvert.cmd"

The model, script, etc. should not be in the program files hierarchy, because that's locked down by the OS. The path to Vensim should be fully qualified with the .exe, just to avoid confusion between the vensim directory and the executable.
james.m.rollins
Junior Member
Posts: 14
Joined: Thu Jul 26, 2018 7:12 pm
Vensim version: DSS

Re: Vensim - GitHub Model Integration

Post by james.m.rollins »

Thanks @tomfid we will check it out.
Post Reply