Change feature-linked annotation expression


Once a feature-linked annotation class has been created, there is no way to change the label expression used to generate annotation elements. This commands allows the user to change the label expression and optionally reprocess all existing annotation features, reapplying the new annotation expression.

How to use:
  1. View the source code to see how the component was implemented.
  2. In ArcCatalog or ArcMap, browse and select the AnnoUtil.dll using the 'Add From File' button on the Customize dialog.
  3. From the 'Developer Samples' commands category, add the "Change Annotation Expression" command to a toolbar.
  4. Select an feature-linked annotation class in a geodatabase.
  5. Click the "Change Annotation Expression" command and change the expression.
  6. Check if you want to ripple through existing annotation features, reapplying the new expression
  7. Click OK to update the annotation expression and optionally update the annotation features


Difficulty: Intermediate

Visual Basic
File Description
AnnoUtil.vbp Visual Basic project that implements this sample.
ChangeAnnoExpression.cls VB class file containing the ICommand implementation.
frmChangeAnnoExpression.frm VB form for setting the expression.
AnnoUtil.dll The compiled project.

Key Interfaces: IAnnoClassAdmin, IAnnotateLayerProperties, IAnnotateLayerPropertiesCollection, IAnnotationExpressionEngine, IAnnotationExpressionParser, ILabelEngineLayerProperties