<?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: Toolbox Tool parameter visible but not enabled in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/toolbox-tool-parameter-visible-but-not-enabled/m-p/1308850#M68182</link>
    <description>&lt;P&gt;As Dan said, you could set it to Derived, that will show the "No parameters" message.&lt;/P&gt;&lt;P&gt;Alternatively, you can just reset the parameter's value in the updateParameters() method:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;class Tool(object):
    def __init__(self):
        self.label = "Tool"
        self.description = ""
        self.canRunInBackground = False

    def getParameterInfo(self):
        return [
            arcpy.Parameter(name="code", displayName="Land Use Code", datatype="GPString", parameterType="Required", direction="Input")
            ]

    def updateParameters(self, parameters):
        parameters[0].value = "9999 - Not Classifiable"

    def updateMessages(self, parameters):
        parameters[0].setWarningMessage("This parameter is for information only, you can't edit it.")

    def execute(self, parameters, messages):
        return&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 17 Jul 2023 23:04:02 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2023-07-17T23:04:02Z</dc:date>
    <item>
      <title>Toolbox Tool parameter visible but not enabled</title>
      <link>https://community.esri.com/t5/python-questions/toolbox-tool-parameter-visible-but-not-enabled/m-p/1308806#M68178</link>
      <description>&lt;P&gt;I am adapting a custom Python toolbox from ArcMap to ArcGIS Pro which assigns land use codes to parcels. This specific tool is for a special "Uncodable" label, so there is no user input besides clicking run.&lt;/P&gt;&lt;P&gt;In ArcMap, the code parameter appears filled in with the default value, but not editable:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="samuel_e_0-1689626301467.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/75565i59EC4DC26E7D4ADA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="samuel_e_0-1689626301467.png" alt="samuel_e_0-1689626301467.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I would like to know if there is a way to do the same in Pro: can I have the parameter be visible, but disabled so it can't be changed?&lt;/P&gt;&lt;P&gt;I want this so coders can do a visual check that Yes, this is the right code that I want to apply. If it's not possible to do that, is there a way to just put descriptive text in the Parameters pane saying "You are going to code it such and such"?&amp;nbsp;Or can I add a message that no action is required? Since there&amp;nbsp;&lt;EM&gt;is&lt;/EM&gt; a parameter, but disabled, I can't even get the "no parameters" message.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 20:45:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/toolbox-tool-parameter-visible-but-not-enabled/m-p/1308806#M68178</guid>
      <dc:creator>samuel_e</dc:creator>
      <dc:date>2023-07-17T20:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: Toolbox Tool parameter visible but not enabled</title>
      <link>https://community.esri.com/t5/python-questions/toolbox-tool-parameter-visible-but-not-enabled/m-p/1308818#M68180</link>
      <description>&lt;P&gt;would a derived parameter work?&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/setting-script-tool-parameters.htm" target="_blank"&gt;Setting script tool parameters—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;you can use SetParameterAsText or SetParameter there&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 21:12:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/toolbox-tool-parameter-visible-but-not-enabled/m-p/1308818#M68180</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2023-07-17T21:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Toolbox Tool parameter visible but not enabled</title>
      <link>https://community.esri.com/t5/python-questions/toolbox-tool-parameter-visible-but-not-enabled/m-p/1308850#M68182</link>
      <description>&lt;P&gt;As Dan said, you could set it to Derived, that will show the "No parameters" message.&lt;/P&gt;&lt;P&gt;Alternatively, you can just reset the parameter's value in the updateParameters() method:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;class Tool(object):
    def __init__(self):
        self.label = "Tool"
        self.description = ""
        self.canRunInBackground = False

    def getParameterInfo(self):
        return [
            arcpy.Parameter(name="code", displayName="Land Use Code", datatype="GPString", parameterType="Required", direction="Input")
            ]

    def updateParameters(self, parameters):
        parameters[0].value = "9999 - Not Classifiable"

    def updateMessages(self, parameters):
        parameters[0].setWarningMessage("This parameter is for information only, you can't edit it.")

    def execute(self, parameters, messages):
        return&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 17 Jul 2023 23:04:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/toolbox-tool-parameter-visible-but-not-enabled/m-p/1308850#M68182</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-07-17T23:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Toolbox Tool parameter visible but not enabled</title>
      <link>https://community.esri.com/t5/python-questions/toolbox-tool-parameter-visible-but-not-enabled/m-p/1308858#M68185</link>
      <description>&lt;P&gt;With a custom python toolbox, you can set the above within the tool dialog&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 23:17:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/toolbox-tool-parameter-visible-but-not-enabled/m-p/1308858#M68185</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2023-07-17T23:17:48Z</dc:date>
    </item>
  </channel>
</rss>

