When opening a new tool/toolbox, the categories are closed/condensed by default.
What would I add to my script to make the categories expanded by default?
I also had thought that categories would be a nice way to organize my parameters, but since they are nearly all required, I did a way with categories all together. What I do is just keep my related parameters together in the parameter list.
I did a little digging and this might be doable by setting the stylesheet property of a python Toolbox class. You'll have to convert your script tool to a python Toolbox though, if its not already. I haven't done much in python toolboxes so can't tell if this will work though.
defining-a-tool-in-a-python-toolbox.
and for the style sheet, maybe this can help (borrowed from Stack Overflow):
...
Copy "C:\Program Files (x86)\ArcGIS\Desktop10.2\ArcToolbox\Stylesheets\MdDlgContent.xsl" to the same folder as your script. (or somewhere it can be reached)
Edit line 467 to remove STYLE="display:'none';", i.e. change:
<DIV ID="{PropertyGroupName}" STYLE="display:'none';" onclick="window.event.cancelBubble = true;">
to
<DIV ID="{PropertyGroupName}" onclick="window.event.cancelBubble = true;">
Datatypes include GPLayout, DEFolder, GPBoolean, GPString, GPLong.
I that this too will need a little ArcGIS Pro SDK. The only properties that a Parameter contains is displayName, name, datatype, parameterType, and direction. Pro's UI will default to display depending on the data type of the parameter- what are the data types of the parameters?
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.