Objects and Failure Effects are searchable within collections. The IDesign interface supports direct recasting into either an IObjectCollection, whereby any object can then be searched for, or to an IFailureEffectCollection, whereby design-level effects can be searched for.
Only certain types of objects can be recast into an IFailureEffectCollection, whereby a Failure Effect can be searched for. Failure Effects found within the object Failure Effect Collection represent Object-level Failure Effects, whereas the Failure Effects found within the Design Failure Effect Collection This is called Drill-Down. By the same token, parent interfaces are searchable by using the IExpressEntity.
An Object Collection can query for an IObject by name, index or ID
A Failure Effect Collection can query for an IFailureEffect by name, index or ID
Failure Effect Collections exist at both the Design and Object levels
Parent Searching
An Object's parent is the Design
A Failure Effects's parent is either a Design or an Object, depending on where it is found
Object Collections and Failure Effect Collections do not have parents
Short-Cuts for Smart Pointers
When using smart pointers, since Objects support direct recasting into Behavior, it is not necessary to first search for behavior prior to the cast. Instead, from an object collection, one can search for an object and receive the return pointer directly as an IFailureEffectCollection. If a COM Exception is not thrown, the object was found and successfully recast as an IFailureEffectCollection. This saves the extra step of attempting to find the object first, and then having to check again if it can be cast successfully.