Select to view content in your preferred language

Trouble with Attachment Tools

1701
1
Jump to solution
05-27-2014 02:10 PM
KevinHighland
Frequent Contributor
Hi there,

I'm running into some problems when using the Attachments tools. We're assigning traffic signs of a certain MUTCD code a single image of what that sign looks like (e.g. all stop signs will have the same attachment, which is a picture of a stop sign). I'm testing out the Generate Attachment Match Table and Add Attachments tools, but can't seem to get the attachments to actually get to signs.

Here are the details:

  • I have a folder with the jpg image of the stop sign on my desktop. The name of the image is R1-1, which is the MUTCD code for stop signs.

  • I have map open with only the sign feature class. Feature class is stored on SDE.

  • I open up the Generate Attachment Match Table tool. Input Dataset is my feature class, Input Folder is the path to the folder I describe above, Output Match Table has been pointed to a file geodatabase on my desktop, and the key field is MUTCD. Store Relative Path is checked.

  • I run the tool and the match table has the correct number of features for stop signs, with the features' OBID in the MatchID field and all records are pointed to the R1-1.jpg with the Filename field.

  • I now open the Add Attachments tool. Input Dataset is my feature class, Input Join Field is OBJECTID, Match Table is the match table in my file geodatabase, Match Join Field is MatchID, and Match Path Field is Filename. Working Folder is pointing to the folder where R1-1.jpg is.

  • When I run the tool, I'm seeing a message in the Results tab for each ObjectID in the match table that says something like, "Cannot add file 'C:\Users\khighland\Desktop\Test\R1-1.jpg' to feature with OID = 1571"

But I don't understand why it's not allowing me to add the files. Does anyone have a clue why this is happening? Am I not allowed to assign a single attachment to multiple features, with the assumption it will copy the attachment x amount of times for however many features match this MUTCD?

Using 10.1 SP1 with an Advanced license on a WIN7 PC with local admin rights.


Any info/advice would be greatly appreciated.
Kevin
0 Kudos
1 Solution

Accepted Solutions
KevinHighland
Frequent Contributor
Contacted ESRI support about this and it turns out the issue was that the feature class was registered as versioned. I created a non-versioned copy in the same location and the tools worked great. I've now got a gameplan to make this happen.

I hope this helps someone in the future.

-Kevin


EDIT: It's a bug that has been resolved in 10.2.1 - NIM073706

NIM073706: Running the Add Attachments geoprocessing tool returns the green warning message, "Cannot add file 'C:\student\seattletrips.jpg' to feature with OID = 1" when adding attachments to a target dataset that is registered as versioned.

Version found: 10.1

The documented workarounds for the bug are -

Workaround1: Run the tool on a file geodatabase then copy/paste back into sde.

Workaround2: Make a copy of the feature class in sde and run the tool on the copy without registering it as versioned.

Please keep in mind there are negative implications to unregistering a feature class as versioned. To minimize these, I would recommend taking a full, verified backup and compressing to a state 0 before unregistering the feature class as versioned and adding attachments.

Below is a link to the resource center documentation which discusses unregistering the data as versioned. It mentions steps needed to carry out to prevent data loss when you unregister data as versioned.

View solution in original post

0 Kudos
1 Reply
KevinHighland
Frequent Contributor
Contacted ESRI support about this and it turns out the issue was that the feature class was registered as versioned. I created a non-versioned copy in the same location and the tools worked great. I've now got a gameplan to make this happen.

I hope this helps someone in the future.

-Kevin


EDIT: It's a bug that has been resolved in 10.2.1 - NIM073706

NIM073706: Running the Add Attachments geoprocessing tool returns the green warning message, "Cannot add file 'C:\student\seattletrips.jpg' to feature with OID = 1" when adding attachments to a target dataset that is registered as versioned.

Version found: 10.1

The documented workarounds for the bug are -

Workaround1: Run the tool on a file geodatabase then copy/paste back into sde.

Workaround2: Make a copy of the feature class in sde and run the tool on the copy without registering it as versioned.

Please keep in mind there are negative implications to unregistering a feature class as versioned. To minimize these, I would recommend taking a full, verified backup and compressing to a state 0 before unregistering the feature class as versioned and adding attachments.

Below is a link to the resource center documentation which discusses unregistering the data as versioned. It mentions steps needed to carry out to prevent data loss when you unregister data as versioned.
0 Kudos