Salome HOME
Increment version: 8.1.0
[modules/hexablock.git] / doc / tui_component.rst
1 :tocdepth: 3
2
3
4 .. _tuicomponent:
5
6 =========
7 Component
8 =========
9
10 Acces to HexaBlock component in python language::
11
12   import hexablock
13
14 Add a new empty document in the session::
15
16     doc = hexablock.addDocument(name)
17
18
19 Add a new document loaded from a *xml* file::
20
21     doc2 = hexablock.loadDocument(filename)
22
23 Get the number of opened document in the session::
24
25     nd = hexablock.countDocument()
26
27 Get the document number *i*::
28
29     doc_i = hexablock.getDocument(i)
30     
31 Remove a document in the session::
32
33     hexablock.removeDocument(doc_i)
34     
35 Set the current study::
36
37         hexablock.SetCurrentStudy(theStudy)
38
39 Get a document from the current study::
40
41         doc = hexablock.getFromStudy(doc_entry)
42         
43 Add a document in the current study::
44
45         hexablock.addToStudy(doc)
46
47 A tool to dump a model of block::
48
49     hexablock.dump(doc, [mesh, [full]])
50
51 - doc: the document to dump
52 - mesh: an optional mesh of this document
53 - full:
54
55   - False: to have a short dump (by default)
56   - True: to have a full dump
57
58
59 GUI command: :ref:`guicomponent`