Tuesday, July 6, 2010

My First ESRI Add-in

I've converted my first ArcMap .NET customization to the new ESRI add-in format. I could have just rebuilt my existing COM project with the new 10 libraries, but I wanted to test out the add-in functionality so I dove into the documentation for converting existing projects. The basic workflow for me was to create a new project in Visual Studio of type "ArcMap Add-in". Then I told the wizard what elements I wanted to include in my add-in which for me included a dockable window and a command button. Then I simply copied the code from my old project to the new one. There were only a few minor changes that I need to make including the slink new global variables that make it a cinch to access commonly used objects like ArcMap.Document. After successful debugging and compiling I came up with this:
Now, all I have to do to install my tool is double-click on the esriAddIn file. This is so much simpler than worrying about registering COM .dll's. I can't wait to convert the rest of my projects and start passing them around. Anyone else created any add-in's yet?

No comments:

Post a Comment