Vensim.dll not working on guest computer
Vensim.dll not working on guest computer
Hi,
I have worked out a file which runs a Vensim model from Excel.
However, when I pass the Excel and the published model along to other computers, it doesn't work. We get a prompt asking if we can open the .vpm in Model Reader and also says it can't find the .vgf .... but even if we put the .vgf in the same folder, still doesn't work.
Any advice much appreciated!
Best wishes,
Sarah
I have worked out a file which runs a Vensim model from Excel.
However, when I pass the Excel and the published model along to other computers, it doesn't work. We get a prompt asking if we can open the .vpm in Model Reader and also says it can't find the .vgf .... but even if we put the .vgf in the same folder, still doesn't work.
Any advice much appreciated!
Best wishes,
Sarah
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Vensim.dll not working on guest computer
Have you published to a VPA file?
If yes, start the model reader, and open this. It will start Excel which in turn will open the model etc.
If yes, start the model reader, and open this. It will start Excel which in turn will open the model etc.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Vensim.dll not working on guest computer
Here is an image of the error message when I try to simulate from Excel.
Forgive please the low resolution image.
Thank you,
Sarah
Forgive please the low resolution image.
Thank you,
Sarah
- Attachments
-
- error.jpg (12.6 KiB) Viewed 16025 times
Re: Vensim.dll not working on guest computer
As sorry, you responded before I realized.
You're right - I was trying to run it on the guest computer from a .vpm
Now, when I try and save as a .vpa
1. I select Package Type: Other (using Vensim.dll)
2. It tells me there are problems packaging
3. If I specify the caller as interface.xlsm
4. It tells me it has problems packaging the interface.xlsm
Any advice as to why it can't package a .vpa?
Many thanks,
Sarah
You're right - I was trying to run it on the guest computer from a .vpm
Now, when I try and save as a .vpa
1. I select Package Type: Other (using Vensim.dll)
2. It tells me there are problems packaging
3. If I specify the caller as interface.xlsm
4. It tells me it has problems packaging the interface.xlsm
Any advice as to why it can't package a .vpa?
Many thanks,
Sarah
Re: Vensim.dll not working on guest computer
Ah, ok - I worked this out. For reference, it wouldn't package interface.xlsm because interface.xlsm was open (set to open automatically when you open the model.)
Best wishes,
Sarah
Best wishes,
Sarah
Re: Vensim.dll not working on guest computer
Can you please, very explicitly tell me how to save an Excel and a .mdl as a .vpa so that a guest can use it?
1. When I do this, do I choose the Excel as the caller?
2. Do I need to add the Excel files as an 'Additional File'
When I publish the model using the settings in the attached image, I get the following error message that 'Failed to open...' (also shown in attached image.)
Please help? This should be simple, right?
Thank you,
Sarah
1. When I do this, do I choose the Excel as the caller?
2. Do I need to add the Excel files as an 'Additional File'
When I publish the model using the settings in the attached image, I get the following error message that 'Failed to open...' (also shown in attached image.)
Please help? This should be simple, right?
Thank you,
Sarah
Re: Vensim.dll not working on guest computer
Hi,
For reference, the steps/settings are as shown in the attached image.
This saves both the Excel and the model into one .vpa file. Note again that Vensim will not be able to publish the application if your Excel file is open.
When you open the published .vpa file with Model Reader, the Excel file automatically opens.
The one problem I'm still having is that when you first simulate Vensim prompts: "do you want to overwrite interface.xlsm with the package file?" I can't seem to stop it from doing this, so maybe need to put something into the VBA code or save it differently?
Best wishes,
Sarah
For reference, the steps/settings are as shown in the attached image.
This saves both the Excel and the model into one .vpa file. Note again that Vensim will not be able to publish the application if your Excel file is open.
When you open the published .vpa file with Model Reader, the Excel file automatically opens.
The one problem I'm still having is that when you first simulate Vensim prompts: "do you want to overwrite interface.xlsm with the package file?" I can't seem to stop it from doing this, so maybe need to put something into the VBA code or save it differently?
Best wishes,
Sarah
- Attachments
-
- howto.jpg (62.33 KiB) Viewed 16018 times
Re: Vensim.dll not working on guest computer
This is the error I'm getting every time I simulate. Clicking "No" works around it, but very distracting.
Any advice much appreciated.
Best wishes,
Sarah
Any advice much appreciated.
Best wishes,
Sarah
- Attachments
-
- error.jpg (22.79 KiB) Viewed 16018 times
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Vensim.dll not working on guest computer
I've experimented a bit. Unfortunately embedding the Excel spreadsheet in the VPA will always overwrite the one on disk. I cannot see a way around this for now (I'll add it as an enhancement for a future release (extract, but don't overwrite)).
So you will have to distribute two files, the spreadsheet and the .VPA.
Tony.
So you will have to distribute two files, the spreadsheet and the .VPA.
Tony.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Vensim.dll not working on guest computer
Hi Tony,
I don't mind distributing two files, but the problem still persists - because the only way to package the .vpa is to use the interface.xlsm files as the caller. So the .vpa opens the interface.xlsm from the package and then saves the interface.xlsm to the same folder as the .vpa.....I don't see how you can package a .vpa without incorporating the Excel file?
And then, once the .vpa is opened, the Excel files is saved to the same folder, and automatically creates a conflict with the Excel file in the .vpa package.
Am I missing something?
Many thanks.
Best wishes,
Sarah
I don't mind distributing two files, but the problem still persists - because the only way to package the .vpa is to use the interface.xlsm files as the caller. So the .vpa opens the interface.xlsm from the package and then saves the interface.xlsm to the same folder as the .vpa.....I don't see how you can package a .vpa without incorporating the Excel file?
And then, once the .vpa is opened, the Excel files is saved to the same folder, and automatically creates a conflict with the Excel file in the .vpa package.
Am I missing something?
Many thanks.
Best wishes,
Sarah
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Vensim.dll not working on guest computer
I've got a solution, but it's a little "messy".
Create a file called launch.bat in the same directory as the model. Make the contents of this file
Now make the caller "launch.bat". Include the Excel file within the package but select it and click "Extract" (see the screenshot). Create the VPA.
Now open this in the model reader. The model reader will call "Launch.bat" which will in turn launch the Excel file. "Extract" should only extract the Excel file on the first time the VPA is opened.
I've tested it here and it seems ok. Let me know how you get on.
Tony.
Create a file called launch.bat in the same directory as the model. Make the contents of this file
Code: Select all
launch excelfile.xls
Now open this in the model reader. The model reader will call "Launch.bat" which will in turn launch the Excel file. "Extract" should only extract the Excel file on the first time the VPA is opened.
I've tested it here and it seems ok. Let me know how you get on.
Tony.
- Attachments
-
- publishsettings.jpg (57.08 KiB) Viewed 16004 times
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Vensim.dll not working on guest computer
Hi Tony,
I don't really know how to write a batch file. Here is my attempt.
It's obviously wrong, all I wrote is literally:
@echo off
launch interface.xlsm
The model doesn't seem to open either.
Thank you. I think your suggestion will work if I get this file right.
Best wishes,
Sarah
I don't really know how to write a batch file. Here is my attempt.
It's obviously wrong, all I wrote is literally:
@echo off
launch interface.xlsm
The model doesn't seem to open either.
Thank you. I think your suggestion will work if I get this file right.
Best wishes,
Sarah
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Vensim.dll not working on guest computer
I've uploaded a zip file containing an example.
And try
instead of
And try
Code: Select all
@echo off
start interface.xlsm
Code: Select all
@echo off
launch interface.xlsm
- Attachments
-
- 2012-06-13 Demo Excel VPA model.zip
- (82.44 KiB) Downloaded 228 times
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Vensim.dll not working on guest computer
Oh thank you! This is really interesting.
The solution I eventually came to was to use the phrase:
call interface.xlsm
and I didn't embed the interface in the *.vpa published package at all....so they exist as two files.
This was the only way I could stop the over-ride error message. Your solution didn't work for me for some reason....
But thank you so much for all the assistance.
Best wishes,
Sarah
The solution I eventually came to was to use the phrase:
call interface.xlsm
and I didn't embed the interface in the *.vpa published package at all....so they exist as two files.
This was the only way I could stop the over-ride error message. Your solution didn't work for me for some reason....
But thank you so much for all the assistance.
Best wishes,
Sarah