ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Core Namespace / GeneralOptions Class / PortalProjectDownloadLocation Property
Example

In This Topic
    PortalProjectDownloadLocation Property
    In This Topic
    Gets and sets the download location for portal projects
    Syntax
    Public Property PortalProjectDownloadLocation As String
    public string PortalProjectDownloadLocation {get; set;}
    Remarks
    Portal projects will be downloaded and cached in the location specified. Setting the download location to null or empty string will default it back to the original default (typically the Documents\ArcGIS\OnlineProjects in your user profile)
    Example
    Get/Set Portal Project Options
    {
      // access the current options
      var def_home = ApplicationOptions.GeneralOptions.PortalProjectCustomHomeFolder;
      var def_gdb = ApplicationOptions.GeneralOptions.PortalProjectCustomDefaultGeodatabase;
      var def_tbx = ApplicationOptions.GeneralOptions.PortalProjectCustomDefaultToolbox;
      var deleteOnClose = ApplicationOptions.GeneralOptions.PortalProjectDeleteLocalCopyOnClose;
      var def_location = ApplicationOptions.GeneralOptions.PortalProjectDownloadLocation;
    
      // set the options
      ApplicationOptions.GeneralOptions.PortalProjectCustomHomeFolder = @"E:\data";
      ApplicationOptions.GeneralOptions.PortalProjectCustomDefaultGeodatabase = @"E:\data\usa.gdb";
      ApplicationOptions.GeneralOptions.PortalProjectCustomDefaultToolbox = @"E:\data\usa.tbx";
      ApplicationOptions.GeneralOptions.PortalProjectDeleteLocalCopyOnClose = false;
      ApplicationOptions.GeneralOptions.PortalProjectDownloadLocation = @"E:\data";
    }
    Requirements

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

    ArcGIS Pro version: 3.4 or higher.
    See Also