Summary
A feature-linked annotation feature class is linked to its primary feature class by a composite relationship. 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 re-created, or if the relationship class is lost.
Instructions provided describe how to re-link feature-linked annotation to its primary feature class. This is only possible if the annotation was originally feature-linked.
Procedure
To re-link feature-linked annotation to its pprimary feature class, use the following workflow.
- In ArcMap, add the feature class and annotation feature class to be re-linked.
- In the feature class, add a new double field, and name it as oldid. Refer to Adding fields for steps to do this.
- Calculate the oldid field to be equal to the OBJECTID field.
- Open the attribute table of the feature class.
- Right-click the new oldid field and select Field Calculator.
- In the Field Calculator dialog box, select OBJECTID in the Fields section, and click OK.
- In the annotation feature class, add a new double field, and name it as oldfid.
- Calculate the oldfid field to be equal to the FeatureID field.
- Open the attribute table of the annotation feature class.
- Right-click the new oldfid field and select Field Calculator.
- In the Field Calculator dialog box, select FeatureID in the Fields section.
- Click OK.
- In the Catalog pane, create a new empty feature class in the geodatabase.
- Right-click the geodatabase > New > Feature Class.
- Set a name for the new feature class, set the type to be the same as the original feature class in Step 2, and click Next.
- Select the spatial reference used in the original feature class and click Next.
- Accept the default XY Tolerance and click Next > Next.
- Click Import to import the fields from the original feature class. In the Browse for table/feature class dialog box, select the original feature class, and click Add, and click Finish.
- Create a new, empty annotation feature class in the geodatabase.
Note:
It is not necessary to define a spatial reference for the new annotation feature class because it is automatically pulled from the feature class that it is linked to.
- Right-click the geodatabase > New > Feature Class.
- 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 Step 6, and click Next > Next.
- Accept the default XY Tolerance and click Next.
- For the Reference Scale, specify a scale for the annotation. It is recommended to use the same scale as the original annotation feature class.
- Specify the Label Engine used to create the labels that are converted into annotation. Select either Standard Label Engine or Maplex Label Engine. Click Next.
- Optionally, set the annotation properties (for example, text, color, etc.) or accept the defaults. Click Next > Next.
- Click Import to import the fields from the original annotation feature class. In the Browse for table/feature class dialog box, select the original annotation feature class, and click Add.
- Click Finish.
- In the Catalog pane, delete the relationship class that links the new feature classes to the new annotation feature class.
- Add the new empty feature classes and the new empty annotation feature class to the map.
- Copy and paste the original features to the new feature class. To do this, refer to Copying and pasting features.
- Copy and paste the original annotation features to the new annotation feature class using the same steps as in Step 10. Select the new annotation feature class in the Paste dialog box.
- Right-click the new annotation feature class and select Joins and Relates > Join. Join the oldfid field with the oldoid field in the new feature class.
- Calculate the FeatureID field in the annotation feature class to be equal to the OBJECTID field of the feature class.
- Right-click the new annotation feature class and select Open Attribute Table.
- Right-click the FeatureID field and select Field Calculator.
- Calculate the FeatureID field in the annotation feature class equal to the OBJECTID field of the feature class.
- In the Editor toolbar, click Editor > Save Edits. Click Editor again > Stop Editing.
- Right-click the new annotation feature class and select Joins and Relates > Remove Join(s) > Remove All Joins.
- Recreate the composite relationship class between the new feature class and the new annotation feature class. Refer to Creating a composite relationship class for steps to do this. When attempted to select the primary key field in the origin feature class, select OBJECTID. For the foreign key field in the destination feature class, select FeatureID.
The new annotation feature class is linked to the new feature class with a composite relationship class. To view the relationship class properties, right-click the relationship class and select Properties.