ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Data.DDL Namespace / SchemaBuilder Class / CreateGeodatabase Method / CreateGeodatabase(FileGeodatabaseConnectionPath) Method
Represents the physical path to create the file ArcGIS.Core.Data.Geodatabase.
Example

In This Topic
    CreateGeodatabase(FileGeodatabaseConnectionPath) Method
    In This Topic
    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
    Creating a File Geodatabase
    public void CreateFileGeodatabaseSnippet()
    {
      // 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

    ArcGIS Pro version: 3 or higher.
    See Also