Get IRelationshipClass from VersionDataChanges, IModifiedClassInfo - SOLVED

1803
0
02-08-2013 04:39 AM
ChrisKushnir
New Contributor III
I'm getting all edits in a version by using VersionDataChanges.
Once I create the VDC, I iterate through the results of VersionDataChanges.GetModifiedClassesInfo()
I then use the IModifiedClassInfo.ChildClassName to get all the changed ID's for the table.

What I want to do is be able to recognize when a IModifiedClassInfo.ChildClassName is for an attributed relationship table, and get an IRelationshipClass for it.

Right now I open the table, get an ITable, and check if the OIDFieldName == "RID" to tell me if it's an attributed relationship table.  Where I am stuck is getting from the ITable to an IRelationshipClass ... or instantiating an AttributedRelationshipClass object somehow to get the IRelationshipClass.

Any suggestions ?

cmk

[EDIT]
Sometimes it just takes putting the problem down on paper ...

IDataset ids  = TABLE as IDataset;
IFeatureWorkspace ifws = ids.Workspace as IFeatureWorkspace;
IRelationshipClass irc  = ifws.OpenRelationshipClass(ids.Name);

I was hoping to avoid another Open(), but it'll do.
[/EDIT]
0 Kudos
0 Replies