Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page

# Revision history [back]

idfObject = OpenStudio::IdfObject::load(string_object) returns an optional IdfObject, which is to say, it returns an object that may or may not actually have an IdfObject inside it. If there's an IdfObject inside it, then you use .get to retrieve the actual IdfObject. There are additional methods available (e.g., .empty?) to check if the object is there before trying to retrieve it.

All of this is described well in the Measure Writing Guide. Specifically look at the section: "OpenStudio Measures and the boost::optional Type".

idfObject = OpenStudio::IdfObject::load(string_object) returns an optional IdfObject, which is to say, it returns an object that may or may not actually have an IdfObject inside it. If there's an IdfObject inside it, then you use .get to retrieve the actual IdfObject. There are additional methods available (e.g., .empty?) to check if the object is there before trying to retrieve it.

All of this is described well in the Measure Writing Guide. Specifically look at the section: "OpenStudio Measures and the boost::optional Type".

The Workspace class is described here. Look at the "Detailed Description". As an approximation, the model object can be thought of as an OSM while the workspace object can be thought of as an IDF.

idfObject = OpenStudio::IdfObject::load(string_object) returns an optional IdfObject, which is to say, it returns an object that may or may not actually have an IdfObject inside it. If there's an IdfObject inside it, then you use .get to retrieve the actual IdfObject. There are additional methods available (e.g., .empty?) to check if the object is there before trying to retrieve it.

All of this is described well in the Measure Writing Guide. Specifically look at the section: "OpenStudio Measures and the boost::optional Type".

The Workspace class is described here. Look at the "Detailed Description". As an approximation, the model model object can be thought of as an OSM while the workspace workspace object can be thought of as an IDF.