Update Annotation Feature Class (Data Management)

Summary

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.

Usage

Syntax

UpdateAnnotation_management (in_features, {update_values})
ParameterExplanationData Type
in_features

Input annotation feature class to which new fields will be added.

Feature Layer
update_values
(Optional)

Populates the value of each new field for every feature in the feature class.

  • POPULATEPopulates the value of each new field for every feature in the feature class.
  • DO_NOT_POPULATEDo not populate a value for the fields.
Boolean

Code Sample

UpdateAnnotation Example (Python Window)

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")
UpdateAnnotation Example (Stand-alone python script)

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"

Environments

Related Topics

Licensing Information

ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes

10/27/2014