]> SALOME platform Git repositories - modules/hexablock.git/blob - doc/tui_component.rst
Salome HOME
Merge from V6_main_20120808 08Aug12
[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 A tool to dump a model of block::
36
37     hexablock.dump(doc, [mesh, [full]])
38
39 - doc: the document to dump
40 - mesh: an optional mesh of this document
41 - full:
42
43   - False: to have a short dump (by default)
44   - True: to have a full dump
45
46
47 GUI command: :ref:`guicomponent`