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

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!