ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Core Namespace / CreateProjectSettings Class / LocationPath Property
Example

In This Topic
    LocationPath Property
    In This Topic
    Gets and sets the location where the project will be stored
    Syntax
    Public Property LocationPath As String
    public string LocationPath {get; set;}
    Remarks

    If not set, projects are saved in the user's My Documents\ArcGIS\Projects folder; this folder is created if it doesn't already exist.

    If the LocationPath property is set, the new project will be created in the provided location; the specified folder must already exist on disk.

    LocationPath is ignored if the TemplateType is set to Untitled.

    Example
    Get the Default Project Folder
    {
      //Get Pro's default project settings.
      var defaultSettings = Project.GetDefaultProjectSettings();
      var defaultProjectPath = defaultSettings.LocationPath;
      // If not set, projects are saved in the user's My Documents\ArcGIS\Projects folder;
      // this folder is created if it doesn't already exist.
      defaultProjectPath ??= Path.Combine(
                  Environment.GetFolderPath(
                       Environment.SpecialFolder.MyDocuments),
                  @"ArcGIS\Projects");
      // Use defaultProjectPath;
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also