return salome.myStudyId
def getActiveStudy():
- return salome.myStudyManager.GetStudyByID(getActiveStudyId())
+ return getStudyFromStudyId(getActiveStudyId())
+
+def getStudyFromStudyId(studyId):
+ salome.salome_init()
+ study = salome.myStudyManager.GetStudyByID(studyId)
+ return study
+
+def getStudyIdFromStudy(study):
+ studyId = study._get_StudyId()
+ return studyId
def getStudyEditor(studyId = None):
"""
_editors[studyId] = StudyEditor(studyId)
return _editors[studyId]
-
class StudyEditor:
"""
This class provides utility methods to complement :class:`Study` and