mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4597 Python: add exportSnapshots example and more comments in examples
This commit is contained in:
@@ -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()
|
||||
Reference in New Issue
Block a user