Append Annotation Feature Classes (Data Management)

Summary

Creates a geodatabase annotation feature class or appends to an existing annotation feature class by combining annotation from multiple input geodatabase annotation feature classes into a single feature class with annotation classes.

Usage

  • When appending multiple annotation feature classes into a new annotation feature class, the input annotation feature classes must reside in the same database.

  • If you select geodatabase annotation features in ArcGIS Pro or build a definition query, only those features will be appended to the output feature class.

  • When appending feature-linked annotation feature classes, all the input annotation feature classes must be linked to the same feature class.

  • If you select an existing output annotation feature class, the features will be appended to that feature class, and the tool will project the annotation features in the destination spatial reference.

  • When appending annotation feature classes with multiple annotation subclasses, the subclasses will be merged if their properties match.

  • This tool handles annotation feature classes with different schemas. If the annotation feature classes have the same schema, use the Append tool.

Parameters

LabelExplanationData Type
Input features

The input annotation features that will form an annotation class in the output feature class.

Feature Layer
Output feature class

A new or existing annotation feature class that will contain an annotation class for each input annotation feature class.

Feature Class
Reference scale

The reference scale set in the output feature class. Input features created at a different reference scale will be transformed to match this output reference scale.

Double
Create a single annotation class
(Optional)

Specifies how annotation features will be added to the output feature class.

  • Checked—All annotation features will be aggregated into one annotation class in the output feature class.
  • Unchecked—Separate annotation classes will be created for each input annotation class in the output feature class unless the classes are named the same and have the same properties. In this case, they will be merged. This is the default.
Boolean
Require symbols to be selected from the symbol table
(Optional)

Specifies how symbols can be selected for newly created annotation features.

  • Checked—Only the list of symbols in the symbol collection of the output feature class can be used when creating annotation features.
  • Unchecked—Any symbology can be used when creating annotation features. This is the default.
Boolean
Create annotation when new features are added (Feature-linked only)
(Optional)

Specifies whether feature-linked annotation will be created when a feature is added.

  • Checked—Feature-linked annotation will be created using the label engine when a linked feature is added. This is the default.
  • Unchecked—Feature-linked annotation will not be created when a feature is added.
Boolean
Update annotation when the shape of the linked feature is modified (Feature-linked only)
(Optional)

Specifies whether feature-linked annotation will be updated when a linked feature changes.

  • Checked—Feature-linked annotation will be updated using the label engine when a linked feature changes. This is the default.
  • Unchecked—Feature-linked annotation will not be updated when a linked feature changes.
Boolean

arcpy.management.AppendAnnotation(input_features, output_featureclass, reference_scale, {create_single_class}, {require_symbol_from_table}, {create_annotation_when_feature_added}, {update_annotation_when_feature_modified})
NameExplanationData Type
input_features
[input_features,...]

The input annotation features that will form an annotation class in the output feature class.

Feature Layer
output_featureclass

A new or existing annotation feature class that will contain an annotation class for each input annotation feature class.

Feature Class
reference_scale

The reference scale set in the output feature class. Input features created at a different reference scale will be transformed to match this output reference scale.

Double
create_single_class
(Optional)

Specifies how annotation features will be added to the output feature class.

  • ONE_CLASS_ONLYAll annotation features will be aggregated into one annotation class in the output feature class.
  • CREATE_CLASSESSeparate annotation classes will be created for each input annotation class in the output feature class unless the classes are named the same and have the same properties. In this case, they will be merged. This is the default.
Boolean
require_symbol_from_table
(Optional)

Specifies how symbols can be selected for newly created annotation features.

  • REQUIRE_SYMBOLOnly the list of symbols in the symbol collection of the output feature class can be used when creating annotation features.
  • NO_SYMBOL_REQUIREDAny symbology can be used when creating annotation features. This is the default.
Boolean
create_annotation_when_feature_added
(Optional)

Specifies whether feature-linked annotation will be created when a feature is added.

  • AUTO_CREATEFeature-linked annotation will be created using the label engine when a linked feature is added. The is the default.
  • NO_AUTO_CREATEFeature-linked annotation will not be created when a feature is added.
Boolean
update_annotation_when_feature_modified
(Optional)

Specifies whether feature-linked annotation will be updated when a linked feature changes.

  • AUTO_UPDATEFeature-linked annotation will be updated using the label engine when a linked feature changes. This is the default.
  • NO_AUTO_UPDATEFeature-linked annotation will not be updated when a linked feature changes.
Boolean

Code sample

AppendAnnotation example (Python window)

The following Python window script demonstrates how to use the AppendAnnotation function in immediate mode.

import arcpy
arcpy.env.workspace = "C:/data/Cobourg.gdb"
arcpy.management.AppendAnnotation(["highways", "roads"], "transport_anno", 1200, 
                                  "CREATE_CLASSES", "NO_SYMBOL_REQUIRED", 
                                  "AUTO_CREATE", "AUTO_UPDATE")
AppendAnnotation example (stand-alone script)

The following stand-alone script demonstrates how to use the AppendAnnotation function.

# Name: AppendAnnotation_Example.py
# Description: Use AppendAnnotation to append annotation feature classes in a 
#              geodatabase

# import system modules 
import arcpy
import os

# Set environment settings - user specified
# User input geodatabase for annotation location - eg. C:/data/roads.gdb
arcpy.env.workspace = input('Location of geodatabase annotation: ')

# Create list of annotation feature classes within the geodatabase
fcList = arcpy.ListFeatureClasses("", "ANNOTATION")

# Set variables
# User input output feature class name - eg. appendedroadsAnno
outFeatureClass = arcpy.env.workspace + os.sep + \
                  input('Output annotation feature class name: ')
refScale = 1200
createClasses = "CREATE_CLASSES"
symbolReq = "NO_SYMBOL_REQUIRED"
autoCreate = "AUTO_CREATE"
autoUpdate = "AUTO_UPDATE"

# Process: Append the annotation feature classes
print("Appending annotation feature classes...")
arcpy.management.AppendAnnotation(fcList, outFeatureClass, refScale, 
                                  createClasses, symbolReq, autoCreate, 
                                  autoUpdate)

print("Annotation feature classes in {} have been appended into {}".format(
    arcpy.env.workspace, outFeatureClass))

Related topics