Brushing to create a selection


PurposeThe Brushing tool allows you to use any graphic to create a selection within the map view in ArcMap. You can select a feature by dragging the graphic object so that it overlaps the feature. Selected features update dynamically as the user drags the graphic across the map area. If a graph is created showing the selected features, it gets updated dynamically.

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Start Visual Studio, open the solution file, then build the project.
  2. Start ArcMap and add some data.
  3. Click the Customize menu and click Customize Mode. The Customize dialog box appears.
  4. Click the Commands tab on the Customize dialog box, find Brushing from Custom Graph Controls, then drag the Brushing tool from the commands to any toolbar in ArcMap. Close the Customize dialog box.
  5. Draw a graphic object (for example, a rectangle) using the Draw tool on the Draw toolbar.
  6. Select the Brushing tool and slowly drag the graphic across the features. You will see features that are overlapping with the graphic get selected while you drag.
  7. To further explore the data, you can add a graph based on the feature. The selected items in the graph update as the graphic is being dragged across the feature.
  8. The Brushing tool is intended to be used for a small dataset. If your dataset is large, the dynamic update is slow. For the best results in using this tool, slowly drag the graphic across the feature to see the dynamic update between the map and graph.

BrushingVB_NET_Addin\BrushingVB_NET_Addin\BrushingVB.vb The class file.
Download the VB.NET files
BrushingCS_NET_Addin\BrushingCS_NET_Addin\BrushingCS.cs The class file.
Download the C# files

Download the files for all languages




Development licensing Deployment licensing
ArcGIS for Desktop Basic ArcGIS for Desktop Basic
ArcGIS for Desktop Standard ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced ArcGIS for Desktop Advanced