ResInsight/GrpcInterface/Python/rips/PythonExamples/selected_cases.py

19 lines
750 B
Python
Raw Normal View History

############################################################################
# This example returns the currently selected cases in ResInsight
# Because running this script in the GUI takes away the selection
# This script does not run successfully from within the ResInsight GUI
# And will need to be run from the command line separately from ResInsight
############################################################################
import rips
2021-01-26 13:48:01 -06:00
resinsight = rips.Instance.find()
2019-09-19 06:25:04 -05:00
if resinsight is not None:
2019-09-19 07:02:23 -05:00
cases = resinsight.project.selected_cases()
2021-01-26 13:48:01 -06:00
print("Got " + str(len(cases)) + " cases: ")
for case in cases:
print(case.name)
2021-01-26 13:48:01 -06:00
for property in case.available_properties("DYNAMIC_NATIVE"):
print(property)