Customization > Automation Interface > Functions > For Models > ExportModelEx function (automation interface)
ExportModelEx function (automation interface)
Syntax:
ExportModelEx (\\SQL\<server>@<instance>\<database>\<model>\<version>", "<directory>")
Where:
<server> is a string that specifies the name of the server on which the Database resides. The case of the name must be correct.
<database> is a string that specifies the name of the Database that owns the Model you want to export. The case of the name must be correct.
<model> is a string that specifies the name of the Model you want to export. The case of the name must be correct.
<version> is a string that specifies the version of the Model you want to export. If the Model has not been versioned, the version is 0.
<directory> is a string that specifies the directory to which you want to export the Model. The directory must be empty.
The ExportModelEx function exports a model version to a directory and returns the name of the export zip file.
Examples
This example exports version 0 of the MyModel model to the C:\MyExportedModels folder.
Set objManager = CreateObject("Studio.ModelManager")
objManager.ExportModelEx("\\SQL\MyServer@MODELER\MyDatabase\MyModel\0","C:\MyExportedModels")
Was this helpful?