compile

Use this forum to post Vensim related questions.
Post Reply
kappe_79
Junior Member
Posts: 5
Joined: Tue Jun 29, 2004 7:28 am

compile

Post 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]
Deel
Junior Member
Posts: 14
Joined: Tue Mar 18, 2003 8:33 am

Post 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
Administrator
Super Administrator
Posts: 4831
Joined: Wed Mar 05, 2003 3:10 am

Post 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.
kappe_79
Junior Member
Posts: 5
Joined: Tue Jun 29, 2004 7:28 am

Post 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
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
Post Reply