First time here? Check out the Help page!
1 | initial version |
openstudio::model::saveModel
is a function that's more meant for the OpenStudio Application (somewhat of a leftover after separating the OpenStudio Application from the OpenStudio SDK). It will copy the model and the companion directory (tif your model is named mymodel.osm
, that's the directory mymodel/
next to it) to another location. The third parameter is a path to that temporary directory, it cannot be empty.
Anyways, you likely don't want to use it at all. You should use openstudio::model::Model.save(path, overwrite = false)
import openstudio
model = openstudio.model.Model()
model.save("model.osm", True)
# or
from pathlib import Path
m.save(Path('mymodel.osm'), True)
2 | No.2 Revision |
openstudio::model::saveModel
is a function that's more meant for the OpenStudio Application (somewhat of a leftover after separating the OpenStudio Application from the OpenStudio SDK). It will copy the model and the companion directory (tif (if your model is named mymodel.osm
, that's the directory mymodel/
next to it) to another location. The third parameter is a path to that temporary directory, it cannot be empty.
Anyways, you likely don't want to use it at all. You should use openstudio::model::Model.save(path, overwrite = false)
import openstudio
model = openstudio.model.Model()
model.save("model.osm", True)
# or
from pathlib import Path
m.save(Path('mymodel.osm'), model.save(Path('mymodel.osm'), True)
3 | No.3 Revision |
openstudio::model::saveModel
is a function that's more meant for the OpenStudio Application (somewhat of a leftover after separating the OpenStudio Application from the OpenStudio SDK). It will copy the model and the companion directory (if your model is named mymodel.osm
, that's the directory mymodel/
next to it) to another location. The third parameter is a path to that temporary directory, it cannot be empty.
Anyways, you likely don't want to use it at all. You should use openstudio::model::Model.save(path, overwrite = false)
import openstudio
model = openstudio.model.Model()
model.save("model.osm", True)
# or
from pathlib import Path
model.save(Path('mymodel.osm'), True)
This method is inherited from Workspace: SDK docs