Select to view content in your preferred language

Feature Selection Using custom button

2026
1
08-31-2011 01:15 PM
MichaelMurphy8
Deactivated User
I'm trying to build a tool to select a feature on the map.  I want to be able to toggle on/off the selection using a button on a DockableWindow.  What's the best way to go about this?  I don't see an easy way to add ArcGIS tools to a DockableWindow in the form designer for the DockableWindow.

Thanks
0 Kudos
1 Reply
MichaelMurphy8
Deactivated User
OK.  So to accomplish this, you have to build and use an ESRI Custom Tool.  Here's what I did...

On the DockableWindow button's On_Click method, i reference a Custom ESRI Tool that I created.

private void button1_Click(object sender, EventArgs e) {
            IApplication app = Hook as IApplication;
            UseCustomToolOnWindowsForm(app, @"Dharma_Inst_CustomUIElements_FindFeaturesFromPoint");
        }
.....

<<Insert the following ESRI Snippet>>
public void UseCustomToolOnWindowsForm(IApplication application, System.String uidValue){...}

0 Kudos