ArcObjects Library Reference (GeoDatabase)  

IFeatureWorkspace Interface

Provides access to members that create and open various types of datasets and other workspace level objects.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


The IFeatureWorkspace interface is used to access and manage datasets that are a key component of a feature based geodatabase; Tables and ObjectClasses, FeatureClasses, FeatureDatasets, and RelationshipClasses. All of the Open methods (such as OpenTable) take a dataset name as input. When working with an enterprise geodatabase, the name may be fully qualified (for example, "database.owner.tablename" or "owner.tablename") using the qualification character appropriate to the underlying database (see ISQLSyntax)). If the input name is not fully qualified, then it is qualified using the currently connected user for the workspace.

When working with geodatabases (personal, file or ArcSDE) the workspace keeps a running object table of instantiated datasets. Multiple calls to open an already instantiated dataset will return a reference to the already instantiated dataset.

When To Use

IFeatureWorkspace is the main interface for creating and opening objects and object classes with a workspace.


Method CreateFeatureClass Creates a new standalone feature class under the workspace.
Method CreateFeatureDataset Creates a new feature dataset.
Method CreateQueryDef Create a query definition object.
Method CreateRelationshipClass Creates a new relationship class.
Method CreateTable Creates a new table.
Method OpenFeatureClass Opens an existing feature class.
Method OpenFeatureDataset Opens an existing feature dataset.
Method OpenFeatureQuery Opens a feature dataset containing a single feature class defined by the specified Query.
Method OpenRelationshipClass Opens an existing relationship class.
Method OpenRelationshipQuery The table of a relationship join query.
Method OpenTable Opens an existing table.

CoClasses that implement IFeatureWorkspace

CoClasses and Classes Description
AMSWorkspace (esriTrackingAnalyst) Controls the Tracking Server workspace COM object's properties.
Sde3Workspace (esriDataSourcesGDB) Esri SDE (3.x) Feature Database.
Sde4Workspace (esriDataSourcesGDB) Esri SDE (4.x) Feature Database.
SqlWorkspace (esriDataSourcesGDB) Sql workspace
VersionedWorkspace VersionedWorkspace Object.
Workspace Workspace Object.

.NET Snippets

Create Table | Set Data Source | Create FeatureClass | Open Network Dataset | Get FeatureClass From Shapefile On Disk

.NET Samples

Closest facility solver (Code Files: frmClosestFacilitySolver) | Add a custom menu created in .NET to ArcGIS for Desktop (Code Files: AddShapefile) | Cut polygons without selection edit task (Code Files: EditingForm) | Editing using a custom form (Code Files: MainForm) | Custom reshape polyline edit task (Code Files: EditingForm) | 3D dynamic element tracking (Code Files: TrackDynamicObject) | Service area solver (Code Files: frmServiceAreaSolver) | Customizing schematic feature removal events (Code Files: FeatureRemovalMgmt) | Managing snap agents (Code Files: EditingForm) | Location-allocation solver (Code Files: frmLocationAllocationSolver) | Vehicle routing problem solver (Code Files: frmVRPSolver) | Automate ArcGIS for Desktop applications (Code Files: Form1) | Simple point plug-in data source (Code Files: OpenSimplePointDlg) | Origin-destination cost matrix solver (Code Files: frmODCostMatrixSolver) | Implementing extended criteria for some predefined schematic rules (Code Files: PlantOnCableDiameter PlantWithoutEquipment) | Custom vertex editing commands (Code Files: EditingForm) | RSS weather GraphicTracker (Code Files: RSSWeather) | Bind a geodatabase table to a .NET control (Code Files: MainWind) | Buffer snap agent (Code Files: EditingForm) | RSS weather layer (Code Files: AddWeatherItemTool RSSWeatherLayerClass) | Route layer (Code Files: Program) | Edit event listener (Code Files: EditingForm)

.NET Related Topics

Adding a custom menu created in .NET to ArcGIS for Desktop | Adding a plug-in data source programmatically | Automating ArcGIS for Desktop applications | Checking for topology error features in a geodatabase topology | Converting labels to geodatabase annotation for a single layer | Converting labels to geodatabase annotation for an entire map | Copying or loading data while preserving GlobalID values | Creating a topology in the geodatabase | Creating an address locator | Creating annotation and dimension feature classes | Creating feature classes | Creating feature datasets | Creating relationship classes | Creating tables | DataSourcesOleDB | Finding differences between versions | Geodatabase | Geodatabase API best practices | How to add different types of layers to a map | How to change label formats and marks on an axis using a line graph | How to create a 3D pie graph | How to create a box plot graph | How to create a dynamic geocoded feature class | How to create a function series graph | How to create a histogram graph | How to create a multimodal network dataset | How to create a network dataset | How to create a selection set using a scatter plot graph | How to create a vertical stack area graph | How to create graph series with different color types | How to create multiple vertical bar graphs | How to geocode a table of addresses | How to get CAD transformation properties (from, to, angle, and scale) | How to get the points of a two-point CAD transformation | How to merge conflicting geometries during a reconcile | How to open a terrain dataset | How to rematch a geocoded feature class | How to return CAD drawing layer properties | How to return CAD transformation settings | How to set CAD transformation properties (from, to, angle, and scale) | How to set the points of a two-point CAD transformation | How to sort data in the graph | How to standardize an address | Leveraging the schema cache | Location | Opening datasets | Performing a spatial analysis operation using objects