Where to find the full code for stock tools in ArcMap?

2689
5
11-19-2014 12:46 PM
MorganHarris
New Contributor III

Does anyone know if there is a way to view the source code of tools? I know I can get the python script to run the tool from esri help, but I am trying to find the script for Buffer 3D so that I can modify it to make a new script. I'm a newbie to scripting language and creating scripts so any help is greatly appreciated!

0 Kudos
5 Replies
ChrisDonohue__GISP
MVP Alum

I dont' know if this will specifically work for Buffer 3d, but if you are looking for Python code for a tool, you can often get it from running the tool, then exporting the Python Snippet.  Check out Dan Patterson's posts (part-way down) in this recent thread - he details how to do this:

https://community.esri.com/thread/116880

Another avenue might be to delve into the world of ArcObjects.  However, that is a more formidible environment than Python for most, and has a much steeper learning curve.

One potential issue - in the past ESRI has stated that they do not expose all of their code, so be aware that there are some processes that may not be available.

Chris Donohue, GISP

MorganHarris
New Contributor III

Thanks for the reply Chris,

The script that I get when I copy the python snippet is just the basic arcpy.Buffer_3D (i.e. it is referencing the tool in the toolbox). I am hoping to get the actual script for the tool itself so that I can see how that tool works (through script) and potentially modify it for a new script tool. Maybe this isn't something you can't do with stock tools in ArcMap? Basically, I want to be able to view to script as it was written to create the tool itself.

0 Kudos
ChrisDonohue__GISP
MVP Alum

As Dan mentioned, the underlying code is protected.

However, ESRI does expose some of it, so people can do development.

Historically, the restrictions ESRI has have changed over time, so it might be best to contact ESRI Tech Support and ask where things are at for your particular situation.

MorganHarris
New Contributor III

Ok, thanks for the information!

0 Kudos
DanPatterson_Retired
MVP Emeritus

if you are looking to modify the underlying compiled code, you can't ... not legally anyway