You can select the items of a collection by index, by sequence, by enumerator, or by name. If you get a collection for an origin object — that is, if you plan to move from an origin object to a destination object, all of these selection options are available. If you get a collection for a destination object — that is, if you plan to move from a destination object to an origin object, you have fewer selection options.
You can select collection items in the following ways:
COM: use the get_Item method of the IRelationshipCol interface or the ITargetObjectCol interface.
Automation: use the syntax collection(index), as for any Automation collection.
You can select by sequence only from a collection belonging to an origin object. You cannot select by sequence from a collection belonging to a destination object, because the Repository does not sequence collections belonging to destination objects.
For More Information Using Enumerators with the Repository
COM: use the get_Item method of the IRelationshipCol interface or the ITargetObjectCol interface.
Automation: use the syntax myCollection("name").
Note You cannot select by name from a collection belonging to a destination object, because the Repository does not support the naming of origin objects.
If the naming collection is not a unique-naming collection, and there are multiple items with the same name, the Repository will return the first item that it finds with the specified name.