]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Providing possibility many times executing
authorsmh <smh@opencascade.com>
Fri, 23 Apr 2004 04:56:55 +0000 (04:56 +0000)
committersmh <smh@opencascade.com>
Fri, 23 Apr 2004 04:56:55 +0000 (04:56 +0000)
src/SALOME_SWIG/batchmode_salome.py

index a6a7753edbc2d3d0eec57a67963534077a74e632..7cf6757561ef8e3c9144f7d9225523c14fc4906b 100644 (file)
@@ -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()