Subject: Is it possible to automatically set the units with the ResultSetting function? Posted: 4/18/2017 Viewed: 11484 times
Hi, I'm doing an automatization and I need to select the units of the Streamflow to m3/s, in order to export results into cvs.
Is it possible to select via COM, using the ResultSetting or other function the units?
Thanks a lot.
Mr. Jack Sieber
Subject: Re: Is it possible to automatically set the units with the ResultSetting function? Posted: 4/18/2017 Viewed: 11475 times
No, it is not possible to set the Results View unit via the API (COM).
Jack
Mr. Jack Johnson
Subject: Re: Is it possible to automatically set the units with the ResultSetting function? Posted: 5/18/2017 Viewed: 11083 times
Hi Jack,
Also a unit setting/automation related question.
I'm currently using the API through Python.
I have multiple Catchment nodes that I am trying to read data into. I have successfully read in data for several values but am struggling with the Area variable. It appears because there is no default unit for Area is given I cannot directly read in my data. If I manually set the units to Ha for example I can access the variable and set it as I wish.
So my question, is there a way I can set the units of the Area variable within a catchment node automatically? Either at a global or local scale. I'm happy to set it at a global scale manually if that is a possible solution.
Any advice would be appreciated!
Thanks,
Jack
Mr. Jack Sieber
Subject: Re: Is it possible to automatically set the units with the ResultSetting function? Posted: 5/18/2017 Viewed: 11075 times
At this time, it is not possible to set any units via the API. You will first need to set the unit manually in WEAP before you can use the API to set the expression for Area.
Jack
Mr. Felipe Ahumada
Subject: Re: Is it possible to automatically set the units with the ResultSetting function? Posted: 3/28/2022 Viewed: 3272 times
Hello Jack.
I was wondering if nowadays there has been an update to this topic.
Is there a way to set the unit for area for all the catchments?
Thanks in advance,
Felipe A.
Mr. Jack Sieber
Subject: Re: Is it possible to automatically set the units with the ResultSetting function? Posted: 3/28/2022 Viewed: 3268 times
Hello Felipe,
Yes, it is now possible to use the WEAP API to set units for Key Assumptions and Demand Sites and Catchments branches. For example, to set the area unit for all catchments to one thousand hectares, here is the VBS statement:
FOR EACH Br IN WEAP.Catchments
Br.Variables("Area").ScaleUnit = "1000 ha"
NEXT
Jack
Mr. Felipe Ahumada
Subject: Re: Is it possible to automatically set the units with the ResultSetting function? Posted: 3/30/2022 Viewed: 3257 times
Hi Jack
Thanks for your reply. It really helped!
Felipe A.
Topic "Is it possible to automatically set the units with the ResultSetting function?"