Salome HOME
0020945: EDF 1465 SMESH: create a new mesh from a selected group or from selected...
[modules/smesh.git] / src / SMESH_I / SMESH_DumpPython.cxx
index 4615dece9f8f9fc6d5835ab3ffbf98e58715bb8c..4678f4c7ec88f594001a972ba2f600a3e5231d6b 100644 (file)
@@ -232,7 +232,10 @@ namespace SMESH
     if(!aSObject->_is_nil() || CORBA::is_nil( theArg ))
       return *this << aSObject;
     SMESH::long_array_var anElementsId = theArg->GetIDs();
-    return *this << anElementsId;
+    SMESH::SMESH_Mesh_var mesh = theArg->GetMesh();
+    SMESH::array_of_ElementType_var types =  theArg->GetTypes();
+    SMESH::ElementType type = types->length() ? types[0] : SMESH::ALL;
+    return *this << mesh << ".GetIDSource(" << anElementsId << ", " << type << ")";
   }
 
   TPythonDump&