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


IWorkspaceDomains Interface (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (GeoDatabase)  

IWorkspaceDomains Interface

Provides access to members that return information about domains and allows you to add or delete domains. Note: the IWorkspaceDomains interface has been superseded byIWorkspaceDomains2. Please consider using the more recent version.

Product Availability

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

Members

Description
Method AddDomain Adds the given domain to the workspace.
Read-only property CanDeleteDomain Indicates if the user can delete the domain.
Method DeleteDomain Deletes the given domain from the workspace.
Read-only property DomainByName The domain with the given name from the workspace.
Read-only property Domains All the domains in the workspace.
Read-only property DomainsByFieldType The domain with the given name from the workspace.

CoClasses that implement IWorkspaceDomains

CoClasses and Classes Description
Sde4Workspace (esriDataSourcesGDB) Esri SDE (4.x) Feature Database.
VersionedWorkspace VersionedWorkspace Object.
Workspace Workspace Object.

Remarks

The IWorkspaceDomains interface is used for managing the collection of domains found within a workspace. Domains may be shared between fields in different object classes, thus they are managed (that is, created, deleted and modified) at the workspace level. It is important to keep in mind that a domain may not be deleted from a workspace if any field in an object class currently uses it. Domain names are also unique across a workspace; if you attempt to add a domain to a workspace and the specified name is already associated with an existing domain, an error will be returned.

Three of the four properties on the IWorkspaceDomain interface are used for returning to the user the domains that are currently associated with the workspace. The user can either request all of the domains (Domains), a particular domain by name (DomainByName), or all the domains that may be associated with a given field type (DomainsByFieldType).

.NET Related Topics

Assigning domains to fields | Creating and modifying domains | Creating subtypes