Customization > Automation Interface > Functions > For Models > MergeSandboxes function (automation interface)
  
MergeSandboxes function (automation interface)
Syntax:
MergeSandboxes ("\\SQL\<source server>\<source database>\<source model>\<source version>", "\\SQL\<target server>\<target database>\<target model>\<target version>", "<log file>")
Where:
<source server> is a string that specifies the name of the server on which the source Repository resides. The case of the name must be correct.
<source database> is a string that specifies the name of the Database that owns the source branch you want to reconcile. The case of the name must be correct.
<source model> is a string that specifies the name of the source branch you want to reconcile. The case of the name must be correct.
<source version> is a string that specifies the version of the source branch you want to reconcile.
<target server> is a string that specifies the name of the server on which the target Repository resides. The case of the name must be correct.
<target database> is a string that specifies the name of the Database that owns the target branch you want to reconcile. The case of the name must be correct.
<target model> is a string that specifies the name of the target branch you want to reconcile. The case of the name must be correct.
<target version> is a string that specifies the version of the target branch you want to reconcile.
<log file> is a string that specifies the path and name of the log file in which you want to record any log messages.
After performing the MergeSandboxes function, the following properties are available:
RecErrors - errors reported from the reconcile operation.
RecWarnings - warnings reported from the reconcile operation.
RecConflicts - conflicts reported from the reconcile operation.
RecConflictObject - ID of the Change Note or Text Diagram that is created in the model to record conflicts.
The MergeSandboxes function reconciles the tip version of a branch to the tip version of another branch. Both branches must have been created from the same trunk version.
Examples
This example reconciles version 0.0.0 of the branch named David's Sandbox of MyModel to the branch named Andrew's Sandbox of MyModel, creates a log file named C:\MyLogFiles\MyLogFile.txt.
Set objManager = CreateObject("Studio.ModelManager")
objManager.ReconcileModel("\\SQL\MyServer@MODELER\MyDatabase\David's Sandbox of MyModel\0.0.0","\\SQL\MyServer@MODELER\MyDatabase\Andrew's Sandbox of MyModel\0.1.0","C:\MyLogFiles\MyLogFile.txt")