Model.CE_ExportFile#
- Model.CE_ExportFile(collection, ce_style, filename, header_string, with_md, option, reserved1, reserved2, with_femd=0, with_appd=0)#
Exports selected connectors in the native XML/ format. The exported connectors file in XML format can be viewed either in an internet browser or in XML notepad. The ASCII format file can be viewed in any text viewer.
- Parameters:
collection (Collection) – The collection containing the connector entities to export.
ce_style (hwString) – Filter the specific type of connector to exported. Valid values are all, spot, bolt, apply_mass, seam, area.
filename (hwString) – The full path and filename of the output file (.xml or .mcf extension).
header_string (hwString) – Optional string information that is written out only in ASCII export.
with_md (int) –
Flag to indicate whether to write metadata information. Valid values are:
0 - Metadata is not written.
1 - Metadata is written.
option (int) –
Export format:
1 - ASCII (.mcf)
3 - XML (.xml)
reserved1 (hwString) – Reserved for future development. Must be set to “”.
reserved2 (double) – Reserved for future development. Must be set to 0.
with_femd (int) – Reserved for future development.
with_appd (int) – Reserved for future development.
Example#
Export all of the displayed connectors in XML format to the file “C:/ce_info.xml”, including all metadata#import hm import hm.entities as ent model = hm.Model() connector_collection = hm.CollectionByDisplayed(model, ent.Connector) model.CE_ExportFile( collection=connector_collection, ce_style="all", filename="C:/ce_info.xml", header_string="", with_md=1, option=3, reserved1="", reserved2=0.0, )