0

I have a geodatabase that has feature classes with attachments (__ATTACH and __ATTACHREL). I would like to use FME to extract the attachments (photos) from each feature class, save the photo in a folder, and create a table in Excel that contains the photo name, path location (folder where the photo is saved), and has some sort of identifier that notes which feature each photo is attached to. I want this to not use the GLOBALID, because when I upload my features to a different location, the GLOBALID changes.

I have tried using the Export Attachments toolbox in ArcGIS Pro, and this successfully exports the photos but does not create any means of reattaching them (https://community.esri.com/t5/arcgis-pro-blog/export-attachments-toolbox/ba-p/1022018).

In FME the only tutorial I have found is using hosted data from AGOL and this doesn't seem to be transferable (https://www.youtube.com/watch?v=smZ_JQ1B-Og)

3
  • The simplest way is to rename attachments in related table and create meaningful names
    – FelixIP
    Commented May 1 at 22:04
  • Not really practical in this case. Hundreds of photos and it is an ongoing job so I'd like to be able to automate it
    – ynxblx
    Commented May 2 at 8:57
  • I did it with 1000s, using join and field calculator.
    – FelixIP
    Commented May 2 at 18:21

2 Answers 2

0

To extract files from blob attributes, see https://support.safe.com/hc/en-us/articles/25407563896589-How-to-Read-the-Contents-of-a-File-into-a-Database-BLOB-Attribute

=== Update 20240507 ===

Writing files from an attachment table can be done using the AttributeFileWriter.

Configuration:

  • Source Attribute: DATA
  • Target Filename: C:\TMP@Value(GLOBALID)_@Value(ATT_NAME)
  • If Target File Exists: Overwrite file
  • Target File Encoding: Binary (fme-binary)

Be aware that @Value(ATT_NAME) is probably be not unique, this is why it is prefixed with the GLOBALID.

2
  • This looks like it would perhaps extract images, although I can't get it to work with a gdb. It also doesn't create a table with path names, to reattach the photos.
    – ynxblx
    Commented May 2 at 11:12
  • Ah ok. I know it is possible, but it has been a while I did this myself. You probably get better response if you post the question on the FME forums. community.safe.com/community Commented May 2 at 15:05
0

I ended up using FME to extract the image from the __ATTACH feature using the RasterReplacer. I wrote this out as a jpeg, using the GLOBALID as the name. I then used the geometry remover and attribute manager to export the image metadata to a corresponding csv, which I can use as the input for the Add Attachments tool in ArcGIS Pro.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.