Salome HOME
Merge from OCC_development_generic_2006
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_StartEndLength_i.cxx
index 56ce6f51d3725d0fbaea397c9c4b66b4c7d3e182..91d398a991d5d506c924048f608c9b9ca40be49b 100644 (file)
@@ -31,6 +31,7 @@ using namespace std;
 #include "StdMeshers_StartEndLength_i.hxx"
 #include "SMESH_Gen_i.hxx"
 #include "SMESH_Gen.hxx"
+#include "SMESH_PythonDump.hxx"
 
 #include "Utils_CorbaException.hxx"
 #include "utilities.h"
@@ -93,11 +94,8 @@ void StdMeshers_StartEndLength_i::SetLength(CORBA::Double theLength,
   }
 
   // Update Python script
-  TCollection_AsciiString aStr, aStrLen ((double)theLength), aStrFlag ((int)theIsStart);
-  SMESH_Gen_i::AddObject(aStr, _this()) += ".SetLength(";
-  aStr += aStrLen + ", " + aStrFlag + ")";
-
-  SMESH_Gen_i::AddToCurrentPyScript(aStr);
+  SMESH::TPythonDump() << _this() << ".SetLength( "
+                       << theLength << ", " << theIsStart << " )";
 }
 
 //=============================================================================