Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

Loading Existing .osm with Python Bindings

I'm trying to load an OSM that I developed in the application as an object in Python, however, I haven't been able to get it to load in correctly.

I've tried both:

     building = openstudio.model.Model_load(osm_path)

and

     building = openstudio.model.Model.load(osm_path)

When I use print(building) I get this:

openstudio.openstudiomodelcore.OptionalModel; proxy of <swig object="" of="" type="" 'boost::optional&lt;="" openstudio::model::model="" &gt;="" *'="" at="" 0x00000277a42c7600<="" p="">

I'm not super familiar with Ruby so maybe my issue is just trying to convert from the SDK documentation (https://openstudio-sdk-documentation.s3.amazonaws.com/index.html) to Python notation. I saw this post (https://unmethours.com/question/57173/openstudio-python-bindings/) and have found that openstudio.model.Model() and openstudio.model.exampleModel() seem to work just fine.

I feel like I'm overlooking something small but I just can't figure out what it is. I appreciate any insight from folks who've started using Python in their OpenStudio workflow.

Loading Existing .osm with Python Bindings

I'm trying to load an OSM that I developed in the application as an object in Python, however, I haven't been able to get it to load in correctly.

I've tried both:

     building = openstudio.model.Model_load(osm_path)

and

     building = openstudio.model.Model.load(osm_path)

When I use print(building) I get this:

openstudio.openstudiomodelcore.OptionalModel; proxy of <swig object="" of="" type="" 'boost::optional&lt;="" openstudio::model::model="" &gt;="" *'="" at="" 0x00000277a42c7600<="" p="">

I'm not super familiar with Ruby so maybe my issue is just trying to convert from the SDK documentation (https://openstudio-sdk-documentation.s3.amazonaws.com/index.html) to Python notation. I saw this post (https://unmethours.com/question/57173/openstudio-python-bindings/) and have found that openstudio.model.Model() and openstudio.model.exampleModel() seem to work just fine.

I feel like I'm overlooking something small but I just can't figure out what it is. I appreciate any insight from folks who've started using Python in their OpenStudio workflow.

Loading Existing .osm with Python Bindings

I'm trying to load an OSM that I developed in the application as an object in Python, however, I haven't been able to get it to load in correctly.

I've tried both:

     building = openstudio.model.Model_load(osm_path)

and

     building = openstudio.model.Model.load(osm_path)

When I use print(building) I get this:

openstudio.openstudiomodelcore.OptionalModel; proxy of <swig object="" of="" type="" 'boost::optional&lt;="" openstudio::model::model="" &gt;="" *'="" at="" 0x00000277a42c7600<="" p="">

I'm not super familiar with Ruby so maybe my issue is just trying to convert from the SDK documentation (https://openstudio-sdk-documentation.s3.amazonaws.com/index.html) to Python notation. I saw this post (https://unmethours.com/question/57173/openstudio-python-bindings/) and have found that openstudio.model.Model() and openstudio.model.exampleModel() seem to work just fine.

I feel like I'm overlooking something small but I just can't figure out what it is. I appreciate any insight from folks who've started using Python in their OpenStudio workflow.