ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Core Namespace / Project Class / Current Property
Example

In This Topic
    Current Property (Project)
    In This Topic
    Gets the project that is currently open in the ArcGIS Pro application
    Syntax
    public static Project Current {get;}
    Public Shared ReadOnly Property Current As Project
    Remarks

    Only one project can be opened at a time in ArcGIS Pro. When another project is opened or a new project is created, this property is updated to reflect the newly opened project.

    Example
    Get the Current project
    //Gets the current project
    var project = Project.Current;
    Get location of current project
    //Gets the location of the current project; that is, the path to the current project file (*.aprx)  
    string projectPath = Project.Current.URI;
    Get the project's default gdb path
    var projGDBPath = Project.Current.DefaultGeodatabasePath;
    Check if project needs to be saved
    //The project's dirty state indicates changes made to the project have not yet been saved. 
    bool isProjectDirty = Project.Current.IsDirty;
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also