mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4578 Add commands for create and clone view
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
|
||||
@@ -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()
|
||||
Reference in New Issue
Block a user