| 42 | namespace openstudio::workflow::util { |
| 43 | |
| 44 | model::Model loadOSM(const openstudio::filesystem::path& osmPath) { |
| 45 | |
| 46 | LOG_FREE(Info, "openstudio.worklow.Util", "Loading OSM model"); |
| 47 | LOG_FREE(Info, "openstudio.worklow.Util", "Reading in OSM model " << osmPath); |
| 48 | |
| 49 | openstudio::osversion::VersionTranslator vt; |
| 50 | auto m_ = vt.loadModel(osmPath); |
| 51 | if (!m_) { |
| 52 | throw std::runtime_error(fmt::format("Failed to load OSM file {}\n", openstudio::toString(osmPath))); |
| 53 | } |
| 54 | return m_.get(); |
| 55 | } |
| 56 | |
| 57 | Workspace loadIDF(const openstudio::filesystem::path& idfPath) { |
| 58 | LOG_FREE(Info, "openstudio.worklow.Util", "Loading IDF workspace"); |
no test coverage detected