First time here? Check out the Help page!
1 | initial version |
The error message indicates that translateModel
takes an OpenStudio Model
object, but what you're passing in is an OptionalModel
. Try forward_translator.translateModel(model.get)
instead.
2 | No.2 Revision |
The error message indicates that translateModel
takes an OpenStudio Model
object, but what you're passing in is an OptionalModel
. Try forward_translator.translateModel(model.get)
instead.
OptionalModel
is a container that will hold a Model
object if the translation succeeded. The get
method returns the Model
object or fails if the translation failed, so it is a good idea to check to make sure that the optional actually holds something before calling get
(if !model ...
or similar). Similar issues came up here and here. You're not the first to get tripped up.