ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Data.DDL Namespace / SchemaBuilder Class / CreateGeodatabase Method / CreateGeodatabase(MemoryConnectionProperties) Method
Represents the properties to create the memory ArcGIS.Core.Data.Geodatabase.
Example

In This Topic
    CreateGeodatabase(MemoryConnectionProperties) Method
    In This Topic
    Creates a new memory ArcGIS.Core.Data.Geodatabase with the specified name.
    Syntax
    Public Overloads Shared Function CreateGeodatabase( _
       ByVal memoryConnectionProperties As MemoryConnectionProperties _
    ) As Geodatabase

    Parameters

    memoryConnectionProperties
    Represents the properties to create the memory ArcGIS.Core.Data.Geodatabase.

    Return Value

    The newly created memory ArcGIS.Core.Data.Geodatabase.
    Exceptions
    Example
    Creating a memory Geodatabase
    public void CreateMemoryGeodatabaseSnippet()
    {
      // Create the memory connection properties to connect to  default memory geodatabase
      MemoryConnectionProperties memoryConnectionProperties = new MemoryConnectionProperties();
    
      // Alternatively create the memory connection properties to connect to memory geodatabase named as 'InterimMemoryGeodatabase'
      // MemoryConnectionProperties memoryConnectionProperties = new MemoryConnectionProperties("InterimMemoryGeodatabase");
    
      // Creates the new memory geodatabase if it does not exist or connects to an existing one if it already exists
      using (Geodatabase geodatabase = new Geodatabase(memoryConnectionProperties))
      {
        // Create additional schema here
      }
    }
    Creating the memory geodatabase
    public Geodatabase GetMemoryGeodatabase()
    {
      // Creates the default memory geodatabase if not exist or connects to an existing one if already exists
      Geodatabase memoryGeodatabase = new Geodatabase(new MemoryConnectionProperties());
    
      // Creates schema
      SchemaBuilder schemaBuilder = new SchemaBuilder(memoryGeodatabase);
      schemaBuilder.Create(new TableDescription("MyTable", new List<FieldDescription>()));
      schemaBuilder.Build();
    
      return memoryGeodatabase;
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also