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

EnergyPlus Python Plugin String Data Exchange

asked 2021-08-12 10:50:17 -0500

spqr gravatar image

When using the EnerygPlus Python API in plugin mode, I need to transfer IDF specific config information to the plugin. This could be in the form of a filename for the plugin to then read from, or the API could transfer this config information as a string.

Looking at the datatransfer.py code, it appears the only method which will return non numeric or boolean data is: list_available_api_data_csv. I could set a variable name or schedule name to be the config filename, and then find it in this CSV, but this approach seems to be a bit of a hack.

I'm generating and running the IDF using eppy, so can programmatically set a text field which matches the IDF.

If it doesn't exist, this functionality may be a feature request for the Python API to make it more flexible.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-08-13 11:12:24 -0500

What information are you trying to share between the IDF to the script? If you're not already aware, there are a number of example Python scripts and corresponding IDFs included in the EnergyPlus example files (e.g. PythonPlugin...py).

edit flag offensive delete link more

Comments

I've worked through the different Python Plugin example files, and as far as I can tell, there isn't a way to do what I am trying to do. I'm trying to pass some sort of text / string information to the python plugin to provide it additional configuration information. This could be as simple as the IDF name which could then be parsed and used to load a separate config file. Or it could be a longer string which contains the config information (in a format such as JSON).

spqr gravatar image spqr  ( 2021-08-22 21:31:39 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

 

Question Tools

1 follower

Stats

Asked: 2021-08-12 10:50:17 -0500

Seen: 61 times

Last updated: Aug 13