Salome HOME
Fix for Bug IPAL8945
[modules/visu.git] / src / VISU_SWIG / batchmode_visu_table.py
index e8c0afa7e1c2cf3c986b445ca0fb54a3a8cbac3d..aca745d10364d6c404dd722cf2b674afac6c4b9b 100644 (file)
@@ -15,17 +15,27 @@ import SALOMEDS
 import VISU
 import math
 
+#--------------------------------------------------------------------------
+modulecatalog = naming_service.Resolve("/Kernel/ModulCatalog")
+
 # >>> Getting study builder ==================================================
 myBuilder = myStudy.NewBuilder()
 
 # >>> Getting (loading) VISU component =======================================
-myVisu = lcc.FindOrLoadComponent("FactoryServer", "Visu")
+myVisu = lcc.FindOrLoadComponent("FactoryServer", "VISU")
 myComponent = myStudy.FindComponent("VISU")
 myVisu.SetCurrentStudy(myStudy)
 if not myComponent:
    myComponent = myBuilder.NewComponent("VISU")
    aName = myBuilder.FindOrCreateAttribute(myComponent, "AttributeName")
-   aName.SetValue("Visu")
+   #aName.SetValue("Visu")
+   Comp = modulecatalog.GetComponent( "VISU" )
+   aName.SetValue( Comp._get_componentusername() )
+
+   A2 = myBuilder.FindOrCreateAttribute(myComponent, "AttributePixMap");
+   aPixmap = A2._narrow(SALOMEDS.AttributePixMap);
+   aPixmap.SetPixMap( "ICON_OBJBROWSER_Visu" );
+
    myBuilder.DefineComponentInstance(myComponent,myVisu)
 
 # >>> Creating object with Table of real[ 200 * 20 ] ========================