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


ISymbolCollection2 Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Display > ESRI.ArcGIS.Display > Interfaces > IS > ISymbolCollection2 Interface
ArcGIS Developer Help

ISymbolCollection2 Interface

Provides access to members that control a collection of symbols and id pairs.

Product Availability

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

Members

Name Description
Method AddSymbol Adds a symbol to the collection. The ID will be set by the collection.
Read-only property Count The number of symbols in the collection.
Method GetSymbolIdentifier Returns the symbol with the given ID.
Method Next Returns the next symbolID-symbol pair in the collection.
Method Remove Removes the symbolID-symbol pair in the collection.
Method RemoveAll Removes all the symbolID-symbol pairs in the collection.
Method RenameSymbol Renames the symbol with the given ID.
Method Replace Replaces the symbol associated with the symbolID.
Method Reset Prepares the collection for Next to be called.
Read/write property Symbol The symbol associated with the symbolID.

Classes that implement ISymbolCollection2

Classes Description
SymbolCollection Collection of symbols and id pairs.

Remarks

ISymbolCollection provides access to the members of the symbol collection.  This interface is most commonly used to maintain the symbol collection of an AnnotationFeatureClassExtension.  Care should be taken when modifying symbols in the collection of an AnnotationFeatureClassExtension.  Updating a TextSymbol property for an existing symbol in use that results in a change in the size or shape of a TextElement will result in a disconnect between the drawn symbol and the feature geometry.  This can be resolved by updating the out of sync features by calling IFeature::Store, but it is generally recommended that only new symbols should be added.  ISymbolCollection2 provides new methods for adding new symbols to the collection and guaranteeing unique symbol IDs.  It is recommended that developers use ISymbolCollection2::AddSymbol method to add symbols to the symbol collection.  A SymbolCollection must have at least one symbol and the default symbol for any Annotation Class cannot be deleted.