Relationship collections can be retrieved at the Automation level and the COM level.
To retrieve a collection of relationships using Automation interfaces
For example, the following Microsoft® Visual Basic® code retrieves a collection of bug discoveries (a relationship collection) belonging to a particular person into the variable called DiscoveryCollection.
DIM DiscoveryCollection As IRelationshipCol
DIM Person As RepositoryObject
...Retrieve the source object into the Person variable...
Set DiscoveryCollection = Person.bugs
In this example, DiscoveryCollection(1) would refer to the first relationship in the collection.
To retrieve a collection of relationships using COM interfaces
The Invoke method will pass an IDispatch interface pointer for the collection back to you.