Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have an M-N relationship class with attributes. I am listening to the IRelationshipClassEvents.OnCreate Event event to see if any new relations are created. How can I read these attributes from an IRelationship?

private void m_editEvents_OnCreateRelation(IRelationship rel)
{
    //how to get the attribute here?
}
share|improve this question
    
Did you try casting to IRow or IRowBuffer and looking at the values? –  Kirk Kuykendall Mar 21 '13 at 13:50
    
@KirkKuykendall - you are right..it gets me the attributes..if you can copy the comment to an answer, i will close it as an answer..thanks –  vinayan Mar 21 '13 at 14:03
add comment

1 Answer

up vote 2 down vote accepted

In addition to implementing the IRelationship interface, the attributedrelationship coclass also implements IRow and IRowBuffer. This means that you should be able to cast rel to one of these interfaces and access the attributes.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.