Revision history [back]
OpenStudio SDK - saving an optional model as a OSM
I have managed to make an optional model by using the gbxml reverse translator using the code below:
require 'openstudio'
translator = OpenStudio::GbXML::GbXMLReverseTranslator.new
newModel = translator.loadModel(OpenStudio::Path.new('C:\Users\szilasia\Documents\dscEngine\gbxml3.xml'))
Unfortunately the model is not initalized so I can't convert it to a model as seen here
How can I initalize the model?
OpenStudio SDK - saving an optional model as a OSM
I have managed to make an optional model by using the gbxml reverse translator using the code below:
require 'openstudio'
translator = OpenStudio::GbXML::GbXMLReverseTranslator.new
newModel = translator.loadModel(OpenStudio::Path.new('C:\Users\szilasia\Documents\dscEngine\gbxml3.xml'))
Unfortunately the model is not initalized so I can't convert it to a model as seen here
How can I initalize the model?
OpenStudio SDK - saving an optional model as a OSM
I have managed to make an optional model by using the gbxml reverse translator using the code below:
require 'openstudio'
translator = OpenStudio::GbXML::GbXMLReverseTranslator.new
newModel = translator.loadModel(OpenStudio::Path.new('C:\Users\szilasia\Documents\dscEngine\gbxml3.xml'))
Unfortunately the model is not initalized so I can't convert it to a model as seen here
How can I initalize the model?
OpenStudio SDK - saving an optional model as a OSM
Unfortunately I am struggling with the OpenStudio SDK, I am creating a OpenStudio model from a gbxml using the GbXMLReverseTranslator which produces a OpenStudio::Model::OptionalModel.
Unfortunately I can't work out how to actually save the model to my desktop as the OpenStudio::Model::OptionalModel doesn't have managed a save method.
What am I missing here? The code can be seen below, I want to make an optional model by using save the gbxml reverse translator using newModel created from the code below:reverseGbXML.
require 'openstudio'
translator = OpenStudio::GbXML::GbXMLReverseTranslator.new
newModel = translator.loadModel(OpenStudio::Path.new('C:\Users\szilasia\Documents\dscEngine\gbxml3.xml'))
Unfortunately the model is not initalized so I can't convert it to a model as seen here newModel.save(OpenStudio::Path.new('C:\Users\szilasia\Documents\dscEngine\newModel.osm'),true)
How can I initalize the model?
OpenStudio SDK - saving an optional model as a OSM
Unfortunately I am struggling with the OpenStudio SDK, I am creating a OpenStudio model from a gbxml using the GbXMLReverseTranslator which produces a OpenStudio::Model::OptionalModel.
Unfortunately I can't work out how to actually save the model to my desktop as the OpenStudio::Model::OptionalModel doesn't have a save method.
What am I missing here? The code can be seen below, I want to save the newModel created from the reverseGbXML.below.
require 'openstudio'
translator = OpenStudio::GbXML::GbXMLReverseTranslator.new
newModel = translator.loadModel(OpenStudio::Path.new('C:\Users\szilasia\Documents\dscEngine\gbxml3.xml'))
newModel.save(OpenStudio::Path.new('C:\Users\szilasia\Documents\dscEngine\newModel.osm'),true)
OpenStudio SDK - saving an optional model as a OSM
Unfortunately I am struggling with the OpenStudio SDK, I am creating a OpenStudio model from a gbxml using the GbXMLReverseTranslator which produces a OpenStudio::Model::OptionalModel.
Unfortunately I can't work out how to actually save the model to my desktop as the OpenStudio::Model::OptionalModel doesn't have a save method.
What am I missing here? The code can be seen below.
require 'openstudio'
translator = OpenStudio::GbXML::GbXMLReverseTranslator.new
newModel = translator.loadModel(OpenStudio::Path.new('C:\Users\szilasia\Documents\dscEngine\gbxml3.xml'))
newModel.save(OpenStudio::Path.new('C:\Users\szilasia\Documents\dscEngine\newModel.osm'),true)
OpenStudio SDK - saving an optional model as a OSM
Unfortunately I am struggling with the OpenStudio SDK, I am creating a OpenStudio model from a gbxml using the GbXMLReverseTranslator which produces a OpenStudio::Model::OptionalModel.
Unfortunately I can't work out how to actually save the model to my desktop as the OpenStudio::Model::OptionalModel doesn't have a save method.
What am I missing here? The code can be seen below.here?
" require 'openstudio'
Make a translator
translator =
= OpenStudio::GbXML::GbXMLReverseTranslator.new
newModel =
= translator.loadModel(OpenStudio::Path.new('C:\Users\szilasia\Documents\dscEngine\gbxml3.xml'))
newModel.save(OpenStudio::Path.new('C:\Users\szilasia\Documents\dscEngine\newModel.osm'),true)
"