Hello everyone,
I work for a small "baby-blue collar" tech startup that uses various Esri tools to survey and report on telecommunications infrastructure. We take a LOT of photos during the course of a single survey. I have been successful in automating report templates for the many times we need to produce reports on specific sites; however, we would also like to be able to download just the images from each site surveyed so that we can store the raw images from each site audit in their own directory.
I have made use of the Jupyter Notebook found here, which I know many are familiar with. While the notebook does indeed extract all the image attachments from a survey, it does so at the survey level and not the form/object ID level within the survey. Our surveys contain many nested repeats and subsections, which causes the notebook to generate about 15 different Excel tables and 15 different subfolders, each with a smorgasborg of images inside that are coming from every single submission to that survey. This is a brute force method that, on the post-processing end, took me several hours the other day to sort out which photos correspond to which specific site - and I only had seven sites to sort out! This will become a massive headache in the near future, when our database reaches into the hundreds and even thousands of records.
Searching for a better way to do this, I found the extremely useful script written by @MichaelKelly (here), and even found some comments he made about how to change snippets of code to make use of GlobalID's, which I think is the sort of pathway that I need here. Unfortunately, I wasn't able to get the code provided by Michael to work for me - I have attached a screenshot of the issue I can't seem to work out. This error occurs after a single image is downloaded to the specified directory.
Is there any way I can use the method provided by Esri (via ArcGIS Pro), or by @MichaelKelly, to download attachments for a specified record in a survey database? My coding skill is somewhere a little past beginner, but that's all more geared towards data science applications. I admit that I am fairly lost in this endeavor at this point and would really really appreciate some support and guidance here. Thank you all!
