Select to view content in your preferred language

Faster way to populate ISet and/or change IRelationship.GetObjectsRelatedToObjectSet

354
0
04-27-2016 11:07 AM
Status: Open
Labels (1)
PascalVezina
Frequent Contributor

When you try to use the function IRelationship.GetObjectsRelatedToObjectSet, you need to pass it an ISet as the input parameter. If the only data you have to work with is an ICursor or an ISelectionSet, you need to loop through all the records to transfer them into an ISet. This is painful and slow.
The IRelationship.GetObjectsRelatedToObjectSet should be able to use a ISelectionSet or and ICursor directly instead of populating an ISet or the other solution would be to set the ISet from an ISelectionSet or ICursor, then pass it to IRelationship.GetObjectsRelatedToObjectSet. 
There should be a better transfer method between ISelectionSet/ICursor and ISet.

Thanks,