Getting weather variables

The VE Python API allows users create simple programs using the Python Programming Language, to interact with a VE Model and/or Vista Results File
Post Reply
User avatar
Complex Potential
VE Expert
VE Expert
Posts: 467
Joined: Wed Jan 09, 2013 11:57 am
Location: Bristol, UK

Getting weather variables

Post by Complex Potential »

Can someone please take a look at this code and let me know where I'm going wrong (preferably with an example of how to do it right because I'm a spanner ;) )? I'm fairly sure it's something to do with the "get_weather_results" call but I cant quite work out what I'm missing.

I'm trying to get a simple list of external dry bulb temperatures

Code: Select all

# Define currently open project folder
project = iesve.VEProject.get_current_project()

# Asks user to select a results file
result_file = IesFilePicker.pick_aps_file()

# Load results file
vista_file = iesve.ResultsReader.open(result_file)

# get.room.list() returns a list of room ids, room names, room volumes and room areas
room_list = vista_file.get_room_list()

dbulbs = vista_file.get_weather_results('Temperature','w')
print(dbulbs)
The above results in the below error

Code: Select all

Traceback (most recent call last):
  File "C:\Users\ukrcm001\Documents\My VE Scripts\test_4.py", line 27, in <module>
    dbulbs = vista_file.get_weather_results()
Boost.Python.ArgumentError: Python argument types in
    ResultsReader.get_weather_results(ResultsReader)
did not match C++ signature:
    get_weather_results(class ResultsReader {lvalue}, class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >, int start_day=-1, int end_day=-1)

Thanks

CP
User avatar
Complex Potential
VE Expert
VE Expert
Posts: 467
Joined: Wed Jan 09, 2013 11:57 am
Location: Bristol, UK

Re: Getting weather variables

Post by Complex Potential »

Ok, I think I've figured it out myself. I didn't need the 'w' in the code.
Post Reply