Gets a value indicating whether a relationship class contains extra columns to store attribute information.

Namespace:  ESRI.ArcGISExplorer.Data

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public bool IsAttributed { get; }
Visual Basic (Declaration)
Public ReadOnly Property IsAttributed As Boolean

Field Value

trueTruetruetrue (True in Visual Basic) if this instance is attributed; otherwise, falseFalsefalsefalse (False in Visual Basic).

Remarks

An attributed relationship class has extra attributes that are maintained for each relationship. For example, in a relationship class between parcels and owners, the percentage of ownership that each particular owner has for a parcel could be stored as a relationship attribute.

The IsAttributed property will only return true if there are extra relationship attributes beyond those required to relate the objects. In the case of relationship classes with many-to-many cardinality, there will be a relationship table, but IsAttributed will return False, unless there are additional attributes.

Examples

The code below accesses two geodatabase relationship classes using the GetTableRelationship method then prints the TableRelationship properties for each, including the IsAttributed property.
CopyC#
//Example 1 - Open a geodatabase relationship class which has a one-to-many cardinality 
//and print out the TableRelationship properties.

//Open file geodatabase
Geodatabase scotlandGdb = new Geodatabase(@"C:\Data\Scotland.gdb");

//Open the mountains feature class
Table mountains = scotlandGdb.OpenTable("mountains");

//Open the MountainRatings geodatabase relationship class
TableRelationship mtnAndRatingsRel = scotlandGdb.OpenTableRelationship("MountainRatings");

//Print out properties describing the TableRelationship 
System.Diagnostics.Debug.Print(mtnAndRatingsRel.Name);                        //Prints "MountainRatings"
System.Diagnostics.Debug.Print(mtnAndRatingsRel.Type.ToString());             //Prints "Geodatabase"          
System.Diagnostics.Debug.Print(mtnAndRatingsRel.Cardinality.ToString());      //Prints "OneToMany"   
System.Diagnostics.Debug.Print(mtnAndRatingsRel.IsAttributed.ToString());     //Prints "False"  
System.Diagnostics.Debug.Print(mtnAndRatingsRel.OriginTable.Name);            //Prints "mountains"
System.Diagnostics.Debug.Print(mtnAndRatingsRel.OriginKeyColumnName);         //Prints "OBJECTID"
System.Diagnostics.Debug.Print(mtnAndRatingsRel.DestinationTable.Name);       //Prints "mtn_ratings"
System.Diagnostics.Debug.Print(mtnAndRatingsRel.OriginForeignKeyColumnName);  //Prints "MTN_ID"

//Example 2 - Open a geodatabase relationship class which has a many-to-many cardinality 
//and print out the TableRelationship properties.

//Open file geodatabase
Geodatabase propertiesGdb = new Geodatabase(@"C:\Data\Property.gdb");

//Open the Properties feature class
Table properties = propertiesGdb.OpenTable("Properties");

//Open the PropertyOwners geodatabase relationship class
TableRelationship propertyOwnersRel = propertiesGdb.OpenTableRelationship("PropertyOwners");

//Print out properties describing the TableRelationship 
System.Diagnostics.Debug.Print(propertyOwnersRel.Name);                           //Prints "PropertyOwners"
System.Diagnostics.Debug.Print(propertyOwnersRel.Type.ToString());                //Prints "Geodatabase"          
System.Diagnostics.Debug.Print(propertyOwnersRel.Cardinality.ToString());         //Prints "ManyToMany"   
System.Diagnostics.Debug.Print(propertyOwnersRel.IsAttributed.ToString());        //Prints "False"  
System.Diagnostics.Debug.Print(propertyOwnersRel.OriginTable.Name);               //Prints "Properties"
System.Diagnostics.Debug.Print(propertyOwnersRel.OriginKeyColumnName);            //Prints "PropertyID"
//Note that the OriginForeignKeyColumnName is in a geodatabase-managed "link" table
System.Diagnostics.Debug.Print(propertyOwnersRel.OriginForeignKeyColumnName);     //Prints "PropID"
System.Diagnostics.Debug.Print(propertyOwnersRel.DestinationTable.Name);          //Prints "Owners"
System.Diagnostics.Debug.Print(propertyOwnersRel.DestinationKeyColumnName);       //Prints "OwnerID"
//Note that the DestinationForeignKeyColumnName is a geodatabase-managed "link" table
System.Diagnostics.Debug.Print(propertyOwnersRel.DestinationForeignKeyColumnName);//Prints "OwnID"
CopyVB.NET
'Example 1 - Open a geodatabase relationship class which has a one-to-many cardinality 
'and print out the TableRelationship properties.


