[CONNECT C++] ElementAgenda, IElementSet

ElementAgenda.BuildFromElementSet (IElementSetP elementSet, ModifyElementSource source) accepts an IElementSet.

The documentation for IElementSet reveals only ways to enumerate its contents, not ways to built the set.  How does one create an ElementSet?  IElementSet and ElementAgenda appear to serve the same purpose: what are the pros and cons of one over the other?

Parents
  • > IElementSet and ElementAgenda appear to serve the same purpose

    They don't.
    ElementAgenda gives you EditElementHandles; IElementSet gives you ElementHandles.
    IElementSet is purposely opaque (user need neither know nor care how the elements are supplied); ElementAgenda is not.
    In fact ElementAgenda's *iterator* is an implementation of IElementSet.
    You build an IElementSet by implementing the interface on some collection of element(s).

    Answer Verified By: Jon Summers 

Reply
  • > IElementSet and ElementAgenda appear to serve the same purpose

    They don't.
    ElementAgenda gives you EditElementHandles; IElementSet gives you ElementHandles.
    IElementSet is purposely opaque (user need neither know nor care how the elements are supplied); ElementAgenda is not.
    In fact ElementAgenda's *iterator* is an implementation of IElementSet.
    You build an IElementSet by implementing the interface on some collection of element(s).

    Answer Verified By: Jon Summers 

Children