Programatically list/delete/test existence of model scenario

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

bhaupt
Posts: 25
Joined: Fri May 07, 2010 1:16 pm

Programatically list/delete/test existence of model scenario

Postby bhaupt » Tue Aug 14, 2012 6:07 am

Within a given model object is it possible to list the different scenarios, get a count of scenarios in the model, traverse the list of scenarios and delete scenarios that need to be rebuilt.

Ultimately what I want to do is test to see if a scenario exists, and then delete it so I can recreate it. Since a model object stores to a db with scenarios intact, I have no way to know whether the model object was stored with the scenario intact, then when I go to build an updated model worfile, part of that process is to put in updated scenarios. Instead what I wind up doing is deleting the model every time and then increasing my error count since deleting a non-existant scenario throws an error.

m_mymodel.scenario(d) "Scenario 1"

Incidentally, since I'm having to do some creative contribution analysis, what is the maximum number of scenarios that a model object can have in it?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13585
Joined: Tue Sep 16, 2008 5:38 pm

Re: Programatically list/delete/test existence of model scen

Postby EViews Gareth » Tue Aug 14, 2012 7:53 am

Unfortunately it is not currently possible to list the existing scenarios, or test their existence.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests