#4578 Add commands for create and clone view

This commit is contained in:
Gaute Lindkvist
2019-08-23 11:25:00 +02:00
parent 3f6d0db07a
commit 2e49670f40
22 changed files with 368 additions and 29 deletions

View File

@@ -1,5 +1,6 @@
###################################################################################
# This example will connect to ResInsight, retrieve a list of cases and print info
# Also creates a new view for all cases
###################################################################################
# Import the ResInsight Processing Server Module
@@ -15,4 +16,7 @@ if resInsight is not None:
for case in cases:
print("Case name: " + case.name)
print("Case grid path: " + case.gridPath())
# Create a new view
view = case.createView()

View File

@@ -1,6 +1,7 @@
#############################################################
# This example will alter the views of all cases
# By setting the background color and toggle the grid box
# Also clones the first view
#############################################################
import rips
# Connect to ResInsight instance
@@ -18,4 +19,9 @@ if resInsight is not None:
view.setShowGridBox(not view.showGridBox())
view.setBackgroundColor("#3388AA")
# Update the view in ResInsight
view.update()
view.update()
# Clone the first view
newView = views[0].clone()
view.setShowGridBox(False)
newView.setBackgroundColor("#FFAA33")
newView.update()