Salome HOME
0021478: EDF 2083 ALL: Write the version of Salome used to create the study in the...
authorvsr <vsr@opencascade.com>
Tue, 16 Oct 2012 14:29:37 +0000 (14:29 +0000)
committervsr <vsr@opencascade.com>
Tue, 16 Oct 2012 14:29:37 +0000 (14:29 +0000)
doc/salome/kernel_salome.dox

index d36db176a50b3a60ab0c3af3cb46b4eef125d529..75deb29601f9bc856fb4ab1e3c527b170772f237 100644 (file)
@@ -112,6 +112,7 @@ study = salome.myStudyManager.GetStudyByName("/home/user/MyStudy.hdf")
 # ...
 \endcode
 
+\anchor salome_myStudy
 \li \b myStudy Reference to the current (active) study
 
 This variable can be used to manipulate with the date of the study:
@@ -296,4 +297,37 @@ name_1 = salome.generateName() # name_1 is something like "Study682"
 name_1 = salome.generateName("Obj") # name_1 is something like "Obj32"
 \endcode
 
+\li \b GetComponentVersion() Get version of component data stored in
+the study
+
+This function allows to obtain the version of the component data
+stored in the current study.
+\note This function does not provide a current version of the
+component being used but that one initially stored in the study
+document.
+
+The first parameter specifies the name of the component. If the
+specified component data is not stored in the study, the result value
+is "no component data". If the version of data is undefined, the
+result is "unknown".
+
+The second parameter (\c False by default), when set to \c True,
+allows to retrieve all versions of the component data stored in the
+study. This is useful to check if version information is valid (the
+data might be updated and/or re-stored in %SALOME of versions different
+from initial one). 
+
+\code
+# get initial version of GEOM module data stored in the study
+geom_version = salome.GetComponentVersion('GEOM')
+# get all versions of GEOM module data stored in the study
+all_geom_versions = salome.GetComponentVersion('GEOM', True)
+\endcode
+
+This function is introduced in %SALOME 6.6.0 (it does not work with
+studies created before version 6.6.0).
+
+\note The study should be initialized before calling this function
+(see \ref salome_myStudy "salome.myStudy").
+
 */