For the complete documentation index, see llms.txt. This page is also available as Markdown.

Attaching reports to borehole annotations

Video chapters: 0:00 How GeoDin organizes borehole report folders | 0:37 Finding document annotations | 1:14 Preparing the AttachKey field | 1:53 Selecting boreholes with linked documents | 2:25 Calculating the AttachKey values | 3:33 Enabling & generating attachment matches | 4:35 Adding the attachments | 5:34 Verifying the attached reports

When a Civil 3D drawing with GeoDin® Ground boreholes is brought into ArcGIS Pro (previous tutorial), the exported PDF reports can be attached to each borehole's document annotation - so the right geotechnical report opens from the right feature. This tutorial builds a matching key and runs the two geoprocessing tools that wire the PDFs to the annotations.

For the same workflow starting from GeoDin®-exported point layers (one record per borehole), see Attach reports in the GeoDin® documentation. The version below handles the Civil 3D annotation layer, where each borehole has multiple annotation records.

Step 1: Locate the reports and confirm the annotations

  • On import, GeoDin® Ground creates a documents folder next to the drawing, structured by project with one subfolder per borehole, each holding that borehole's geotechnical report.

  • Copy the report PDFs into one working folder to simplify matching.

The exported documents folder and a borehole's Geotech Soil Log PDF
  • In the annotation layer's attribute table, confirm the borehole's document record: its RefName reads "1 document(s)".

The document annotation record in the attribute table

Step 2: Add a key field

  • Open the feature class fields view and add a new field named AttachKey with Data Type = Text. Save the changes.

The AttachKey field added as Text

Step 3: Select only the document annotations

  • Use Select By Attributes with the clause: RefName contains the text document.

  • Apply and verify the selection count before continuing - the key must only be calculated for these records.

Selecting the document annotation records

Step 4: Calculate the key

  • With the selection active, right-click AttachKey > Calculate Field, set Expression Type = Python, expression extract_bh(!Layer!), and this code block:

Calculate Field applied to the selected records only
  • The trailing " -" is intentional: it makes the key specific enough to prefix-match exactly one report filename, so similarly named boreholes (BH1 vs. BH1A) cannot cross-match.

The populated key - borehole name plus trailing dash

Step 5: Enable attachments

  • Open the feature class Properties > Manage and enable Attachments (attachments are a geodatabase feature - the annotation layer must be a geodatabase feature class, not a shapefile). Save.

Attachments enabled on the feature class

Step 6: Generate the match table

  • Run the Generate Attachment Match Table geoprocessing tool:

    • Input Dataset: the annotation layer (selected records).

    • Input Folder: the working folder with the PDFs.

    • Key Field: AttachKey - Input Data Filter: *.pdf - Match Pattern: Prefix.

Generate Attachment Match Table with Match Pattern set to Prefix

Step 7: Add the attachments

  • Run Add Attachments with the same input dataset, Input Join Field OBJECTID, the match table from step 6, and Match Join Field MatchID.

Add Attachments joining OBJECTID to MatchID

Step 8: Verify

  • Click a document annotation in the scene and scroll its pop-up: the geotechnical report appears as an attachment.

  • Spot-check one or two more boreholes to confirm the matching worked consistently.

The report attached to the annotation, verified in the pop-up

Optional settings

  • Selection scope - calculate the key only for the selected document records; calculating across all rows creates incorrect matches.

  • Key specificity - if several reports have similar names, make the key format more specific before matching (the trailing " -" exists for exactly this).


Working with attachment matching

Confirm attachments are enabled before running the match and add tools, and spot-check one borehole after each stage (key calculated, match table generated, attachments added) so a mismatch is caught one step from its cause rather than at the end.


Next step: Publish and review the model as a web scene - the attached reports stay available in the published scene's pop-ups.

Last updated

Was this helpful?