In ArcGIS Pro Add-in's where do you you need to put the png icons so they appear in the interface?

1704
2
12-29-2016 05:56 PM
RichardDaniels
Occasional Contributor III

In the DAML for a Add-In you can define the png image to use for a tool.

<tool id="BasicMapTool_BasicMapTool" caption="Show Coordinates" keytip="T1" className="BasicMapTool" loadOnClick="true" smallImage="Images\crosshair16.png" largeImage="Images\crosshair32.png" condition="esri_mapping_mapPane">

Generally if you stay with one of the ESRI default icons they will appear. However, based on the pathing any 16 and 32 pixel png image referenced at .\Images should be usable. Where is this location? I've tried deploying them to the assembly cache (e.g., C:\Users\<user id here>\AppData\Local\ESRI\ArcGISPro\AssemblyCache\{ff226987-8efd-4d34-b606-3e731c8cd2ad}\Images) but that does not appear to work.

In Visual Studio 2013 it the setup looks like this (see attached screen shot_.

Rich D.

Tags (1)
0 Kudos
2 Replies
CharlesMacleod
Esri Regular Contributor

The screenshot shows "corsshair". The DAML shows "crosshair"...

Generally speaking, if the content type is set to 'AddinContent' the images will be copied to a folder called "Images" within the archive (.esriAddinX) (given a containing folder called "Images" in the solution) which is, in turn, usually deployed to your C:\Users\username\Documents\ArcGIS\AddIns\ArcGISPro\{Addin-id} folder . They are not copied to the assembly cache.

More information on Add-in resources can be found here: ProGuide-content-and-image-resources

0 Kudos
Wolf
by Esri Regular Contributor
Esri Regular Contributor

Hi Rich,

 Good find by Charles to see the spelling error, however, the name crosshair could imply that you expect the png to be used as the tool's cross hair icon.  After you correct the spelling of the image and set the image property's "Build Action" to "AddinContent", you should see the icon in the tool gallery like in my sample of a construction tool below.  Just to make sure though: this is not the crosshair icon the tool is using over the map view once the tool has been activated.