Sha256: 43484f7a98b0d838659168037daccf028cfbcf3a43cdd6b791703d70497ff77c

Contents?: true

Size: 473 Bytes

Versions: 5

Compression:

Stored size: 473 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

5 entries across 5 versions & 1 rubygems

Version Path
openstudio-standards-0.1.4 lib/openstudio-standards/prototypes/Prototype.strip_model.rb
openstudio-standards-0.1.3 lib/openstudio-standards/prototypes/Prototype.strip_model.rb
openstudio-standards-0.1.2 lib/openstudio-standards/prototypes/Prototype.strip_model.rb
openstudio-standards-0.1.1 lib/openstudio-standards/prototypes/Prototype.strip_model.rb
openstudio-standards-0.1.0 lib/openstudio-standards/prototypes/Prototype.strip_model.rb