In this topic
- About the tool palette
- Understanding the config.xml
- Creating different types of customizations
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.
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:
- 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:
- 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:
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:
- id*—Represents the unique name that is used to identify your tool palette. You can create more than one tool palette for a project and this id* property is used to distinguish between the different tool palettes. Notice that the image shows a default value for this property. Ideally, you should replace this id with a more meaningful name. Use the Java package naming convention when constructing your id property value. For example, com.esri.arcgis.arcmap.addin.arcmaptoolpalette could be used to represent the tool palette being created in this topic (required).
caption*—Used to give a name to the tool palette and is used in a single location after a project is deployed (required).
The caption is used as metadata on the Add-In Manager to help a user identify the types of customizations available. The following screen shot shows a value of ArcMap Tool Palette for the caption property on the Add-In Manager:
Is Menu Style—By default, the tool palette exposes a selector dialog box. For example, if you had four tools in a tool palette, it would be exposed in a 2 by 2 square when the user selects the tool palette. This menu style allows you to expose your tools and organize them the same way a menu is organized (from top to bottom). If this check box is selected, the same four tools appear vertically as four items and not like a 2 by 2 square.
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:
On the left, select the functionality you want to move.
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.
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:
- See the previously referenced topic, How to create an add-in toolbar, for details on creating a toolbar.
- Select your add-in toolbar under the All Add-Ins section on the Add-In Editor.
- 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.
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.
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.
- How to create an add-in button
- How to create an add-in tool
- How to create an add-in combo box
- How to create an add-in toolbar (previously referenced)
- How to create an add-in menu
- How to create an add-in dockable window
- How to create an add-in application extension
|Development licensing||Deployment licensing|
|ArcGIS for Desktop Basic||ArcGIS for Desktop Basic|
|ArcGIS for Desktop Standard||ArcGIS for Desktop Standard|
|ArcGIS for Desktop Advanced||ArcGIS for Desktop Advanced|