IMapTableInfo.RelateInfos Property (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Carto)  

IMapTableInfo.RelateInfos Property

Array of relates associated to the table.

[Visual Basic .NET]
Public ReadOnly Property RelateInfos As IRelateInfos
public IRelateInfos RelateInfos {get;}
HRESULT get_RelateInfos(
  IRelateInfos** RelateInfo

Parameters RelateInfo [out, retval]
RelateInfo is a parameter of type IRelateInfos**

Product Availability

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


In order for MapServer to advertise a relationship, both source and destination layer/standalone table must be added to the source map document. For example, Layer A is related to Table B in the GeoDatabase; Layer A is added to the map while Table B is not, in this scenario, MapServer will not publicize this relationship and therefore QueryRelatedRows function cannot be used to get related row(s) for feature from Layer A.


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

IRelateInfos pRIs=null;
IRelateInfo pRI=null;


if (pRIs == null)
    Console.WriteLine("No relationship is available"); 

for (int j=0; j < pRIs.Count; j++)
    Console.WriteLine(pRI.Name + ", " + pRI.RelationshipID + ", " + pRI.RelatedTableID);

See Also

IMapTableInfo Interface