Change the auto-create and update annotation when linked feature's geometry changes


When new feature linked annotation classes are created in a geodatabase, you have the option to choose if new annotation features are automatically created when new features in the linked feature class are created, and whether annotation features should be modified in response to changes in their linked feature's geometry. Once the annotation class has been created, you may want to turn these behaviors on and off for different editing scenarios. This example demonstrates how implementing the ICommand interface allows you to alter the annotation class extension properties for a particular annotation class in ArcCatalog.

How to use:
  1. View the source code to see how the component was implemented.
  2. In ArcCatalog, browse and select the UpdateAGeomP.dll using the 'Add From File' button on the Customize dialog.
  3. From the 'Developer Samples' commands category, add the Update annotation proerties command to a toolbar.
  4. In the ArcCatalog tree, browse to and select an annotation class in a geodatabase.
  5. Click the Update annotation proerties command and check those properties you want the annotation class the have.
  6. Click OK to update the properties and close the dialog.


Difficulty: Intermediate

Visual Basic
File Description
UpdateAGeomP.vbp Visual Basic project that implements this sample.
AUpdateP.cls VB class file containing the ICommand implementation.
AnnoProps.frm VB form for setting the properties.
UpdateAGeomP.dll The compiled project.

Key Interfaces: IAnnoClass, IAnnoClassAdmin2, ISchemaLock