Skip to content

Commit

Permalink
Use generated_files in Apply Measure Now which is what the workflow g…
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarrec committed Jun 3, 2021
1 parent 4e3c11c commit 7591ef7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/openstudio_lib/ApplyMeasureNowDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ ApplyMeasureNowDialog::ApplyMeasureNowDialog(QWidget* parent)
//m_workingDir = toPath("E:/test/ApplyMeasureNow");
m_workingDir = openstudio::toPath(app->currentDocument()->modelTempDir()) / openstudio::toPath("ApplyMeasureNow");

m_workingFilesDir = m_workingDir / openstudio::toPath("WorkingFiles");

// save the model's workflow JSON
m_modelWorkflowJSON = app->currentModel()->workflowJSON();

Expand All @@ -124,6 +122,10 @@ ApplyMeasureNowDialog::ApplyMeasureNowDialog(QWidget* parent)
m_tempWorkflowJSON.setWeatherFile(*weatherFile);
}

// The openstudio-workflow gem will prepend the "generated_files" directory to the workflowJSON.filePaths, so match that
// cf: https://github.com/NREL/OpenStudio-workflow-gem/blob/e569f910be364d33c3ddb1a655570c85f1b24bfa/lib/openstudio/workflow/jobs/run_initialization.rb#L99
// in requestReload, this directory gets copied over to the first filePath of m_modelWorkflowJSON, which is typically the files/ directory
m_workingFilesDir = m_workingDir / openstudio::toPath("generated_files");
// add the WorkingFiles directory as files files path, measures writing output files should be written here
m_tempWorkflowJSON.addFilePath(m_workingFilesDir);

Expand Down

0 comments on commit 7591ef7

Please sign in to comment.