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

Revision history [back]

I'm not aware of a measure on the BCL that does this. There is a method called removeEquipment in the OSlib_HVAC.rb module that's included in the /resources folder of some BCL measures, e.g. the AEDG measures.

If you're using the API outside of formal measures the code below will remove all HVAC systems. If you'd like a formal measure to do this, I've created a one and committed it to the UnmetHours OpenStudio Measures GitHub repository.

# get model objects
air_loops = model.getAirLoopHVACs
plant_loops = model.getPlantLoops
zones = model.getThermalZones

# do stuff
plant_loops.each do |plant_loop|
  plant_loop.remove
end

air_loops.each do |air_loop|
  air_loop.remove
end

zones.each do |zone|

  zone.equipment.each do |zone_equipment|
    zone_equipment.remove
  end

end