access energyplus sql file in openstudio application

asked 2020-09-25 08:03:01 -0500

riteshsahoo gravatar image

updated 2020-09-25 08:15:09 -0500

I want to write a query in openstudio application to get some result from the latest energyplus sql file . I am getting an error. How to get the last file ?

 openstudio::path sqlFilepath = openstudio::SqlFile::path();
  boost::optional<openstudio::SqlFile> mySqlFile = openstudio::SqlFile::path();
  if (mySqlFile && mySqlFile->connectionOpen())


this does not work

edit retag flag offensive close merge delete


boost::optional<openstudio::path> sqlFilepath = openstudio::filesystem::path(); boost::optional<openstudio::sqlfile> mySqlFile = this->m_model.sqlFile(); if (mySqlFile && mySqlFile->connectionOpen()) {

also dont work

riteshsahoo gravatar imageriteshsahoo ( 2020-09-25 08:04:39 -0500 )edit

Where are you specifying the actual path to the sql file? E.g. C:/foo/eplusout.sql. Also, depending on your OpenStudio workflow, you may simply be able to do sqlFile = runner.lastEnergyPlusSqlFile.get

shorowit gravatar imageshorowit ( 2020-09-25 12:10:15 -0500 )edit

I want it to access in the C++ openstudio application and not in the measure ... how can i get the lastEnergyPlusSqlFile path ?

riteshsahoo gravatar imageriteshsahoo ( 2020-09-25 21:24:52 -0500 )edit