First time here? Check out the Help page!
![]() | 1 | initial version |
SOLUTION FROM THE PERSON POSTING THE QUESTION: I realized something hiding in plain sight: there's a load() method under 'Static Public Member Functions' in the page that I linked to, which seems to be made for converting .osm files to model objects. This code finally worked for me:
import OpenStudio
osmPath = "C:\MyModels\model.osm"
model = OpenStudio.Model().load(OpenStudio.Path(osmPath)).get()
All of this said, I think Julien's solution is better as it is able to deal with .osm files generated from different versions of OpenStudio. Thanks for the insightful answer, Julien!