Select to view content in your preferred language

Is it possible to add a custom group to an existing tab?

1075
6
11-09-2020 10:36 AM
DerekSalinas
Occasional Contributor

I have created a custom addin that I would like to house in a custom group the "esri_mapping_homeTab" to the right of the "Offline" group. 

I know i need to be able to update the "esri_mapping" module, but do I need to have the module added first? 

Thanks any help you can provide!

-Derek Salinas

0 Kudos
6 Replies
Wolf
by Esri Regular Contributor
Esri Regular Contributor

If this is what you want to implement:

You can model your add-in's config.daml after this:

<modules>
  <insertModule id="GroupInsertTest_Module" className="Module1" autoLoad="false" caption="Module1">
    <groups>
      <group id="GroupInsertTest_Group1" caption="Group 1" appearsOnAddInTab="true">
        <button refID="GroupInsertTest_Button1" size="large" />
        <button refID="GroupInsertTest_Button2" size="large" />
      </group>
    </groups>
    <controls>
      <!-- add your controls here -->
      <button id="GroupInsertTest_Button1" caption="Button 1" className="Button1" loadOnClick="true" smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue16.png" largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue32.png">
        <tooltip heading="Tooltip Heading">Tooltip text<disabledText /></tooltip>
      </button>
      <button id="GroupInsertTest_Button2" caption="Button 2" className="Button2" loadOnClick="true" smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue16.png" largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue32.png">
        <tooltip heading="Tooltip Heading">Tooltip text<disabledText /></tooltip>
      </button>
    </controls>
  </insertModule>
	<!--Modifying Core Map Tab-->
	<updateModule refID="esri_mapping">
		<tabs>
			<updateTab refID="esri_mapping_homeTab" >
				<insertGroup refID="GroupInsertTest_Group1" placeWith="esri_mapping_offlineGroup" insert="after" />
			</updateTab>
		</tabs>
	</updateModule>
</modules>

There's also a sample that adds a button to the "esri mapping homeTab" 
arcgis-pro-sdk-community-samples/Framework/WorkingWithDAML at master · Esri/arcgis-pro-sdk-community... 

ChristopherWorrell
New Contributor

Hi Wolfgang,

I'm facing a similar issue. Using your update module snippet it works for me in the mapping hometab, however I need this on the edit Tab. Once I update from your snippet to fit my code, I no longer see the new group. Any Idea on what I am doing wrong?

    </insertModule>
	  <updateModule refID="esri_editing">
		  <tabs>
			  <updateTab refID="esri_editing_EditingTab">
				  <insertGroup refID="AttributeEditor" placeWith="esri_editing_EditGallery" insert="after"/>  
			  </updateTab>
		  </tabs>
	  </updateModule>  
  </modules>

 

0 Kudos
GKmieliauskas
Esri Regular Contributor

Hi @ChristopherWorrell ,

You are using wrong updateTab refID. refID is "esri_editing_EditingModule"

 

0 Kudos
ChristopherWorrell
New Contributor

Hi This worked for me once i added it to the update module refID.

How do I find the right namespaces for the updating modules?

	<updateModule refID="esri_editing_EditingModule">
		<tabs>
			<updateTab refID="esri_editing_EditingTab">
				<insertGroup refID="AttributeEditor" placeWith="esri_editing_EditGallery" insert="after"/>
			</updateTab>
		</tabs>
	</updateModule>
0 Kudos
nadja
by
Frequent Contributor

@Wolf  and @GKmieliauskas Could you tell me, what I need to change so that my group with my button will also be displayed in the Insert tab in a separate group. I tried this

<modules>
	<insertModule id="My_Module" className="Module1" autoLoad="true" caption="Module1">
		<tabs>
			<tab id="My_Tab1" caption="My Caption" keytip="Caption">
				<group refID="My_Group1"/>
			</tab>
		</tabs>
		<groups>
			<group id="My_Group1" caption="My Caption" appearsOnAddInTab="false" keytip="keytip">
				<button refID="My_Dockpane1_ShowButton" size="large"/>
			</group>
		</groups>
		<controls>
			<button id="My_Dockpane1_ShowButton" caption="MyGDI" keytip="MyGDI" className="Dockpane1_ShowButton" loadOnClick="true" smallImage="pack://application:,,,/MyData;component/Images/EN_SP_16_RGB.png" largeImage="pack://application:,,,/MyData;component/Images/EN_SP_32_RGB.png">
				<tooltip heading="Show my GDI">
					My GDI<disabledText />
				</tooltip>
			</button>
		</controls>
		<dockPanes>
			<dockPane id="My_Dockpane1" caption="MyGDI" className="Dockpane1ViewModel" dock="group" dockWith="esri_core_projectDockPane" isDropTarget="false">
				<content className="Dockpane1View" />
			</dockPane>
		</dockPanes>
	</insertModule>

	<updateModule refID="esri_core_module">
		<tabs>
			<updateTab refID="esri_core_insertTab" >
				<insertGroup refID="My_Group1" placeWith="esri_core_projectData" insert="after" />
			</updateTab>
		</tabs>
	
		
	</updateModule>

	
</modules>
0 Kudos
nadja
by
Frequent Contributor

nvm, it just needed a clean build. now it works.

0 Kudos