Update Annotation Feature Class (Data Management)
Updates the input annotation feature class with text attribute fields and optionally populates the value of each new field for every feature in the feature class.
This tool can be run on a versioned feature class if the option to populate attribute fields is unchecked. The schema of the feature class will be updated in this case, but the new annotation fields will not be populated. Attribute values for a feature will remain blank until the feature is edited.
This tool will update the schema of the feature class and, optionally, each annotation feature within the feature class. The schema update will add fields to the feature class (bold, italic, text, and so on) and also ensure that there is a symbol within the symbol collection. Without a symbol in the symbol collection, you can't use the improvements for constructing annotation features.
Populating the attributes fields is an intensive operation that requires every feature to be updated. Turning off this option will add the fields, but not populate them. If the fields are not populated on update, they will remain blank until the feature is edited.
Input annotation feature class to which new fields will be added.
Populates the value of each new field for every feature in the feature class.
The following Python Window script demonstrates how to use the UpdateAnnotation tool in immediate mode.
import arcpy arcpy.env.workspace = "C:/data/Ontario.mdb" arcpy.UpdateAnnotation_management("ProvParks_anno", "POPULATE")
The following stand-alone script demonstrates how to use the UpdateAnnotation tool.
# Name: UpdateAnnotation_Example.py # Description: Use UpdateAnnotation to update ArcGIS 8.3 annotation feature classes # to ArcGIS 9.0 # Author: ESRI # import system modules import arcpy, os from arcpy import env # Set environment settings # User input geodatabase location - eg. C:/data/anno83.mdb env.workspace = raw_input('Annotation data location: ') # Create list of annotation feature classes within the geodatabase fcList = arcpy.ListFeatureClasses("", "ANNOTATION") # Loop through the feature classes and update for fc in fcList: try: # Process: Update the annotation feature classes print "Updating " + fc + "..." arcpy.UpdateAnnotation_management(fc, "POPULATE") except: # If an error occurred while running a tool print the messages print arcpy.GetMessages() print "Update of annotation feature classes in " + env.workspace + " complete"