mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 07:03:25 -06:00
Add save() as a command to the python interface
Fix export_snapshot issue
This commit is contained in:
parent
7f393f5ad8
commit
2ca3345a20
@ -323,6 +323,11 @@ message ExportContourMapToTextRequest
|
||||
int32 viewId = 5;
|
||||
}
|
||||
|
||||
message SaveProjectRequest
|
||||
{
|
||||
string filePath = 1;
|
||||
}
|
||||
|
||||
/* CommandParams handles both command name and parameters in one.
|
||||
* The message type and content is used as parameters and
|
||||
* the name of the variable is used to find the command name. */
|
||||
@ -372,6 +377,7 @@ message CommandParams
|
||||
ExportWellLogPlotDataRequest exportWellLogPlotData = 36;
|
||||
SetWindowSizeParams setPlotWindowSize = 37;
|
||||
ExportContourMapToTextRequest exportContourMapToText = 38;
|
||||
SaveProjectRequest saveProject = 39;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,14 @@ class Project(PdmObject):
|
||||
"""
|
||||
self._execute_command(openProject=Cmd.FilePathRequest(path=path))
|
||||
return self
|
||||
|
||||
def save(self, path=""):
|
||||
"""Save the project to the existing project file, or to a new file
|
||||
Arguments:
|
||||
path(str): File path to the file to save the project to. If empty, saves to the active project file
|
||||
"""
|
||||
self._execute_command(saveProject=Cmd.SaveProjectRequest(filePath=path))
|
||||
return self
|
||||
|
||||
def close(self):
|
||||
"""Close the current project (and open new blank project)"""
|
||||
@ -223,7 +231,7 @@ class Project(PdmObject):
|
||||
"""
|
||||
return self._execute_command(
|
||||
exportSnapshots=Cmd.ExportSnapshotsRequest(
|
||||
type=snapshot_type, prefix=prefix, caseId=-1))
|
||||
type=snapshot_type, prefix=prefix, caseId=-1, viewId=-1 ))
|
||||
|
||||
def export_well_paths(self, well_paths=None, md_step_size=5.0):
|
||||
""" Export a set of well paths
|
||||
|
Loading…
Reference in New Issue
Block a user