Customization > Automation Interface > Functions > For Models > UpdateAllProfiles function (automation interface)
UpdateAllProfiles function (automation interface)
Syntax:
UpdateAllProfiles (\\SQL\<server>@<instance>\<database>\<model>\<version>", <version before update>, <version after update>)
Where:
<server> specifies the name of the server on which the Database resides. The case of the name must be correct.
<database> specifies the name of the Database that owns the Model in which the PTC profiles require updating. The case of the name must be correct.
<model> specifies the name of the Model in which the PTC profiles require updating. The case of the name must be correct.
<version> specifies the version of the Model in which the PTC profiles require updating. If the Model has not been versioned, the version is 0.
<version before update> is a numeric value that specifies whether a new version of the model is created before updating the PTC profiles:
1 creates a new version the model before updating the PTC profiles.
0 does not create a new version the model before updating the PTC profiles.
<version after update> is a numeric value that specifies whether a new version of the model is created after updating the PTC profiles:
1 creates a new version the model after updating the PTC profiles.
0 does not create a new version the model after updating the PTC profiles.
The UpdateAllProfiles function updates all the PTC profiles in a model version.
Example:
This example updates the PTC profiles in Version3 of the MyModel model in the MyDatabase database and then creates a new version of the model.
Set objManager = CreateObject("Studio.ModelManager")
objManager.UpdateAllProfiles("\\SQL\MyServer@MODELER\MyDatabase\MyModel\3",0,1)
Was this helpful?