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:

  • Buttons and tools
    Buttons and tools are simple controls that can appear on toolbars or—in the case of buttons—on menus.
  • Combo boxes
    A combo box provides a drop-down list of items and can optionally provide an editable input area.
  • Menus and context menus
    A menu presents a drop-down list of buttons, submenus, and multi-items. Menu items can come from built-in sources, add-in sources, or a combination of both. Menus are typically hosted on toolbars, but they may also appear independently as context (pop-up) menus and root menus.
  • Multi-items
    A multi-item is a dynamic collection of menu items created at run time. Multi-items are useful when the items on a menu cannot be determined prior to run time or the items need to be modified based on the state of the system.
  • Toolbars
    A toolbar can host buttons, tools, menus, tool palettes, and combo boxes. As with menus, controls that appear on toolbars can come from built-in sources, add-in sources, or a combination of both. Toolbars can be configured to automatically appear when initially added to an application to make their presence more obvious to users.
  • Tool palettes
    Tool palettes provide a compact way to group a related set of tools. The most recently used tool appears on the toolbar alongside a small drop-down button used to access other tools in the group. As with menus, tools that appear on tool palettes can come from built-in sources, add-in sources, or a combination of both.
  • Dockable windows
    Dockable windows are floating or docked windows that appear within the ArcGIS Desktop applications. You can populate dockable windows with any sort of content: charts, slide shows, video, mini-maps, or custom dialog boxes containing other controls—including ESRI controls. Add-in developers have considerable control over where the dockable window initially appears and whether it will be grouped with other dockable windows.
  • Application extensions
    Application extensions are used to coordinate activities between other components—such as buttons, tools and dockable windows—within a containing add-in. Application extensions are usually responsible for storing state associated with the add-in as a whole and are often used to listen for and respond to various events exposed by the host application. Application extensions can be configured to load when needed or automatically when their associated application is started; extensions can also be configured to appear in the standard ArcGIS extension dialog box.
  • Editor extensions
    Editor extensions allow you to customize your editing workflows by plugging directly into the editing framework. As opposed to application extensions, editor extension add-ins are loaded when the edit session starts (Editor>Start Editing). You can customize the behavior of your editing session (for example, listening for edit events) by creating editor extensions.
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.

 

This entry was posted in Uncategorized and tagged , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

