From 0deaf83f89824430d3c984267cbbdedf8e0e05b0 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 15 Feb 2017 15:03:49 +0300 Subject: [PATCH] 0021803: EDF 2351 : Available versions of MED in TUI function ExportMED aren't consistent with GUI behavior Update according changes of SMESH API. --- examples/command_line/dataset.py | 4 ++-- src/Macro/ShowSalomeObject.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/command_line/dataset.py b/examples/command_line/dataset.py index 300af014..2ef76e7a 100644 --- a/examples/command_line/dataset.py +++ b/examples/command_line/dataset.py @@ -49,10 +49,10 @@ def create_meshes(geometry, out_filename=None): isDone = Mesh_quad.Compute() smesh.SetName(Mesh_tri, 'Mesh_tri') if out_filename: - Mesh_tri.ExportMED(out_filename, 0, SMESH.MED_V2_2, 1, None ,1) + Mesh_tri.ExportMED(out_filename, overwrite=True) smesh.SetName(Mesh_quad, 'Mesh_quad') if out_filename: - Mesh_quad.ExportMED(out_filename, 0, SMESH.MED_V2_2, 0, None ,1) + Mesh_quad.ExportMED(out_filename, overwrite=False) # Set names of Mesh objects smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D') diff --git a/src/Macro/ShowSalomeObject.py b/src/Macro/ShowSalomeObject.py index 464519d3..fd01a7be 100644 --- a/src/Macro/ShowSalomeObject.py +++ b/src/Macro/ShowSalomeObject.py @@ -70,7 +70,7 @@ for entry in selection: tmpf = tempfile.NamedTemporaryFile(suffix='.med') fname = tmpf.name tmpf.close() - mo.ExportToMEDX(fname, True, SMESH.MED_V2_2, True, True) + mo.ExportMED(fname, True, True, True) ShowParaviewView() p = MEDReader(FileName=fname) renderView = GetActiveViewOrCreate('RenderView') -- 2.39.2