<?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: How to add multi parameters, looping through each one in order to complete?  in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-add-multi-parameters-looping-through-each/m-p/335824#M26307</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you describe what you are trying to do? What are your inputs, outputs, and processes? Who will run this process? That info would help us figure out the best way to structure your script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Micah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Feb 2018 18:10:35 GMT</pubDate>
    <dc:creator>MicahBabinski</dc:creator>
    <dc:date>2018-02-27T18:10:35Z</dc:date>
    <item>
      <title>How to add multi parameters, looping through each one in order to complete?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-add-multi-parameters-looping-through-each/m-p/335822#M26305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the script in picture below that is exported from a model builder running through the erase tool multiple times in order.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to add a multi value parameter which I think I have found to do in parameter tab in properties of script tool.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I get all the inputted feature classes to be looped through erase tool in order added, as the current tool does, saves editing the script or model&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Multi Erase Scrip" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/397559_Erase_Python_Script.PNG" style="width: 804px; height: 597px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Feb 2018 16:23:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-add-multi-parameters-looping-through-each/m-p/335822#M26305</guid>
      <dc:creator>JonathanHallam2</dc:creator>
      <dc:date>2018-02-27T16:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to add multi parameters, looping through each one in order to complete?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-add-multi-parameters-looping-through-each/m-p/335823#M26306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to use arcpy.GetParameter and set an input parameter as a multi-value parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
myList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameter&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; thing &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; myList&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;thing&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.GetParameter lets you access myList as a list object instead of using arcpy.GetParameterAsText which sets it as a string object and you needing to split it yourself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="397566" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/397566_pastedImage_1.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set the input as a multi-value input which will let you add items to a list:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="397575" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/397575_pastedImage_3.png" style="width: 620px; height: 328px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The loop simply prints the values of the myList object, so that's the business section of your script:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="397576" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/397576_pastedImage_4.png" style="width: 620px; height: 326px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd also suggest you avoid overiding built-in types like &lt;STRONG&gt;list&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:54:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-add-multi-parameters-looping-through-each/m-p/335823#M26306</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2021-12-11T15:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to add multi parameters, looping through each one in order to complete?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-add-multi-parameters-looping-through-each/m-p/335824#M26307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you describe what you are trying to do? What are your inputs, outputs, and processes? Who will run this process? That info would help us figure out the best way to structure your script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Micah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Feb 2018 18:10:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-add-multi-parameters-looping-through-each/m-p/335824#M26307</guid>
      <dc:creator>MicahBabinski</dc:creator>
      <dc:date>2018-02-27T18:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to add multi parameters, looping through each one in order to complete?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-add-multi-parameters-looping-through-each/m-p/335825#M26308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Micah,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to set up a tool script that runs a multi erase function. The original purpose is to erase planning restriction (inc flood zones, SSSI's, Conservation areas) data on company parcel data to see what land land is left that has no restrictions. I would like to have an output after every erase. I am trying to create a script for this to be run with different data inputs, not necessarily for restrictions, for different projects. The output would be land parcel file after erase features have been erased, at least one output but would like an output after every erase. The processes is erase analysis tool, I created a string of these in a row in model builder with parcel layer first input and then each output becomes input for next erase. The order is key particularly with restrictions as some are more important that others and if outputs created after each erase it creates an audit to go back through if needed. The people running this would be geospatial staff in my department who need it, mainly my analytics team, for mainly site selection analysis specifying suitable available land for customer interests. &amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 00:10:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-add-multi-parameters-looping-through-each/m-p/335825#M26308</guid>
      <dc:creator>JonathanHallam2</dc:creator>
      <dc:date>2018-02-28T00:10:53Z</dc:date>
    </item>
  </channel>
</rss>

