ArcMap Add-in (How to View the Code Behind it?)

10580
2
01-02-2015 07:15 PM
ShawnPaulson
New Contributor II

I downloaded some Add-ins which are great but I want to make modifications and add them to some tools that I am working on. Is there a way to look at the raw code behind an Add-in?

Say I wanted to look at the Selection Sample Example.

2015-01-02.jpg

How can we do that? (see the code that was written).

When it comes to scripts for ArcToolBox that are written with python, I can easily see the code by simply right clicking on the script and viewing the code but have no idea how to do it with an Add-in.

Any HELP would be greatly appreciated.

2 Replies
XanderBakker
Esri Esteemed Contributor

An Add-in is basically a ZIP file with a certain folder structure. You can change the extension to .zip and open it. Just look at the content in the Install folder. In case it is written in .NET you will see the dll files. They are compiled and cannot be easily accessed. In case of a Python toolbox you will probably see a toolbox and 1 or more python files.

There are however loads of sample in C# (and VB.NET) available. This is one with a custom selection:

ArcObjects Help for .NET developers

AdamMarinelli
Occasional Contributor

If one or more of the Add-Ins you downloaded happen to be built with the Python Add-In Wizard‌ instead of as  .NET Add-In for Desktop...then it is quite easy to see the python code behind it.

As Xander Bakker‌ mentions, change the file extension or use 7zip to open the .esriaddin file as an archive or extract it.  The source .py file(s) will be located in the "Install" folder.

Add-Ins you have already installed can be found here:  C:\Users\<username>\Documents\ArcGIS\AddIns

0 Kudos