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

Getting model path from runner object in OpenStudio

The runner object (openstudio::ruleset::OSRunner) has the lastOpenStudioPath attribute that can be set by:

runner.setLastOpenStudioModelPath(OpenStudio::Path.new(modelPath))

It is posible read the last OpenStudio model from the runner as:

model = runner.lastOpenStudioModel

You can also read the path of the weather file used:

weatherPath = runner.lastEpwFilePath

Then ¿is it posible to get the the last OpenStudio model path?

I've tried with:modelPath = runner.lastOpenStudioModelPath but is not working.

Thanks