1

I want to find a way to run a tool's UI using arcpy. I know that I can use this code to execute buffer tool

import arcpy

roads = "c:/base/data.gdb/roads"
output = "c:/base/data.gdb/roads_Buffer"

# Run Buffer using the variables set above and pass the remaining 
# parameters in as strings
arcpy.Buffer_analysis(roads, output, "distance", "FULL", "ROUND", "NONE")

This code executes the buffer itself, but I want just display buffer UI just like when we click on buffer. Is there any way to do it?

4

1 Answer 1

1

To give a short answer, after Majid confirms my assumption, you can use Python-Addins to call a tool by a button-click-event.

import pythonaddins
#...skipping more code
def onClick(self):          
    pythonaddins.GPToolDialog(toolPath, "ToolNameFromToolbox")

I'm referring to this Post on ESRI's geonet platform: https://geonet.esri.com/thread/74093 and used this in my own addins.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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