<?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 boolean variables in toolbox: how are they passed to a python script? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/boolean-variables-in-toolbox-how-are-they-passed/m-p/737257#M57050</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Q: how and in what form are boolean variables passed from a toolbox to its python script?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a python script that works fine when I use 'True' (text string) as an argument in PythonWin, but when I tick the checkbox in the ArcGIS toolbox, it doesn't seem to work... (script behaves as if it has received a 'False')&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use arcpy.GetParamterAsText(), assuming that even if the argument gets passed as a boolean from the toolbox, it would still be converted to text string. But if it does, shouldn't it be resulting in the same 'True' text string? That doesn't happen, judging from the different behaviour of the script. Or would it be the value 1 that gets passed as a '1' text string?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thoughts? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maarten&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Feb 2012 02:55:14 GMT</pubDate>
    <dc:creator>MaartenHofman1</dc:creator>
    <dc:date>2012-02-08T02:55:14Z</dc:date>
    <item>
      <title>boolean variables in toolbox: how are they passed to a python script?</title>
      <link>https://community.esri.com/t5/python-questions/boolean-variables-in-toolbox-how-are-they-passed/m-p/737257#M57050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Q: how and in what form are boolean variables passed from a toolbox to its python script?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a python script that works fine when I use 'True' (text string) as an argument in PythonWin, but when I tick the checkbox in the ArcGIS toolbox, it doesn't seem to work... (script behaves as if it has received a 'False')&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use arcpy.GetParamterAsText(), assuming that even if the argument gets passed as a boolean from the toolbox, it would still be converted to text string. But if it does, shouldn't it be resulting in the same 'True' text string? That doesn't happen, judging from the different behaviour of the script. Or would it be the value 1 that gets passed as a '1' text string?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thoughts? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maarten&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 02:55:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/boolean-variables-in-toolbox-how-are-they-passed/m-p/737257#M57050</guid>
      <dc:creator>MaartenHofman1</dc:creator>
      <dc:date>2012-02-08T02:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: boolean variables in toolbox: how are they passed to a python script?</title>
      <link>https://community.esri.com/t5/python-questions/boolean-variables-in-toolbox-how-are-they-passed/m-p/737258#M57051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;IIRC they´re passed as lower case string.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 06:21:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/boolean-variables-in-toolbox-how-are-they-passed/m-p/737258#M57051</guid>
      <dc:creator>RaphaelR</dc:creator>
      <dc:date>2012-02-08T06:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: boolean variables in toolbox: how are they passed to a python script?</title>
      <link>https://community.esri.com/t5/python-questions/boolean-variables-in-toolbox-how-are-they-passed/m-p/737259#M57052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Rafael.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;it does seem to get passed in lower case. It works now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the confusion arose because I used upper case True and False (boolean, NOT str) to set arcpy.env.qualifiedFieldNames and assumed it would work the same for the string arguments passed from the toolbox&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks again&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Feb 2012 13:50:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/boolean-variables-in-toolbox-how-are-they-passed/m-p/737259#M57052</guid>
      <dc:creator>MaartenHofman1</dc:creator>
      <dc:date>2012-02-08T13:50:24Z</dc:date>
    </item>
  </channel>
</rss>

