I'm creating a series of Add-ins to place on my own custom ribbon tab. Only the first Add-in is showing up on my tab. A second one, created as an independent project, doesn't work despite having the same (or different) module id, module classname and tab id. What are the requirements to put different independent Add-ins on the same custom tab? Do they have to be created in the same solution? #arcgisprosdk #creating .net add-ins
Hi Andres,
Yes, the reference document is here:
https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#introduction-to-daml-desktop-application-markup-language
I think the syntax to add your button to an already existing group goes like this:
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>updateModule</SPAN> <SPAN class="attr-name token">refID</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>module id of your first add-in<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>groups</SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>updateGroup</SPAN> <SPAN class="attr-name token">refID</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>group id of your first add-in that you like to add your button<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>insertButton</SPAN> <SPAN class="attr-name token">refID</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>id of the new button defined in this add-in<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>insertButton</SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>updateGroup</SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>groups</SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>updateModule</SPAN><SPAN class="punctuation token">></SPAN></SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
I also just remembered a way to debug the 'combined' daml once you published your add-in. You can use the following command line:https://github.com/esri/arcgis-pro-sdk/wiki/ProGuide-Command-lines-switches-for-ArcGISPro.exe#view-the-daml-elements-loaded-at-startup
Hi Wolf:
Thank you very much for your solution. I followed your solution steps above, and solved the same issue here.
Steve
Thank you Wolfgang. I checked your code and the WorkingWithDALM example, but both are different cases to what I'm trying to do. I'm using:
...
</controls> </insertModule> <updateModule refID="MyAddin1_Module"> <tabs> <updateTab refID="MyAddins_Tab"> <updateGroup refID="Layer_Group"></updateGroup> </updateTab> </tabs> </updateModule> </modules></ArcGIS>
to try to have a second button within the same group of the first app. I made sure both were working and that the first one loads first. The second Add-in has the same module, tab and group id as the first one. What is wrong here? Is there a reference document on the config.daml file?
First you need to make sure all your add-ins are working properly, and you can test this by clearing your add-ins (from the well known folder location) before you rebuild each add-in separately and then test it. Next you need to make sure that you know the add-in loading sequence. Currently the loading sequence is determined by the value of the "id" attribute under the "AddInInfo" tag in the "config.daml" file. In my example below that value starts with f0f7...
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>ArcGIS</SPAN> <SPAN class="attr-name token">defaultAssembly</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>test1.dll<SPAN class="punctuation token">"</SPAN></SPAN> <SPAN class="attr-name token">defaultNamespace</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>test1<SPAN class="punctuation token">"</SPAN></SPAN> <SPAN class="attr-name token">xmlns</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN><A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fschemas.esri.com%2FDADF%2FRegistry" target="_blank">http://schemas.esri.com/DADF/Registry</A><SPAN class="punctuation token">"</SPAN></SPAN> <SPAN class="attr-name token"><SPAN class="namespace token">xmlns:</SPAN>xsi</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN><A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</A><SPAN class="punctuation token">"</SPAN></SPAN> <SPAN class="attr-name token"><SPAN class="namespace token">xsi:</SPAN>schemaLocation</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN><A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fschemas.esri.com%2FDADF%2FRegistry" target="_blank">http://schemas.esri.com/DADF/Registry</A><SPAN> file:///C:/Program%20Files/ArcGIS/Pro/bin/ArcGIS.Desktop.Framework.xsd</SPAN><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>AddInInfo</SPAN> <SPAN class="attr-name token">id</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>{f0f70f07-0579-4df7-9a47-570c46c3aa5b}<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>1.3.0<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>test1<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>test1 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\AddinDesktop32.png<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>Image</SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>Author</SPAN><SPAN class="punctuation token">></SPAN></SPAN>Wolfgang<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>Author</SPAN><SPAN class="punctuation token">></SPAN></SPAN> ...<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
The lower "id" values are loaded first, so if I have a second add-in with a value that starts with b0f... which means that my "test2" add-in is always loaded first because of it's lower "id" value. Note: if you want to change the "id" value you have to change the same value in "AssemblyInfo.cs" as well. Because test2 is loaded first test2 elements are the only elements I see on the newly added tab. When test1 is loaded it is trying to add an already existing tab and consequently none of the test1 elements are seen on the UI.
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>ArcGIS</SPAN> <SPAN class="attr-name token">defaultAssembly</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>Test2.dll<SPAN class="punctuation token">"</SPAN></SPAN> <SPAN class="attr-name token">defaultNamespace</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>Test2<SPAN class="punctuation token">"</SPAN></SPAN> <SPAN class="attr-name token">xmlns</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN><A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fschemas.esri.com%2FDADF%2FRegistry" target="_blank">http://schemas.esri.com/DADF/Registry</A><SPAN class="punctuation token">"</SPAN></SPAN> <SPAN class="attr-name token"><SPAN class="namespace token">xmlns:</SPAN>xsi</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN><A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</A><SPAN class="punctuation token">"</SPAN></SPAN> <SPAN class="attr-name token"><SPAN class="namespace token">xsi:</SPAN>schemaLocation</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN><A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fschemas.esri.com%2FDADF%2FRegistry" target="_blank">http://schemas.esri.com/DADF/Registry</A><SPAN> file:///C:/Program%20Files/ArcGIS/Pro/bin/ArcGIS.Desktop.Framework.xsd</SPAN><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>AddInInfo</SPAN> <SPAN class="attr-name token">id</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>{b0f89d8e-66fb-4509-bcb1-14d7fe0b8eba}<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>1.3.0<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>Test2<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>Test2 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\AddinDesktop32.png<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>Image</SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>Author</SPAN><SPAN class="punctuation token">></SPAN></SPAN>Wolfgang<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>Author</SPAN><SPAN class="punctuation token">></SPAN></SPAN> ...<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
So now I know that my test2 add-in loads first, therefore I don't change anything in test2. However, test1, which is loaded second, needs to be modified: Instead of creating a tab and adding my 'group' to that tab I now use the "updateModule" tag in my daml to make an "update" to my "test2" module's UI. We have a sample that shows how to update existing items on the ribbon here: WorkingWithDAML.
In short I made the following addition at the end of my "test1" "config.daml" file:
... <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>controls</SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>insertModule</SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>updateModule</SPAN> <SPAN class="attr-name token">refID</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>Test2_Module<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>tabs</SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>updateTab</SPAN> <SPAN class="attr-name token">refID</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>test_Tab<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>insertGroup</SPAN> <SPAN class="attr-name token">refID</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>test1_Group1<SPAN class="punctuation token">"</SPAN></SPAN> <SPAN class="attr-name token">insert</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>before<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>insertGroup</SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>updateTab</SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>tabs</SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>updateModule</SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>modules</SPAN><SPAN class="punctuation token">></SPAN></SPAN> <SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>ArcGIS</SPAN><SPAN class="punctuation token">></SPAN></SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
The DAML change I made here updates my Test2_Module's UI (test2 is my add-in that is loaded first) by adding a new group to the already existing tab called test_Tab. So now my two add-ins appear on the same Test ribbon as can be seen here:
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.