Adding attachments to a feature class or table enabled for attachments in a geodatabase allows you to include additional information with GIS data and workflows.
There are two primary ways to add attachments to a dataset:
- In an edit session
- With a geoprocessing tool
Add attachments in an edit session
One or more files can be added as attachments while editing a dataset.
Keep the following in mind when adding attachments while editing:
- Attachments can be added from multiple sources.
- Multiple attachments can only be added one feature at a time during an edit session in the Attribute pane.
- This process can take significant time when adding many attachments.
To view the steps to add attachments while editing, see Add or remove file attachments.
Use the Add Attachments geoprocessing tool
The Add Attachments geoprocessing tool associates one or more attachments to one or more features or rows in an enabled feature class or table.
Keep the following in mind when using the Add Attachments tool:
- The tool can be used with enabled feature classes, feature layers, or stand-alone tables.
- A match table is required for adding attachments to their applicable features or rows. It is recommended that you use the Generate Attachments Match Table tool to create the required match table.
- The tool does not honor selected dataset features. Instead, it loads only the files listed in a required match table and associates them with their respective object IDs.
- Custom or multiple match tables can be combined into a single match table to meet the required match table parameter.
- When adding attachments, the tool does not remove or replace existing attachments. This can create duplicates if the same attachments already exist.
If the input dataset attribute table has an existing field with a path to the attachments to add, the field can be specified in place of the match table.
To add attachments to an existing dataset using the Add Attachments tool, complete the following steps:
- On the Analysis tab in the Geoprocessing group, click Tools, and search for or browse to the Add Attachments tool in the Data Management Tools toolset.
- Click the Add Attachments search result to open the tool.
The Add Attachments tool dialog box appears with its parameters.
- For Input Dataset, use the browse button to select a feature class or table, or click the down arrow to choose a dataset from the active map.
- For Input Join Field, choose a field from the input dataset with matching values in the match table.
This field is the OBJECTID field if the match table was created using the Generate Attachment Match Table tool.
- For Match Table, choose the match table that contains the object IDs and file names that will be added as attachments.
- For Match Join Field, choose the field in the match table with object ID values.
If the Generate Attachment Match Table tool created the match table, this is the MatchID column.
- For Match Path Field, choose the file name field in the match table.
- For Working Folder, use the folder or workspace containing the files being attached.
This parameter is optional and can be left blank if the file names have a full path to the data. Otherwise, add the folder location if the file names are short (for example, image1.jpg and image2.jpg).
- Click Run to add the attachments.
Add attachments with a sample tool
You can also add attachments using a sample tool that allows attachments to be added by selection. With this method, no match table is needed. You can add attachments to one or more selected features in a feature class in an active map, and attachments can be added from individual files, one or more folders with files, or a combination of individual files and folders.
One way to verify that attachments are associated with the correct feature in a feature class is to view them in a pop-up.