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


IEnumAnnotationConstructor Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Editor > ESRI.ArcGIS.Editor > Interfaces > IE > IEnumAnnotationConstructor Interface
ArcGIS Developer Help

IEnumAnnotationConstructor Interface

Provides access to members that control the annotation constructors.

Product Availability

Available with ArcGIS Desktop.

Members

Name Description
Method Next The next constructor in the enumeration.
Method Reset Resets the enumerator such that a subsequent next returns the first constructor.

Classes that implement IEnumAnnotationConstructor

Classes Description

Remarks

Use IEnumAnnotationConstructor to cycle through each AnnotationConstructor registered in the 'ESRI Annotation Constructors' component category.

[C#]
/// Use the sample code below to set the current annotation constructor. 
/// The method takes a string representing the annotation constructor name as input. 
/// 
public void SetAnnotationConstructorText(String constructorName)
{
    UID editorUid = new UIDClass();
    editorUid.Value = "esriEditor.Editor";
    IEditor editor = m_application.FindExtensionByCLSID(editorUid) as IEditor;
    UID annotationId = new UIDClass();
    annotationId.Value = "esriEditor.AnnotationEditExtension";
    IAnnotationEditExtension annotationExtension = editor.FindExtension(annotationId) as IAnnotationEditExtension;
    
    IEnumAnnotationConstructor enumConstructor = annotationExtension.AnnotationConstructors;
    enumConstructor.Reset();
    IAnnotationConstructor currentConstructor = enumConstructor.Next();
    while(currentConstructor != null)
    {
        if (currentConstructor.Name == constructorName)
        {
            annotationExtension.CurrentConstructor = currentConstructor;
            return;
        }
        currentConstructor = enumConstructor.Next();
    }
} 


 

See Also

IAnnotationConstructor Interface