Arcpy Toolbox Conversion – How to Convert a Toolbox (.TBX) to a Python Script (.PY)

arcpypython-script-tool

I have a .tbx tool box, which runs a script that is incredibly slow.
So what I want to do is to open the python script that is running below the .tbx and make some changes or perhaps write something similar and faster. Is there someway to convert a .tbx ( and not just the form ) into a .py so I can inspect the code that it runs?
to clarify,

it is a third party tool created as a .tbx, and specifically here:
http://www.arcgis.com/home/item.html?id=c1c649ad439442189547c12685fcc9c3

it is slow in running in arcmap, but that is not the central idea, here. I want to open the python underneath the .tbx. As suggested by others i have tried
to right click and export (grayed out) and
also i have tried using a .tbx to .pyt converter (only returns the input form) and one more thing
i has also right clicked and opened in wordpad, but it was nearly illegible.

Best Answer

For third party toolboxes, there will either be an associated python script or the script will be embedded. Check the properties of the tool to see if there is a source script file. If embedded, right-click to export script. There may be password protections.

If it is not a tool, and it seems in this case a model tool, the model can be viewed and modified in ModelBuilder. Simply right-click and edit. From ModelBuilder, you can also export the script to modify or use in a python script tool.

Related Question