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

Revision history [back]

The EnergyPlus Measures section in the OpenStudio Measure Writer's Reference Guide provides an example.

With your Workspace object you could call getObjectByTypeAndName, get the handle for the object returned, and then call removeObject. Be careful about removing workspace objects - you may end up deleting an object needed by another object.

The EnergyPlus Measures sectionPer Eric's comment below, the best way to do this is using the remove call of a Workspace Object. API documentation for the Workspace object here. You can get an instance of an object in the OpenStudio Measure Writer's Reference Guide provides an example.

With your Workspace object you could call with the getObjectByTypeAndName, get the handle for the object returned, and then call removeObject. or related method call. Be careful about removing workspace objects - you may end up deleting an object needed by another object.

For a tutorial on writing EnergyPlus measures, see the EnergyPlus Measures section in the OpenStudio Measure Writer's Reference Guide provides an example.

Per Eric's comment below, the best way to do this is using the remove call of a Workspace Object. API documentation for the Workspace object here. You can get an instance of an object in your Workspace with the getObjectByTypeAndName or related method call. Be careful about removing workspace objects - you may end up deleting an object needed by another object.

For a tutorial on writing EnergyPlus measures, see the EnergyPlus Measures section in the OpenStudio Measure Writer's Reference Guide provides an example.