Customization > Automation Interface > Functions > For Models > ProtectModel function (automation interface)
  
ProtectModel function (automation interface)
Syntax:
ProtectModel (\\SQL\<server>@<instance>\<database>\<model>\<version>")
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 that owns the Model you want to protect. The case of the name must be correct.
<model> is a string that specifies the name of the Model you want to protect. The case of the name must be correct.
<version> is a string that specifies the version of the Model you want to protect. If the Model has not been versioned, the version is 0.
The ProtectModel function protects the tip version of a model.
Examples
This example protects version 3 of the MyModel model in the MyDatabase database.
Set objManager = CreateObject("Studio.ModelManager")
objManager.ProtectModel("\\SQL\MyServer@MODELER\MyDatabase\MyModel\3")