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

Revision history [back]

During a simulation OS uses the Temp directory to read and write files. The contents of <OsmFolder>/run/ is copied to the Temp directory and then deleted after the new files are written and the simulation is completed. On Windows machines OS uses the C:\Users\<UserName>\AppData\Local\Temp\OpenStudio.xxxxxx\resources\run\ path.

The issue I had was in referencing the OSM directory structure rather than the Temp directory. So to have a measure write files during a simulation and have them appear in the OSM folder I had to make sure any paths used in the measure were relative to the measure file. The File.expand_path("../../../", __FILE__) worked well for moving around the Temp OSM directory.

During a simulation OS uses the Temp directory to read and write files. The contents of <OsmFolder>/run/ is copied to the Temp directory and then deleted after the new files are written and the simulation is completed. On Windows machines OS uses the path:

C:\Users\<UserName>\AppData\Local\Temp\OpenStudio.xxxxxx\resources\run\ path.

The issue I had was in referencing the OSM directory structure rather than the Temp directory. So to have a measure write files during a simulation and have them appear in the OSM folder I had to make sure any paths used in the measure were relative to the measure file. The File.expand_path("../../../", __FILE__) worked well for moving around the Temp OSM directory.