Salome HOME
Correct some memory leaks
[modules/smesh.git] / src / SMESH_SWIG / batchmode_smesh.py
index a76a796097b5cadc6fb96334cb0a2e608f0db8f5..eef9e1d502f01c11be0cc697a9f3e78003d0d2d3 100644 (file)
@@ -11,6 +11,7 @@ from batchmode_salome import *
 import SMESH
 
 #--------------------------------------------------------------------------
+modulecatalog = naming_service.Resolve("/Kernel/ModulCatalog")
 
 smesh = lcc.FindOrLoadComponent("FactoryServer", "SMESH")
 myStudyBuilder = myStudy.NewBuilder()
@@ -23,7 +24,9 @@ if father is None:
         father = myStudyBuilder.NewComponent("MESH")
         A1 = myStudyBuilder.FindOrCreateAttribute(father, "AttributeName");
         FName = A1._narrow(SALOMEDS.AttributeName)
-        FName.SetValue("Mesh")
+        #FName.SetValue("Mesh")        
+       Comp = modulecatalog.GetComponent( "SMESH" )
+       FName.SetValue( Comp._get_componentusername() )
        A2 = myStudyBuilder.FindOrCreateAttribute(father, "AttributePixMap");
        aPixmap = A2._narrow(SALOMEDS.AttributePixMap);
        aPixmap.SetPixMap( "ICON_OBJBROWSER_Mesh" );