Customization > Automation Interface > Functions > For Models > ImportModel function (automation interface)
  
ImportModel function (automation interface)
Syntax:
ImportModel (\\SQL\<server>@<instance>\<database>", "<source folder>")
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 Repository to which you want to import the model. The case of the name must be correct.
<source folder> is a string that specifies the directory from which you want to import the model.
The ImportModel function imports a model that has been unzipped.
This function returns the reference of the model that is imported.
Examples
This example imports a model that was exported and unzipped to the C:\MyExportedModels folder.
Set objManager = CreateObject("Studio.ModelManager")
objManager.ImportModel ("\\SQL\MyServer@MODELER\MyDatabase","C:\MyExportedModels")