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

Revision history [back]

If you have an AirLoopHVAC object, you can get the AirLoopHVACReturnPlenum and its associated ThermalZone by doing something like this:

air_loop_hvac.demandComponents.each do |component|
  if component.to_AirLoopHVACReturnPlenum.is_initialized
    return_plenum = component.to_AirLoopHVACReturnPlenum.get
    if return_plenum.thermalZone.is_initialized
      zone = return_plenum.thermalZone.get
      puts "Return plenum thermal zone is #{zone.name}"
    end
  end
end