ResInsight/GrpcInterface/Python/rips/PythonExamples/alter_wbs_plot.py
2021-01-26 20:48:01 +01:00

28 lines
774 B
Python

# Load ResInsight Processing Server Client Library
import rips
import tempfile
# Connect to ResInsight instance
resinsight = rips.Instance.find()
# Get the project
project = resinsight.project
# Find all the well bore stability plots in the project
wbsplots = project.descendants(rips.WellBoreStabilityPlot)
# Chose a sensible output folder
dirname = tempfile.gettempdir()
# Loop through all Well Bore Stability plots
for wbsplot in wbsplots:
# Set depth type a parameter and export snapshot
wbsplot.depth_type = "TRUE_VERTICAL_DEPTH_RKB"
# Example of setting parameters for existing plots
params = wbsplot.parameters()
params.user_poisson_ratio = 0.12345
params.update()
wbsplot.update()
wbsplot.export_snapshot(export_folder=dirname)