ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Desktop.Mapping.Offline Namespace / GenerateReplicaParams Class
Members Example

In This Topic
    GenerateReplicaParams Class
    In This Topic
    Specifies the parameters for creating sync replicas from all sync enabled layers in a map
    Object Model
    GenerateReplicaParams ClassEnvelope Class
    Syntax
    public class GenerateReplicaParams 
    Public Class GenerateReplicaParams 
    Example
    Generate Replicas for Sync-Enabled Content
    {
      //namespace ArcGIS.Desktop.Mapping.Offline
      var extent = mapView.Extent;
      await QueuedTask.Run(() =>
      {
        //Check map has sync-enabled content that can be taken offline
        var hasSyncEnabledContent = GenerateOfflineMap.Instance.GetCanGenerateReplicas(map);
        if (hasSyncEnabledContent)
        {
          //Generate Replicas and take the content offline
          //sync-enabled content gets copied local into a SQLite DB
          var gen_params = new GenerateReplicaParams()
          {
            Extent = extent, //SR of extent must match map SR
    
            //DestinationFolder can be left blank, if specified,
            //it must exist. Defaults to project offline maps location
            DestinationFolder = @"C:\Data\Offline"
          };
          //Sync-enabled layer content will be resourced to point to the
          //local replica content.
          GenerateOfflineMap.Instance.GenerateReplicas(map, gen_params);
        }
      });
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Mapping.Offline.GenerateReplicaParams

    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also