#4597 Python: add exportSnapshots example and more comments in examples

This commit is contained in:
Gaute Lindkvist
2019-08-19 13:46:14 +02:00
parent edfb39c9b7
commit 6c0e2bb3ad
20 changed files with 226 additions and 53 deletions

View File

@@ -0,0 +1,21 @@
#############################################################
# This example will alter the views of all cases
# By setting the background color and toggle the grid box
#############################################################
import rips
# Connect to ResInsight instance
resInsight = rips.Instance.find()
# Check if connection worked
if resInsight is not None:
# Get a list of all cases
cases = resInsight.project.cases()
for case in cases:
# Get a list of all views
views = case.views()
for view in views:
# Set some parameters for the view
view.setShowGridBox(not view.showGridBox())
view.setBackgroundColor("#3388AA")
# Update the view in ResInsight
view.update()