Add-ins for ArcGIS Desktop 10

ArcGIS 10 introduces several new and innovative features that make it easier for you to customize and extend the ArcGIS Desktop applications, including the new Desktop add-in model. The new add-in model provides you with a declaratively-based framework for creating a collection of customizations conveniently packaged within a single compressed file. Add-ins are easily shared between users as they do not require installation programs or Component Object Model (COM) registration; add-ins are added to a system by simply copying them to a well-known folder and removed by deleting them from this folder. Add-ins can also be shared between users within an organization using a centralized network share.

Add-ins are authored using .NET or Java along with Extensible Markup Language (XML). The XML describes the customizations, while the .NET or Java classes provide the custom behavior. The ArcObjects software development kit (SDK) includes an Add-Ins Wizard that integrates with development environments-such as Eclipse, Microsoft Visual Studio, and the free Express Editions of Visual Studio-to simplify development.

Add-in Types
ArcGIS Desktop applications support a fixed set of add-in types, including the most popular types used in the classic COM-based extensibility model introduced in previous versions of ArcGIS. The following add-in types are supported in the current release:

Managing Add-ins
Add-ins can be obtained from a variety of sources including Web-based repositories, via e-mail, or by browsing the file system or network. You can install an add-in by simply double-clicking an add-in file in Windows Explorer. When double-clicked, the ESRI supplied Add-In Installation Utility validates the add-in and copies it to the appropriate well-known folder. Users are given an opportunity to review the author, description, version, and digital signature information of the add-in before proceeding. This validation step ensures that: the file is copied to the appropriate location; name conflicts are handled; and guarantees that any existing version of the add-in file isn’t overwritten by an older version. This utility also works directly on e-mail attachments and Web page links. See the following screen shot:
Add-ins can also be installed using the Add from file button on the Customize dialog box available in all the ArcGIS Desktop applications. See the following screen shot:
You can access the Customize dialog box via the Customize menu. Add-ins installed using either the double-click or Add from file options are classified as local add-ins. Local add-ins reside within a special well-known/per-user folder on the local machine.
Though add-in files can be manually copied to a well-known folder without using the ESRI Add-In Utility, care must be taken to avoid file name collisions, version overwrites, and so forth. This approach is typically used when sharing add-ins on a network.
As with classic COM components, individual add-in types are accessible via the Customize dialog box. For example, a button defined in an add-in behaves no differently than a COM command, both are listed under their specified category on the Commands tab. From this location, either can be dragged onto any toolbar or menu.
The ArcGIS Desktop applications provide an Add-In Manager dialog box available from the Customize menu. The Add-Ins tab on this dialog box provides detailed information on every installed add-in currently available to the running application. Add-ins targeting ArcGlobe, for instance, will not appear inside ArcMap. See the following screen shot:
The Add-In Manager Options tab lets users add custom well-known add-in folders. The add-in framework will additionally search for add-ins within these custom folders each time the application is started. This option is particularly useful in scenarios where a central network location is used to share add-ins throughout an organization. Add-ins can be added, deleted, and updated in these locations without intervention on any of the client machines; updates will be automatically reflected on the clients when the relevant applications are next re-started. The Options tab can also be used to disable all add-in functionality. See the following screen shot:

From the Add-In Manager, users can also elect to uninstall a particular add-in. Uninstalling an add-in moves the selected add-in file to the system Recycle Bin where it can later be restored if necessary. The Uninstall button is only enabled for local add-ins. To uninstall an add-in originating from a custom add-in folder, simply delete the add-in from the share or remove the custom add-in folder using the Remove Folder button.

Building Add-ins
Add-ins are built using an integrated development environment (IDE), such as Visual Studio Express for .NET and Eclipse for Java, and simple wizards and templates are provided with the ArcObjects SDKs to automatically generate fully stubbed out add-in projects including the XML and class files. In addition, when these projects are built, they automatically generate an add-in file and copy it to a well-known folder. For the most part, the XML is authored by the wizards; however, if you do need to edit the XML by hand, the associated schema file makes edits easy as it provides IntelliSense and on-the-fly validation. To learn more about developing add-ins and using these wizards and templates, see Building custom UI elements using add-ins and How to migrate from COM components to add-ins.

Next Article

Environment Maps to be Retired

Read this article