Customization > Automation Interface > Functions > For Models > RebaseModel function (automation interface)
  
RebaseModel function (automation interface)
Syntax:
RebaseModel (\\SQL\<server>@<instance>\<database>\<model>\<version>", "<log file>", <clear locks 1 or 0>)
Where:
<server> specifies the name of the server on which the Repository resides. The case of the name must be correct.
<database> specifies the name of the Database that owns the Model you want to rebase. The case of the name must be correct.
<model> specifies the name of the Model you want to rebase. The case of the name must be correct.
<version> specifies the version of the Model you want to rebase.
<log file> specifies the path and name of the log file in which you want to record any log messages.
<clear locks 1 or 0> specifies whether locks are cleared in the two source model versions:
1 clears locks in the two source model versions.
0 does not clear locks in the two source model versions.
Clear locks only if you are sure that no other users are using the two source model versions for the rebase operation.
This function returns the reference of the resultant model version.
After performing the RebaseModel function, the following properties are available:
RecErrors - errors reported from the rebase operation.
RecWarnings - warnings reported from the rebase operation.
RecConflicts - conflicts reported from the rebase operation.
RecConflictObject - ID of the Change Note or Text Diagram that is created in the model to record conflicts.
The RebaseModel function rebases the tip version of a branch.
Examples
This example rebases version 0.0.1 of the MyModel model in the MyDatabase database, creates a log file named C:\MyLogFiles\MyLogFile.txt, and clears locks.
Set objManager = CreateObject("Studio.ModelManager")
objManager.RebaseModel("\\SQL\MyServer@MODELER\MyDatabase\MyModel\0.0.1","C:\MyLogFiles\MyLogFile.txt",1)