Summary
Converts a collection of coverage annotation features to geodatabase annotation. You can convert each level to individual annotation classes or merge them into a single class. Also, if you choose map layers as input, the level and font overrides will be honored.
Usage
The conversion requires an exclusive lock so it may not be opened by another application. Output written to a desktop, workgroup, or enterprise geodatabase will not be versioned.
You can link annotation features to features in a point, line, or polygon feature class. If converting annotation to a desktop, workgroup, or enterprise geodatabase, the link feature class must not be registered as versioned.
You can convert each coverage annotation level to individual annotation classes or merge them into a single class.
If you select coverage annotation features and/or use a definition query, only those features that are selected and visible will be converted.
You can create a selection set of coverage features and create a new layer from the selection. If you use that new layer as input to the conversion, only those features in the layer will be converted.
If you override the font symbol or color for coverage annotation features, those settings will be honored during the conversion. If you want to convert more than one annotation feature class using the symbol overrides that you applied to one layer, make sure that layer is the first input, and check the option to Match symbols from first input.
Choose a reference scale that is roughly equal to the scale at which the annotation will normally be displayed. You can think of the reference scale as "freezing" the symbol and text sizes to a particular map scale. When viewing the map, the symbol and text sizes change depending on the viewing scale. Symbols and text will appear larger as you zoom in (the current map scale is larger than the reference scale) and smaller when you zoom out (the current map scale is smaller than the reference scale).
Annotation that is feature-linked is associated with a specific feature in another feature class in the geodatabase. If checked, when you create the output annotation feature class, a relationship class will be automatically generated as well. This relationship class defines the relationship between the annotation and the features and enables you to define and customize this relationship. It will not establish the links between features and annotation. That will have to be done within the ArcMap Editor.
Syntax
arcpy.conversion.ImportCoverageAnnotation(input_features, output_featureclass, reference_scale, {use_levels}, {match_symbols_from_first_input}, {require_symbol_from_table}, {feature_linked}, {linked_feature_class}, {create_annotation_when_feature_added}, {update_annotation_when_feature_modified})
Parameter | Explanation | Data Type |
input_features [input_features,...] | The coverage annotation features that you want to convert to geodatabase annotation. If you choose a coverage annotation layer in ArcMap, the following properties of that layer will be honored during the conversion:
| Feature Layer |
output_featureclass | Browse into an existing geodatabase and type in the name of the new annotation feature class to create. | Feature Class |
reference_scale | Enter the scale to use as a reference for the annotation. This sets the scale to which all symbol and text sizes in the annotation will be based. | Double |
use_levels (Optional) | Specify whether all coverage annotation drawing levels will be converted to annotation classes within the feature class.
| Boolean |
match_symbols_from_first_input (Optional) | If you are converting coverage annotation from more than one coverage or annotation subclass and need to substitute the font properties for a symbol and apply them to all the input features, you can use this option.
| Boolean |
require_symbol_from_table (Optional) | Specify whether the output annotation features must reference a symbol stored in the symbol collection for the feature class.
| Boolean |
feature_linked (Optional) | Choose whether the output annotation feature class will be linked to the features in another feature class.
| Boolean |
linked_feature_class (Optional) | The feature class to which you are linking annotation features. This option is only available if you choose FEATURE_LINKED for the feature_linked parameter. | Feature Layer |
create_annotation_when_feature_added (Optional) | Specify whether new annotation will be generated when you add new features to the feature class to which this annotation feature class is linked. This option is only available if you choose FEATURE_LINKED for the feature_linked parameter and specify a value for the linked_feature_class parameter.
| Boolean |
update_annotation_when_feature_modified (Optional) | Specify whether the ArcMap Editor will automatically update the placement of annotation when you edit features in the feature class to which this annotation feature class is linked. This option is only available if you choose FEATURE_LINKED for the feature_linked parameter and specify a value for the linked_feature_class parameter.
| Boolean |
Code sample
ImportCoverageAnnotation Example (Python Window)
The following Python Window script demonstrates how to use the ImportCoverageAnnotation tool in immediate mode.
import arcpy
arcpy.env.workspace = "C:/data"
arcpy.ImportCoverageAnnotation_conversion("roads/annotation", "Ontario.gdb/roads_anno",
10000, "CLASSES_FROM_LEVELS", "NO_MATCH",
"NO_SYMBOL_REQUIRED", "STANDARD", "",
"AUTO_CREATE", "AUTO_UPDATE")
ImportCoverageAnnotation Example (stand-alone Python script)
The following stand-alone script demonstrates how to use the ImportCoverageAnnotation tool.
# Name: ImportCoverageAnnotation_Example.py
# Description: Create a geodatabase and import coverage annotation into it using the
# ImportCoverageAnnotation tool.
# import system modules
import arcpy, os
from arcpy import env
# Set environment settings - user specified
# User input coverage workspace - eg. C:/data
env.workspace = raw_input('Coverage workspace: ')
# User input Coverage name - eg. Roads
covName = raw_input('Coverage Name: ')
# Create file geodatabase based on coverage
fgdb = env.workspace + os.sep + covName + ".gdb"
arcpy.CreateFileGDB_management(os.path.dirname(fgdb), os.path.basename(fgdb))
# Set workspace to coverage
env.workspace = env.workspace + os.sep + covName
# Get all coverage annotation subclasses
covAnnos = arcpy.ListFeatureClasses("", "Annotation")
# Import each annotation subclass
for covAnno in covAnnos:
print "Importing Coverage annotation..."
# Set variables
outFeatureClass = fgdb + os.sep + covAnno.replace(".", "")
refScale = 10000
useLevels = "CLASSES_FROM_LEVELS"
matchSymbols = "NO_MATCH"
requireSymbol = "NO_SYMBOL_REQUIRED"
featLinked = "STANDARD"
linkedFeatClass = ""
autoCreate = "AUTO_CREATE"
autoUpdate = "AUTO_UPDATE"
try:
# Process: Import the coverage annotation
arcpy.ImportCoverageAnnotation_conversion(covAnno, outFeatureClass, refScale,
useLevels, matchSymbols, requireSymbol,
featLinked, linkedFeatClass, autoCreate,
autoUpdate)
except:
# If an error occurred while running a tool print the messages
print arcpy.GetMessages()
print "Import complete"
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes