Exporting features with attachments for use outside ArcGIS?

http://support.esri.com/em/knowledgebase/techarticles/detail/41763

For ArcGIS 10.1+

from arcpy import da
import os

inTable = arcpy.GetParameterAsText(0)
fileLocation = arcpy.GetParameterAsText(1)

with da.SearchCursor(inTable,['DATA','ATT_NAME']) as cursor:
   for row in cursor:
      binaryRep = row[0]
      fileName = row[1]
      # save to disk
      open(fileLocation + os.sep + fileName, 'wb').write(binaryRep.tobytes())
      del row
      del binaryRep
      del fileName

Exporting GDB to XML (by right clicking on GDB> Export to XML) can perfectly export features+attachments. Moreover, if you are looking for a more automated approach, ArcGIS 10.1 features a new toolbox for XML export. You can import XML into new GDBs or directly access all its data by parsing it for other applications.


I have not tried next methods, so just my thoughts about it:

If you are convenient with ArcGIS .NET API you can use C# to export blobs to files. Take a look at this snippet.

Also may be you can try to export attachment table to Personal GDB and then try to export blobs there. Same way you can export to SDE table and use you DBMS (sql?) to perform it.