Sha256: b82af9064e2ca89833646b064d1392c5e256419abb9151c74f0aeb7911c0f9d1

Contents?: true

Size: 479 Bytes

Versions: 11

Compression:

Stored size: 479 Bytes

Contents

require 'openstudio'
require_relative 'Prototype.utilities'

full_filename = '2004.osm'

if full_filename && (File.file?(full_filename) || File.file?(File.join(Dir.pwd, full_filename)))
  model = safe_load_model(full_filename)

  model = strip_model(model)

  new_path = OpenStudio::Path.new("#{Dir.pwd}/stripped_model.osm")

  model.save(new_path, true)

  puts "Stripped model was saved to #{new_path}"
else
  puts 'Pass a valid file path to this script'
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
openstudio-standards-0.1.15 lib/openstudio-standards/prototypes/Prototype.strip_model.rb
openstudio-standards-0.1.14 lib/openstudio-standards/prototypes/Prototype.strip_model.rb
openstudio-standards-0.1.13 lib/openstudio-standards/prototypes/Prototype.strip_model.rb
openstudio-standards-0.1.12 lib/openstudio-standards/prototypes/Prototype.strip_model.rb
openstudio-standards-0.1.11 lib/openstudio-standards/prototypes/Prototype.strip_model.rb
openstudio-standards-0.1.10 lib/openstudio-standards/prototypes/Prototype.strip_model.rb
openstudio-standards-0.1.9 lib/openstudio-standards/prototypes/Prototype.strip_model.rb
openstudio-standards-0.1.8 lib/openstudio-standards/prototypes/Prototype.strip_model.rb
openstudio-standards-0.1.7 lib/openstudio-standards/prototypes/Prototype.strip_model.rb
openstudio-standards-0.1.6 lib/openstudio-standards/prototypes/Prototype.strip_model.rb
openstudio-standards-0.1.5 lib/openstudio-standards/prototypes/Prototype.strip_model.rb