Attachment Table Rename

2387
3
10-02-2014 02:26 PM
mpboyle
Regular Contributor

If I were to rename a feature class and related attachment table, would this cause any harm to the attachment relationship and functionality?...or would it continue to work?...Would I need to alter the attachment relationship properties?

For example, I have a feature classes named: FCTest and the attachment table is called FCTest__ATTACH.  If I were to rename the feature class to BuildingTest and the attachment table to BuildingTest__ATTACH, would this screw things up?  If so, is there a workflow that would preserve the attachments to continue working after renaming the feature class and attachment table?

Thanks in advance!

Tags (1)
3 Replies
MikeBly
Occasional Contributor

I know this post is a bit old but did you ever find a workflow for this? So far in testing this, I lose the relationship when I rename anything. I can copy into a new FGDB and maintain, but renaming the feature class drops the relationship. i have been able to successfully merge two FC together and re establish relationship and during that process rename the FC. However just a simple rename does not work.

Thanks,

Mike

0 Kudos
JoeDunn
New Contributor II

Here's how I finally got it to work after much trial and error.

In Catalog go to the GDB containing the feature with the associated attachment table and relationship table. Select the feature layer, then right click and choose copy. Paste the copied feature back into that same GDB. This creates a new feature layer re-named [feature name]_1 along with a table named [feature name]_ATTACH_1 and a relationship file named [feature name]_ATTACHREL_1. DO NOT DELETE THE ORIGINAL FEATURE OR ASSOCIATED FILES YET.  Next re-name [feature name]_1 to [NewName] then delete the table [feature name]_ATTACH_1 (this also deletes [feature name]_ATTACHREL_1). Now right click [NewName], choose "Manage" then "Create Attachments".  New files are added [NewName]_ATTACH and [NewName]_ATTACHREL. Next right click [NewName]_ATTACH then "Load" and "Load Data". A Wizard will pop up with an explanation screen, choose next. On the second screen at the "Input Data" box click "Browse" and choose the original "[feature name]_ATTACH" file then click "Add" then "Next". Click "Next" through the remaining screens until you reach "Finish" You will now have a new feature layer connected to the associated attachments with the new name. Check to make sure the newly renamed feature layer works properly and has your attachments. The original feature layer and associated files may now be deleted leaving you with only the renamed feature layer. Hope this helps.

ScottSambell2
New Contributor II

Hi.  Thanks for the precise explanation Jo.  I was having the same problem but i have since come up with a more simple solution.

Use the "Copy" tool in Data Management Tools. It give you the choice of the name you want to copy the input data as and also the table and relationship file.  Seems to work well.