'Open file geodatabase
Dim scotlandGdb As Geodatabase = New Geodatabase("C:\Data\Scotland.gdb")

'Open the mountains feature class
Dim mountains As Table = scotlandGdb.OpenTable("mountains")

'Open the MountainRatings geodatabase relationship class
Dim mtnAndRatingsRel As TableRelationship = scotlandGdb.OpenTableRelationship("MountainRatings")

'Print out properties describing the TableRelationship 
System.Diagnostics.Debug.Print(mtnAndRatingsRel.Name)                        'Prints "MountainRatings"
System.Diagnostics.Debug.Print(mtnAndRatingsRel.Type.ToString())             'Prints "Geodatabase"          
System.Diagnostics.Debug.Print(mtnAndRatingsRel.Cardinality.ToString())      'Prints "OneToMany"   
System.Diagnostics.Debug.Print(mtnAndRatingsRel.IsAttributed.ToString())     'Prints "False"  
      System.Diagnostics.Debug.Print(mtnAndRatingsRel.OriginTable.Name)            'Prints "mountains"
System.Diagnostics.Debug.Print(mtnAndRatingsRel.OriginKeyColumnName)         'Prints "OBJECTID"
System.Diagnostics.Debug.Print(mtnAndRatingsRel.DestinationTable.Name)       'Prints "mtn_ratings"
System.Diagnostics.Debug.Print(mtnAndRatingsRel.OriginForeignKeyColumnName)  'Prints "MTN_ID"


'Example 2 - Open a geodatabase relationship class which has a many-to-many cardinality 
'and print out the TableRelationship properties.


'Open file geodatabase
Dim propertiesGdb As Geodatabase = New Geodatabase("C:\Data\Property.gdb")

'Open the Properties feature class
Dim properties As Table = propertiesGdb.OpenTable("Properties")

'Open the PropertyOwners geodatabase relationship class
Dim propertyOwnersRel As TableRelationship = propertiesGdb.OpenTableRelationship("PropertyOwners")

'Print out properties describing the TableRelationship 
System.Diagnostics.Debug.Print(propertyOwnersRel.Name)                           'Prints "PropertyOwners"
System.Diagnostics.Debug.Print(propertyOwnersRel.Type.ToString())                'Prints "Geodatabase"          
System.Diagnostics.Debug.Print(propertyOwnersRel.Cardinality.ToString())         'Prints "ManyToMany"   
System.Diagnostics.Debug.Print(propertyOwnersRel.IsAttributed.ToString())        'Prints "False"  
System.Diagnostics.Debug.Print(propertyOwnersRel.OriginTable.Name)               'Prints "Properties"
System.Diagnostics.Debug.Print(propertyOwnersRel.OriginKeyColumnName)            'Prints "PropertyID"
'Note that the OriginForeignKeyColumnName is in a geodatabase-managed "link" table
System.Diagnostics.Debug.Print(propertyOwnersRel.OriginForeignKeyColumnName)     'Prints "PropID"
System.Diagnostics.Debug.Print(propertyOwnersRel.DestinationTable.Name)          'Prints "Owners"
System.Diagnostics.Debug.Print(propertyOwnersRel.DestinationKeyColumnName)       'Prints "OwnerID"
'Note that the DestinationForeignKeyColumnName is a geodatabase-managed "link" table
System.Diagnostics.Debug.Print(propertyOwnersRel.DestinationForeignKeyColumnName) 'Prints "OwnID"

See Also