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?
" 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)
"