From 0045c72b47257dab150a0ac2a8ebefbdb0e6526c Mon Sep 17 00:00:00 2001 From: ouv Date: Fri, 12 Jan 2007 15:19:18 +0000 Subject: [PATCH] DumpPytnon --- src/VISU_SWIG/visu.py | 4 +++- src/VISU_SWIG/visu_change_input.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/VISU_SWIG/visu.py b/src/VISU_SWIG/visu.py index 15d5b7fe..7e7b0e71 100644 --- a/src/VISU_SWIG/visu.py +++ b/src/VISU_SWIG/visu.py @@ -31,6 +31,7 @@ import SALOME import SALOME_Session_idl import SALOMEDS import SALOME_MED +import SALOME_ModuleCatalog from omniORB import CORBA from string import * from time import sleep @@ -77,7 +78,8 @@ def PublishComponent(theStudyDocument): aSComponent = aStudyBuilder.NewComponent(aComponentDataType); aName = aStudyBuilder.FindOrCreateAttribute(aSComponent,"AttributeName") - aModuleCatalog = myNamingService.Resolve("/Kernel/ModulCatalog"); + aModuleCatalogObj = myNamingService.Resolve("/Kernel/ModulCatalog"); + aModuleCatalog = aModuleCatalogObj._narrow(SALOME_ModuleCatalog.ModuleCatalog) aComponent = aModuleCatalog.GetComponent(aComponentDataType); if aComponent != None: aComponentUserName = aComponent._get_componentusername() diff --git a/src/VISU_SWIG/visu_change_input.py b/src/VISU_SWIG/visu_change_input.py index 47f477f4..44233a3c 100644 --- a/src/VISU_SWIG/visu_change_input.py +++ b/src/VISU_SWIG/visu_change_input.py @@ -42,7 +42,7 @@ def WalkTroughTimeStamps(theVISUType, aPrs3d.SetEntity(theEntity) aPrs3d.SetFieldName(theFieldName) aPrs3d.SetTimeStampNumber(theTimeStampNumber) - if not aPrs3d.Apply(): + if not aPrs3d.Apply(0): print "It is impossible to create such kind of presentation (%s) with the given parameters" % theVISUType print "\ttheMeshName = '%s'" % theMeshName print "\ttheEntity = %s" % theEntity @@ -60,7 +60,7 @@ def WalkTroughTimeStamps(theVISUType, for anInfo in aRange: print "%d (%s); " % (anInfo.myNumber, anInfo.myTime) aPrs3d.SetTimeStampNumber(anInfo.myNumber) - aPrs3d.Apply() + aPrs3d.Apply(0) aView.Update(); time.sleep(aDelay) pass -- 2.39.2