Salome HOME
bos #18858 Use sphinx_rtd_theme as theme for SALOME documentation built with Sphinx
[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 Get a document from the current study::
36
37         doc = hexablock.getFromStudy(doc_entry)
38         
39 Add a document in the current study::
40
41         hexablock.addToStudy(doc)
42
43 A tool to dump a model of block::
44
45     hexablock.dump(doc, [mesh, [full]])
46
47 - doc: the document to dump
48 - mesh: an optional mesh of this document
49 - full:
50
51   - False: to have a short dump (by default)
52   - True: to have a full dump
53
54
55 GUI command: :ref:`guicomponent`