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

Revision history [back]

You can use the removeBranchForZone method in the AirLoopHVAC object to delete the AirTerminal object.

Code will look something like:

model.getAirLoopHVACs.each do |loop|
  loop.removeBranchForZone(thermal_zone)
end

or better:

model.getThermalZones.each do |zone|
  if !zone.airLoopHVACTerminal.empty?
    terminal = zone.airLoopHVACTerminal.get
    if !terminal.airLoopHVAC.empty?
      air_loop = terminal.airLoopHVAC.get
      air_loop.removeBranchForZone(zone)
    end
  end
end