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

Revision history [back]

From the OpenStudio SketchUp plugin:

Extensions > OpenStudio User Scripts > Add or Alter Model Elements...

  1. Add New Thermal Zone For Spaces With No Thermal Zone

  2. Rename Thermal Zones Based on Space Names

...which will rename the zones as "Thermal Zone: Space Name".

If you want to change the zone name prefix you can alter the following code block from #2, which can be found here on a Windows machine:

C:\Program Files\OpenStudio 1.14.0\Ruby\openstudio\sketchup_plugin\user_scripts\Alter or Add Model Elements

  # rename thermal zone based on first space with prefix added e.g. ThermalZone 203
  if number_of_spaces > 0
    new_name = "TZ: " + spaces_in_thermal_zone[0] + multi  
    thermal_zone.setName(new_name)
  else
    puts "#{thermal_zone.name.to_s} did not have any spaces, and will not be renamed." 
  end

Where "TZ: " is the prefix. Zone names can be identical to space names, but might cause issues such as calling the getModelObjectByName method on a model.

From the OpenStudio SketchUp plugin:

Extensions > OpenStudio User Scripts > Add or Alter Model Elements...

  1. Add New Thermal Zone For Spaces With No Thermal Zone

  2. Rename Thermal Zones Based on Space Names

...which will rename the zones as "Thermal Zone: Space Name".

If you want to change the zone name prefix and are familiar with OpenStudio Measures you can alter the following code block the RB file from #2, which can be found here on a Windows machine:

C:\Program Files\OpenStudio 1.14.0\Ruby\openstudio\sketchup_plugin\user_scripts\Alter or Add Model Elements

Rename_ThermalZones_Based_On_Space_Names.rb

  # rename thermal zone based on first space with prefix added e.g. ThermalZone 203
  if number_of_spaces > 0
    new_name = "TZ: " + spaces_in_thermal_zone[0] + multi  
    thermal_zone.setName(new_name)
  else
    puts "#{thermal_zone.name.to_s} did not have any spaces, and will not be renamed." 
  end

Where "TZ: " is the prefix. Zone names can be identical to space names, but might cause issues such as calling the getModelObjectByName method on a model.


Other measures that may be useful: