Interface IRelateInfo

Namespace
ESRI.ArcGIS.Carto
Assembly
ESRI.Server.Carto.dll

Provides access to members that describe a relate.

[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("D44CFDBD-E724-4EF9-92AE-873C8ACD18C6")]
public interface IRelateInfo

Remarks

If a layer or a standalonetable participates in a relationship, MapServer advertises that by populating those information as RelateInfo.

When there are more than one relationships exist between the same source and destination table(s) or layer(s), RelationshipID can be used to uniquely identify a relationship.

[C#]

Example: Printing a list of all relates a layer or standalonetable is participating


Assuming pMTI is a MapTabeInfo passed in to this function

IRelateInfos pRIs = null;
IRelateInfo pRI = null;

pRIs = pMTI.RelateInfos;

if (pRIs == null)
{
  Console.WriteLine(“No relationship is available”); 
  return;
}



for (int j = 0; j < pRIs.Count; j++)
{
  pRI = pRIs.get_Element(j);
  Console.WriteLine(pRI.Name + “, " + pRI.RelationshipID + “, ” + pRI.RelatedTableID + “\n”);
}




Properties

Name

The name of the relationship to a table.

string Name { get; }

Property Value

string

Remarks

For Geodatabase relationship class, the name is either the backward or forward label.

For relationship that is created in map, the name is same the table/layer it is related to.

RelatedTableID

ID of the table related to.

int RelatedTableID { get; }

Property Value

int

RelationshipID

Identifies the specific relationship for a related table.

int RelationshipID { get; }

Property Value

int