This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Editor > ESRI.ArcGIS.Editor > Classes > A > AnnotationEditExtension CoClass (ArcObjects .NET 10.4 SDK) |
An editor extension for creating and editing annotation features.
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 | 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 | Indicates whether a specific interface can return Automation error objects. |
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".
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;
}
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