3

I am pretty new to ArcGis and ArcPy, so I apologize if my question seems straightforward. However, I have been looking on the web for quite a while and didn't find any answer so far. I am using ArcGIS 10.2 for Desktop with Win7pro.

What I am trying to achieve is the following :

  1. Run a script tool (or model) from the ArcGis window (that's easy)
  2. This prompts the usual parameters window in which you fill all the needed fields (easy too)
  3. At some point during the execution of the tool, I would like another tool to be executed (before the first tool stops its execution). When that's the case, I would like ArcGis to prompt a new window in which the user can enter the needed parameters for this tool.

    enter image description here

My basic idea was to use only python code to prompt python GUI using TKinter during the execution of the script tool. I however understood that TKinter is not supported by ArcGis... Is that true ? If yes, any other idea ?

  • Could we have a bit more info on why you would like to execute another tool midway through the first tool? Does that mean you'd like to have two tools executing simultaneously after that point? – XIY Oct 31 '14 at 11:53
  • Hi XIZ, Here are some more info : I'd like to create a tool that allow the user to create new features in different shapefiles and tables contained in the same geodatabase, following a given pattern. e.g. : 1. create a new point in input_point.shp 2. for this point, create associated operations in a table. As many new operations as the user wants to enter 3. for each new operation, create (or not) an associated output point in another output_point.shp I'll try to add an image to illustrate my workflow... – vchapuis Nov 3 '14 at 7:17
2

Sounds like you are asking to use the pythonaddins module and GPToolDialog method? I've not used this before so can't really comment on it. A quick look on the ESRI GeoNet forum threw up various threads about this, I would recommend you read those first before you try anything.

  • The pythonaddins.GPToolDialog method just calls the script tool from a button; it doesn't allow you to enter parameters part way through that tool. The python-addin button isn't even aware how far through the tool is, or when it has finished. – XIY Oct 31 '14 at 11:36
  • You'll need to make a script tool and write a simple script to call the tool dialogue. You'll then need to add the script tool to your model in the place where you want it to be called. Then set the input into the script tool as a precondition. This will force the model to execute everything up to the script tool before the script tool is called. – jbalk Jan 18 '17 at 6:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.