Select to view content in your preferred language

Remove tools from modify features pane

540
2
Jump to solution
09-20-2023 02:26 AM
Asimov
by
New Contributor III

Hi, as on subject, I would like to remove (programmatically) some tools from the Modify Features pane in order to leave the user with just the tools they need, plus some custom tool we'll add: 

Screen.png

I know I can add my custom tools to it, setting categoryRefID attribute "esri_editing_commandList" on the daml, but I'm not able to find how to remove/hide the stock items (or entire categories) I don't need. Is there a way to accomplish this through the SDK?

An alternative way to implement the workflow I need would be to intercept the OnToolActivate event of the stock tools in order to do the things I need before the user starts to use the tool, but I couldn't find any way to listen to events of a stock tool. I know I can define my own tools in order to do it, but this would take me back to the beginning, since I would still need a way to act in case a stock tool is selected.

Any idea is appreciated, thanks in advance.

0 Kudos
1 Solution

Accepted Solutions
John_Jones
New Contributor III

From daml, you can delete a button, here as an example I delete sequential numbering (no hard feelings)...

  <dependencies>
    <dependency name="Editing.daml" />
  </dependencies>
  <modules>
    <updateModule refID="esri_editing_EditingModule">
      <controls>
        <deleteButton refID="esri_editing_SeqNum"/>
      </controls>
    </updateModule>
  </modules>  

I suppose it would be less invasive to not remove the button but just clear its categoryRefID, but I had less luck with that approach.

John_Jones_0-1695365013547.png

View solution in original post

2 Replies
John_Jones
New Contributor III

From daml, you can delete a button, here as an example I delete sequential numbering (no hard feelings)...

  <dependencies>
    <dependency name="Editing.daml" />
  </dependencies>
  <modules>
    <updateModule refID="esri_editing_EditingModule">
      <controls>
        <deleteButton refID="esri_editing_SeqNum"/>
      </controls>
    </updateModule>
  </modules>  

I suppose it would be less invasive to not remove the button but just clear its categoryRefID, but I had less luck with that approach.

John_Jones_0-1695365013547.png

Asimov
by
New Contributor III

That was exactly what I was hoping to do, but I couldn't find how to refer to that dock pane (and I didn't consider the dependency requirement, also).

It works perfectly, thank you so much @John_Jones!

0 Kudos