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


AnnotationEditExtension Class (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Editor > ESRI.ArcGIS.Editor > Classes > A > AnnotationEditExtension Class
ArcGIS Developer Help

AnnotationEditExtensionClass Class

An editor extension for creating and editing annotation features.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Extended Error Information

Use the ISupportErrorInfo method InterfaceSupportsErrorInfo to determine if the object supports extended error information. If the object supports extended error info, VC++ developers should use the OLE/COM IErrorInfo interface to access the ErrorInfo object. Visual Basic developers should use the global error object Err to retrieve this extended error information.

Interfaces

Interfaces Description
IAnnotationEditExtension Provides access to members that control annotation feature editing.
IEditEvents Provides access to editor events. Implement it to listen for specific events that occur during an edit session.
IEditEvents2 Provides access to more editor events. Implement it to listen for specific events that occur during an edit session.
IEditSketchExtension Provides access to members that extend the edit sketch.
IEditSketchExtension2 Provides access to members that extend the edit sketch.
IExtension (esriSystem) Provides access to members that define an extension.
ISupportErrorInfo (esriSystem)

Remarks

The AnnotationEditExtension is an editor extension to manage and create Geodatabase annotation features.  The primary interface IAnnotationEditExtension can be accessed using IEditor::FindExtension and the CLSID for "esriEditor.AnnotationEditExtension".

[C#]

The following C# code illustrates how to acquire a reference of type IAnnotationEditExtension to the AnnotationEditExtension object.

public void GetAnnotationEditExtensionByCLSID()
{
  //You can get app from ICommand :: OnCreate() hook parameter
  UID editorUid = new UIDClass();
  editorUid.Value = "esriEditor.Editor";
  IEditor editor = app.FindExtensionByCLSID(editorUid) as IEditor;

  UID extUid = new UIDClass();
  extUid.Value = "esriEditor.AnnotationEditExtension";
  IAnnotationEditExtension annoExt = editor.FindExtension(extUid) as IAnnotationEditExtension;
}
[Visual Basic .NET]

The following VBNet code illustrates how to acquire a reference of type IAnnotationEditExtension to the AnnotationEditExtension object.

  Public Sub GetAnnotationEditExtensionByCLSID()
    'You can get app from ICommand :: OnCreate() hook parameter
    Dim editorUid As UID = New UIDClass()
    editorUid.Value = "esriEditor.Editor"
    Dim editor As IEditor = TryCast(app.FindExtensionByCLSID(editorUid), IEditor)

    Dim extUid As UID = New UIDClass()
    extUid.Value = "esriEditor.AnnotationEditExtension"
    Dim annoExt As IAnnotationEditExtension = TryCast(editor.FindExtension(extUid), IAnnotationEditExtension)
  End Sub