With ArcObjects I have this code in C# to export the differences to a XML file:

        ESRI.ArcGIS.GeoDatabaseDistributed.IVersionDataChangesInit pVDataChgs;
        var pvTemp = new ESRI.ArcGIS.GeoDatabaseDistributed.VersionDataChanges();
        pVDataChgs = pvTemp as ESRI.ArcGIS.GeoDatabaseDistributed.IVersionDataChangesInit;
        pVDataChgs.Init(pwkspname, pParWkSpname);
        var pvDataChanges = pVDataChgs as ESRI.ArcGIS.GeoDatabaseDistributed.IDataChanges;

        //Export to an XML file
        ESRI.ArcGIS.GeoDatabaseDistributed.IExportDataChanges pDCExp;
        pDCExp = new ESRI.ArcGIS.GeoDatabaseDistributed.DataChangesExporter();
        pDCExp.ExportDataChanges(sXMLExpFile, ESRI.ArcGIS.GeoDatabaseDistributed.esriExportDataChangesOption.esriExportToXML, pvDataChanges, true);

I need an equivalent functions to get the same result trought ArcPy. But the closest thing I've found is this function: FeatureCompare_management.

How can I compare versions, not features one by one?

  • There is a Version Change Tool that describes what you're looking for however I do not see any reference to it in the Arcpy library. It may not be available. desktop.arcgis.com/en/arcmap/latest/manage-data/geodatabases/… – NULL.Dude Aug 13 '18 at 18:07
  • I've been looking, but apparently it's impossible – Pilgrim Aug 14 '18 at 12:53
  • @Pilgrim, it's not impossible. You could iterate over the feature classes and tables in the databases, and run tools from the Data Comparison toolset, as needed. Then parse and transform the resulting messages as desired...this is the tricky, code-heavy part. – Tom Aug 14 '18 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.