i need to know by arcobjects which other layers/tables are related throught relationship classes or throught relates to an other.
For relationship classes there are no problems.
For relates, if I query the origin layer is ok, but if i query the destination layer, the relate has not shown.
Here a little code example:
IRelationshipClassCollection relClasses = lay as IRelationshipClassCollection;
IFeatureClass fc = ((IFeatureLayer)lay).FeatureClass;
IRelationshipClass relC = enumRelC.Next() as IRelationshipClass;
if (relC == null)
while (relC != null)
MessageBox.Show(relC.OriginClass.AliasName + " "+ relC.DestinationClass.AliasName);
relC = enumRelC.Next() as IRelationshipClass;
So, if the selected layer is the origin for relate, "OriginLay DestinationLay" has shown, if the selected is destination one, "NoRel" has shown instead.
Could you help me?