The validation tab in your script tool properties allows you to put parameters in categories. The help states:
Put parameters in different categories. Categories are expandable window shades with a collection of parameters.
I am using the categories to organize my parameters, so I don't care about the expandable/collapsible feature; it just adds a lot of time to the user. This is all within a normal toolbox, not a script toolbox. v10.1
Does anyone know how to have these categories expanded by default?
Here is my only validation code. I am only utilizing categories. The other parts are the default.
def initializeParameters(self):
"""Refine the properties of a tool's parameters. This method is
called when the tool is opened."""
self.params[0].category = "General"
self.params[1].category = "General"
self.params[2].category = "Inudaciones"
self.params[3].category = "Cienegas"
self.params[4].category = "DrenajesPrincipal"
self.params[5].category = "DrenajesSensillos"
self.params[6].category = "Inudaciones"
self.params[7].category = "Cienegas"
self.params[8].category = "DrenajesPrincipal"
self.params[9].category = "DrenajesSensillos"
return
Answer
This isn't possible in python, but you can by using a custom stylesheet.
Copy "C:\Program Files (x86)\ArcGIS\Desktop10.2\ArcToolbox\Stylesheets\MdDlgContent.xsl" to the same folder as your script.
Edit line 467 to remove
STYLE="display:'none';"
, i.e. change:
No comments:
Post a Comment