<?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 Set a tool parameter category to be open by default in script of a .atbx toolbox. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/set-a-tool-parameter-category-to-be-open-by/m-p/1415760#M70476</link>
    <description>&lt;P&gt;Is it possible, perhaps in the validation script of a tool, to enable a category to be open by default on opening the tool? The user always has to expand the category to see the included parameters but I'd like to have it open by default.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MattHowe_0-1714125070630.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/102254i11A655AB9FE7D6DC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MattHowe_0-1714125070630.png" alt="MattHowe_0-1714125070630.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 Apr 2024 09:52:07 GMT</pubDate>
    <dc:creator>MattHowe</dc:creator>
    <dc:date>2024-04-26T09:52:07Z</dc:date>
    <item>
      <title>Set a tool parameter category to be open by default in script of a .atbx toolbox.</title>
      <link>https://community.esri.com/t5/python-questions/set-a-tool-parameter-category-to-be-open-by/m-p/1415760#M70476</link>
      <description>&lt;P&gt;Is it possible, perhaps in the validation script of a tool, to enable a category to be open by default on opening the tool? The user always has to expand the category to see the included parameters but I'd like to have it open by default.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MattHowe_0-1714125070630.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/102254i11A655AB9FE7D6DC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MattHowe_0-1714125070630.png" alt="MattHowe_0-1714125070630.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 09:52:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/set-a-tool-parameter-category-to-be-open-by/m-p/1415760#M70476</guid>
      <dc:creator>MattHowe</dc:creator>
      <dc:date>2024-04-26T09:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Set a tool parameter category to be open by default in script of a .atbx toolbox.</title>
      <link>https://community.esri.com/t5/python-questions/set-a-tool-parameter-category-to-be-open-by/m-p/1415769#M70477</link>
      <description>&lt;P&gt;Hi Matt&lt;/P&gt;&lt;P&gt;I think the behaviour of a Category is for it to be 'closed' by default. I think the reason is to save space on the form to hold optional arguments. As you are probably aware, optional arguments in the category should have a default value (where appropriate) and you should not include mandatory / required arguments.&lt;/P&gt;&lt;P&gt;Probably not the answer you were hoping for but it probably conforms your assumptions.&lt;/P&gt;&lt;P&gt;many thanks ed&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 10:13:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/set-a-tool-parameter-category-to-be-open-by/m-p/1415769#M70477</guid>
      <dc:creator>EdMorris</dc:creator>
      <dc:date>2024-04-26T10:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set a tool parameter category to be open by default in script of a .atbx toolbox.</title>
      <link>https://community.esri.com/t5/python-questions/set-a-tool-parameter-category-to-be-open-by/m-p/1415773#M70478</link>
      <description>&lt;P&gt;If the newer .atbx toolboxes can use a custom xsl stylesheet (I don't know...), then this old ArcGIS Desktop answer might be useful:&lt;/P&gt;&lt;P&gt;&lt;A href="https://gis.stackexchange.com/q/226569" target="_self"&gt;Controlling Categories in Script Validation Tools - Expanding Groups By Default&lt;/A&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;This isn't possible in python, but you can by using a custom stylesheet.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Copy "C:\Program Files (x86)\ArcGIS\Desktop10.2\ArcToolbox\Stylesheets\MdDlgContent.xsl" to the same folder as your script.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Edit line 467 to remove&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;STYLE="display:'none';", i.e. change:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;DIV&lt;/SPAN&gt; &lt;SPAN class=""&gt;ID&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"{PropertyGroupName}"&lt;/SPAN&gt; &lt;SPAN class=""&gt;STYLE&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"display:'none';"&lt;/SPAN&gt; &lt;SPAN class=""&gt;onclick&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"window.event.cancelBubble = true;"&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;to&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;DIV&lt;/SPAN&gt; &lt;SPAN class=""&gt;ID&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"{PropertyGroupName}"&lt;/SPAN&gt; &lt;SPAN class=""&gt;onclick&lt;/SPAN&gt;=&lt;SPAN class=""&gt;"window.event.cancelBubble = true;"&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Then in your script tool properties, set the stylesheet property to your edited.xsl.&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DMpHX" style="width: 442px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/102258iC4F6E6C70F6795DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="DMpHX" alt="DMpHX" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;BLOCKQUOTE&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 26 Apr 2024 10:34:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/set-a-tool-parameter-category-to-be-open-by/m-p/1415773#M70478</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2024-04-26T10:34:01Z</dc:date>
    </item>
  </channel>
</rss>

