When a record is selected I have tried to do a File Geodatabase export and it downloads all the records not just one or two being selected.
Hi Christopher,
Are you using the method highlighted in the screenshot below? I just tested by selecting once record and exporting, which worked as expected.
Brandon,
I verified that I was using the method as highlighted in the screenshot and when I download a File Geodatabase it downloads all the images from all records.
My method is to make sure that the “Selected records only” is selected, that only one record is selected, and then I click download “File Geodatabase”. Then I run the ArcMap script to get photos and it pulls all the photos for all records.
Thanks,
Chris
So, when you add the feature class from the exported file geodatabase to ArcMap, records other than those that were selected are present? Which ArcMap script are you referring too?
Brandon
The script that I am currently using is the one recommended by survey123, the arcpy code is below. When I use ArcMap to pull the images from the geodatabase then I still pull all the images from all the records and not just the one selected originally.
import arcpy
from arcpy import da
import os
inTable = arcpy.GetParameterAsText(0)
fileLocation = arcpy.GetParameterAsText(1)
with da.SearchCursor(inTable, ) 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
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.