CÓMO
Note: ArcMap is in Mature support and will be retired March 1, 2026. There are no plans for future releases of ArcMap, and it is recommended that you migrate to ArcGIS Pro. See Migrate from ArcMap to ArcGIS Pro for more information.
No hay herramientas de geoprocesamiento que permitan a los usuarios exportar y guardar todos los adjuntos localmente. Las instrucciones que se proporcionan a continuación describen cómo ejecutar una posible solución a través de la creación de una herramienta de script para realizar la tarea.
Para exportar adjuntos por lotes desde una clase de entidad, cree una herramienta de script a partir de un script de Python utilizando el flujo de trabajo proporcionado a continuación y ejecute la herramienta de script creada.
Note: This script requires that the input table be the standard attachment table created when attachments are enabled on a feature class. This is because the script relies on the DATA, ATT_NAME and ATTACHMENTID fields stored in this table. The typical naming convention should append _ATTACH to the end of the table name.
import arcpy from arcpy import da import os inTable = arcpy.GetParameterAsText(0) fileLocation = arcpy.GetParameterAsText(1) with da.SearchCursor(inTable, ['DATA', 'ATT_NAME', 'ATTACHMENTID']) as cursor: for item in cursor: attachment = item[0] filenum = "ATT" + str(item[2]) + "_" filename = filenum + str(item[1]) open(fileLocation + os.sep + filename, 'wb').write(attachment.tobytes()) del item del filenum del filename del attachment
Note: This script iterates through the entire attachment table of a single feature class and copies all of the attachments (saved as BLOBs, or binary large objects) to a file.
Id. de artículo: 000011912
Obtener ayuda de expertos en ArcGIS
Descargar la aplicación de soporte de Esri
You can also download the app to access the chatbot anytime! Download it now.