English

How To: Re-link previously feature-linked annotation

Summary

A feature-linked annotation feature class is linked to its parent feature class by a composite relationship class. Even though it is not possible to create feature-linked annotation from standard annotation, it is possible to recreate feature-linked annotation if feature classes become corrupt and need to be recreated, or if the relationship class is lost.

Instructions provided describe how to re-link feature-linked annotation to its parent feature class. This is only possible if the annotation was originally feature-linked.

Procedure

Follow the steps below:

  1. Start ArcMap. Add the feature class and annotation feature class that is to be re-linked.
  2. Right-click on the feature class, select Open Attribute Table and add a new Double field called oldoid.
    [O-Image] Adding the oldoid double field
  3. Right-click on the new oldoid field, select calculate values (field calculator in ArcGIS 10) and calculate the oldoid field equal to the original OBJECTID field.
    [O-Image] Calculate the oldoid to the ObjectID
  4. Right-click on the annotation feature class, select Open Attribute Table, and add a new Double field called oldfid.
    [O-Image] Adding the oldfid double field
  5. Right-click on the new oldfid field, select calculate values (field calculator in ArcGIS 10), and calculate the oldfid field equal to the original FeatureID field.
    [O-Image] Calculate the oldfid field to the original FeatureID field
  6. Save the MXD and close ArcMap.
  7. Start ArcCatalog.

    Create a new empty feature class in the geodatabase by right-clicking in the empty space in the geodatabase > New > Feature Class.
    [O-Image] Create a new Feature Class
  8. In 9.2 and up

    Name the feature class and set the type to be the geometry to the feature class being used.

    Select Next > Import > Import the spatial reference from the original annotation feature class.

    Prior to 9.2

    Name the feature class and set the type to 'This Feature Class will Store ESRI Simple Features'.

    Select Next > Default > Next to get to the dialog box that has Field Name and Data Type listings.
  9. In 9.2 and up

    Accept the default XY Tolerance > Next > Next > Import the fields from the original features class.

    A. Select the Import button located at the bottom right of the dialog box.

    B. In the Browse for Table/Feature Class dialog box, navigate to the original feature class, highlight it, and click Add.

    Skip to step 12.

    Prior to 9.2

    Import the fields and spatial information from the original feature class:

    A. Select the Import button located at the bottom right of the dialog box.
    [O-Image] Import button for new feature classes
    B. In the Browse for Table/Feature Class dialog box, navigate to the original feature class, highlight it, and click Add.
  10. Prior to 9.2

    Define the geometry type:

    A. Highlight Shape under the Field Name heading. The Field Properties is activated.

    B. Verify that geometry types match the original layer.
    [O-Image] Make sure the geometry of the layer matches
  11. Prior to 9.2

    Select the Spatial Reference Key (...). Import the Spatial Reference from the original feature class.
    [O-Image] Import spatial reference
    This displays the Spatial Reference Properties dialog box used to import the spatial reference from the original feature class. Press the import button. Navigate to the original feature class and select it.

    Optional: Increase the XY domain after importing the spatial domain from the original layer. This is important if adding additional features and annotation later.

    Click OK on the Spatial Reference Properties dialog box.

    Click Finish on the New Feature Class dialog box.
  12. Create a new, empty annotation feature class in the geodatabase by right-clicking in the empty space in the geodatabase > New > Feature Class.

    In 9.2 and up

    Name the feature class and set the type to 'Annotation Features'.

    Check the 'Link the annotation to the following feature class' box. Select the new empty feature class created in the steps above.

    Click Next > accept to default xy tolerance by clicking Next again.

    Prior to 9.2

    Name the feature class and set the type to 'This Feature Class will Store annotation features, dimension features, geometric network features, turn features, or custom objects'.

    Set the type of custom objects to 'ESRI Annotation Feature'.

    Check the 'Link the annotation to the following feature class' box. Select the new empty feature class created in the steps above.
    [O-Image] Setup for the new Annotatioan Feature Class
    Click Next.
  13. 9.2-10 and Prior to 9.2

    In the Reference Scale pane, specify a scale for your annotation. It is recommended to use the same scale as the original annotation feature class.
    [O-Image] enter the appropriate scale
    Specify the labeling engine used to create the labels that were converted into annotation. Select either the Standard Labeling Engine, available to ArcEditor and ArcInfo users, or the Maplex Labeling Engine, available to ArcInfo users.
    [O-Image] Choose the appropriate labeling engine.
    Select Next. Optionally set annotation properties (for example: text, color, etc.) or accept the defaults.

    Select Next and Next again.
  14. 9.2-10 and Prior to 9.2

    Import the fields from the original annotation feature class: select the Import button located at the bottom right of the dialog box.

    In the Browse for Table/Feature Class dialog box, navigate to the original annotation feature class, highlight it, and click Add.

    Click Finish. It is not necessary to define a spatial reference for the new annotation feature class, because it automatically pulls it from the feature class that it is linked to.
  15. Delete the relationship class that links the new feature classes with the new annotation feature class.
  16. Close ArcCatalog. Start ArcMap.

    Open the MXD document. Use the Add Data button to add the new empty feature classes and the new empty annotation feature class.
  17. Paste the original features into the new feature class.
    1. On the Editor Toolbar go to Editor > Start Editing; set the Task to Create New Feature and the Target to the Empty Feature Class. 

    2. Right-click on the original feature class > Selection > Select All.

    3. On the Taskbar, go to Edit > Copy. Go to Edit > Paste.

    [O-Image] Copy and pasting original features to the New Empty Feature Class
    Clear the selection by going to Selection > Clear Selected Features.

    Remove the original feature class from the MXD.
  18. Paste the original annotation features into the new annotation feature class.

    Clear the selection with Selection > Clear Selected Features.

    Remove the original annotation feature class from the MXD.
    1. On the Editor Toolbar, set the Task to Create New Feature and the Target to the Empty Feature-Linked Annotation Feature Class. 

    2. Right-click on the original feature-linked annotation feature class > Selection > Select All.

    3. On the Taskbar go to Edit > Copy > Paste.

    [O-Image] Copy and pasting original annotation to
  19. Right-click on the New Annotation Feature Class > Joins and Relates > Join.

    Join the oldfid field with the oldoid field in the new feature class.
    [O-Image] Joining the new Annotation Feature Class with the new Feature Class
  20. Right-click the new annotation feature class. Select Open Attribute Table.

    Right-click the FeatureID field. Click Calculate Values (Field Calculator in ArcGIS 10). Calculate the FeatureID field in the annotation feature class equal to the OBJECTID field of the feature class.
    [O-Image]  field calculator to calculate the featureID equal to the ObjectID
  21. On the editor toolbar, go to Editor > Save Edits, followed by Editor > Stop Editing.
  22. Right-click on the new Annotation Feature Class > Joins and Relates > Remove Joins > Remove All Joins.
  23. Save and close the MXD. Start ArcCatalog.
  24. Recreate the composite relationship class between the new feature class and the new annotation feature class.

    1. Right-click in the Personal Geodatabase that houses the new feature class and feature-linked annotation feature class > New > Relationship Class.

    2. Name the Relationship Class.

    3. Origin Table is the new feature class.

    4. Destination Table is the new feature-linked annotation feature class.

    5. Click Next.

    6. Select a Composite Relationship.

    7. Click Next.

    8. For 'Specify a Label for the relationship as it is Traversed from the Origin Table/Feature Class to the Destination Table/Feature Class', keep the default value that is going to be the new feature-linked annotation feature class.

    9. For 'Specify a Label for the relationship as it is Traversed from the Destination Table/Feature Class to the Origin Table/Feature Class', keep the default that is going to be the the new feature class.

    10. Select Forward (Origin to Destination).

    11. Click Next.

    12. Select 1 - M (one to many).

    13. Click Next.

    14. Select 'No, I do not want to add attributes to this relationship class'.

    15. For 'Select a Primary Key Field in the Origin Table/Feature Class', select OBJECTID.

    16. For 'Select the Foreign Key Field in the Destination Table/ Feature class that refers to the primary key field in the origin table/ feature class', Select FeatureID.

    16. Click Next.

    17. Click Finish.