Page 1 of 1

compile

Posted: Fri Sep 17, 2004 2:10 pm
by kappe_79
I'm creating a program in Visual Basic to run a set of simulations in Vensim througth dll.

Is there a way to compile the model through the dll and so to run the compiled model? In this case can you send me the code?
In fact, if i run the model throught the command "RUN|o", the simulation goes very slowly.

thanks,
Alessandro

[Edited on 9-17-2004 by kappe_79]

Posted: Fri Sep 17, 2004 2:25 pm
by Deel
hi,

Is it DDE with another program only or with Visual Studio?
if you ready with your prog. you can compile it with VS compilers, but you have to include the corresponding vensim dll to your *.exe too - as it was written in vensim help.

Lajos

Posted: Fri Sep 17, 2004 2:25 pm
by Administrator
Have a look at the Vensim documentation for compiling models
http://www.vensim.com/documentation/vensim.htm
It is in the DSS reference supplement, chapter 10.

You need a C compiler on your machine, the compilation process creates a DLL, Vensim then calls that.

Hope this helps,

Tony.

Posted: Tue Sep 21, 2004 1:51 pm
by kappe_79
i have read the chapter 10. My mdl.bat is already modified to use the compiler (visual studio). Is in this case the compilation made automatically?

I have not understand the section "compiled simulation and the vensim DLL". Do I have to change the mdl so to make the request sim32.dll (instead of sim.dll)?

thanks

Posted: Tue Sep 21, 2004 11:23 pm
by bob@vensim.com
Edit mdl.bat and take away the comments around the lines associated with creating simdll32.dll - then compile the model in regular Vensim DSS and it will creat both sim.dl (for use with Vensim DSS) and simdll32.dll for use with vendll32.dll.