ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Update Annotation Feature Class

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

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

  • 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.

Syntax

UpdateAnnotation(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.

  • POPULATE —Populates the value of each new field for every feature in the feature class.
  • DO_NOT_POPULATE —Do 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

# import system modules 
import arcpy
import os

# Set environment settings
# User input geodatabase location - eg. C:/data/anno83.mdb
arcpy.env.workspace = 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

  • Current Workspace

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics

  • An overview of the Feature Class toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2019 Esri. | Privacy | Legal