lib/from_honeybee/hvac/template.rb in honeybee-openstudio-2.5.0 vs lib/from_honeybee/hvac/template.rb in honeybee-openstudio-2.5.1

- old
+ new

@@ -99,18 +99,21 @@ os_thermal_zone = zone_get.get zones << os_thermal_zone end end - # create the HVAC system and assign the identifier to the air loop name if it exists + # create the HVAC system and assign the display name to the air loop name if it exists os_hvac = openstudio_model.add_cbecs_hvac_system(standard, equipment_type, zones) os_air_loop = nil air_loops = openstudio_model.getAirLoopHVACs - unless air_loops.length == 0 + unless air_loops.length == $air_loop_count # check if any new loops were added + $air_loop_count = air_loops.length os_air_loop = air_loops[-1] loop_name = os_air_loop.name unless loop_name.empty? - os_air_loop.setName(@hash[:identifier] + ' - ' + loop_name.get) + if @hash[:display_name] + os_air_loop.setName(@hash[:display_name] + ' - ' + loop_name.get) + end end end # TODO: consider adding the ability to decentralize the plant by changing loop names #os_hvac.each do |hvac_loop|