Stop Python Toolbox aranging params alphabetically

1442
8
02-08-2017 09:13 AM
RajeshKulandaivelu
New Contributor II

Is that really possible to control Python Toolbox from arranging the params alphabetically, at least the category?

Tags (2)
0 Kudos
8 Replies
DanPatterson_Retired
MVP Emeritus

can you provide an example of what you are talking about?

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

Like Dan said, a little more info would be helpful....but the way I fool things that get sorted, for example, to get my python tools and scripts to show in the order I want, I add a preceeding number, e.g.

01MyFirstTool

02MySecondTool

or something like that.  Might not help you, but just in case...

0 Kudos
RajeshKulandaivelu
New Contributor II

Thanks Dan and Rebecca!

Rebecca,

Yes, I have numbered them but I really don't like that, still trying to find a way for it. Attached are the screen prints of what I was talking about. Pic1 is how I want the Param categories to be sorted (without numbers). If I remove the numbers - it looks the way Pic2 is.

Pic1

- Pic1

Pic2

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

Have you tried reordering them in the Parameters list...notice the up/down arrows on the right?  But keep in mind you may need to modify your script too.

(mine were in alpha order before...by choice)

RajeshKulandaivelu
New Contributor II

Hi,

Thanks, but the one you posted above works for ArcToolbox but not for Python Toolbox. In fact Python toolbox don't have this option, the params have to be managed in the script.

Thanks,

Rajesh

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

ok, sorry.  I don't mess with the Python toolbox yet, just ArcTool boxes and tools using Python scripts so I can create python addins.  I would have thought them to be the same. 

edit: I guess this would be the help page for parameters in Python Toolbars Defining parameters in a Python toolbox—Help | ArcGIS Desktop  althought that still might not help you any.

0 Kudos
DanPatterson_Retired
MVP Emeritus

Again... perhaps you can produce a visual of your issue since it is clear from the documentation that you have full control over the parameter order simply by ordering them logically when you create them ... here is the documentation link so an image and a script would help

0 Kudos
DanPatterson_Retired
MVP Emeritus

Rebecca is correct... the link to working with Script Tools is in this link  There are subsections therein for other information