I am running ArcGIS 10.1 for Desktop Advanced licenses.
I can and have added attachments via enabling attachments, starting edit mode, opened the attachment manager and adding files for each polygon, one at a time. However, I have several more thousand polygons to go and was looking to speed the process up by using a Match Table and Add Attachments to features tool.
What I have done so far: Renamed multiple photos within the same folder to match attributes within Feature class table field, “future_projects_area” Futprj. Photos have names like pic.jpeg, pic(1).jpeg….
Enabled attachments from within ArcCatalog.
Ran “Generate Attachment Match Table”
I have created a match table with the “Generate Attachment Match Table”.
- Input Dataset: is feature class within DB that I renamed photos to match.
- Input Folder: is location on my computer where photos are kept
- Output match Table: I cut and paste from ArcCatalog the absolute path back to input dataset DB and name table to same as input dataset feature class, “future_projects_area_Match”
- Key Field: Name of attribute table field that contains names of projects I have renamed photos to, “futprj”.
- Store Relative Path: I ran this tool both ways, with relative paths and absolute paths. When I ran with relative paths it caused issues with “Adding Attachment” to features tool, since it only contained the name of each photo. When I ran with absolute paths the complete paths were shown.
The generated Match Table shows up in ArcMap and inside chosen database.
The problem comes when I try running the “Adding Attachment” to features tool.
- Input Dataset: is feature class within DB to have attachments added
- Input Join Field: Since I can pick any attribute field I choose Object ID since the Match table has two fields, the first are the Object ID within “future_projects_area” attribute table which each photo matches based on naming convention I explained earlier.
- Match Table: I choose the match table created by running Generate Attachment Match Table.
- Match Path Field: If I load the match table with relative path, I choose the workspace where the attachments are kept. If I load match table with absolute path, then I leave the “Working Folder” empty.
The tool runs but no attachments are added, or I get the following error…
Cannot Add file....to feature with OID=1 So on and so on.
Partially fixed: biggest problem is I was saving Match Table inside the geodatabase where attachments were to be kept. The Match Table needs to stored Inside folder where orginal attachmentsare housed.
This cleaned up process and allowed me to run script but having issues now with batch running the tool.