Sha256: 118dcb66c0408adb5811130dcb305b1fa2118cf2d94db02a0777df24bf58c1f2
Contents?: true
Size: 731 Bytes
Versions: 23
Compression:
Stored size: 731 Bytes
Contents
require 'openstudio' require_relative '../../openstudio-standards/btap/btap' require_relative '../../openstudio-standards/btap/fileio' puts "\nenter osm file name (without file extension):\n" # osm_infile_name = gets.chomp osm_infile_name = 'NECB2011Hospital' osm_outfile_name = osm_infile_name.to_s + '_updated.osm' model = BTAP::FileIO.safe_load_model("#{osm_infile_name}.osm") spaces = model.getSpaces spaces.each do |space| surfaces = space.surfaces() surfaces.each_with_index do |surface, index| name = "#{space.nameString}-#{index}-#{surface.surfaceType}" puts name surface.setName(name) end end osm_path = OpenStudio::Path.new(osm_outfile_name.to_s) model.save(osm_path, true)
Version data entries
23 entries across 23 versions & 1 rubygems