Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

You can also have each measure write its own file and have the other measures read it. For this to work on both PAT( OS-app) and the OS-server, the following directories should work:

 json_path = '../OtherMeasureDirectoryName/results.json'  #this is the path structure on the server
if File.exist? ems_path
  ems_string = File.read(ems_path)
  if File.exist? json_path
    json = JSON.parse(File.read(json_path))
  end
else
  json_path2 = Dir.glob('../../**/results.json')  #this will parse the directory structure with PAT/OS-app
  json_path1 = json_path2[0]
  if File.exist? json_path
    json = JSON.parse(File.read(json_path))
  end

end

This will probably change next year once OS-server and OS-App use the same workflow manager, but this is a way off.