How To: Combine existing feature linked annotations
Instructions provided describe how to combine feature linked annotations and their related parent features from different geodatabases into one geodatabase to maintain already established feature linked annotations (FLA) locations.
Normally, new feature linked annotations are created in the associated FLA feature class when new features are added to the parent feature class where the annotations are linked. In cases where annotations in the source are relocated for display purposes, one may want a procedure for moving these existing feature linked annotations into the target instead of creating new ones and having to reposition them again. This procedure is for merging data with the same feature class/feature linked annotation schemas defined in each geodatabase.
Note: Test this procedure and ensure that the results are satisfactory before putting it into the production environment.
This procedure involves removing the relationship class for the feature linked annotation, loading/appending the data, performing some temporary data processing, and recreating the relationship class after all copying/appending is complete.
Note: Combine all data either in personal geodatabase (PGDB) or Spatial Data Engine (SDE) since there is an issue with user_defined fields in the annotation feature class when appending from PGDB to SDE. If work is done in PGDB, copy final feature class and feature linked annotation to SDE before creating the relationship class (step 11).
The parent feature class and the feature linked annotation are linked by ObjectID in the feature class and linked by FeatureID in the feature linked annotation. Each individual source feature class/feature linked annotation pair may have the same ObjectIDs and FeatureIDs, so it is important to preserve the old links while maintaining unique linking identifiers, during the merge process.
Take a screenshot of the relationship class properties. This is needed to recreate the feature linking relationship at the end of the procedure.
For each geodatabase, delete the feature linked annotation relationship classes; this makes the annotation a standard annotation feature class.
If working in a new geodatabase (GDB), all data to the new GDB can be copied using the copy and paste feature.
Note: Note for steps 3 and 4: A factor must be added to make all Old_OID unique values for the primary and foreign keys for the reconstructed relationship class. Select a numeric factor or an alpha factor. Alpha factors are easier to use if combining more than two datasets, because it is not necessary to keep track of the highest numeric value in Old_OID. For this discussion alpha factors are used. The same factor ('new factor') is added to the corresponding Old_FID of feature linked annotation, since it keeps track of its related feature class ObjectID.
For each feature class/feature linked annotation pair, determine a unique alpha factor that is referred to as 'newfactor'. For example, 'a' for FC1/FLA1, 'b' for FC2/FLA2 and so on until all pairs are assigned a unique newfactor.
A. Create a TEXT field in the parent feature class called Old_OID. B. In ArcMap calculate Old_OID = [objectid] & "newfactor". Make sure to use double quotes.
A. Create a TEXT field called Old_FID in the Annotation feature class. B. Calculate Old_FID = [featureid] & "newfactor".
Note: To combine all data in steps 5 and 6 into one step, the above steps must be completed for all feature class and feature linked annotation pairs.
In ArcCatalog, use the Simple Data Loader to load source feature classes into the target feature class: A. Right-click on target feature class > Load > Load Data. B. To input data, browse to and select FC2. C. Click Add. If combining more than two datasets, browse to and add the others, if desired. Click Next for the other dialog boxes.
In ArcToolbox (Data Management, Feature Class), use the Append Annotation Feature Classes tool to append the source feature linked annotations to the target feature linked annotation.
Note: All unplaced annotations in the source are also appended to the target. Do not append across GDB types; for example, PGDB to SDE.
For input features, browse to and select source feature linked annotations. For output feature class, browse to and select target FLA1. Click OK.
Once all data loading or appending is complete, and if using SDE, register the final feature class/feature linked annotation as versioned.
Add final feature class (FC) and feature linked annotation (FLA) to ArcMap and start edit session.
A. Join feature class to feature linked annotation on Old_FID, Old_OID respectively. B. Right-click on FLA > Joins and Relates > Join. C. Click the first drop-down menu and click Join attributes from a table. D. Click the second drop-down menu and click the Old_FID field. E. Click the third drop-down menu to choose the parent Feature Class. If the feature class is not currently part of the map, click the Browse button to search for it on disk. F. Click the fourth drop-down menu and click the Old_OID Field. G. Click OK.
Note: To avoid problems dropping Old_OID at step 12, do not create an index on the Join field.
Open the feature linked annotation attribute table and calculate FLA.FeatureId = FC.Objectid.
Save edits, stop editing, remove Join and exit ArcMap.
Use the screenshot of the relationship class properties from step 1 to create a new relationship class. The previous name of the relationship class may already be in use. In that case, specify another name for the new relationship class.
In ArcCatalog, drop the Old_OID and Old_FID fields that were added. If a general function failure is received, check whether there is a temporary index on Old_OID on the indexes tab. If there is a general function failure, remove it.