How to use the openstudio.Workspace function in openstudio

To help you get started, we’ve selected a few openstudio examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NREL / OpenStudio / python / testpath.py View on Github external
import openstudio

print openstudio.toString(openstudio.runmanager.RunManager().dbPath())

# workspace test
workspace = openstudio.Workspace()
zone = workspace.addObject(openstudio.IdfObject(openstudio.IddObjectType("Zone")))
zone = zone.get()
zone.setName("New Zone")

for obj in workspace.objects():
  print obj

# model test
model = openstudio.model.Model()
space = openstudio.model.Space(model)
space.setName("New Space")

for s in openstudio.model.getSpaces(model):
  print s