1 .. |export.icon| image:: images/export.png
6 The export feature allows exporting objects from the current study to an external file. The following sections show the different ways to export objects.
11 To export the full study in SHAPER native format (``*.shaper``) select in the Main Menu *File -> Export -> Part Set...* item.
12 The **Export file** dialog will be opened:
14 .. figure:: images/ExportNativeFileDlg.png
17 **Dialog box for export to SHAPER native format**
19 Specify file name and press **Save** button to export the file. **Cancel** button cancels the operation.
25 It allows to export the specified results including the sequence of all operations which affect the selected objects.
26 To export results in binary format (``*.shaperpart``) select in the Main Menu *File -> Export -> Part...* item.
28 The following property panel will be opened:
30 .. figure:: images/ExportPart_panel.png
33 **Export Part property panel**
35 The file name and path can be defined in **Export file** field by direct input or browsing with **'...'** button, which opens **Export file** dialog box:
37 .. figure:: images/ExportPartFileDlg.png
40 **Dialog box to export part of the model**
42 Selection list in the property panel contains a list of exported objects which can be selected in a viewer or object browser.
43 In case of the list is empty, all active results in the current Part will be exported.
44 If the PartSet is active, only results (construction elements) of this PartSet may be selected for the export, but not results of Parts.
46 *Note:* It is forbidden to export features that include references to external elements other than default elements (origin or main axes and planes).
49 **Apply** button exports the file.
51 **Cancel** button cancels the operation.
55 .. py:function:: model.exportPart(Part_doc, FileNameString, ObjectsList)
57 :param part: The current part object
58 :param string: The file name
59 :param list: A list of exporting objects, if necessary
64 The Result of operation is an exported file.
66 **See Also** a sample TUI Script of :ref:`tui_export_part` operation.
72 It is possible to export objects to files in the following CAD-neutral formats: BREP, STEP, IGES, XAO, STL.
73 To export objects to a file select in the Main Menu *File -> Export -> To CAD formats...* item.
76 The following property panel will be opened:
78 .. figure:: images/Export_panel.png
81 **Export property panel**
83 In this panel, it is necessary to select desirable format of export file. It can be **'BREP, STEP, IGES'** , **'XAO'** or **'STL'** .
86 Export to BREP, STEP, IGES
87 """"""""""""""""""""""""""
89 In case of first choice the format of exported file will be defined according to file extension. The file name and path can be defined in **Export file** field by direct input or browsing with **'...'** button, which opens **Export file** dialog box:
91 .. figure:: images/ExportFileDlg.png
94 **Dialog box to export in CAD-neutral format**
96 Selection list in the property panel contains a list of exported objects which can be selected in a viewer or object browser.
98 **Apply** button exports the file.
100 **Cancel** button cancels the operation.
104 .. py:function:: model.exportToFile(Part_doc, FileNameString, ObjectsList)
106 :param part: The current part object
107 :param string: The file name
108 :param list: A list of exporting objects
113 The Result of operation is an exported file.
115 **See Also** a sample TUI Script of :ref:`tui_export_file` operation.
120 In this case, the following property panel will be opened:
122 .. figure:: images/ExportXAO.png
125 **Dialog box to export in XAO format**
127 The file name and path can be defined in **Export file** field by direct input or browsing with **'...'** button, which opens **Export file** dialog box
129 *Note*: For XAO format, selection list is not available, the whole part is exported.
131 **Author** Author name, empty by default
133 **Geometry name** Geometry name, empty by default
135 **Export shape in a separate file** if checked, shape will be exported in a separate BREP file with path = <XAO file name> + ".brep"
137 **Apply** button exports the file.
139 **Cancel** button cancels the operation.
143 .. py:function:: model.exportToXAO(Part_doc, FileNameString, Author="", GeometryName="", ShapeFile="")
144 .. py:function:: model.exportToXAO(Part_doc, FileNameString, Object, Author="", GeometryName="", ShapeFile="")
146 :param part: The current part object
147 :param string: The file name
148 :param object: An exporting object, if necessary
149 :param string: The name of the author, empty by default
150 :param string: The name for the shape processed in GEOMETRY module, empty by default
151 :param string: The shape file name. If not empty, shape data will be stored in a separate BREP file, given by this parameter
153 .. py:function:: aBuffer = model.exportToXAOMem(Part_doc, Object, Author="", GeometryName="")
155 This function enables passing data in XAO format from SHAPER to GEOM through a memory buffer (bytes array), without creation of real file on disk.
157 :param object: The object to export
158 :param string: The name of the author, empty by default
159 :param string: The name for the shape processed in GEOMETRY module, empty by default
165 The Result of operation is an exported XAO file.
167 **See Also** a sample TUI Script of :ref:`tui_export_file_XAO` operation.
172 In this case, the following property panel will be opened:
174 .. figure:: images/ExportSTL.png
177 **Dialog box to export in STL format**
180 The file name and path can be defined in **Export file** field by direct input or browsing with '...' button, which opens Export file dialog box.
182 **Object** field contains an exported object which can be selected in a viewer or object browser.
184 **Deflection** (**Relative** or **Absolute**) has to be chosen and defined in the corresponding field as well as the **File type** which can defined as **Binary** or as **ASCII**.
187 **Apply** button exports the file.
189 **Cancel** button cancels the operation.
193 .. py:function:: model.exportToSTL(Part_doc, FileNameString, selectedShape, relative, absolute, isRelative, isASCII)
195 :param part: The current part object
196 :param string: The file name
197 :param object: An exporting object
198 :param real: value of the relative deflection
199 :param real: value of the absolute deflection
200 :param boolean: indicate if use deflection relative
201 :param boolean: indicate if the file is in ASCII type
206 The Result of operation is an exported STL file.
208 **See Also** a sample TUI Script of :ref:`tui_export_file_STL` operation.