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

Revision history [back]

I might be totally misunderstanding your question but...

There is no model.getAirLoopHVAC. All methods to return model objects are like model.getWhateverObjects (note the "s" on the end) and return an array of objects. So if you wanted a list of AirLoopHVAC names, you could do:

air_loop_hvac_names = []
model.getAirLoopHVACs.each do |air_loop_hvac|
  air_loop_hvac_names << air_loop_hvac.name.get
end

or in a one-liner:

air_loop_hvac_names = model.getAirLoopHVACs.map{ |air_loop_hvac| air_loop_hvac.name.get }

I might be totally misunderstanding your question but...

There is no model.getAirLoopHVAC. All methods to return model objects objects, for which there can be more than one, are like model.getWhateverObjects (note the "s" on the end) and return an array of objects. So if you wanted a list of AirLoopHVAC names, you could do:

air_loop_hvac_names = []
model.getAirLoopHVACs.each do |air_loop_hvac|
  air_loop_hvac_names << air_loop_hvac.name.get
end

or in a one-liner:

air_loop_hvac_names = model.getAirLoopHVACs.map{ |air_loop_hvac| air_loop_hvac.name.get }