From: DUC ANH HOANG Date: Fri, 21 Oct 2022 13:04:51 +0000 (+0200) Subject: porting to medreader evolution X-Git-Tag: V9_10_0b1~1^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fduc%2Ffix_medreader_api;p=modules%2Fmed.git porting to medreader evolution --- diff --git a/src/MEDCalc/cmp/MEDPresentation.cxx b/src/MEDCalc/cmp/MEDPresentation.cxx index 20ddfeb39..e3b8f77f0 100644 --- a/src/MEDCalc/cmp/MEDPresentation.cxx +++ b/src/MEDCalc/cmp/MEDPresentation.cxx @@ -435,14 +435,14 @@ MEDPresentation::createSource() } std::ostringstream oss; - oss << _srcObjVar << " = pvs.MEDReader(FileName=r'" << _fileName << "');"; + oss << _srcObjVar << " = pvs.MEDReader(FileNames=r'" << _fileName << "');"; pushAndExecPyLine(oss.str()); oss.str(""); oss << "medcalc.SelectSourceField(" << _srcObjVar << ", '" << _meshName << "', '" << _fieldName << "', '" << typ << "');"; pushAndExecPyLine(oss.str()); oss.str(""); // Generate complete vector fields: fields with 2 components will copied into _vector and // have a third null component added. - oss << _srcObjVar << ".GenerateVectors = 1;"; + oss << _srcObjVar << ".VectorsProperty = 1;"; pushAndExecPyLine(oss.str()); oss.str(""); // Make sure this is set so we stick to time steps: diff --git a/src/MEDCalc/tui/medpresentation.py b/src/MEDCalc/tui/medpresentation.py index 78755654c..3378ed586 100644 --- a/src/MEDCalc/tui/medpresentation.py +++ b/src/MEDCalc/tui/medpresentation.py @@ -441,7 +441,7 @@ def SelectSourceField(obj, meshName, fieldName, discretisation): arr = t.split("/") arr = arr[:-1] + arr[-1].split("@@][@@") if arr[1] == meshName and arr[3] == fieldName and arr[4] == discretisation: - obj.AllArrays = [t] + obj.FieldsStatus = [t] return raise Exception("Field not found")