First time here? Check out the Help page!
1 | initial version |
Hi, I ran into the same problem and ended up with a bit of a 'hacky' solution as below.
TL;DR - use sys.path inside the plugin
All the paths present in the PythonPlugins:SearchPaths section of the idf are added by EnergyPlus to the Python environment variable. By default, this includes the idf location and the working directory.
You could do something like below to then figure out the idf directory from the ones returned by sys.path (not the most elegant solution, but it works :) ):
idf_dir = [p for p in sys.path if len(glob.glob(p + "\\*idf")) > 0][0]
Hope this helps!