how to use IRelClassEnumRowPairs

11-09-2019 07:10 PM
New Contributor II

I tried to find a use example about IRelClassEnumRowPairs, but could not find any example online. Based on the interface information about IRelClassEnumRowPairs, I wrote the code below. 

Dim pEnumRowPairs As IRelClassEnumRowPairs

//Assuming pVSet has already been populated
pEnumRowPairs = pRelClass.GetObjectsMatchingObjectSet(pVSet) 

Dim sourceRow As RowClass = New ESRI.ArcGIS.Geodatabase.Row
Dim targetRow As RowClass = New ESRI.ArcGIS.Geodatabase.Row

pEnumRowPairs.Next(sourceRow, targetRow)

However, it throws COMException on the last call. Could anyone provide an example here on how to loop through and retrieve data from IRelClassEnumRowPairs.

0 Kudos
0 Replies