This document is archived and information here might be outdated.  Recommended version.


IElementCollection Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IE > IElementCollection Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Carto)  

IElementCollection Interface

Provides access to members that control the Graphics element collection. Note: the IElementCollection interface has been superseded byIElementCollection2. Please consider using the more recent version.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

The IElementCollection interface provides a tool for managing a collection of Graphic Elements.  It includes functionality to handle feature-linked elements, such as annotation.

 

Members

Name Description
Method Add Adds an element to the collection.
Method Clear Removes all the elements in the collection.
Read-only property Count Number of elements in the collection.
Method QueryItem Element at the given index.
Method Remove Remove an element from the collection.

CoClasses that implement IElementCollection

CoClasses and Classes Description
ElementCollection Collection of elements.

Remarks

Once the collection is created, elements can be added using the Add method and removed using the Remove method. Specific elements can be queried from the collection using the QueryItem method, while the entire collection can be iterated using the For Each...Next statement. The collection can be cleared of all elements using the Clear method. At anytime, the count of elements present in the collection is known using Count property.

.NET Samples

Subset network evaluators (Code Files: AutoUpdateNetworkElementArrayParametersCommand)