Salome HOME
22874: [CEA 1425] Performance SMESH Module
[modules/smesh.git] / doc / salome / gui / SMESH / input / tui_work_on_objects_from_gui.doc
1 /*!
2
3 \page tui_work_on_objects_from_gui How to work with objects from the GUI ?
4
5 It is sometimes useful to work alternatively in the GUI of SALOME and in the Python Console. To fetch an object from the TUI simply type:
6
7 \code
8 myMesh_ref = salome.IDToObject("ID")  
9 // were ID is the number that appears in the object browser in the Entry column 
10 // ( If hidden show it by right clicking and checking the checkbox Entry)
11 myMesh = smesh.Mesh(myMesh_ref)
12 \endcode
13 or 
14 \code
15 myMesh_ref = salome.myStudy.FindObjectByPath("/Mesh/myMesh").GetObject() 
16 // "/Mesh/myMesh" is the path to the desired object in the object browser
17 myMesh = smesh.Mesh(myMesh_ref)
18 \endcode
19
20 All the methods documented in these pages can then be used on myMesh
21
22 \note The first statement only gives you access to a reference to the object created via the GUI. 
23 \n But the methods available on this reference are not exactly the same as those documented in these help pages. 
24 This Python API is meant to be used on smesh.Mesh instances. 
25 \n That's why you'll have to create such an instance with the second statement. 
26
27 */