mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Move GrpcInterface into top level
This commit is contained in:
20
GrpcInterface/Python/rips/PythonExamples/export_plots.py
Normal file
20
GrpcInterface/Python/rips/PythonExamples/export_plots.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# Import the tempfile module
|
||||
import tempfile
|
||||
# Load ResInsight Processing Server Client Library
|
||||
import rips
|
||||
# Connect to ResInsight instance
|
||||
resInsight = rips.Instance.find()
|
||||
|
||||
# Get a list of all plots
|
||||
plots = resInsight.project.plots()
|
||||
|
||||
export_folder = tempfile.mkdtemp()
|
||||
|
||||
print("Exporting to: " + export_folder)
|
||||
|
||||
for plot in plots:
|
||||
plot.export_snapshot(export_folder=export_folder)
|
||||
plot.export_snapshot(export_folder=export_folder, output_format='PDF')
|
||||
if isinstance(plot, rips.WellLogPlot):
|
||||
plot.export_data_as_las(export_folder=export_folder)
|
||||
plot.export_data_as_ascii(export_folder=export_folder)
|
||||
Reference in New Issue
Block a user