access energyplus sql file in openstudio application

asked 4 years ago

riteshsahoo's avatar

updated 4 years ago

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

Preview: (hide)

Comments

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's avatar riteshsahoo  ( 4 years ago )
1

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's avatar shorowit  ( 4 years ago )

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

riteshsahoo's avatar riteshsahoo  ( 4 years ago )