ArcGIS Pro 2.7 API Reference Guide
SetDefaultGeoDatabasePath Method

ArcGIS.Desktop.Core Namespace > Project Class : SetDefaultGeoDatabasePath Method
The full path to the geodatabase that will be used
Sets the current project's default geodatabase. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public void SetDefaultGeoDatabasePath( 
   string defaultGeoDatabase
)
Public Sub SetDefaultGeoDatabasePath( _
   ByVal defaultGeoDatabase As String _
) 

Parameters

defaultGeoDatabase
The full path to the geodatabase that will be used
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Remarks

By default, a new file geodatabase is created in the project's home folder and used as its default geodatabase. However, the default geodatabase can be set to another existing geodatabase. For example, if you add a schema-only layer package to a map, the schema required by the layer is generated in the project's default geodatabase. A project is required to have a default geodatabase.

The ArcGIS Pro application settings may specify a geodatabase that should always be used as the default geodatabase. Anyone using the project is expected to have write access to and appropriate permissions in that geodatabase. If a project uses a file geodatabase as the default geodatabase and the file geodatabase is not available in the specified location, a file geodatabase will be created accordingly to satisfy the default geodatabase path.

At this time, only file geodatabases can be used as a project's default geodatabase.

Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

Project Class
Project Members