call a published DSS model via DLL from VBA code

Use this forum to post Vensim related questions.
Post Reply
MKui
Junior Member
Posts: 16
Joined: Thu Mar 01, 2018 3:57 pm
Vensim version: DSS

call a published DSS model via DLL from VBA code

Post by MKui »

We publish our model in DSS and only check the box ‘readable by DSS’. In our application Vensim DSS is called via a DLL from VBA code.
This gives the error ‘file blocked by this application’.

Via trial-and-error we now publish by also checking the box ‘readable by runtime’. The disadvantage of this is that we loose the functionality of being able to read the specific subscript element set from the database via GET ODBC SUBSCRIPT(); before publishing we have to reload the model with specific subscript element set and than publish it. So per subscript element set we have a separate vpmx file. For only DSS this should not be the case. DSS is able to work with ‘dynamic’ subscript element sets.
In your documentation we also read that ‘runtime’ is becoming obsolete.

What can you advice us on using DSS, publish only readable by DSS and calling DSS model via DLL from VBA, so we make use of the DSS functionality?
MKui
Junior Member
Posts: 16
Joined: Thu Mar 01, 2018 3:57 pm
Vensim version: DSS

Re: call a published DSS model via DLL from VBA code

Post by MKui »

Could you please give a reply on this topic?
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: call a published DSS model via DLL from VBA code

Post by Administrator »

GET...SUBSCRIPTS will not work in the DLL or Vensim Model Reader. Both the DLL and Model Reader require a fully working and parsed model, and the only way to guarantee that is to block calls to GET...SUBSCRIPTS functions.

The Vensim Model reader would not really be an option as you want to load via the DLL. The same restriction will be in place on the GET...SUBSCRIPTS functions.

Can you create the model with a standard set of subscripts, and then map these to labels in the user interface at runtime? That is how we used to do things in the past when needed.
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
Post Reply