Select to view content in your preferred language

When running script in ArcMAP disable/hide the Parameters Window?

5443
7
02-04-2015 11:33 AM
PaulVepraskas
Regular Contributor

Is it possible/could someone show me what to add to a python script so that when it runs in ArcMAP the Parameters Window does not pop up?

Thanks in Advance

Paul

0 Kudos
7 Replies
DanPatterson_Retired
MVP Emeritus

Do you mean so that it has no parameters? or is this a python toolbox that you want certain parameters hidden until some precondition is met... A visual of what you want hidden in your toolbox and when would help

0 Kudos
PaulVepraskas
Regular Contributor

Yes my script has no parameters so when a user click on it they see a parameters window that appears and no inputs to enter so they just hit Ok... I want to streamline the work flow and just remove the parameters window that appears.

0 Kudos
DanPatterson_Retired
MVP Emeritus

Now it makes sense

What about 1 parameter
Do you wish to continue?  with a Yes/No as the parameter type and Yes set as the default.  if they select No, then cancel the script, if yes, it will proceed

0 Kudos
PaulVepraskas
Regular Contributor

No too much work, they will be touching this script frequently in the field.

0 Kudos
MahtabAlam1
Frequent Contributor

Looks like you want a field user friendly button. In this case I would go with a custom button. Please look at Creating a python add-in button

MahtabAlam1
Frequent Contributor

You can run your script from ArcMap's Python window. First you need to import the toolbox or python toolbox.

arcpy.ImportToolbox(r'C:\MyToolbox.pyt')

Now if you have a tool in toolbox defined as MyTool with a single parameter you can call it as:

arcpy.MyTool('Hello')

Hope that helps.

0 Kudos
EricWerfel
Emerging Contributor

ever figure this out? i have the same question

0 Kudos