How to insert control groups under 1 custom tab at runtime/during initialization from the separate addins?

348
1
Jump to solution
02-27-2023 12:16 PM
Amadeus111
Occasional Contributor II

In my project, I need to create check boxes dynamically that turn on/off groups (buttons) from separate addins. 

I was able to create check boxes by using Custom Categories 

 

Components = Categories.GetComponentElements("NRMCustomCategory");
//Then reading the states from other addins 
foreach (ComponentElement component in Components)
{
  string toolState = component.ReadAttribute("tool_state");
  string toolName = component.ReadAttribute("tool_name");
  string checkBoxName = toolName.Replace(" ", "");
//....
}

 

 Now, my checkboxes turn/on of the groups/controls but in their own tab. I would like to get them together under one tab I created for the main addin. I thought if I can read/write all DAML files during the initialazation I can put them altogether using something like this 

 

 <updateModule refID="NRM_ArcProMainMenu_Module">
      <groups>
        <updateGroup refID="Group_nrmlinking">
          <insertButton refID="DepButtonCustomCategory"
                        insert="before"/>
        </updateGroup>
      </groups>
    </updateModule>

 

 

from my search I found these but I am not sure how to use these or if I am on the right path 

https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic14871.html

https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic14867.html

I would appreciate any help!

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Amadeus111
Occasional Contributor II

My colleague helped me to solve the problem. I was trying work it out from the main addin. Basically, I use 

<updateModule refID="NRM_ArcProMainMenu_Module">
      <groups>
        <updateGroup refID="Group_nrmlinking">
          <insertButton refID="DepButtonCustomCategory"
                        insert="before"/>
        </updateGroup>
      </groups>
    </updateModule>

on the dependent addin which solved the problem

View solution in original post

0 Kudos
1 Reply
Amadeus111
Occasional Contributor II

My colleague helped me to solve the problem. I was trying work it out from the main addin. Basically, I use 

<updateModule refID="NRM_ArcProMainMenu_Module">
      <groups>
        <updateGroup refID="Group_nrmlinking">
          <insertButton refID="DepButtonCustomCategory"
                        insert="before"/>
        </updateGroup>
      </groups>
    </updateModule>

on the dependent addin which solved the problem

0 Kudos