Provides access to members that create and open workspaces and supply workspace factory information.
Note: the IWorkspaceFactory interface has been superseded byIWorkspaceFactory2 . 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.
Members
All
Properties
Methods
Description
ContainsWorkspace
Indicates if parentDirectory contains a valid workspace, or is a valid file-system workspace.
Copy
Copies a workspace to the specified destination folder.
Create
Creates a new workspace specified by the directory, file name, and connection properties.
GetClassID
The class ID of the WorkspaceFactory.
GetWorkspaceName
Retrieves the workspace name of a workspace from the given list of file names.
IsWorkspace
True if the specified file identifies a workspace supported by the workspace factory.
Move
Moves a workspace to the specified destination folder.
Open
Opens the workspace specified by the connection properties.
OpenFromFile
Opens the workspace specified by the given file name.
ReadConnectionPropertiesFromFile
The connection properties from the specified file.
WorkspaceDescription
A singular or plural description of the type of workspace the workspace factory opens/creates.
WorkspaceType
The type of workspace the workspace factory opens/creates.
CoClasses that implement IWorkspaceFactory
Remarks
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 Snippets
Get FeatureClass From Shapefile On Disk |
Create Grid From Feature Class |
Add Shapefile Using OpenFileDialog |
Add Tracking Layer To Map |
Open Raster File As GeoDatset |
Set Data Source |
.NET Samples
3D dynamic element tracking (Code Files:
TrackDynamicObject ) |
Add a custom menu created in .NET to ArcGIS Desktop (Code Files:
AddShapefile ) |
Adding a real-time feed to ArcMap (Code Files:
AddTrackingServerLayerButton ) |
ArcGIS GPConsole (Code Files:
Program ) |
Automate ArcGIS Desktop applications (Code Files:
Form1 ) |
Buffer snap agent (Code Files:
EditingForm ) |
Closest facility solver (Code Files:
frmClosestFacilitySolver ) |
Create a custom NoData pixel filter (Code Files:
TestApp ) |
Create a custom raster function (Code Files:
TestWatermarkFunction WatermarkFunction ) |
Create a custom raster type (Code Files:
TestThumbnailBuilder ) |
Create a Function Raster dataset (Code Files:
CreateFunctionRasterDataset ) |
Create a Mosaic dataset (Code Files:
CreateMosaicDataset ) |
Create a Raster Function template (Code Files:
CreateRasterFunctionTemplate ) |
Custom reshape polyline edit task (Code Files:
EditingForm ) |
Custom vertex editing commands (Code Files:
EditingForm ) |
Cut polygons without selection edit task (Code Files:
EditingForm ) |
Displaying MOLE symbology with the GlobeControl (Code Files:
MainForm ) |
Edit event listener (Code Files:
EditingForm ) |
Editing using a custom form (Code Files:
MainForm ) |
Extending the replication synchronization process (Code Files:
RegisterExtension ) |
Location-allocation solver (Code Files:
frmLocationAllocationSolver ) |
Managing snap agents (Code Files:
EditingForm ) |
Mosaic raster datasets to a file raster format (Code Files:
CreateFileRasterMosaic ) |
Origin-destination cost matrix solver (Code Files:
frmODCostMatrixSolver ) |
Publish an image service and set configurations (Code Files:
ISConfig ) |
Route layer (Code Files:
Program ) |
RSS weather GraphicTracker (Code Files:
RSSWeather ) |
RSS weather layer (Code Files:
AddWeatherItemTool RSSWeatherLayerClass ) |
Service area solver (Code Files:
frmServiceAreaSolver ) |
Simple point plug-in data source (Code Files:
OpenSimplePointDlg ) |
Temporal statistics (Code Files:
MainForm ) |
Vehicle routing problem solver (Code Files:
frmVRPSolver ) |
.NET Related Topics
Accessing ECWP service |
Accessing raster workspaces |
Adding a custom menu created in .NET to ArcGIS Desktop |
Adding a plug-in data source programmatically |
Automating the ArcGIS Desktop applications |
Connecting to a geodatabase |
Converting data using GeoAnalyst objects |
Creating geodatabases |
Data processing in spatial analysis operations |
DataSourcesGDB |
DataSourcesOleDB |
DataSourcesRaster |
DefenseSolutions |
Executing a map algebra expression |
Geodatabase |
How to access a raster dataset |
How to access members that control the CAD drawing dataset |
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 convert coordinate arrays |
How to create a 3D pie graph |
How to create a box plot graph |
How to create a function series graph |
How to create a histogram graph |
How to create a Mosaic dataset |
How to create a mosaic layer |
How to create a multimodal network dataset |
How to create a network dataset |
How to create a raster dataset |
How to create a selection set using a scatter plot graph |
How to create a vertical stack area graph |
How to create an image server layer |
How to create graph series with different color types |
How to create multiple vertical bar graphs |
How to export a dataset to XML |
How to geocode a single address |
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 import a dataset from XML |
How to open a Mosaic dataset |
How to open a terrain dataset |
How to open locator workspaces |
How to rematch a geocoded feature class |
How to return CAD drawing layer properties |
How to return CAD transformation settings |
How to save a function raster dataset into a raster dataset |
How to save a mosaic dataset to a raster dataset |
How to save raster data and set storage properties |
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 |
Location |
LocationUI |
Performing a spatial analysis operation using objects |
Working with server contexts |
Working with SQL workspaces |
Working with the analysis environment |