#4736 View.py renames

This commit is contained in:
Gaute Lindkvist
2019-09-19 14:47:48 +02:00
parent 3aa3bb67a7
commit 502a1532b6
10 changed files with 51 additions and 51 deletions

View File

@@ -23,7 +23,7 @@ case_group.print_object_info()
resinsight.commands.compute_case_group_statistics(case_group_id=case_group.group_id)
view = case_group.views()[0]
cellResult = view.cellResult()
cellResult = view.set_cell_result()
cellResult.set_value("ResultVariable", "PRESSURE_DEV")
cellResult.update()

View File

@@ -37,7 +37,7 @@ for case in cases:
view = case.views()[0]
for property in property_list:
view.applyCellResult(resultType='DYNAMIC_NATIVE', resultVariable=property)
view.apply_cell_result(result_type='DYNAMIC_NATIVE', result_variable=property)
for ts_snapshot in tss_snapshot:
resinsight.commands.set_time_step(case_id = case.id, time_step = ts_snapshot)
resinsight.commands.export_snapshots(type='VIEWS', case_id=case.id) # ALL, VIEWS or PLOTS default is 'ALL'

View File

@@ -35,4 +35,4 @@ case.properties.set_active_cell_property_async(createResult(poroChunks, permxChu
end = time.time()
print("Time elapsed: ", end - start)
print("Transferred all results back")
view = case.views()[0].applyCellResult('GENERATED', 'POROPERMXAS')
view = case.views()[0].apply_cell_result('GENERATED', 'POROPERMXAS')

View File

@@ -32,4 +32,4 @@ end = time.time()
print("Time elapsed: ", end - start)
print("Transferred all results back")
view = case.views()[0].applyCellResult('GENERATED', 'POROPERMXSY')
view = case.views()[0].apply_cell_result('GENERATED', 'POROPERMXSY')

View File

@@ -6,4 +6,4 @@ import rips
resinsight = rips.Instance.find()
view = resinsight.project.view(0)
view.applyCellResult(resultType='STATIC_NATIVE', resultVariable='DX')
view.apply_cell_result(resultType='STATIC_NATIVE', resultVariable='DX')

View File

@@ -8,11 +8,11 @@ import rips
resinsight = rips.Instance.find()
view = resinsight.project.view(0)
#view.applyFlowDiagnosticsCellResult(resultVariable='Fraction',
#view.apply_flow_diagnostics_cell_result(resultVariable='Fraction',
# selectionMode='FLOW_TR_INJ_AND_PROD')
# Example of setting individual wells. Commented out because well names are case specific.
view.applyFlowDiagnosticsCellResult(resultVariable='Fraction',
view.apply_flow_diagnostics_cell_result(resultVariable='Fraction',
selectionMode='FLOW_TR_BY_SELECTION',
injectors = ['C-1H', 'C-2H', 'F-2H'],
producers = ['B-1AH', 'B-3H', 'D-1H'])

View File

@@ -44,4 +44,4 @@ print("Time elapsed: ", end - start)
print("Transferred all results back")
view = case.views()[0].applyCellResult('GENERATED', 'SOILPORVAsync')
view = case.views()[0].apply_cell_result('GENERATED', 'SOILPORVAsync')

View File

@@ -30,4 +30,4 @@ print("Time elapsed: ", end - start)
print("Transferred all results back")
view = case.views()[0].applyCellResult('GENERATED', 'SOILPORVSync')
view = case.views()[0].apply_cell_result('GENERATED', 'SOILPORVSync')

View File

@@ -16,12 +16,12 @@ if resinsight is not None:
views = case.views()
for view in views:
# Set some parameters for the view
view.setShowGridBox(not view.showGridBox())
view.setBackgroundColor("#3388AA")
view.set_show_grid_box(not view.show_grid_box())
view.set_background_color("#3388AA")
# Update the view in ResInsight
view.update()
# Clone the first view
newView = views[0].clone()
view.setShowGridBox(False)
newView.setBackgroundColor("#FFAA33")
view.set_show_grid_box(False)
newView.set_background_color("#FFAA33")
newView.update()