Hello,
I'm looking for a way to add multiple attachments to a single point within ArcPro using the 'add attachments' tool.. I have successfully done this is the past, but I'm currently unable to find the workflow or recreate.
I've added single attachments no problem... But I forget how/what to name the file (when doing multiples)... specifically, the attribute path name and the image file name need to match for the 'Add Attachments' to work correctly.
I do remember, when I was able to successfully link multiple attachments to a single point, that I simply ran the "Add Attachments" tool as many times as I had attachments to add... For instance, if I was adding (2) attachments to a single point, I would run the 'Add Attachments' tool (2) times to get both attachments linked to the same point.
I've searched and haven't been able to come across the documentation again. Any help is greatly appreciated. Thanks.!
Solved! Go to Solution.
I was able to find a little more time to dig into this and have found the solution...
Step 1: Enable Attachments
(Right-click FC > Manage > Enable)
This creates the hidden attachment tables/relationship class.
Step 2: Organize Your Photos
This part is critical.
-Put all photos in a single folder (or separate folders per feature class)
-Make sure the file names contain the feature ID somewhere (e.g., 1001_1.jpg, 1001_2.jpg)
-ArcGIS will use this to match multiple photos to one feature
Step 3: Create the Match Table
(Catalog > Right-click your geodatabase > New > Table)
Add fields:
-MatchID (same type as your feature class ID field)
-FilePath (Text, length ~500)
Step 4: Populate FilePath
This is the fast way to get all your file paths without typing:
-Open the folder with your photos
-Select all photos you want to attach
-Shift + Right-click > “Copy as path”
-Paste into your match table’s FilePath field (you can do this in the Table view in Pro)
Step 5: Populate MatchID
You now need to extract the ID from the filename so that 'Add Attachments' can match correctly.
-Option A: Manual Type in the correct ID in the MatchID field for each row
-Option B: Field Calculator (Python)
If your filenames are consistent, e.g., 1001_1.jpg, 1002_2.jpg, you can use this in the Field Calculator for MatchID:
-Python-
!FilePath!.split("\\")[-1].split("_")[0]
Explanation:
!FilePath! > the full path
.split("\\")[-1] > gets the filename only (ignores folder)
.split("_")[0] > gets the part before the underscore > the feature ID
After running this, every row will have the correct MatchID.
Now one feature can have multiple rows (i.e., multiple photos).
Step 6: Add Attachments
Input Dataset > FC
Input Join Field > AssetID
Match Table > CSV/Table
Match Join Field > MatchID
Match Path Field > FilePath
Folder > N/A
<Run it>
Make sure attachments are enabled.
From there, you can add multiple attachments via the attribute pane in Pro (on the third “attachment” tab). I would take screenshots but unfortunately I’m not in front of my computer.
Here’s the documentation for the add attachments tool.
Hi Eugene,
While I am familiar with adding attachments via the attribute pane, this workflow isn't viable for the amount of files I'm attempting to link.
Current workflow [images coming from AutoCAD]:
(1) Within AutoCAD, I created a block reference with attribute field 'Detail View.'
(2) I then made JPGs and matched the JPG file name to the 'Detail View' attribute field.
I now have 658 points (feature class) within ArcPRO.
(3) I've enabled attachments for the 'detail view' feature layer and then use the 'add attachments' tool to do just that (add attachments).
This workflow works great. However, I have multiple files that I need to batch attach to the same point. And that is where I forget the workflow (specifically file nomenclature).
The documentation for that workflow should be included in the attachments tool link (the 3rd link in my first reply).
The illustration above shows linking (1) Path Field to (1) Input_ID.
Again, I am trying to link multiple Path Fields to (1) Input_ID.
Also, my workflow is slightly different. Specifically, my [Input_ID] matches my [Path Field] name identically (only difference is [Path] has .jpg at the end).
Ok. I was working under the thought process that if you have multiple attachments for a single point then you would use the same "input ID" for each attachment url. This did not mention anything about the match field/input ID for the feature being unique (a single existence), only the availability of a matching number which I thought could apply to multiple urls ultimately pointing the same feature. But I could be wrong since I've never used the process, so I'm not personally familiar with it. Sorry I can't help you beyond that.
While on the subject, I'm also looking for a quick way to batch convert 658 PDF to JPG... the catch here is, all 658 files contain a unique name that needs to be retained.
I attempted using Adobe, but when I combine and export, it renames all the files.
I attempted using PDFgear, but when I export to JPG, it adds "conv 1" to the end of each file name. I could go through each file and eliminate the "conv 1" from the path name, but this would be time consuming.
I could also convert 1-by-1, but again this would be very time consuming.
If anyone has better workflow recommendations for this, I would also greatly appreciate sharing.
I was able to find a little more time to dig into this and have found the solution...
Step 1: Enable Attachments
(Right-click FC > Manage > Enable)
This creates the hidden attachment tables/relationship class.
Step 2: Organize Your Photos
This part is critical.
-Put all photos in a single folder (or separate folders per feature class)
-Make sure the file names contain the feature ID somewhere (e.g., 1001_1.jpg, 1001_2.jpg)
-ArcGIS will use this to match multiple photos to one feature
Step 3: Create the Match Table
(Catalog > Right-click your geodatabase > New > Table)
Add fields:
-MatchID (same type as your feature class ID field)
-FilePath (Text, length ~500)
Step 4: Populate FilePath
This is the fast way to get all your file paths without typing:
-Open the folder with your photos
-Select all photos you want to attach
-Shift + Right-click > “Copy as path”
-Paste into your match table’s FilePath field (you can do this in the Table view in Pro)
Step 5: Populate MatchID
You now need to extract the ID from the filename so that 'Add Attachments' can match correctly.
-Option A: Manual Type in the correct ID in the MatchID field for each row
-Option B: Field Calculator (Python)
If your filenames are consistent, e.g., 1001_1.jpg, 1002_2.jpg, you can use this in the Field Calculator for MatchID:
-Python-
!FilePath!.split("\\")[-1].split("_")[0]
Explanation:
!FilePath! > the full path
.split("\\")[-1] > gets the filename only (ignores folder)
.split("_")[0] > gets the part before the underscore > the feature ID
After running this, every row will have the correct MatchID.
Now one feature can have multiple rows (i.e., multiple photos).
Step 6: Add Attachments
Input Dataset > FC
Input Join Field > AssetID
Match Table > CSV/Table
Match Join Field > MatchID
Match Path Field > FilePath
Folder > N/A
<Run it>