Sha256: b4ff67bcf771aea799265f7960c8f013a6651768dd328ad3f60975a6556822e8

Contents?: true

Size: 726 Bytes

Versions: 14

Compression:

Stored size: 726 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 {|space|
	surfaces = space.surfaces()
	surfaces.each_with_index{ |surface, index|
		name = "#{space.nameString}-#{index}-#{surface.surfaceType()}"
		puts name
		surface.setName(name)
	}
	
}


osm_path = OpenStudio::Path.new(osm_outfile_name.to_s)
model.save(osm_path, true)

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
openstudio-standards-0.2.12 lib/openstudio-standards/utilities/rename_surfaces.rb
openstudio-standards-0.2.12.rc7 lib/openstudio-standards/utilities/rename_surfaces.rb
openstudio-standards-0.2.12.rc6 lib/openstudio-standards/utilities/rename_surfaces.rb
openstudio-standards-0.2.12.rc5 lib/openstudio-standards/utilities/rename_surfaces.rb
openstudio-standards-0.2.12.rc4 lib/openstudio-standards/utilities/rename_surfaces.rb
openstudio-standards-0.2.12.rc2 lib/openstudio-standards/utilities/rename_surfaces.rb
openstudio-standards-0.2.12.rc1 lib/openstudio-standards/utilities/rename_surfaces.rb
openstudio-standards-0.2.11 lib/openstudio-standards/utilities/rename_surfaces.rb
openstudio-standards-0.2.11.rc2 lib/openstudio-standards/utilities/rename_surfaces.rb
openstudio-standards-0.2.11.rc1 lib/openstudio-standards/utilities/rename_surfaces.rb
openstudio-standards-0.2.10 lib/openstudio-standards/utilities/rename_surfaces.rb
openstudio-standards-0.2.10.rc3 lib/openstudio-standards/utilities/rename_surfaces.rb
openstudio-standards-0.2.10.rc2 lib/openstudio-standards/utilities/rename_surfaces.rb
openstudio-standards-0.2.10.rc1 lib/openstudio-standards/utilities/rename_surfaces.rb