Lose the Features, Keep the Annotation Properties

974
2
04-04-2012 05:46 AM
Labels (1)
Suzanne-Boden
Esri Regular Contributor
0 2 974

Updated February 13, 2018

A previous post covered converting standard annotation to feature-linked annotation—to recap, it cannot be done directly. A recommended workflow when you have standard annotation that you wish were feature-linked is to create an empty feature-linked annotation class, then append the standard annotation features to it (using the Append Annotation Feature Classes tool).

Several readers have wondered, once you have feature-linked annotation in place, what happens when you need to replace the data linked to the annotation? No one wants to repeat the work of setting up annotation if they can avoid it. Can you change which feature class your feature-linked annotation is linked to?

The answer is no. Feature-linked annotation can be associated with only one feature class (the one specified when the feature-linked annotation was created). The feature-linked annotation and the feature class participate in a relationship class that you cannot alter.

Despite this, when you receive new data, there is a way to preserve the annotation.

Consider this scenario:

  • Every month, you receive updates to a geodatabase feature class in shapefile format. Each month, features have been deleted, there are new features to be added, and remaining features have changes. Replacing the data would be faster than editing the existing feature class. However, the feature class has linked annotation.


A reader shared a solution for this situation: delete the existing features from the feature class (thus creating an empty feature class), then append the new features to repopulate the feature class. This solution works and it's a good one when you have data that changes a lot and doesn't participate in table joins or relationships (besides feature-linked annotation). This method is not advisable in all situations. Before deleting features, check your workflows to make sure there are no unintended impacts.

Depending on how extensive the data changes are, you can replace all features or just a selected set. Below are the steps to do this using ArcMap.

  • Of course, before deleting any data, it's always wise to make a backup copy first. For example, you could create a file geodatabase in an archive workspace and copy the feature class and feature-linked annotation class to it before performing the steps below. To create or edit a feature class that has feature-linked annotation, you need an Standard or Advanced license of ArcGIS Desktop.

Delete Existing Features

  1. In ArcMap, open a blank map document and add the feature class that needs to be updated and its feature-linked annotation to the Table of Contents. Start an edit session.
  2. Select the features you want to delete. You can build a query expression to select a subset or, to delete all features, right-click the feature class layer and click Selection > Select All.
  3. Click the Delete button, then save your edits. Stop the edit session.
  4. Open the attribute table for the feature-linked annotation and note that its features have been deleted as well.

Append Replacement Features

  1. Add the dataset that contains the new data to the map document.
    • The Append tool accepts map layers, shapefiles, and geodatabase feature classes (and other data types) as input. You can use its optional Schema Type and Field Map parameters to control how attributes are treated.
  2. In the Catalog window, expand Toolboxes > System Toolboxes > Data Management Tools > General (or just use the Search window to search for "append").
  3. Double-click the Append tool to open its dialog box.
  4. For Input Dataset, click the drop-down arrow and choose the layer that stores the new data.
  5. For Target Dataset, choose the existing feature class, then click OK to run the tool.
  6. After the Append tool finishes running, open the attribute tables for the updated feature class and the annotation. Note that the features were added and new annotation features were created for them.
  7. Review the features and annotation on the map and reposition individual annotations as needed, based on the new feature locations and shapes.


So there you have it: an easy way to mass-update data and associated feature-linked annotation. Thanks to reader Pedonkus for sharing this solution.

If you regularly receive new data to replace current data that has feature-linked annotation, you can automate this process using a Python script. The ArcPy site package includes the UpdateCursor function (can use to delete existing features). The Append tool help topic includes example Python code.


Related Post: ArcGIS Annotation: Woes and Woohoos

2 Comments
About the Author
Suzanne is a Maryland native who enjoys writing about Esri technology and other topics. She is the Training Marketing Manager with Esri Training Services in Redlands, California.