This document is archived and information here might be outdated.  Recommended version.

IWorkspaceFactory Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IW > IWorkspaceFactory Interface
ArcGIS Developer Help

IWorkspaceFactory Interface

Provides access to members that create and open workspaces and supply workspace factory information. Note: the IWorkspaceFactory interface has been superseded by IWorkspaceFactory2. Please consider using the more recent version.

Product Availability

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

When To Use

Use IWorkspaceFactory when you need to create a new workspace, connect to an existing workspace or find information about a workspace.


Name Description
Method ContainsWorkspace Indicates if parentDirectory contains a valid workspace, or is a valid file-system workspace.
Method Copy Copies a workspace to the specified destination folder.
Method Create Creates a new workspace specified by the directory, file name, and connection properties.
Method GetClassID The class ID of the WorkspaceFactory.
Method GetWorkspaceName Retrieves the workspace name of a workspace from the given list of file names.
Method IsWorkspace True if the specified file identifies a workspace supported by the workspace factory.
Method Move Moves a workspace to the specified destination folder.
Method Open Opens the workspace specified by the connection properties.
Method OpenFromFile Opens the workspace specified by the given file name.
Method ReadConnectionPropertiesFromFile The connection properties from the specified file.
Read-only property WorkspaceDescription A singular or plural description of the type of workspace the workspace factory opens/creates.
Read-only property WorkspaceType The type of workspace the workspace factory opens/creates.

Classes that implement IWorkspaceFactory

Classes Description
AccessWorkspaceFactory (esriDataSourcesGDB) Esri Access Workspace Factory.
AMSWorkspaceFactory (esriTrackingAnalyst) Controls functionality for the tracking workspace factory.
ArcInfoWorkspaceFactory (esriDataSourcesFile) Workspace factory used to create workspace objects for ArcInfo coverages and Info tables.
CadWorkspaceFactory (esriDataSourcesFile) Esri Cad Workspace Factory.
ExcelWorkspaceFactory (esriDataSourcesOleDB) Excel Workspace Factory.
FeatureServiceWorkspaceFactory (esriCarto) FeatureService workspace factory.
FileGDBWorkspaceFactory (esriDataSourcesGDB) File GeoDatabase Workspace Factory.
GeoRSSWorkspaceFactory (esriDataSourcesFile) GeoRSS workspace factory.
IMSWorkspaceFactory (esriGISClient) The IMS Workspace Factory.
InMemoryWorkspaceFactory (esriDataSourcesGDB)
LasDatasetWorkspaceFactory (esriGeoDatabaseExtensions) Esri LasDataset workspace-factory component.
NetCDFWorkspaceFactory (esriDataSourcesNetCDF) Provides access to members that control creation of NetCDF workspaces.
OLEDBWorkspaceFactory (esriDataSourcesOleDB) OleDB Workspace Factory.
PCCoverageWorkspaceFactory (esriDataSourcesFile) Esri PC ARC/INFO Workspace Factory.
PlugInWorkspaceFactory Esri Plug-In Workspace Factory.
RasterWorkspaceFactory (esriDataSourcesRaster) Provides access to members that control creation of raster workspaces.
SDCWorkspaceFactory (esriDataSourcesFile) Esri SDC workspace factory.
SdeWorkspaceFactory (esriDataSourcesGDB) Esri SDE Workspace Factory.
ShapefileWorkspaceFactory (esriDataSourcesFile) Esri Shapefile Workspace Factory.
SqlWorkspaceFactory (esriDataSourcesGDB) Sql workspace factory
StreetMapWorkspaceFactory (esriDataSourcesFile) Esri StreetMap workspace factory.
TextFileWorkspaceFactory (esriDataSourcesOleDB) Text File Workspace Factory.
TinWorkspaceFactory (esriDataSourcesFile) Esri TIN workspace factory is used to access TINs on disk.
ToolboxWorkspaceFactory (esriGeoprocessing) Workspace Factory used to open toolbox workspaces.
VpfWorkspaceFactory (esriDataSourcesFile) Esri VPF Workspace Factory
WorkspaceFactory WorkspaceFactory Object.


A WorkspaceFactory is a dispenser of workspaces and allows a client to connect to a workspace specified by a set of connection properties. A workspace represents a database or a datasource that contains one or more datasets. Examples of datasets include tables, feature classes and relationship classes. A WorkspaceFactory is a cocreatable, singleton object. Connection properties are specified using a PropertySet object and can be saved to a connection file. A WorkspaceFactory also supports methods that can be used to browse and manage file system workspaces, and methods to manage connection files for remote database workspaces.

Each workspace factory maintains a pool of currently connected, active workspaces that are referenced by the application. When any of the Open* methods is called, the workspace factory first checks to see if a workspace has previously been opened with a matching set of properties. If so, a reference to the existing instance is returned. In the case of ArcSDE workspaces, when an application connects to a workspace but omits some connection properties (such as username, password, or version), the workspace factory will check a set of "core" properties - SERVER, INSTANCE, and AUTHENTICATION_MODE - to see they match any open workspaces. If so, the workspace factory will return a reference to the matching workspace.

.NET Samples

Closest facility solver Mosaic raster datasets to a file raster format Create a Function Raster dataset Create a Math Function Raster dataset Create a Mosaic dataset Create a Raster Function template Create a custom NoData pixel filter Create a custom raster function Create a custom raster function Create a custom raster type Create a custom raster type from the ground up for DMCII data Create a custom raster type from the ground up for DMCII data Buffer snap agent Cut polygons without selection edit task Edit event listener Managing snap agents Custom reshape polyline edit task Editing using a custom form Custom vertex editing commands Get and set key properties on a mosaic dataset 3D dynamic element tracking Publish an image service and set configurations Location-allocation solver Create an NDVI custom raster function Create an NDVI custom raster function Origin-destination cost matrix solver Extending the replication synchronization process Route layer RSS weather GraphicTracker RSS weather layer RSS weather layer Service area solver Simple point plug-in data source Adding a real-time feed to ArcMap Temporal statistics Temporal statistics Vehicle routing problem solver