I am trying to set the SHGC(Solar Heat Gain Coefficient) in OpenStudio for a Fixed Window under the category Simple Glazing System Window Materials using a ruby measure. I am using OpenStudio 1.6.0 and there is no method to set the SHGC using ruby that I can find. The only other way I have found to set SHGC is by translating the whole model to EnergyPlus, setting SHGC and bring it back to OpenStudio. The code for that method looks like this:
ft = OpenStudio::EnergyPlus::ForwardTranslator.new
workspace = ft.translateModel(model)
win = model.getObjectsByType("WindowMaterial:SimpleGlazingSystem".to_IddObjectType)
win[0].setDouble(2,shgc)
bt = OpenStudio::EnergyPlus::ReverseTranslator.new
model = bt.translateWorkspace(workspace)
Unfortunately the above code seems to work in the cmd but the changes do not show up in OpenStudio. What should I try next to set the SHGC?