AutoAnnoSizing Extension


This Mx Extension will add an extra property page to the Data Frame. On this property page the user will have the opportunity to specify size factors to apply to the reference scales of annotation layers based on the current map scale. For instance, if i want my annotation to display twice as large when the map scale is greater than 4000, then i could enter a size factor of 2 with the scale of 4000 and the extension will dynamically update the ReferenceScale of my annotation layer so that the annotation draws with a larger font. Changes made to the ReferenceScale are for the duration of the current ArcMap session only and are not persisted in the database.

Changing the ReferenceScale dynamically will not affect the selection box for the annotation feature. When this extension is being used to alter the size of annotation, it is important to remember that selection of the annotation could be more difficult than normal (because the selection box will not match the size of the annotation when the ReferenceScale has been altered). Scaling of the annotation will be based on the justification for the individual features.

When you use this extension scale the ReferenceScale for the specified annotation layers will be altered for the duration of the current ArcMap session. Because of this, it is necessary to insure you select or un-select layers to participate from the Property Page only when the "Size Annotation by scale" option is off (not checked). Unchecking this option will reset the Reference Scale as long as you haven't selected or un-selected other layers while the option was on. Since the ReferenceScale updates apply only to the current ArcMap session, you can always quit ArcMap and restart to reset the ReferenceScales back to their original settings.

How to use:
  1. Run the _install.bat file in the AutoAnnoSizing directory. This will register the dll and put the class components (one extension and one property page) into the correct categories.
  2. Start ArcMap and load some annotation data.
  3. Double-Click on the Data Frame title (most likely "Layers") in the TOC to bring up the Data Frame Properties.
  4. Click on the Anno Sizing tab. Select the layers you want to scale. Specify the scale breaks and the size factors to use with each break. It is not necessary to fill in all the boxes, but you will need to add one more scaling factor then size factor. For instance, if you enter a scale of 1000 and size factors of 1 and 2, then the annotation will display at its normal size when the map scale is less than 1000 and twice the normal size when the map scale is greater than or equal to 1000. After entering your parameters, click on the Size Annotation by scale option.
  5. Be sure to uncheck the Size Annotation by scale option before turning layers on and off for scaling.


Difficulty: Advanced

Visual Basic
File Description
AtutoAnnoSizingPrj.vbp The Visual Basic project for this extension.
frmAutoAnnoSizing.frm Contains the controls for the property page.
AutoAnnoSizingExt.cls Class containing the code for the extension.
AutoAnnoSizingPP.cls Class containing the code for the Data Frame Property Page.

Key CoClasses: AnnotationFeatureClassExtension, Map
Key Interfaces: IAnnoClass, IAnnoClassAdmin, IMap
Key Members: IAnnoClass::ReferenceScale, IAnnoClassAdmin::ReferenceScale, IMap::AfterDraw