mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-11 16:19:17 +05:00
NRI : Use component username from Catalog.
This commit is contained in:
parent
1a40fbbe98
commit
cb3b49a350
@ -12,6 +12,7 @@
|
|||||||
from batchmode_salome import *
|
from batchmode_salome import *
|
||||||
|
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
|
modulecatalog = naming_service.Resolve("/Kernel/ModulCatalog")
|
||||||
|
|
||||||
geom = lcc.FindOrLoadComponent("FactoryServer", "GEOM")
|
geom = lcc.FindOrLoadComponent("FactoryServer", "GEOM")
|
||||||
geom.GetCurrentStudy(myStudyId)
|
geom.GetCurrentStudy(myStudyId)
|
||||||
@ -22,7 +23,11 @@ if father is None:
|
|||||||
father = myBuilder.NewComponent("GEOM")
|
father = myBuilder.NewComponent("GEOM")
|
||||||
A1 = myBuilder.FindOrCreateAttribute(father, "AttributeName");
|
A1 = myBuilder.FindOrCreateAttribute(father, "AttributeName");
|
||||||
FName = A1._narrow(SALOMEDS.AttributeName)
|
FName = A1._narrow(SALOMEDS.AttributeName)
|
||||||
FName.SetValue("Geometry")
|
# FName.SetValue("Geometry")
|
||||||
|
|
||||||
|
Comp = modulecatalog.GetComponent( "GEOM" )
|
||||||
|
FName.SetValue( Comp._get_componentusername() )
|
||||||
|
|
||||||
A2 = myBuilder.FindOrCreateAttribute(father, "AttributePixMap");
|
A2 = myBuilder.FindOrCreateAttribute(father, "AttributePixMap");
|
||||||
aPixmap = A2._narrow(SALOMEDS.AttributePixMap);
|
aPixmap = A2._narrow(SALOMEDS.AttributePixMap);
|
||||||
aPixmap.SetPixMap( "ICON_OBJBROWSER_Geometry" );
|
aPixmap.SetPixMap( "ICON_OBJBROWSER_Geometry" );
|
||||||
|
Loading…
Reference in New Issue
Block a user