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

Revision history [back]

click to hide/show revision 1
initial version

Open Studio: Air loop not recognized in model from Ruby measure script

Hi there, I am working on coding an ASHP measure for Open Studio in Ruby and am running into an issue where the name of an air loop specified in an user-input CSV is not recognized in the model (thus, retrieving it produces an "empty" result). I am getting the error message that I specified below when running the measure.

model_airloop = model.getAirLoopHVACByName(inputted_airloop_name)
if model_airloop.empty?
      runner.registerError("HVAC air loop template '#{inputted_airloop_name}' not found.")
      return false
end

The OS model does have an air loop that is named "inputted_airloop_name", but I am unexpectedly getting this error message, meaning the variable is coming up empty. Any ideas on potential causes of this error?

Thank you!