ArcGIS Pro 2.9 API Reference Guide
CustomDefaultGeodatabase Property

ArcGIS.Desktop.Core Namespace > GeneralOptions Class : CustomDefaultGeodatabase Property
Gets and sets the path to the default geodatabase to use with new projects
Syntax
public string CustomDefaultGeodatabase {get; set;}
Public Property CustomDefaultGeodatabase As String
Remarks
Default geodatabases can be either file (.gdb) or enterprise (.sde). Attempting to set the path to a non-file or enterprise gdb is ignored. Set DefaultGeodatabaseOption to OptionSetting.UseCustom after setting the CustomDefaultGeodatabase (to use the CustomDefaultGeodatabase with newly created projects). Attempting to set the DefaultGeodatabaseOption to UseCustom before CustomDefaultGeodatabase contains a valid path will be ignored.
Conversely, attempting to set the CustomDefaultGeodatabase back to null or empty string will be ignored if DefaultGeodatabaseOption is currently set to UseCustom. DefaultGeodatabaseOption must be changed to UseDefault first.
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

GeneralOptions Class
GeneralOptions Members