Customization > Automation Interface > Functions > For Configuration Management Tool Integration > ExportEx function (automation interface)
  
ExportEx function (automation interface)
Syntax:
ExportEx("<folder>",TRUE¦FALSE)
Where
<folder> is a string that specifies the folder to which you want to export the Model or Package.
TRUE specifies that sub-packages are included in the export.
FALSE specifies that sub-packages are not included in the export.
This function acts on a Model (Project) or Package. It creates in the specified folder, an MDF file for a Model, or a PKF file for a Package. If you include subdirectories, PKF files are created for descendent Packages of the Model or Package.
When using this function, you may want to interrogate the Permissions and Protected attributes, and then set the Protected property accordingly. Unlike the Export function, the ExportEx function can export when the model or package is protected, which allows you to export from versioned models.
Examples
In this example, Package1 is exported to the C:\Exported Packages folder, but its sub-Packages are not included.
Set objPackage = Dictionary.Item("Package", "Package1")
Call objPackage.ExportEx("C:\Exported Packages", FALSE)