<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Downloading Selected Attachments in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/downloading-selected-attachments/m-p/1343369#M74631</link>
    <description>&lt;P&gt;thanks do you have an example that I could add to the script&lt;/P&gt;</description>
    <pubDate>Mon, 30 Oct 2023 16:22:31 GMT</pubDate>
    <dc:creator>RobertBorchert</dc:creator>
    <dc:date>2023-10-30T16:22:31Z</dc:date>
    <item>
      <title>Downloading Selected Attachments</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/downloading-selected-attachments/m-p/1343325#M74623</link>
      <description>&lt;P&gt;I would like to find out how to download selected attachments.&lt;/P&gt;&lt;P&gt;I have used the script below and followed instructions to create a script in Pro and download the attachments to a specific folder. What I would like to do is add an SQL query so I can specify the attachments I want to download.&lt;/P&gt;&lt;P&gt;I set up the script tool to use&amp;nbsp; SQL query&amp;nbsp; and specified the name of the column&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RobertBorchert_0-1698680129663.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/84426i2C858136857FDD03/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RobertBorchert_0-1698680129663.png" alt="RobertBorchert_0-1698680129663.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However the query has no values.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RobertBorchert_1-1698680174083.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/84427iADC55D2AC2C854BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RobertBorchert_1-1698680174083.png" alt="RobertBorchert_1-1698680174083.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Below is the script I used from the help docs&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;from arcpy import da&lt;BR /&gt;import os&lt;/P&gt;&lt;P&gt;inTable = arcpy.GetParameterAsText(0)&lt;BR /&gt;fileLocation = arcpy.GetParameterAsText(1)&lt;/P&gt;&lt;P&gt;with da.SearchCursor(inTable, ['DATA', 'ATT_NAME', 'ATTACHMENTID']) as cursor:&lt;BR /&gt;for item in cursor:&lt;BR /&gt;attachment = item[0]&lt;BR /&gt;filenum = "ATT" + str(item[2]) + "_"&lt;BR /&gt;filename = filenum + str(item[1])&lt;BR /&gt;open(fileLocation + os.sep + filename, 'wb').write(attachment.tobytes())&lt;BR /&gt;del item&lt;BR /&gt;del filenum&lt;BR /&gt;del filename&lt;BR /&gt;del attachment&lt;/P&gt;&lt;P&gt;and&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 15:36:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/downloading-selected-attachments/m-p/1343325#M74623</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2023-10-30T15:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading Selected Attachments</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/downloading-selected-attachments/m-p/1343336#M74626</link>
      <description>&lt;P&gt;SQL Expression parameters require a "Dependency" on the parameter you want to filter so it can populate the dialog, set that up and your parameter should work&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 15:49:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/downloading-selected-attachments/m-p/1343336#M74626</guid>
      <dc:creator>DavidSolari</dc:creator>
      <dc:date>2023-10-30T15:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Downloading Selected Attachments</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/downloading-selected-attachments/m-p/1343369#M74631</link>
      <description>&lt;P&gt;thanks do you have an example that I could add to the script&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 16:22:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/downloading-selected-attachments/m-p/1343369#M74631</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2023-10-30T16:22:31Z</dc:date>
    </item>
  </channel>
</rss>

