ArcGIS Pro 3.2 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 string LocationPath {get; set;}
    Public Property LocationPath As String
    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 (defaultProjectPath == null)
    {
      // 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 = System.IO.Path.Combine(
                  System.Environment.GetFolderPath(
                       Environment.SpecialFolder.MyDocuments),
                  @"ArcGIS\Projects");
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also