Customization > Automation Interface > Functions > For Models > ExportModel function (automation interface)
  
ExportModel function (automation interface)
Syntax:
ExportModel (\\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 ExportModel function exports a model version to a directory.
If you want to export a model version and return the name of the export zip file, use the ExportModelEx function. Tell me more...
Examples
This example exports version 0 of the MyModel model to the C:\MyExportedModels folder.
Set objManager = CreateObject("Studio.ModelManager")
objManager.ExportModel("\\SQL\MyServer@MODELER\MyDatabase\MyModel\0","C:\MyExportedModels")