Page 1 of 1

Time Series Data of VistaPro Variable using VE Script API

Posted: Thu Feb 15, 2024 3:58 pm
by Veerpal Kaur
Hi all,

I am using Python VE Scripting API for accessing the Room Variables for .clg file

Does anyone know whether or not it is possible to get the data of date and time of the variable via VE Script API.

I am using VistaPro variable “Space conditioning sensible.” and I extracted this variable as : scs = results_file_reader.get_results('Space conditioning sensible','Space conditioning sensible', 'z')

I want to get the date and time along with the variable value

I couldn’t find any support document on the internet for this .

Any help from from the community would be appreciated on this.

Regards,
Veerpal Kaur

Re: Time Series Data of VistaPro Variable using VE Script API

Posted: Sat Mar 09, 2024 12:26 am
by enerGwizz
I don't believe that's available in the results file, but you can figure it out with some legwork.

Code: Select all

first_day = results_file_reader.first_day
last_day = results_file_reader.last_day
results_per_day = results_file_reader.results_per_day
sim_year = results_file_reader.simulation_year
We use the Pandas library from there, which is magical for crunching data tables like this. For our own scripts, we validate that there are 365 days and 8760 values in the series first (i.e. hourly results for a non-leap year) and then use this:

Code: Select all

dt_index = pd.date_range(start="{}-01-01 01:00:00".format(sim_year), periods=8760, freq='H')