Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to save model by using the ruby bindings

Hi I want to modify a openstudio model in command prompt by ruby bindings. I want to load the model and then assign a a thermal zone to a HVAC loop.

require 'OpenStudio'

translator = OpenStudio::OSVersion::VersionTranslator.new
path = OpenStudio::Path.new('model.osm')
model = translator.loadModel(path).get
hVACs = model.getAirLoopHVACs[0]

floor = model.getBuildingStorys[1]

hVACs .addBranchForZone(floor.spaces[1].thermalZone.get)

I get a True for addBranchForZone, but when I open the model in openstudio, the zone wasn't assigend to that air loop.

Any advice and suggestion, or any tutorial or introduction or documentation about openstudio ruby binding would be appreciated!

How to save model by using the ruby bindings

Hi I want to modify a openstudio model in command prompt by ruby bindings. I want to load the model and then assign a a thermal zone to a HVAC loop.

require 'OpenStudio'

translator = OpenStudio::OSVersion::VersionTranslator.new
path = OpenStudio::Path.new('model.osm')
model = translator.loadModel(path).get
hVACs = model.getAirLoopHVACs[0]

floor = model.getBuildingStorys[1]

hVACs .addBranchForZone(floor.spaces[1].thermalZone.get)

I get a True for addBranchForZone, but when I open the model in openstudio, the zone wasn't assigend to that air loop.

Any advice and suggestion, or any tutorial or introduction or documentation about openstudio ruby binding would be appreciated!

How to save model by using the ruby bindings

Hi I want to modify a openstudio model in command prompt by ruby bindings. I want to load the model and then assign a a thermal zone to a HVAC loop.

require 'OpenStudio'

translator = OpenStudio::OSVersion::VersionTranslator.new
path = OpenStudio::Path.new('model.osm')
model = translator.loadModel(path).get
hVACs = model.getAirLoopHVACs[0]

floor = model.getBuildingStorys[1]

hVACs .addBranchForZone(floor.spaces[1].thermalZone.get)

I get a True for addBranchForZone, but when I open the model in openstudio, the zone wasn't assigend to that air loop. I suppose the model haven't be save yet, but I'm not sure there have save function in ruby bindings

Any advice and suggestion, or any tutorial or introduction or documentation about openstudio ruby binding would be appreciated!