<?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 a parameter to a Toolbox GUI to provide a floating numeric value to a script? in ArcGIS Analyse Questions</title>
    <link>https://community.esri.com/t5/arcgis-analyse-questions/how-to-add-a-parameter-to-a-toolbox-gui-to-provide/m-p/846918#M111</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;grief... someone else didn't read the comment line in the sample script &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Apr 2020 17:58:05 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2020-04-01T17:58:05Z</dc:date>
    <item>
      <title>How to add a parameter to a Toolbox GUI to provide a floating numeric value to a script?</title>
      <link>https://community.esri.com/t5/arcgis-analyse-questions/how-to-add-a-parameter-to-a-toolbox-gui-to-provide/m-p/846912#M105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I running a script using the Toolbox in ArcMap, and the script requires inputs to run.&amp;nbsp; Most of these inputs such as file names and folders are pretty straight forward.&amp;nbsp; However, some of the parameters the script uses are simple floating numeric values.&amp;nbsp; The list of parameter types includes "Any Value", and "Long", but these do not work.&amp;nbsp; "Long" requires an integer, and "Any Value seems to behave as though it is looking for a data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can simply set the values in the script, but I want to be able to hand off this tool to folks who would use it in the Toolbox, rather than having to access the script directly.&amp;nbsp; Thanks, and my apologies for what is likely a simple problem!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2020 20:42:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-analyse-questions/how-to-add-a-parameter-to-a-toolbox-gui-to-provide/m-p/846912#M105</guid>
      <dc:creator>RobertTrotter</dc:creator>
      <dc:date>2020-03-31T20:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a parameter to a Toolbox GUI to provide a floating numeric value to a script?</title>
      <link>https://community.esri.com/t5/arcgis-analyse-questions/how-to-add-a-parameter-to-a-toolbox-gui-to-provide/m-p/846913#M106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you retrieving your parameters in the toolbox using GetParameter or GetParameterAsText or sys.argv ?&lt;/P&gt;&lt;P&gt;You need to check what the toolbox returns which is usually a text representation of the parameter.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used some that you have mentioned and just perform the conversion in the script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;x &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;   &lt;SPAN class="comment token"&gt;# parameter is defined as required, input with type Double&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;try&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    x &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; float&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;x&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;  &lt;SPAN class="comment token"&gt;# ensure inputs can be cast &lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;with the requisite check for errors on the humanware side.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:23:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-analyse-questions/how-to-add-a-parameter-to-a-toolbox-gui-to-provide/m-p/846913#M106</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T10:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a parameter to a Toolbox GUI to provide a floating numeric value to a script?</title>
      <link>https://community.esri.com/t5/arcgis-analyse-questions/how-to-add-a-parameter-to-a-toolbox-gui-to-provide/m-p/846914#M107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan, this sounds like a great solution, I have been using both the "arcpy.GetParameter" and the "arcpyGetParametersAsText".&amp;nbsp; The GetParameter function has been useful and simple to use, as long as there is a Data Type that fits the data set well.&lt;/P&gt;&lt;P&gt;I will give this a try and let you know how it goes.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2020 21:09:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-analyse-questions/how-to-add-a-parameter-to-a-toolbox-gui-to-provide/m-p/846914#M107</guid>
      <dc:creator>RobertTrotter</dc:creator>
      <dc:date>2020-03-31T21:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a parameter to a Toolbox GUI to provide a floating numeric value to a script?</title>
      <link>https://community.esri.com/t5/arcgis-analyse-questions/how-to-add-a-parameter-to-a-toolbox-gui-to-provide/m-p/846915#M108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;'Double' is the data type you need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2020 10:50:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-analyse-questions/how-to-add-a-parameter-to-a-toolbox-gui-to-provide/m-p/846915#M108</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2020-04-01T10:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a parameter to a Toolbox GUI to provide a floating numeric value to a script?</title>
      <link>https://community.esri.com/t5/arcgis-analyse-questions/how-to-add-a-parameter-to-a-toolbox-gui-to-provide/m-p/846916#M109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/390241"&gt;David Pike&lt;/A&gt;‌&amp;nbsp; in the comments of my post&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;...input with type Double&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2020 10:53:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-analyse-questions/how-to-add-a-parameter-to-a-toolbox-gui-to-provide/m-p/846916#M109</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-04-01T10:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a parameter to a Toolbox GUI to provide a floating numeric value to a script?</title>
      <link>https://community.esri.com/t5/arcgis-analyse-questions/how-to-add-a-parameter-to-a-toolbox-gui-to-provide/m-p/846917#M110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is excellent, thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2020 15:08:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-analyse-questions/how-to-add-a-parameter-to-a-toolbox-gui-to-provide/m-p/846917#M110</guid>
      <dc:creator>RobertTrotter</dc:creator>
      <dc:date>2020-04-01T15:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a parameter to a Toolbox GUI to provide a floating numeric value to a script?</title>
      <link>https://community.esri.com/t5/arcgis-analyse-questions/how-to-add-a-parameter-to-a-toolbox-gui-to-provide/m-p/846918#M111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;grief... someone else didn't read the comment line in the sample script &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2020 17:58:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-analyse-questions/how-to-add-a-parameter-to-a-toolbox-gui-to-provide/m-p/846918#M111</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-04-01T17:58:05Z</dc:date>
    </item>
  </channel>
</rss>

