GetCanSynchronizeReplicas Method
Check Map Has Local Syncable Content
//namespace ArcGIS.Desktop.Mapping.Offline
var map = MapView.Active.Map;
//await if needed...
QueuedTask.Run(() =>
{
//Check map has local syncable content
var canSyncContent = GenerateOfflineMap.Instance.GetCanSynchronizeReplicas(map);
if (canSyncContent)
{
//TODO - use status
}
});
Synchronize Replicas for Syncable Content
//namespace ArcGIS.Desktop.Mapping.Offline
var map = MapView.Active.Map;
//await if needed...
QueuedTask.Run(() =>
{
//Check map has local syncable content
var canSyncContent = GenerateOfflineMap.Instance.GetCanSynchronizeReplicas(map);
if (canSyncContent)
{
//Sync Replicas - changes since last sync are pushed to the
//parent replica. Parent changes are pulled to the client.
//Unsaved edits are _not_ sync'd.
GenerateOfflineMap.Instance.SynchronizeReplicas(map);
}
});
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.