<?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: Setting Python Tool Properties in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578364#M45315</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It worked! I was able to extract the attached photos on my local drive. THANKS!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Oct 2016 16:43:24 GMT</pubDate>
    <dc:creator>TimHayes1</dc:creator>
    <dc:date>2016-10-12T16:43:24Z</dc:date>
    <item>
      <title>Setting Python Tool Properties</title>
      <link>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578358#M45309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am new to Python. I created a Python Toolbox - Tool Properties, I cannot change the Name, Label, and the Store Relative Pathnames is grayed out. How do I enable to these features?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 15:24:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578358#M45309</guid>
      <dc:creator>TimHayes1</dc:creator>
      <dc:date>2016-10-12T15:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Python Tool Properties</title>
      <link>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578359#M45310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to be sure... you are following the logic and process described in the help files beginning here...&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/analyze/creating-tools/creating-a-new-python-toolbox.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/creating-tools/creating-a-new-python-toolbox.htm"&gt;Creating a new Python toolbox—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 15:30:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578359#M45310</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-10-12T15:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Python Tool Properties</title>
      <link>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578360#M45311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using ArcGIS 10.2.2, and have never used Python before. I am using NotePad++ as my editor. The script was copied from here:&amp;nbsp;&lt;A class="link-titled" href="http://support.esri.com/technical-article/000011912" title="http://support.esri.com/technical-article/000011912"&gt;How To: Batch export attachments from a feature class&lt;/A&gt;&amp;nbsp;and savedas a&amp;nbsp;.py file using Notepad.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I followed the instructions for Creating a new Python Toolbox, all I need to do is make sure the box next to "Store Relative Paths" is checked. But, when I right click on Tool under the Toolbox.pyt and go to Properties, the "Store Relative Path Names" is grayed out. How do I get this so it is not grayed out and I can add a check in the box next to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am totally new to Python.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 16:10:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578360#M45311</guid>
      <dc:creator>TimHayes1</dc:creator>
      <dc:date>2016-10-12T16:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Python Tool Properties</title>
      <link>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578361#M45312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the directions in the article you link to are for a custom toolbox (right-click New&amp;gt;Toolbox) instead of a Python Toolbox. Try with a custom toolbox and then follow steps 2 -6 in the article.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 16:16:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578361#M45312</guid>
      <dc:creator>BrittneyWhite1</dc:creator>
      <dc:date>2016-10-12T16:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Python Tool Properties</title>
      <link>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578362#M45313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I only see 3 steps in article:&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/analyze/creating-tools/creating-a-new-python-toolbox.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/creating-tools/creating-a-new-python-toolbox.htm"&gt;Creating a new Python toolbox—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 16:24:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578362#M45313</guid>
      <dc:creator>TimHayes1</dc:creator>
      <dc:date>2016-10-12T16:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Python Tool Properties</title>
      <link>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578363#M45314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry! I was referring to the &lt;A href="http://support.esri.com/technical-article/000011912"&gt;How To: Batch export attachments from a feature class &lt;/A&gt;you are following. I suggest not creating a Python toolbox and create a Custom one instead. Here are the instructions for that: &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/managing-tools-and-toolboxes/creating-a-custom-toolbox.htm"&gt;Creating a toolbox&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 16:29:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578363#M45314</guid>
      <dc:creator>BrittneyWhite1</dc:creator>
      <dc:date>2016-10-12T16:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Python Tool Properties</title>
      <link>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578364#M45315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It worked! I was able to extract the attached photos on my local drive. THANKS!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 16:43:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578364#M45315</guid>
      <dc:creator>TimHayes1</dc:creator>
      <dc:date>2016-10-12T16:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Python Tool Properties</title>
      <link>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578365#M45316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more thing, the photo attachments download, but their names include the Attachment ID at the front, like this:&lt;/P&gt;&lt;P&gt;ATT3_CIP Photographs_-1_0_ArcGISApp_1475269645362.jpg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea how to auto-remove the "ATT3_" from the photo file name automatically?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know I could do a Field Calculate on the Photo_ATTACH Table and add the "ATT3_" before each Photo. But is there a better way?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2016 16:50:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578365#M45316</guid>
      <dc:creator>TimHayes1</dc:creator>
      <dc:date>2016-10-12T16:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Python Tool Properties</title>
      <link>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578366#M45317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The script generates this filename here.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;filenum &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"ATT"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"_"&lt;/SPAN&gt;
filename &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; filenum &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is how I'd do it (equivalent to the above). 0 and 1 format indexes are used to flip the order (put the first argument second). &lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;filename &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"ATT{1}_{0}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; item&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You could modify your script tool to set up a filename just how you want it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:51:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578366#M45317</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-12T00:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Python Tool Properties</title>
      <link>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578367#M45318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to remove the "ATT_1" etc... all together. Do not want to have any filename added, just want to use the original file names with nothing added a prefix or suffix via the script tool. How can this be done?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2016 04:55:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578367#M45318</guid>
      <dc:creator>TimHayes1</dc:creator>
      <dc:date>2016-10-13T04:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Python Tool Properties</title>
      <link>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578368#M45319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on the code in the referenced KB article above, using filename = str(item[1]) should only include the original filename of the attachement/photo.&lt;/P&gt;&lt;P&gt;It might have been changed, but previously photos were attached with a name like Photo1, Photo2, ... etc, repeated for each feature. If that's still the case, then you may find that your attachments with the same name&amp;nbsp;are overwritten and you need to use a prefix to overcome this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Oct 2016 11:09:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-python-tool-properties/m-p/578368#M45319</guid>
      <dc:creator>zkovacs</dc:creator>
      <dc:date>2016-10-13T11:09:17Z</dc:date>
    </item>
  </channel>
</rss>

