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


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

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.

CoClasses that implement IEnumAnnotationConstructor

CoClasses and 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