Represents a geodatabase feature dataset.

Namespace:  ESRI.ArcGISExplorer.Data

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public sealed class GeodatabaseFolder : IDisposable
Visual Basic (Declaration)
Public NotInheritable Class GeodatabaseFolder _
	Implements IDisposable

Remarks

The GeodatabaseFolder class represents a geodatabase feature dataset and consequently only applies to data stored in a geodatabase. It is a container of Table objects each of which represents a geodatabase feature class. All the Table objects within a GeodatabaseFolder will have the same CoordinateSystem.

You do not need to explicitly return a GeodatabaseFolder object in order to open a Table as each feature class is uniquely named. For example, to open the Blocks feature class, which is contained in the Landbase feature dataset in the Montgomery geodatabase you have three options:

  • Create a new Geodatabase object then use the Geodatabase.OpenTable method to open the Blocks feature class.
  • Create a new Geodatabase object, use Geodatabase.OpenGeodatabaseFolder to open the Landbase feature dataset then use the GeodatabaseFolder.OpenTable method to open the Blocks feature class.
  • From the static methods on the Table class. To open a geodatabase feature class or table use OpenFileGeodatabaseTable, or Table.OpenArcSDETable.

Examples

The code below adds the contents of a geodatabase feature dataset to the Map. Additionally the 2D Map coordinate system is set to be the same as that of the GeodabaseFolder object.
CopyC#
{
  //Open geodatabase
  Geodatabase gdb = new Geodatabase(@"C:\Data\Montgomery.gdb");

  //Open the Landbase feature dataset to create a GeodabaseFolder object
  GeodatabaseFolder gdbFolder = gdb.OpenGeodatabaseFolder("Landbase");

  //Create a Folder
  Folder folderMapItem = new Folder();
  //Set the Folder name to be the same as the GeodatabaseFolder name
  folderMapItem.Name = gdbFolder.Name;

  //Loop over all the Tables in the GeodatabaseFolder
  foreach (Table table in gdbFolder.GetTables())
  {
    //Create a new FeatureLayer, set the name and connect it to the Table
    FeatureLayer fl = FeatureLayer.OpenFromTable(table);
    fl.Name = table.AliasName;

    //Add FeatureLayer to the Folder if it is connected
    if (fl.IsConnected)
    {
      folderMapItem.ChildItems.Add(fl);
    }
  }

  //Add the Folder to the Map
  ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Map.ChildItems.Add(folderMapItem);

  //Set the 2D CoordinateSystem to be same as that used by the GeodatabaseFolder
  ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.CoordinateSystem2D = gdbFolder.CoordinateSystem;
}
CopyVB.NET
'Open geodatabase
Dim gdb As Geodatabase = New Geodatabase("C:\Data\Montgomery.gdb")

'Open the Landbase feature dataset to create a GeodabaseFolder object
Dim gdbFolder As GeodatabaseFolder = gdb.OpenGeodatabaseFolder("Landbase")

'Create a Folder
Dim folderMapItem As Folder = New Folder()
'Set the Folder name to be the same as the GeodatabaseFolder name
folderMapItem.Name = gdbFolder.Name

'Loop over all the Tables in the GeodatabaseFolder
For Each fcTable As Table In gdbFolder.GetTables()
  'Create a new FeatureLayer, set the name and connect it to the Table
  Dim fl As FeatureLayer = FeatureLayer.OpenFromTable(fcTable)
  fl.Name = fcTable.AliasName

  'Add FeatureLayer to the Folder if it is connected
  If (fl.IsConnected) Then
    folderMapItem.ChildItems.Add(fl)
  End If
Next

'Add the Folder to the Map
ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Map.ChildItems.Add(folderMapItem)

'Set the 2D CoordinateSystem to be same as that used by the GeodatabaseFolder
ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.CoordinateSystem2D = gdbFolder.CoordinateSystem

Inheritance Hierarchy

System..::.Object

  ESRI.ArcGISExplorer.Data..::.GeodatabaseFolder

See Also