Select to view content in your preferred language

Replica creation with the ArcPro SDK

296
1
09-20-2023 07:02 AM
NicholasHardy
Occasional Contributor II

Hi

I'm trying to create a 2-way replica between enterprise geodatabases where the feature classes have different names.  Out of the box Pro does not allow this, so I've been looking at using the ArcPro SDK.  I wrote similar code in ArcObjects a while back but cannot find anything about replicas in the new SDK, closest I've found is syncing offline maps.  

Has anyone done this?  

thanks

Nick

0 Kudos
1 Reply
GKmieliauskas
Esri Regular Contributor

Hi,

You can create replica using geoprocessing:

    IGPResult gpResult = await Geoprocessing.ExecuteToolAsync(
            "management.CreateReplica", parameters, null, cancelableProgressor);
    if (gpResult.IsFailed)
    {
        throw new Exception("Error executing Geoprocessing tool \"CreateReplica\":↵\n "
            + string.Join("↵\n ", gpResult.ErrorMessages));
    }

More info about CreateReplica tool here

0 Kudos