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

The openstudio::model::ruleset::OSRunner class has a private m_lastOpenStudioModelPath member, but it is not exposed in the public API as are the other relevant paths.

The model path can be useful to keep track from where the models originate so it can be displayed in reports and any other user script artifacts.

A new API addition would have a signature like this in OSRunner.hpp:

  /** Returns a path to the last OpenStudioModel if available. */
boost::optional<openstudio::path> lastOpenStudioModelPath() const;

and an implementation like this (in OSRunner.cpp):

boost::optional<openstudio::path> OSRunner::lastOpenStudioModelPath() const
{
  return m_lastOpenStudioModelPath;
}