Feature-Linked Annotation Slide Tool


The 'Annotation Slide' tool is a sample that allows for the dynamic repositioning of feature-linked annotation along the related linear feature. For instance, the tool would allow me to drag street names along the streets that they label.

How to use:
  1. Browse and select the AnnoSlidePrj.dll using the 'Add From File' button on the customization dialog.
  2. From the 'Developer Samples' commands category, add the 'Anno Slide' command to the Editor toolbar.
  3. Start an edit session with at least one feature-linked annotation layer and the polyline layer it is related to.
  4. Use the 'Select Graphics' tool on the Draw toolbar to select a single piece of feature-linked annotation. Don't select the annotation with the Edit tool.
  5. Choose the Anno Slide tool and then click and hold the left button of the mouse over the selected piece of annotation. As you move the mouse (with the button depressed), the annotation will move along the related feature. Press the Shift key to flip the annotation. Release the mouse button to update the position of the annotation.


Requires: An Edit Session with a feature-linked annotation layer and the polyline layer it is related to.

Difficulty: Advanced

Visual Basic
File Description
AnnoSlide.cls Class file for performing annotation position update.
AnnoSlidePrj.vbp The project file for the sample Annotation Slide tool.
frmResources.frm The form containing graphics resources.
AnnoSlidePrj.dll The compiled project.

Key CoClasses: Map, Polyline, RelationshipClass, TextElement
Key Interfaces: IAnnotationElement, ICurve, IElement, IGraphicsContainer, IRelationshipClass, ITextElement
Key Members: IAnnotationElement::Feature, ICurve::GetSubcurve, IElement::QueryOutline, IGraphicsContainer::UpdateElement, IRelationshipClass::GetObjectsRelatedToObject, ITextElement::Symbol, ITextElement::Text