ArcObjects Library Reference (GeoDatabase)  

IRelationshipClassContainer Interface

Provides access to members that create, add and hand out relationship classes.

Product Availability

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

Description

The IRelationshipClassContainer interface lets you create a relationship class within a feature dataset rather than a workspace.

When To Use

The IRelationshipClassContainer interface lets you create a relationship class within a feature dataset rather than a workspace. The AddRelationshipClass method is effectively superseded by IDatasetContainer::AddDataset.

Members

Description
Method AddRelationshipClass Transfers ownership of a relationship class to this container.
Method CreateRelationshipClass Creates a new relationship class in this container.
Read-only property RelationshipClasses An enumerator over the RelationshipClasses in this container.

CoClasses that implement IRelationshipClassContainer

CoClasses and Classes Description
FeatureDataset Esri Feature Dataset object.

Remarks

The AddRelationshipClass method is effectively superseded by IDatasetContainer::AddDataset. The IDatasetContainer interface lets you move datasets between feature datasets and workspacesóboth objects implement the interface.

[C#]


    public void MoveDataset(IFeatureDataset featureDataset, IDataset dataset, Boolean requiredStandAlone)
    {
        //This function moves a dataset (for example, a feature class or relationship class)
        //from a feature dataset to being standalone in a workspace, or vice versa.
        IDatasetContainer datasetContainer;
        if (requiredStandAlone)
        {
            datasetContainer = featureDataset.Workspace as IDatasetContainer;
        }
        else
        {
            datasetContainer = featureDataset as IDatasetContainer;
        }
        datasetContainer.AddDataset(dataset);
    }

See Also

IDatasetContainer Interface | IRelationshipClass Interface

.NET Related Topics

Creating relationship classes