Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I don't use the python API but I just done this last week using batch, so you should be able to do the same in Python.

The meter.CSV isn't an output from E+, it is an output from READVARSESO.exe, a tool built in EP Launch that reads the .eso and .mtr files. This is the information page:https://bigladdersoftware.com/epx/docs/8-0/input-output-reference/page-090.html.

That .exe is in every E+ download in the "postprocess" folder, so you already have it. Once you call E+ from Python and get the .ESO, calling the ReadvarsEso with the correct arguments and some neccesary file in the same folder should work. With the link I gave you should be able to make it work for yourself in python, but I leave to you how I made it work for myself in case it helps.

In particular, readvars needs 2 files .mvi and .rvi for the variable and meter .CSV files respectively, so the call to readvarsESO in my case looks like this (Unlimited makes it so you can output more than 255 variables):

ReadVarsESO ins.rvi unlimited  
ReadVarsESO ins.mvi unlimited

And those ins.rvi and .mvi look like this:

The whole content of the .mvi is:

!idfName!out.mtr
!idfName!outmeter.csv

And for the .rvi:

!idfName!out.eso
!idfName!out.csv

So my workflow (Because I modified the E+ source code so I call E+ not from EPLaunch) is using batch to call E+ and after simulating I get the names of the .eso and .mtr files, write it into the .rvi and .mvi accordingly, and call readvars with the previously stated arguments. That way I get the .csv and meter.csv files to work with.

Implementing this in python is something that you can probably do yourself so I wish you luck in your simulations, PMP

I don't use the python API but I just done this last week using batch, so you should be able to do the same in Python.

The meter.CSV isn't an output from E+, it is an output from READVARSESO.exe, a tool built in EP Launch that reads the .eso and .mtr files. This is the information page:https://bigladdersoftware.com/epx/docs/8-0/input-output-reference/page-090.html. page:

https://bigladdersoftware.com/epx/docs/8-0/input-output-reference/page-090.html.

That .exe is in every E+ download in the "postprocess" folder, so you already have it. Once you call E+ from Python and get the .ESO, calling the ReadvarsEso with the correct arguments and some neccesary file in the same folder should work. With the link I gave you should be able to make it work for yourself in python, but I leave to you how I made it work for myself in case it helps.

In particular, readvars needs 2 files .mvi and .rvi for the variable and meter .CSV files respectively, so the call to readvarsESO in my case looks like this (Unlimited makes it so you can output more than 255 variables):

ReadVarsESO ins.rvi unlimited  
ReadVarsESO ins.mvi unlimited

And those ins.rvi and .mvi look like this:

The whole content of the .mvi is:

!idfName!out.mtr
!idfName!outmeter.csv

And for the .rvi:

!idfName!out.eso
!idfName!out.csv

So my workflow (Because I modified the E+ source code so I call E+ not from EPLaunch) is using batch to call E+ and after simulating I get the names of the .eso and .mtr files, write it into the .rvi and .mvi accordingly, and call readvars with the previously stated arguments. That way I get the .csv and meter.csv files to work with.

Implementing this in python is something that you can probably do yourself so I wish you luck in your simulations, PMP