Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I reconcile a version in Arc Map, if it has any conflicts it will stop the reconcile operation and open a window. The window shows the conflicts of that particular version with red dots. My task is to read those values and generate a report which contains only conflict fields.

share|improve this question
up vote 1 down vote accepted

Directly its not possible.

See the code below

IVersionEdit4 = pVersionEdit4;
pVersionEdit4.Reconcile4("SDE.DEFAULT", true, false, false, false)

From that

IFeatureWorkspace commonAncestorFWorkspace = (IFeatureWorkspace)pVersionEdit4.CommonAncestorVersion;
                IFeatureWorkspace preReconcileFWorkspace = (IFeatureWorkspace)pVersionEdit4.PreReconcileVersion;
                IFeatureWorkspace reconcileFWorkspace = (IFeatureWorkspace)pVersionEdit4.ReconcileVersion;
                IEnumConflictClass pEnumConflictClass = pVersionEdit4.ConflictClasses;
                IConflictClass pConflictClass = null;
                //Loop through all conflict classes
                while ((pConflictClass = pEnumConflictClass.Next()) != null)
                    IDataset pDataSet = pConflictClass as IDataset;
                    string datasetname = pDataSet.Name;
                    ISelectionSet pSelectionSet = pConflictClass.UpdateUpdates;
                    IFeatureClass featureClassPreReconcile = preReconcileFWorkspace.OpenFeatureClass(datasetname);
                    IFeatureClass featureClassReconcile = reconcileFWorkspace.OpenFeatureClass(datasetname);
                    IFeatureClass featureClassCommonAncestor = commonAncestorFWorkspace.OpenFeatureClass(datasetname);
                    IEnumIDs pEnumIds = pSelectionSet.IDs;
                    int oid =  - 1;
                    //Loop through all conflicting features. 
                    while ((oid = pEnumIds.Next()) != -1)
                        // Get conflict feature on the three reconcile versions.
                        IFeature featurePreReconcile = featureClassPreReconcile.GetFeature(oid);
                        IFeature featureReconcile = featureClassReconcile.GetFeature(oid);
                        IFeature featureCommonAncestor = featureClassCommonAncestor.GetFeature(oid);
                        //Loop through all fields of a conflict feature.
                        for (int intField = 0; intField < featurePreReconcile.Fields.FieldCount; intField++)
                            //Finding the conflict by checking two versions.
                            if (featurePreReconcile.get_Value(intField).ToString()!=featureReconcile.get_Value(intField).ToString())
                                //Writing to the Log.
                                base.LogReport(new string[] { WorkOrderName, featureClassPreReconcile.AliasName, oid.ToString(), featureReconcile.Fields.get_Field(intField).Name, featureReconcile.get_Value(intField).ToString(), featurePreReconcile.get_Value(intField).ToString(), featureReconcile.get_Value(intField).ToString(), featureCommonAncestor.get_Value(intField).ToString() });

We will get the UID's of conflict classes. From that we should compare PreReconcileVersion and ReconcileVersion then we will get conflict field value.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.