ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping.Offline Namespace / GenerateReplicaParams Class / DestinationFolder Property
Example

In This Topic
    DestinationFolder Property (GenerateReplicaParams)
    In This Topic
    Gets and sets the folder into which the local replica data will be copied (optional).
    Syntax
    public string DestinationFolder {get; set;}
    Public Property DestinationFolder As String
    Remarks
    If null or empty, the destination folder defaults to the Offline Maps location specified for the current project. Typically this is the current project folder
    Example
    Generate Replicas for Sync-Enabled Content
    //namespace ArcGIS.Desktop.Mapping.Offline
    var extent = MapView.Active.Extent;
    var map = MapView.Active.Map;
    
    //await if needed...
    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);
    
      }
    });
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also