lib/to_openstudio/geometry/aperture.rb in honeybee-openstudio-2.31.8 vs lib/to_openstudio/geometry/aperture.rb in honeybee-openstudio-2.31.9

- old
+ new

@@ -116,11 +116,11 @@ unless @hash[:display_name].nil? os_subsurface.setDisplayName(@hash[:display_name]) end # assign the construction if it exists - if @hash[:properties][:energy][:construction] + if @hash[:properties].key?(:energy) && @hash[:properties][:energy][:construction] construction_identifier = @hash[:properties][:energy][:construction] construction = openstudio_model.getConstructionByName(construction_identifier) if !construction.empty? os_construction = construction.get os_subsurface.setConstruction(os_construction) @@ -180,10 +180,10 @@ os_shading_surface.setDisplayName(@hash[:display_name]) end # get the approriate construction id construction_id = nil - if @hash[:properties][:energy][:construction] + if @hash[:properties].key?(:energy) && @hash[:properties][:energy][:construction] construction_id = @hash[:properties][:energy][:construction] else construction_id = 'Generic Double Pane' end