addins vs python tools, which makes more sense?

7875
5
Jump to solution
07-31-2014 10:43 AM
DrewDowling
Occasional Contributor III

With the upcoming release of ArcGIS Pro and the eventual retirement of Desktop and ArcObjects does it make more sense to start new customizations in python or continue to use ArcObjects/addins for the time being?

I have a new project about to start that will involve a custom toolbar for desktop with about 10 custom editing tools. Previously I have always carried out such a project in .NET and ArcObjects. But now I wonder:

  1. Is the functionality now there to do this in python (At arcgis 10.1)?
  2. If I continue to use ArcObjects what is a resonable expectation on the toolbar life expectancy?

The current editing environment is ArcGIS desktop 10.1 and is likely to stay that way for the next 1 - 2 years.

0 Kudos
1 Solution

Accepted Solutions
JamesCrandall
MVP Frequent Contributor

Add-ins *can* be great for *some* development needs.  However, they are also quite limited in comparison to a customization that is fully exposed to ArcObjects.  If your implementation requires fully functional UI components and presentation forms with lots of elements (text boxes, drop-down lists, crystal reports, etc..) you will have a tough time getting those migrated to a python add-in.

If you have to rely soley upon Python Add-In and need the UI functionality, you will need to build Geoprocessing tools/scripts, which of course also provide limited UI components.  The idea is to build these with user interaction processes and components and just launch them from the Add-In:

pythonaddins.GPToolDialog('C:\MyCustomToolbox.tbx', 'MyTool')

Finally, manipulating map elements can also be quite limited.  For example, try adding and altering text elements on a Layout view.  Seemingly simple tasks/processes easily handled with ArcObjects customized tools written in VB/C# become very convoluted and difficult to replicate with an Add-In.

View solution in original post

5 Replies
DanPatterson_Retired
MVP Emeritus

Python Add-ins   ArcGIS Help (10.2, 10.2.1, and 10.2.2)‌ are an option depending upon complexity

DrewDowling
Occasional Contributor III

Thanks Dan

I didn't realize python addins were capable of extensions and handling editing events, exactly what I was looking for.

0 Kudos
JamesCrandall
MVP Frequent Contributor

Add-ins *can* be great for *some* development needs.  However, they are also quite limited in comparison to a customization that is fully exposed to ArcObjects.  If your implementation requires fully functional UI components and presentation forms with lots of elements (text boxes, drop-down lists, crystal reports, etc..) you will have a tough time getting those migrated to a python add-in.

If you have to rely soley upon Python Add-In and need the UI functionality, you will need to build Geoprocessing tools/scripts, which of course also provide limited UI components.  The idea is to build these with user interaction processes and components and just launch them from the Add-In:

pythonaddins.GPToolDialog('C:\MyCustomToolbox.tbx', 'MyTool')

Finally, manipulating map elements can also be quite limited.  For example, try adding and altering text elements on a Layout view.  Seemingly simple tasks/processes easily handled with ArcObjects customized tools written in VB/C# become very convoluted and difficult to replicate with an Add-In.

JamesCrandall
MVP Frequent Contributor

Yes, Python Add-in's is what I have had experince with and comparing them to an ArcObjects COM component built with .NET/C# -- they are wildly different in capabilities.

Go ahead and try to build an installed COM/ArcObjects component developed in Visual Studio and attempt to replicate that component in PythonWin

DrewDowling
Occasional Contributor III

Thanks everyone for your reply's. To summarize what I've learned from you and research on my own:

  1. .NET/ArcObject addins are still more flexible, especially for tools requiring a GUI interface.
  2. Python addins are quite advanced, allowing editor extensions and events. They can also call ArcObject libs if necessary but don't handle GUI objects (at least that I can see).
  3. Things are less clear for ArcGIS pro, which caused me to ask this question in the first place. ArcGIS Pro has its own API, not ArcObjects, but it will also handle customizations through the python addin model. At least that is my reading of this excellent response by Jim McKinney

Taking into account all of this from here on in I'm going to use the python addin model as much as possible in ArcGIS Desktop and hope that these addins will translate to ArcGIS Pro. For addins requiring a lot of GUI stuff I'll stick with ArcOjects for now and rewrite  down the line when my users get off of Desktop or ESRI retire it.