ArcGIS Pro 2.9 API Reference Guide
CreateGeodatabase(FileGeodatabaseConnectionPath) Method
Example 

ArcGIS.Core.Data.DDL Namespace > SchemaBuilder Class > CreateGeodatabase Method : CreateGeodatabase(FileGeodatabaseConnectionPath) Method
Represents the physical path to create the file ArcGIS.Core.Data.Geodatabase.
Creates a new file ArcGIS.Core.Data.Geodatabase at the specified path.
Syntax
Public Overloads Shared Function CreateGeodatabase( _
   ByVal fileGeodatabaseConnectionPath As FileGeodatabaseConnectionPath _
) As Geodatabase

Parameters

fileGeodatabaseConnectionPath
Represents the physical path to create the file ArcGIS.Core.Data.Geodatabase.

Return Value

The newly created file ArcGIS.Core.Data.Geodatabase.
Exceptions
ExceptionDescription

The path contains an invalid Windows folder character or the geodatabase name is invalid.

-or-

The length of the local path is greater than 215 characters.

fileGeodatabaseConnectionPath is null.
The name of the file ArcGIS.Core.Data.Geodatabase contains a colon.
The file ArcGIS.Core.Data.Geodatabase already exists.
A geodatabase-related exception has occurred.
Example
// Create a FileGeodatabaseConnectionPath with the name of the file geodatabase you wish to create
FileGeodatabaseConnectionPath fileGeodatabaseConnectionPath = new FileGeodatabaseConnectionPath(new Uri(@"C:\Path-To-File-Geodatabase\YourName.gdb"));

// Create and use the file geodatabase
using (Geodatabase geodatabase = SchemaBuilder.CreateGeodatabase(fileGeodatabaseConnectionPath))
{
  // Create additional schema here
}
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

SchemaBuilder Class
SchemaBuilder Members
Overload List