Welcome to WEAP's Website WEAP
WEAP is an initiative of the Stockholm Environment Institute.


About WEAP

Home
Why WEAP?
Features
What's New?
Sample Screens
Demonstration
Publications
History and Credits

Using WEAP
Download
Licensing
User Guide
Tutorial
Videos (YouTube)

User Forum
Discussions
Members List
Edit Profile

Additional Support
Training
University Courses
Collaboration

About Us
SEI-US Water Resources Program
Please Contact Us

LEAP
Interested in Energy?
Read about LEAP: SEI's software for energy planning.

Link WEAP and LEAP for combined Water-Energy planning.
Watch a video demo!
   

User Forum

All Topics | Topic "Export crop production results from API"
Log in to post new messages or reply to existing messages.
 
Author Message
Dr. Andrea Momblanch Benavent

Subject: Export crop production results from API   
Posted: 3/18/2021 Viewed: 5632 times
Hi,

I would like to export the "Annual crop production" from MABIA catchments in my model using the API. I am not exporting favorite results, but the values that the variable take at each time step with two nested loops:

For CalcYear = 1990 to 2010
For CalcTS = 1 to 12
WEAP.Branch("Demand Sites and Catchments\MABIA_Catchment").Variables("Annual Crop Production").Value(CalcYear, CalcTS)
Next
Next

This does not produce any result as I think it gets confused with another variable with the same name for SMM catchments (for which I have not added potential yield data). Is there anything I am missing here or it is simply that having the same name in the API the two variables get confused and WEAO exports the SMM one by default?

Thanks,
Andrea
Topic "Export crop production results from API"