Current Property (Project)
Gets the project that is currently open in the ArcGIS Pro application
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;
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.