All Topics |
Topic: “WEAPApplication.Scenarios”
Author | Message |
---|
Subject: WEAPApplication.Scenarios
Posted: 6/25/2022 Viewed: 8005 times
Dear All,
How can I remove these errors? 1.WEAPApplication.Scenarios: Invalid Scenario: Current Accounts. 2.WEAPApplication.ResultValue: Invalid Branch: Variable name:\... I tried to use Examples (using VB script) in WEAP API Classes But I can not understand what is wrong! also, when I run the code several times, the errors change! some disappear new ones appear! I am a beginner and need help very much!If you have a sample file about this, please share with me. Thank you all for your attention. |
Subject: Re: WEAPApplication.Scenarios
Posted: 2/5/2025 Viewed: 2871 times
Zahra and for anyone else wondering,
Best use practices of the API can be found in the WEAP Help- search for "Application API". You will need to ensure that your code is in the format listed for the scenario and resultvalue functions. The help lists the following examples: PRINT WEAP.ResultValue("\Demand Sites\South City:Reliability") 'Reliability is for the entire study period, so doesn't have a year or time step parameter SET S = WEAP.Scenario("Reference") |
Topic: “WEAPApplication.Scenarios”