I am creating Arcpro Add-Ins and would like to change the image used in Add-In Manager for my add-ins. I tried changing the Image tag in the AddInInfo portion of the config.daml but all I can seem to do is make the image blank and the only image that seems to work is the default AddInDesktop32.png. Is this broken functionality or is there something special needed here?
I got it to work as you described. I thought I was doing the same thing before but I must have missed a step. Maybe you just gave me permission for it to work 😉 It is also possible that I needed a full rebuild (which I did this time). Thanks for all of your guidance.
Great! I have gone down the same road a few times myself 😉
I used a different image file: Test.png which has 32x32 pixels. I edited the file with mspaint and saved as .png
I then added the file in the project's Image folder and changed the BuildAction property for the newly added image file to AddinContent. Then i changed the Image tag as shown below (i honored the case of both path and file name):
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>AddInInfo</SPAN> <SPAN class="attr-name token">id</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>{e8a5c762-09c9-4768-8a4e-a5046ef5b8e5}<SPAN class="punctuation token">"</SPAN></SPAN> <SPAN class="attr-name token">version</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>1.0<SPAN class="punctuation token">"</SPAN></SPAN> <SPAN class="attr-name token">desktopVersion</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>2.5.22081<SPAN class="punctuation token">"</SPAN></SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>Name</SPAN><SPAN class="punctuation token">></SPAN></SPAN>ProAppModule11<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>Name</SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>Description</SPAN><SPAN class="punctuation token">></SPAN></SPAN>ProAppModule11 description<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>Description</SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>Image</SPAN><SPAN class="punctuation token">></SPAN></SPAN>Images\Test.png<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>Image</SPAN><SPAN class="punctuation token">></SPAN></SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
and it worked fine:
Yes, I even tried using ESRI provided images (like GenericButtonBlue32.png in my project as addincontent and displayed as one of my add-in buttons) with the same blank result.
BTW, the link you are referring to gets a page not found error.
Did you set the BuildAction (properties) for your new image to 'AddinContent' as shown here: Images as AddinContent
Thank you for that information, but my question was concerning another area of the add-in. The information below is displayed in ArcPro's Add-In Manager section:
<AddInInfo id="{<guid>}" version="10.0.0" desktopVersion="2.4.19948"> <Name>Name</Name> <Description>Description</Description> <Image>Images\AddinDesktop32.png</Image> <Author>Author</Author> <Company>Company</Company> <Date>4/1/2020 9:07:24 AM, 2020</Date> <Subject>Framework</Subject> </AddInInfo>
If I try to change 'Images\AddinDesktop32.png' to any other image, I just get a blank image next to my add-in.
Hi Jeff,
By default a newly added 'Addin Button' pulls its button images from image resources built into ArcGIS Pro using the 'pack' protocol as in:
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>button</SPAN> <SPAN class="attr-name token">...</SPAN> <SPAN class="attr-name token">smallImage</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue16.png<SPAN class="punctuation token">"</SPAN></SPAN> <SPAN class="attr-name token">largeImage</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue32.png<SPAN class="punctuation token">"</SPAN></SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>button</SPAN><SPAN class="punctuation token">></SPAN></SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
There are place holder images in the 'Images' and 'DarkImages' folder of your add-in project, however, before you can use those (or any modifications) you have to change the smallImage/largeImage attributes:
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>button</SPAN> <SPAN class="attr-name token">...</SPAN> <SPAN class="attr-name token">smallImage</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>Images/GenericButtonBlue16.png<SPAN class="punctuation token">"</SPAN></SPAN> <SPAN class="attr-name token">largeImage</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>Images/GenericButtonBlue32.png<SPAN class="punctuation token">"</SPAN></SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>button</SPAN><SPAN class="punctuation token">></SPAN></SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
The image in the 'DarkImages' folder is used when ArcGIS Pro is using Dark Theme.
There is a ProGuide to explain this: Images as AddinContent
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.