PLE dll

Use this forum to post Vensim related questions.
Post Reply
tangent
Member
Posts: 22
Joined: Wed Jun 25, 2008 7:07 am

PLE dll

Post by tangent »

I have prepared a model (using DSS single precision version 5.7) for an educational institution that has version 5.6B of PLE installed. I have published my model as a vpm, with all versions of Vensim checked.

The model has an Excel 2003 interface and works on my machine. On their machine, the Excel interface is unable to find the dll. I have asked them to check the System32 directory and vendll32.dll is not in that folder. Nevertheless, they can open the model directly with Vensim.

Does the educational version use the same dll? I can get them to install the model reader instead but that would mean they don't have access to the PLE features.

thanks, Jen
vensim.net
Junior Member
Posts: 3
Joined: Tue Jun 24, 2008 6:28 am

Post by vensim.net »

If any help, PLE and Model Reader can be installed in the same machine.
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

they will need to install the Vensim model reader to use the interface. You will also need to publish this as a .vpa not a .vpm and include the Excel file as the calling program - see Chapter 13 od the DSS Reference Supplement for details.

as was pointed out it is not a problem to have both the model reader and Vensim PLE installed at the same time.
tangent
Member
Posts: 22
Joined: Wed Jun 25, 2008 7:07 am

Post by tangent »

Thank you both for your help. It is difficult to test these things without access to a spare computer without DSS installed. I have a follow up question about packages (probably for Bob). The manual states:

One consequence of this structure is that all models and supporting files must be in a single published package.

Does "supporting files" include vdf, lst and vsc files? If so, what happens when the user creates new vdf files by running simulations or overwrites vsc files? Do the files in the package get replaced within the package, or are the original files retained in some way? I want my users to be able to run and retrieve scenarios from the Excel interface and have constructed vba code that does this, as well as other vba code that writes the correct vsc and lst files for a sensitivity analysis based on marking relevant variables from a list.
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

Runs (.vdf files) that are in the package are read only - Vensim won't let you use that run name to make a simulation. Other files (such as .vsc etc) can be overwritten, but will get replaced with the package contents the next time the application starts. If you are generating .vsc etc files from the VBA code you should not include them in the package, just create them prior to executing the runs. Only the calling excel file, the model, the external funcitons DLL, any toolsets and any custom graph definitions have to be in the package.
tangent
Member
Posts: 22
Joined: Wed Jun 25, 2008 7:07 am

Post by tangent »

Excellent. I believe I have it now. The following is partly for confirmation and partly for anybody else reading this with the same problem.

During development:
1/ Build Vensim model
2/ Publish Vensim model as Package Type "Model" so as to make vpm file that can be called by Excel
3/ Build Excel interface as required
4/ Create runs and other files that may be wanted by the user (eg default scenario)

Once developed:
1/ Create a copy of the Excel interface for inclusion in the package (so original can be used for further development and is safe from overwriting)
2/ Publish Vensim model as Package Type "Other" (ie make vpa) with:
- Excel interface file as the "Caller"
- Additional files list to include the Vensim model file and any files that should not be able to be changed by the user
3/ Distribute the model reader installation file, the vpa package and any support files (user guide, example scenario runs)

When opened, the package will create an instance of the Excel interface in whatever form it was included in the package and overwrite any version of the interface with the same name in the directory.

Thanks, Jen
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

Looks right to me.
tangent
Member
Posts: 22
Joined: Wed Jun 25, 2008 7:07 am

Post by tangent »

Okay, for some reason this method is no longer working for me and I can't quite figure out why.

I build the model as a mdl file (with Interface.xls as the interface). I have published a vpm model to be called by the Excel file and am trying to publish the vpa version for user testing.

I open the mdl file in Vensim (DSS v5.7a) and select Publish from menu. In the dialogue box, I have:

Name: ACTDrugs.vpa
Caller: Interface.xls
Additional files: ACTDrugs.vpm
Package type: Other
Readable by: DSS, Runtime, Model Reader

I have settings unchecked and no other additional files.

When I hit the 'Publish' button, I get the error "The published file contains no models and will not be useful. Fix this error?"

What am I doing wrong? I assume it is something really simple but can't see it.

Thanks, Jen
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

You need to includee ACTDrugs.mdl or ACTDrugs.vmf in the publication not ACTDrugs.vpm.
tangent
Member
Posts: 22
Joined: Wed Jun 25, 2008 7:07 am

Post by tangent »

Thanks Bob. If I use ACTDrugs.mdl, I get a different error about needing a published model. What's the vmf file?
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

In the application use SPECIAL>LOADMODEL|modelname.vpm When you repackage the model for distribution with the reader that statement is actually redirected to the .vpa file, so you don't need to change your code at all.

The .vpa file you create is the same as the .vpm but it is marked as an application with the Excel caller. In the .vpa file you need to explicitly add the .mdl file since it is dropped when you change the package type.
Post Reply