Skip to content

Commit

Permalink
feat(openstudio): Upgrade component to work with OpenStudio 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey committed Jul 6, 2020
1 parent ea2ed2a commit 63aaff7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/Honeybee_Export To OpenStudio.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# This file is part of Honeybee.
#
# Copyright (c) 2013-2018, Mostapha Sadeghipour Roudsari <[email protected]>, Chris Mackey <[email protected]>, and Chien Si Harriman <[email protected]>
# Copyright (c) 2013-2020, Mostapha Sadeghipour Roudsari <[email protected]>, Chris Mackey <[email protected]>, and Chien Si Harriman <[email protected]>
# Honeybee is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 3 of the License,
Expand Down Expand Up @@ -72,9 +72,9 @@

ghenv.Component.Name = "Honeybee_Export To OpenStudio"
ghenv.Component.NickName = 'exportToOpenStudio'
ghenv.Component.Message = 'VER 0.0.65\nJAN_01_2020'
ghenv.Component.Message = 'VER 0.0.65\nJUL_06_2020'
ghenv.Component.IconDisplayMode = ghenv.Component.IconDisplayMode.application
ghenv.Component.Category = "Honeybee"
ghenv.Component.Category = 'HB-Legacy'
ghenv.Component.SubCategory = "10 | Energy | Energy"
#compatibleHBVersion = VER 0.0.56\nMAY_18_2018
#compatibleLBVersion = VER 0.0.59\nJUL_24_2015
Expand Down Expand Up @@ -214,8 +214,13 @@ def setSimulationControls(self, model):
def setShadowCalculation(self, model):
calcMethod, freq, maxFigure = self.simParameters[1]
shadowCalculation = ops.Model.getShadowCalculation(model)
shadowCalculation.setMaximumFiguresInShadowOverlapCalculations(int(maxFigure))
shadowCalculation.setCalculationFrequency(int(freq))
if vernum1 < 3:
shadowCalculation.setMaximumFiguresInShadowOverlapCalculations(int(maxFigure))
shadowCalculation.setCalculationFrequency(int(freq))
else:
shadowCalculation.setShadingCalculationUpdateFrequencyMethod(calcMethod)
shadowCalculation.setShadingCalculationUpdateFrequency(freq)
shadowCalculation.setMaximumFiguresInShadowOverlapCalculations(maxFigure)

def setTimestep(self, model):
timestepInput = self.simParameters[0]
Expand Down
Binary file modified userObjects/Honeybee_Export To OpenStudio.ghuser
Binary file not shown.

0 comments on commit 63aaff7

Please sign in to comment.