Each record contains the date and time of the
modification and the name of the user, who has introduced it.</li>
<li><b> Stored data </b> - Shows the versions of data currently stored
-in the study. Note, that this information does not concern current
+in the study. Note, that this information does not concern the current
versions of SALOME modules, it shows the version in which the data has been
initially created. If the study is re-saved in the version of SALOME,
-different from initial one, the version information is
-highlighted by red-colored font; this means that version information
+different from the initial one, the version information is
+highlighted by the red-colored font, which means that the version information
is not actually valid.</li>
</ul>
\page tui_page Using SALOME GUI python interface
-The extended salome.py Python module provides a \b sg variable, this variable provides an access to some GUI functions.
+The extended salome.py Python module provides \b sg variable, which gives access to some GUI functions.
\b Note, that this variable is not available if you use salome.py
-Python module outside the GUI desktop, i.e. not in the embedded Python
+Python module outside of the GUI desktop, i.e. without the embedded Python
console (since SWIG library is linked directly to the GUI library).
The example of usage:
# update Object browser contents
salome.sg.updateObjBrowser(True)
-# get active study ID
+# get the active study ID
studyId = salome.sg.getActiveStudyId()
-# get active study name
+# get the active study name
studyName = salome.sg.getActiveStudyName()
-# get selected objects
-selCount = salome.sg.SelectedCount() # total number of selected items
+# get the selected objects
+selCount = salome.sg.SelectedCount() # the number of selected items
for i in range(selCount):
- print salome.sg.getSelected(i) # print entry ID of i-th selected item
+ print salome.sg.getSelected(i) # print the entry ID of i-th selected item
\endcode
\code
-# get list of all selected objects' IDs
+# get the list of IDs of all selected objects
selected = salome.sg.getAllSelected()
-# add object to the selection
+# add an object to the selection
salome.sg.AddIObject("0:1:1:1") # "0:1:1:1" is an object ID
-# remove object from the selection (make it unselected)
+# remove an object from the selection (make it unselected)
salome.sg.RemoveIObject("0:1:1:1") # "0:1:1:1" is an object ID
-# clear selection (set all objects unselected)
+# clear the selection (set all objects unselected)
salome.sg.ClearIObjects()
-# display object in the current view (if possible)
+# display an object in the current view (if possible)
salome.sg.Display("0:1:1:1") # "0:1:1:1" is an object ID
salome.sg.UpdateView() # update view
-# erase object from the current view
+# erase an object from the current view
salome.sg.Erase("0:1:1:1") # "0:1:1:1" is an object ID
salome.sg.UpdateView() # update view
salome.sg.ViewLeft() # left view
salome.sg.ViewRight() # right view
-# reset current view
+# reset the current view
salome.sg.ResetView()
-# get component symbolic name by its user name
+# get the component symbolic name by its user name
compName = salome.sg.getComponentName("Geometry") # compoName = "GEOM"
-# get component user name by its symbolic name
+# get the component user name by its symbolic name
compName = salome.sg.getComponentUserName("SMESH") # compoName = "Mesh"
# ...
SALOME <b>NoteBook</b> allows to predefine numerical and boolean
parameters (variables).
-By default, the <b>NoteBook</b> takes place in a left tabbed widget.
+By default, the <b>NoteBook</b> is located in a tabbed widget to the left (shared with the Object Browser).
\image html notebook1.png
study, you should click <b>Update Study</b> button to apply your changes
to the study.
-\note The study can not be updated until at least one of variables in
+\note The study can not be updated until at least one of the variables in
the table has an invalid name or value (marked by red color). The names of
variables should be unique and their values should be numerical (integer or
double) or boolean ("True" / "False").
-Here is an example of setting of variables in python scripts:
+Here is an example of setting variables in python scripts:
\code
import salome_notebook