How to create an add-in tool palette


Summary
This topic guides you through the workflow for creating a tool palette using the Eclipse integrated development environment (IDE). A tool palette is a container for tools that you have created or ESRI provided tools.

In this topic


About the tool palette

A tool palette is a container for tools. These tools can be your tools or ESRI provided system tools. In addition, tool palettes can only be exposed by adding them to an existing toolbar. For more information on creating toolbars, see How to create an add-in toolbar.
This topic guides you through the process of creating a tool palette using the Eclipse IDE. Before beginning this workflow, make sure that you have created an ArcMap add-in project using Eclipse. For more information, see How to create an add-in project in Eclipse
Since there is no difference between creating a tool palette for any ArcGIS for Desktop application, this workflow shows you how to create a tool palette that can be consumed in ArcMap. This topic shows how the tool palette can be used to contain your tools and ESRI provided tools. It also demonstrates how to expose your tool palette so it can be consumed in ArcMap.
The workflow for creating a tool palette in Eclipse consists of the following (done in the order as shown):
  • Creating a tool palette—Examines the process of creating a tool palette in Eclipse.
  • Setting properties—Examines all of the properties that can be set for the tool palette with descriptions.
  • Add functionality—Examines how existing functionality is added to the tool palette, either your add-ins or ESRI provided functionality.
  • Adding the tool palette to a toolbar—Examines the process of adding a tool palette to a toolbar so it can be exposed in an ArcGIS for Desktop application after the project is deployed.

Creating a tool palette

The following shows how to create a tool palette for an existing Eclipse add-in project. Ensure that you have the Add-In view enabled for the Add-In Editor on the config.xml file, and that you have completed the required Add-In Overview properties. See the following screen shot:

 
  1. Under All Add-Ins on the Add-In Editor, click the Add button. The Create New Add-In dialog box appears. See the following screen shot:


  2. Select the Tool Palette option on the preceding screen shot (there are eight different options), then click OK.

    A new section of the Add-In Editor appears with various properties for you to set for your new tool palette. By default, the id*, caption*, and category* properties are completed with default values to help expedite the development process. The following screen shot shows the new Tool Palette Details section that is added to the Add-In Editor with default values:

Setting properties

A tool palette has various properties for you to set. The following is a list of all of the properties with an explanation for each:

Adding functionality

At this stage, you have finished adding values for all of the necessary properties to define your tool palette. This section shows how you can add functionality to your tool palette container. A tool palette can contain your tools or ESRI provided tools. The following screen shot shows these different possibilities:

On the preceding screen shot, the left side shows all possible add-in types that can be put onto a tool palette container. All the tools that you define are considered commands and are designated with the Commands keyword. The screen shot also shows ESRI provided tools designated with System as the keyword. The right side is used to show what the tool palette contains. Do the following steps to add functionality to the tool palette:
  1. On the left, select the functionality you want to move.
  1. Click the arrow (>) to move the selected functionality to the right.
The other arrow (<) is available to remove selected functionality from the right if the functionality is not wanted.
For example, the following screen shot shows moving the ArcMap Tool to the right side with ESRI provided Pan, Zoom In, and Zoom Out tools:

Similar to adding your customizations to a tool palette, you can also add ESRI system provided tools by following the same methodology. This approach avoids having duplications if the functionality already exists in the desktop product you are customizing.

Adding the tool palette to a toolbar

The final step before deploying your add-in project is to add your tool palette to a toolbar. Do the following steps to achieve this:
  1. See the previously referenced topic, How to create an add-in toolbar, for details on creating a toolbar.
  2. Select your add-in toolbar under the All Add-Ins section on the Add-In Editor.
  3. Using the previously discussed procedure, add your tool palette to the new toolbar.

    For more information about consuming tool palettes that are connected with your toolbars, see How to deploy your add-in. When you have followed the workflow, the following screen shot shows an example of how the tool palette looks connected to the ArcMap Toolbar:



    On the preceding screen shot, the add-in tool palette contains the Pan, Zoom In, and Zoom Out ESRI provided tools with a custom ArcMap Tool (the tool palette is connected to a custom toolbar). In customize mode, this tool palette can be dragged to other toolbars; however, initially it can only be shown on an add-in toolbar. Remember that a tool palette is a container for only tools, while a toolbar can contain commands and more.

Understanding the config.xml

When setting all of the properties, the raw XML for the config.xml file was being generated behind the scenes. To understand more about how this config.xml file is defined, see Understanding the config.xml.

Creating different types of customizations

This topic showed how to create a tool palette. However, there are additional types of add-ins that can be created and defined. See the following topics that discuss each type of add-in.






Development licensingDeployment licensing
ArcGIS for Desktop BasicArcGIS for Desktop Basic
ArcGIS for Desktop StandardArcGIS for Desktop Standard
ArcGIS for Desktop AdvancedArcGIS for Desktop Advanced