Model.CE_ExportFiles#

Model.CE_ExportFiles(collection, ce_style, option, reserved1, reserved2, reserved3)#

Exports selected connectors to their original files in original formats or specified format. The exported connectors file in XML format can be viewed either in an internet browser or in XML notepad. The ASCII or VIP 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.

  • option (int) –

    Specifies the output format. Valid values are:

    0 - original format

    1 - ASCII

    3 - XML

    4 - VIP

    5 - XML 2.0

    6 - XML 2.0 (version A)

    7 - XML 2.0 (version B)

  • reserved1 (hwString) – Reserved for future development. Must be set to “”.

  • reserved2 (double) – Reserved for future development. Must be set to 0.0.

  • reserved3 (int) – Reserved for future development. Must be set to 0.

Example#

Export all of the displayed connectors in XML format to their original files#
import hm
import hm.entities as ent

model = hm.Model()

connector_collection = hm.CollectionByDisplayed(model, ent.Connector)
model.CE_ExportFiles(
    collection=connector_collection,
    ce_style="all",
    option=3,
    reserved1="",
    reserved2=0.0,
    reserved3=0,
)