AddModel function (automation interface)
Syntax:
AddModel (\\SQL\<server>@<instance>\<database>", "<new model name>")
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 in which you want to create the model. The case of the name must be correct.
• <new model name> is a string that specifies the name of the model you want to create.
The AddModel function creates a model in a database.
The function returns of the reference of the model that is created.
Examples
This example creates a model named MyModel in the MyDatabase database.
Set objManager = CreateObject("Studio.ModelManager")
objManager.AddModel("\\SQL\MyServer@MODELER\MyDatabase","MyModel")