Select to view content in your preferred language

Configuring DAML to show the select by rectangle tool in Configuration Add-In

959
2
Jump to solution
12-15-2022 12:39 PM
MichaelKohler
Frequent Contributor

I am making a Configuration Add-in to remove ribbons and other tools and provide only the tools needed by the user. All the add-in interaction is done with buttons and controls on a dock pane. The user will have to use the selection tool to select parcels to create project boundary polygons.

I know I could make buttons to select/clear and put them on my dock pane but since I'm in a configuration project I'd figure I could leave the Select and Clear buttons on the ribbon. In the configure database in the override OnUpdateDatabase, I remove everything but my Add-in group. Then, in the DAML, I add the esri_editing_selectionGroup group in the <tabs> area. This works and shows just the Selection group in the ribbon (ribbon.png). I don't want the Attributes button to show. Is there anyway I can remove the attribute button?

I thought, perhaps I could just add those 2 buttons to my add-in group. I tried just adding the selection tool but that is not working. See DAML below. I tried "refID" like what worked for the group and just the "id" like my button and neither worked.

Finally, i could forget about all this and tell the user to use the right-click context menu on the map to clear and select. But I would like to know this for future efforts.

 

  <modules>
    <insertModule id="PamConfig_Module" className="Module1" autoLoad="false" caption="Module1">
      <!-- uncomment to have the control hosted on a separate tab-->
      <tabs>
        <tab id="PamConfig_Tab1" caption="PAM">
          <group refID="PamConfig_Group1" />
          <group refID="esri_editing_selectionGroup" />
        </tab>
      </tabs>
      <groups>
        <group id="PamConfig_Group1" caption="Connect..." appearsOnAddInTab="false">          
          <button refID="PamConfig_PAMDP_ShowButton" size="large" />
        </group>
      </groups>
      <controls>
        <!-- add your controls here -->
        <button id="PamConfig_PAMDP_ShowButton" caption="Show PAMDP" className="PAMDP_ShowButton" loadOnClick="true" smallImage="Images/PAMPRO16.png" largeImage="Images/PAMPRO32.png">
          <tooltip heading="Show Dockpane">Show Dockpane<disabledText /></tooltip>
        </button>
        <!--<button refID="esri_mapping_SelectByRectangeleTool"/>-->
      </controls>
      <dockPanes>
        <dockPane id="PamConfig_PAMDP" caption="PAMDP2.5" className="PAMDPViewModel" dock="group" dockWith="esri_core_projectDockPane">
          <content className="PAMDPView" />
        </dockPane>
      </dockPanes>
    </insertModule>
  </modules>

 

 

 

 

0 Kudos
1 Solution

Accepted Solutions
GKmieliauskas
Esri Regular Contributor

Hi,

Try lines below. It works for me:

        <tab id="PamConfig_Tab1" caption="PAM">
          <group refID="PamConfig_Group1" />
          <group refID="PamConfig_editing_selectionGroup" />
        </tab>
.....
        <group id="PamConfig_editing_selectionGroup" caption="Selection" appearsOnAddInTab="false">
          <toolPalette id="esri_editing_selectToolPalette" itemsInRow="1" showItemCaption="true" caption="Select" extendedCaption="Open select tool palette">
            <tool refID="esri_mapping_selectByRectangleTool" />
            <tool refID="esri_mapping_selectByPolygonTool" />
            <tool refID="esri_mapping_selectByLassoTool" />
            <tool refID="esri_mapping_selectByCircleTool" />
            <tool refID="esri_mapping_selectByLineTool" />
            <tool refID="esri_mapping_selectByTraceTool"/>
          </toolPalette>
          <button refID="esri_mapping_clearSelectionButton" size="middle" />
          <button refID="esri_mapping_zoomToSelectionButton" size="middle" />
        </group>

View solution in original post

0 Kudos
2 Replies
GKmieliauskas
Esri Regular Contributor

Hi,

Try lines below. It works for me:

        <tab id="PamConfig_Tab1" caption="PAM">
          <group refID="PamConfig_Group1" />
          <group refID="PamConfig_editing_selectionGroup" />
        </tab>
.....
        <group id="PamConfig_editing_selectionGroup" caption="Selection" appearsOnAddInTab="false">
          <toolPalette id="esri_editing_selectToolPalette" itemsInRow="1" showItemCaption="true" caption="Select" extendedCaption="Open select tool palette">
            <tool refID="esri_mapping_selectByRectangleTool" />
            <tool refID="esri_mapping_selectByPolygonTool" />
            <tool refID="esri_mapping_selectByLassoTool" />
            <tool refID="esri_mapping_selectByCircleTool" />
            <tool refID="esri_mapping_selectByLineTool" />
            <tool refID="esri_mapping_selectByTraceTool"/>
          </toolPalette>
          <button refID="esri_mapping_clearSelectionButton" size="middle" />
          <button refID="esri_mapping_zoomToSelectionButton" size="middle" />
        </group>
0 Kudos
MichaelKohler
Frequent Contributor

I ended up figuring out that I was trying to use a button for the select by rectangle instead of a tool. So a big thanks for that because I was able to get what i wanted.

I couldn't get the tool pallet to work. Kept getting error of "the id attribute is not declared" and there were problems with the other tags in your line 7 defining the palette. And at the end of line 7 there was "the element cannot contain white space. Content model is empty". And another error on your line 8 that said "the element cannot contain child element because the parent element's model is empty".

I'll keep plugging on that as i can use palette in other apps.

  <modules>
    <insertModule id="PamConfig_Module" className="Module1" autoLoad="false" caption="Module1">      
      <tabs>
        <tab id="PamConfig_Tab1" caption="PAM" keytip="t1">
          <group refID="PamConfig_Group1" />
          <group refID = "PAMConfig_Editing_selectionGroup"/>
          <!--<group refID="esri_editing_selectionGroup" />-->
        </tab>
      </tabs>     
      <groups>
        <group id="PamConfig_Group1" caption="Connect..." appearsOnAddInTab="false" keytip="g1">
          <button refID="PamConfig_PAMDP_ShowButton" size="large" />
        </group>
        <group id ="PAMConfig_Editing_selectionGroup" caption="Selection" appearsOnAddInTab ="false" keytip="g2">          
          <tool refID="esri_mapping_selectByRectangleTool" size="middle" />
          <tool refID="esri_mapping_selectByPolygonTool" size="middle" />
          <button refID="esri_mapping_clearSelectionButton" size="middle" />        
        </group>
      </groups>
      <controls>
        <!-- add your controls here -->
        <button id="PamConfig_PAMDP_ShowButton" caption="Show PAMDP" className="PAMDP_ShowButton" loadOnClick="true" smallImage="Images\PAMPRO16.png" largeImage="Images\PAMPRO32.png" keytip="b1">
          <tooltip heading="Show Dockpane">Show Dockpane<disabledText /></tooltip>
        </button>        
      </controls>
      <dockPanes>
        <dockPane id="PamConfig_PAMDP" caption="PAMDP2.5" className="PAMDPViewModel" dock="group" dockWith="esri_core_projectDockPane">
          <content className="PAMDPView" />
        </dockPane>
      </dockPanes>
    </insertModule>
  </modules>

 

0 Kudos