Vensim dll
-
- Junior Member
- Posts: 8
- Joined: Thu May 28, 2009 2:35 pm
Vensim dll
I am developing a C++ project to show and represent Vensim simulation results. I do not need to simulate from this program just to represent results.
Our filesystem have the "&" character into filenames and folder names. When I try to open a model calling vensim_command from my C++ application and the model name or the folder name has the "&" character, vensim does not find the model to open.
On 21-11-2008 propose a solution by saying this:
This will be in the next release and done by using quotes around options as in
SPECIAL>LOADMODEL|"c:\vensim\projects\prueba&veras\empty.vpm"
so in C the command would be
vensim_command("SPECIAL>LOADMODEL|\"c:\\vensim\\Projects\\prueba&veras\\empty.vpm\"")
But I can not fix the problem. If I do this, the path change:
can not open C: / Vensim / C: / Archivos de programa/Vensim/samples/bpr3.vpm
How can I solve this?
Our filesystem have the "&" character into filenames and folder names. When I try to open a model calling vensim_command from my C++ application and the model name or the folder name has the "&" character, vensim does not find the model to open.
On 21-11-2008 propose a solution by saying this:
This will be in the next release and done by using quotes around options as in
SPECIAL>LOADMODEL|"c:\vensim\projects\prueba&veras\empty.vpm"
so in C the command would be
vensim_command("SPECIAL>LOADMODEL|\"c:\\vensim\\Projects\\prueba&veras\\empty.vpm\"")
But I can not fix the problem. If I do this, the path change:
can not open C: / Vensim / C: / Archivos de programa/Vensim/samples/bpr3.vpm
How can I solve this?
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
-
- Junior Member
- Posts: 8
- Joined: Thu May 28, 2009 2:35 pm
HI BOB ;
I AM USING VENSIM VERSION 5.9.
AND MY COMMAND IS
vensim_command("SPECIAL>LOADMODEL|\"c:\\vensim\\prueba&veras\\BPR3.vpm\"")
BUT THE DIALOG BOX PUTS CAN NOT OPEN c:/vensim/c:/vensim/prueba&veras\\BPR3.vpm
HOW YOU SEE IT IS A DIRECTORY DUPLICATED; c:vensim/c:/vensim/........
I don´t know what is the problem.
Thank you very much by your help
bye bob
I AM USING VENSIM VERSION 5.9.
AND MY COMMAND IS
vensim_command("SPECIAL>LOADMODEL|\"c:\\vensim\\prueba&veras\\BPR3.vpm\"")
BUT THE DIALOG BOX PUTS CAN NOT OPEN c:/vensim/c:/vensim/prueba&veras\\BPR3.vpm
HOW YOU SEE IT IS A DIRECTORY DUPLICATED; c:vensim/c:/vensim/........
I don´t know what is the problem.
Thank you very much by your help
bye bob
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
-
- Junior Member
- Posts: 8
- Joined: Thu May 28, 2009 2:35 pm
Thank you BOb; but it does not work.
when I puts this:
vensim_command("\"SPECIAL>LOADMODEL|c:\\vensim\\prueba&veras\\BPR3.vpm\"")
Mi program load the model but it cannot be simulated and it has not turned out that to show.
Already not that to put.
Excuse me for the inconveniences.
You would have another solution
Thank you
when I puts this:
vensim_command("\"SPECIAL>LOADMODEL|c:\\vensim\\prueba&veras\\BPR3.vpm\"")
Mi program load the model but it cannot be simulated and it has not turned out that to show.
Already not that to put.
Excuse me for the inconveniences.
You would have another solution
Thank you
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
-
- Junior Member
- Posts: 8
- Joined: Thu May 28, 2009 2:35 pm
-
- Junior Member
- Posts: 8
- Joined: Thu May 28, 2009 2:35 pm
Hi Bob;
Sorry again but I have another question.
when my program tries to open a model mdl. or VMF. with vensim 5.9 a message appears saying:
the model ... ....... ... .. need published model ..........
To fix this I use the command FILE> PUBLISH but does not create the file. vpm and I do not know why?
do you know???
Thank you
Sorry again but I have another question.
when my program tries to open a model mdl. or VMF. with vensim 5.9 a message appears saying:
the model ... ....... ... .. need published model ..........
To fix this I use the command FILE> PUBLISH but does not create the file. vpm and I do not know why?
do you know???
Thank you
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
-
- Junior Member
- Posts: 8
- Joined: Thu May 28, 2009 2:35 pm
-
- Junior Member
- Posts: 8
- Joined: Thu May 28, 2009 2:35 pm
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
You will first need to create the .frm file in Vensim (click on the Save... button on the File>Publish dialog). Once you have created that file you will need to copy it to the location of the model and use it with the FILE>PUBLISH command. The .frm file is a simple text file so if you want to modify it (eg by changing the model name) that is straightforward.
-
- Junior Member
- Posts: 8
- Joined: Thu May 28, 2009 2:35 pm
file frm
Hello bob,
Already I have almost finished the changes of my program; nevertheless; I wanted to know if some command exists to create the file .frm without need to have to use the publication dialog
Thank you; bob
Already I have almost finished the changes of my program; nevertheless; I wanted to know if some command exists to create the file .frm without need to have to use the publication dialog
Thank you; bob
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm