From df20659de8abf5f76b083f013554c0ac07eba81f Mon Sep 17 00:00:00 2001 From: smh Date: Fri, 23 Apr 2004 04:56:55 +0000 Subject: [PATCH] Providing possibility many times executing --- src/SALOME_SWIG/batchmode_salome.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/SALOME_SWIG/batchmode_salome.py b/src/SALOME_SWIG/batchmode_salome.py index a6a7753ed..7cf675756 100644 --- a/src/SALOME_SWIG/batchmode_salome.py +++ b/src/SALOME_SWIG/batchmode_salome.py @@ -226,8 +226,13 @@ obj = naming_service.Resolve('myStudyManager') myStudyManager = obj._narrow(SALOMEDS.StudyManager) # create new study -myStudy = myStudyManager.NewStudy("Study1") - +aListOfOpenStudies = myStudyManager.GetOpenStudies(); +myStudy = None; +if len(aListOfOpenStudies) == 0 : + myStudy = myStudyManager.NewStudy("Study1") +else: + myStudy = aListOfOpenStudies[0] + myStudyName = myStudy._get_Name() myStudyId = myStudy._get_StudyId() -- 2.39.2