access energyplus sql file in openstudio application

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

riteshsahoo gravatar image

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

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 image riteshsahoo  ( 2020-09-25 08:04:39 -0600 )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 image shorowit  ( 2020-09-25 12:10:15 -0600 )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 image riteshsahoo  ( 2020-09-25 21:24:52 -0600 )edit