Notes and Advice on Programming for ArcGIS...
Back to the
GIS
Tutorials & Help Page... Back
to the
SAL Home Page...
The text below is taken from an online GIS list serve hosted by ESRI. The original question is followed by a summary of member responses...
~ ~ ~ ~ ~
ORIGINAL POST (11/2007):
Here's a short poll designed to pick the brains of expert GIS programmers out there...
What advice would you give someone wanting to learn how to customize ArcMap? In particular:
1) What scripting 'flavor' is most useful, versatile, powerful, or easiest to learn (Python, C#, VBA/ArcObjects, etc)?
2) More importantly, which one is less likely to cease to be supported in the next version of ArcMap (Avenue legacy)?
3) Where to start? What are the most recommended/most useful training courses, websites, or reference books?
4) Any other important considerations?
~~~~~~~~~~~~~~~~~~~~~~~
1) FIRST STEP - Consider your main goal.
If you are just automating geoprocessing tasks without the need for a user interface, then using Python is your best bet. Model Builder is a great tool for routine geoprocessing tasks. You can export a model to Python, study it and modify it as needed.
If you need to create custom interfaces and tools for a few users, then go with VBA/ArcObjects. It is relatively easy to learn and there are tons of examples out there on the ESRI support website. Visual Basic Editor is included with ArcMap.
If you need to create portable custom tools for a community of users (via Server or with a pre-compiled .dll) or are interested in programming as a specialty in the GIS field, then you may want to consider jumping into the deep end and learning VB.NET and/or C#.
What is easiest to learn?
Python and VBA (don't require compiling and are COM-based)
What is not so easy?
VB.NET & C# (both are .NET-based and are compiled) Both are also more powerful and versatile, but are more difficult to learn and development is more labor intensive. They also introduce COM-NET interoperability issues with use with ArcObjects. Not usually recommended for beginners.
2) Which one is more likely to be supported in the future?
Python is widely favored and supported in the programming community. It is an open-source language and is also platform independent. Most people that responded thought that Python is here to stay but can't say what ESRI will do, although most predict that ESRI will only increase support for it (i.e. reducing dependence on Microsoft?).
VBA only runs on Windows (a non-issue if you are using it with ArcMap via ArcObjects). Many other Windows applications use it for customization and can talk to ArcMap through COM automation.
Nice...except that Microsoft has already migrated to VSTA (VBA's replacement - see http://msdn2.microsoft.com/en-us/isv/bb190538.aspx).
Only ESRI knows how long before they migrate too.
VB.NET and C#...??? Most of the serious programmers said they were using these or were getting ready to step up from VBA. There will always be a new generation of the C-language family evolving. The good news is that once you understand the basics of one, upgrading to the latest one is easy.
3) Where to start?
Learn Python - start by creating a model in Model Builder, export it as a python script and study it.
Good references for Python are:
http://forums.esri.com/forums.asp?c=93&s=1729#1729Python for Dummies (book)
ESRI related python forum -
For VBA/ArcObjects - start by going through the many examples provided in the Developer Kit included with ArcMap, read the Desktop Developers Guide (also included).
ESRI has many online forums dedicated to ArcObjects Getting to Know ArcObjects (book) is great for beginners Exploring ArcObjects (book) - a great cure for insomnia but very helpful VBA Developer's Handbook (book) Programming with ArcObjects (ESRI instructor led course) pricey but very highly recommended Many other ESRI online courses (some are free or at low cost)
VB or C#
Download Microsoft Visual Studio, Express Edition - free Install the .NET Developer's Kit that comes with ArcMap 9.2 and look through templates and examples Reference EDN (ESRI Developer Network Website) for examples Ask the ESRI listserv or online forums for help
4) Any other important advice?
Keep in mind that understanding the concepts of an object-oriented programming language is half the battle. Once you've done that, making a step up to a harder and more complex language is easier.
Program by 'Frankenstein' method - It is always hardest to start a script from scratch when you are learning. Take scripts that others have made, carve them up, study them and modify as needed.
Shop around for the best price on books. The Software manufacturer Isn't the cheapest in most cases.
Happy programming!
Back to the
GIS
Tutorials & Help Page... Back
to the
SAL Home Page...