mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4736 View.py renames
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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')
|
||||
@@ -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')
|
||||
@@ -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')
|
||||
|
||||
@@ -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'])
|
||||
|
||||
@@ -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')
|
||||
@@ -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')
|
||||
@@ -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()
|
||||
Reference in New Issue
Block a user