30 Comments

  1. tomfumb says:

    Can you please fix the links for Building custom UI elements using add-ins and How to migrate from COM components to add-ins at the end of this post?

  2. rpe2 says:

    I just fixed the links. Sorry about that.

    -Rob

  3. ckerzman says:

    Do you know if you can use add-ins for the same functionlity as a Feature Class extension? This would be great since Feature Class extensions have to be installed on each client machine.

  4. thomasl@informi.dk says:

    Hi,

    We’re currently looking into deploying ArcObjects customizations using add-ins located on a centralized network share. How does this work? Are the underlying assemblies loaded from the central network share once and at the first use or can we expect a lot of network traffic?
    How does it impact performance compared to distributing the add-ins to each seperate client?

    Thanks in advance

  5. rpe2 says:

    The assembly packaged up in the add-in is automatically unpacked/copied on each client machine (e.g. C:UsersvaneschAppDataLocalESRIDesktop10.0AssemblyCache). If an admin needs to update the add-in, they only have to update the network share, not each client. The add-in framework will automatically update all the clients with the new add-in assembly the next time they restart the target Desktop application, ArcMap for example. Note, the admin does have to increment the add-ins version number (xml attribute) for this scenario to work.

  6. juq says:

    Hi. I have created an Add-In in Visual Studio and it works on my version of Arc 10. But now how do I give this to my colleagues. What is the actual file or directory that I have to send out?? I can’t find this crucial step anywhere on the help system!

  7. crperrea says:

    Jug – did you find any help on giving your Add-In to your colleagues? I have the same situation.

  8. thomasl@informi.dk says:

    Have you had a readthrough of

    http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Sharing_add_ins/0001000009tm000000/

    ?

    I have shared my bindebug folder on the network and then mapped that folder as a add-in lookup folder in ArcMap’s add-in manager. It works for me – but this is just an internal deployment. I guess, to deploy externally, copy all the files in the bindebug folder into some central folder on a GIS server at your customer :o )

  9. vanesch says:

    Hi. After building your add-in there will be an .esriAddIn file in your target output folder (e.g. binrelease). The add-in is also copied to your local add-in well-known folder (e.g. C:UsersvaneschDocumentsArcGISAddInsDesktop10.0). The add-in is just the one .esriAddIn file, it’s a zip archive containing all its necessary pieces. To share it with your colleagues you can simply copy the file to a network share they can see, email it to them, or use a thumbdrive. Your colleagues just need to double-click on the add-in file to install it.

    There are some advanced sharing scenarios as well. You can instead copy the add-in to a network share and your colleagues can add the network share as a new well-known folder in the Add-In Manager dialog. This way you can update the add-in at any time and you won’t have to worry about redistributing it. Admins can also establish well-known folders in your registry.

    -Steve

  10. thomasl@informi.dk says:

    Quote: ‘Admins can also establish well-known folders in your registry.’

    Which registry entry is used for this? I tried to search (for values = my network folder, for addins and under Esri) but nothing really appeared to be this specific registry setting.

    I tried to search for it in the SDK help as well, but nothing really showed up.

    ??
    Thomas

  11. juq says:

    Thanks Steve
    What is the process for updating add-ins. I am going with the simple scenario of sharing a add-in file. Does the user have to delete the add-in in the Customize box or just double click the revised add-in?
    Matthew

  12. vanesch says:

    Hi Thomas, check out the last section in this topic.

    http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Advanced_add_in_concepts/0001000004n7000000/

    To add administrator folders, manually enter a new AddInFolders key under the Settings key and add a new string value for each add-in folder.

    HKEY_LOCAL_MACHINESOFTWAREESRIDesktop10.0SettingsAddInFolders

    Please send me any feedback so we can address any issues in 10.1.

    svanesch@esri.com

    Thanks,
    Steve

  13. vanesch says:

    Hi Matthew,

    As long as you increment the number in your new XML file (e.g. 1.0 -> 1.1), the add-in framework will automatically overwrite the old one when they double-click on it. If the applicaiton is running when they do this, they will have to restart to app to load the newer version.

    The same is true for those using a network share or admin folder. You have to increase the Version number so the framemwork knows to a newer verison is available. In this scenario though the end user doesn’t have to do anything (double-click on the add-in) to install it.

    Steve

  14. vanesch says:

    Russell and I are about to start work on our slide deck for this years .NET Add-In presentation at the PDC. Are there any special topics people want covered or want clarity on? We always struggle with how much code to show as well. Last year we wrote a WPF add-in mostly from scratch and some people liked that but others would rather we just paste in the code. Should we code it up live or just walk over the code? I’m also taking suggestions for what this sample should be, last year it was a WPF carousel geodatabase attachment viewer.

    Feel free to email me at svanesch@esri.com

    Thanks,
    Steve

  15. thomasl@informi.dk says:

    Hi Steve,

    Thanks for input regarding settings in the registry (as described in the help section). I have tried it out, without success. Here’s my registry (exported from regedit);

    **************
    Key Name: HKEY_LOCAL_MACHINESOFTWAREESRI
    Class Name:
    Last Write Time: 06-12-2010 – 16:00

    Key Name: HKEY_LOCAL_MACHINESOFTWAREESRIDesktop10.0
    Class Name:
    Last Write Time: 08-02-2011 – 09:29
    Value 0
    Name: 64Bit
    Type: REG_SZ
    Data: True

    Key Name: HKEY_LOCAL_MACHINESOFTWAREESRIDesktop10.0Settings
    Class Name:
    Last Write Time: 08-02-2011 – 09:29
    Value 0
    Name: BlockAddIns
    Type: REG_DWORD
    Data: 0

    Value 1
    Name: AdminAddInLock
    Type: REG_DWORD
    Data: 0×1

    Key Name: HKEY_LOCAL_MACHINESOFTWAREESRIDesktop10.0SettingsAddInFolders
    Class Name:
    Last Write Time: 08-02-2011 – 09:27
    Value 0
    Name: \endkwebdistributedaddins
    Type: REG_SZ
    Data:
    **************

    So, I have an addin placed at \endkwebdistributedaddins, but the addin never appears in my add in manager and the path is not visible either, neither is the toolbar or command accessible from the customize mode. Do I have the correct registry settings (above) and do I need to restart my computer for this do take effect (tried that, but with same result)

    Also, in the addin manager, I can still change the security option (fx. load all addins without restrictions), even though I have set the registry flag, AdminAddInLock, to 1

    Any help will be appreciated, since we’re going to roll out at a customer soon ;o)

    Thanks

  16. vanesch says:

    Hi Thomas, I think you’re running 64 bit Windows, can you try moving the settings down under the following key?

    HKEY_LOCAL_MACHINESOFTWAREWow6432NodeESRIDesktop10.0Settings

  17. thomasl@informi.dk says:

    Steve,

    Your hint about using this reg key for 64 bit machines works.

    “HKEY_LOCAL_MACHINESOFTWAREWow6432NodeESRIDesktop10.0Settings”

    Thanks a lot for input. I think it would be useful to many 64 bit machine users/developers/administrators if this knowledge of yours was reflected in the online documentation :o )

    Also, a change request for future releases: it would be handsome to see the addinfolders from registry in the addinmanager.

    Thanks for your help
    thomas

  18. ahmad2aa says:

    Did someone tried to use windows forms in ArcGIS Add-ins? Is there anyway for developing addins based tools using windows forms or any workaround to use forms. Please let me know if anyone have any suggestion or any recommendations on it.

    Your help is appreciated.

    Ahmad

  19. vanesch says:

    Ahman, you have a small bug in your code:

    Protected Overrides Sub OnClick()
    Dim frmMyAddinButton As New Windows.Forms.Form()

    Dim frmMyAddinButton As New frmMyAddinButton()

  20. vanesch says:

    Ahmad, you have a small bug in your code:

    You are creating an empty form rather than the one you designed.

    Dim frmMyAddinButton As New Windows.Forms.Form()

    should be:

    Dim frmMyAddinButton As New frmMyAddinButton()

    This should get you going. Let me know if you have any more questions.
    Steve

  21. amarsden says:

    Hi

    I’m having an issue, currently being looked at by esri(uk) support, but I thought I’d post here as well, in case others have had it.

    Add-Ins install fine, they appear in the List of Add-Ins. However what is missing is the category in the category list, so the addin buttons cannot be edited.

    On some accounts this works fine. So far the only difference we can see is that the test accounts that work have a local “My Documents” where as the test accounts that fail have a networked “my documents”

    Setting ArcMap to look in a 2nd location (c:temp) fails as well.

    It is if the bit of code that scans all addins for valid category names is missing the ability to scan networked “My Documents”

    Cheers

    Adrian

  22. sindhuns says:

    I am trying to develop a tool to automate digitization of line features between two point features using ArcObjects. Is it possible to do this using Add-ins or i have to go for ArcEngine?

  23. thomasl@informi.dk says:

    #sindhuns,

    You can do this in ArcEngine or in add-ins. The underlying ArcObjects is the same, so if you seperate GUI from logic you will even be able to re-use your code between the two environments.

  24. juq says:

    What size should the AddIn main image be in pixels? The one that appears in the Add-In Manager?

    Matthew

  25. kieuhanh31 says:

    i increased the version 1.0 to 1.1 on my shared Add-In. the local cache picked up the new dll (i checked my local folder C:UsershtranAppDataLocalESRIDesktop10.0AssemblyCache{CE1D2552-BB78-13FD-DE9C-0AC1980231C5}), however, my mxd has two buttons for my Add-Inn tool and they both work.

    do I miss some setting here or it is a bug or the Add-In manager?
    Thank you
    Hanna

  26. suresh.rajamani says:

    I need to add some config xml files to add-in component.How to add the xml file while installing the addin.

  27. chirag601 says:

    I have dockable window in ArcCatalog Add-Ins. How would I make that dockable window available to ArcMap Add-Ins ?

  28. pbartsch says:

    I’m trying to create a custom tool add-in. When I go through the steps to create this tool add-in, there does not seem to be the plumbing code for on mouse down, on mouse up, etc. I created a button add-in just fine, what’s the trick to creating a tool add-in that allows you to click on the display, and fire off code in the onMouseDown routine? OnMouseDown and OnMouseUp do not show up when creating an Add-in Tool. I can get the OnMouseDown and OnMouse Up to show up when I create a form, and create a tool on the form, but there’s got to be a way to execute a tool directly from the tool bar. What’s the trick?

  29. warpengine says:

    I am just transitioning to ArcGIS 10.0 and looking to update my extension from VB6 to .NET. Is there a book that I can buy that details the steps I need to create an application extension for ArcMap? I’ve had some help from ESRI tech support but rather than just follow the steps I want to know what each step means and what the options are. For example, the pros and cons of making a JIT extension. Also the various objects I can place in the extension have some options which I don’t fully understand.

    Thanks

  30. brad234 says:

    Is there a way to automate the install of an add-in so the user has a single click that installs the add-in and puts it on a toolbar?