2021-01-14 11:21:25 +01:00
|
|
|
# Access to environment variables and path tools
|
|
|
|
|
import os
|
2021-01-26 20:48:01 +01:00
|
|
|
|
2021-01-12 15:27:56 +01:00
|
|
|
# Load ResInsight Processing Server Client Library
|
|
|
|
|
import rips
|
2021-01-26 20:48:01 +01:00
|
|
|
|
2021-01-12 15:27:56 +01:00
|
|
|
# Connect to ResInsight instance
|
|
|
|
|
resinsight = rips.Instance.find()
|
|
|
|
|
|
2021-01-14 11:21:25 +01:00
|
|
|
# This requires the TestModels to be installed with ResInsight (RESINSIGHT_BUNDLE_TESTMODELS):
|
2021-01-26 20:48:01 +01:00
|
|
|
resinsight_exe_path = os.environ.get("RESINSIGHT_EXECUTABLE")
|
2021-01-14 11:21:25 +01:00
|
|
|
|
|
|
|
|
# Get the TestModels path from the executable path
|
|
|
|
|
resinsight_install_path = os.path.dirname(resinsight_exe_path)
|
2021-01-26 20:48:01 +01:00
|
|
|
test_models_path = os.path.join(resinsight_install_path, "TestModels")
|
|
|
|
|
path_name = os.path.join(test_models_path, "TEST10K_FLT_LGR_NNC/10KWithWellLog.rsp")
|
2021-01-14 11:21:25 +01:00
|
|
|
|
2021-01-12 15:27:56 +01:00
|
|
|
# Open a project
|
2021-01-14 11:21:25 +01:00
|
|
|
resinsight.project.open(path_name)
|