Salome HOME
Redesign SALOME documentation
[modules/gui.git] / doc / salome / gui / input / using_notebook.rst
1 .. _using_notebook: 
2
3 **************
4 Using NoteBook
5 **************
6
7 SALOME **NoteBook** allows to predefine numerical and boolean
8 parameters (variables).
9
10 By default, the **NoteBook** is located in a tabbed widget to the left (shared with the Object Browser).
11
12 .. image:: ../images/notebook1.png
13         :align: center
14
15 To hide/show this tab choose **View > Windows > Notebook**.
16
17 Here you can add new variables, remove and rename existing variables and 
18 change their values.
19
20 If you have modified some variables, which are already used in the current
21 study, you should click **Update Study** button to apply your changes
22 to the study.
23
24 .. note:: 
25         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").
26
27 Here is an example of setting variables in python scripts:
28
29 .. code-block:: python
30    :linenos:
31
32         import salome_notebook
33
34         notebook = salome_notebook.notebook
35
36         notebook.set("Length", 100)
37         notebook.set("Radius", 37.5)
38         notebook.set("Flag", True)
39
40 Later these values can be used as parameters for any operations in
41 various components.
42
43