HOW TO
Instructions provided describe how to programmatically detect conflicts found during a reconcile operation using ArcObjects.
Code (C#): public void ReconcileandPost(IVersion editVersion, IVersion targetVersion) { IMultiuserWorkspaceEdit muWorkspaceEdit = (IMultiuserWorkspaceEdit)editVersion; IWorkspaceEdit workspaceEdit = (IWorkspaceEdit2)editVersion; IVersionEdit4 versionEdit = (IVersionEdit4)workspaceEdit; if (muWorkspaceEdit.SupportsMultiuserEditSessionMode(esriMultiuserEditSessionMode.esriMESMVersioned)) { muWorkspaceEdit.StartMultiuserEditing(esriMultiuserEditSessionMode.esriMESMVersioned); //Reconcile with the target version. bool conflicts = versionEdit.Reconcile4(targetVersion.VersionName, true, false, false, false); if (conflicts) MessageBox.Show(" Conflicts Detected "); else MessageBox.Show(" No Conflicts Detected "); workspaceEdit.StartEditOperation(); //Post to the target version. if (versionEdit.CanPost()) versionEdit.Post(targetVersion.VersionName); workspaceEdit.StopEditOperation(); workspaceEdit.StopEditing(true); } }Note that there is an interface called IVersionEdit4, and a method called Reconcile4. This method takes five parameters; the third parameter (a Boolean) allows you to detect conflicts. Once conflicts are detected, you can use the IVersionEdit4.ConflictClasses property to enumerate through each conflict, and handle it programmatically. See the link below to this property.
Article ID: 000015646
Get help from ArcGIS experts
Download the Esri Support App