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.
- Start Visual Studio and open the solution.
- Build the solution to make the Buffer selected layer command .dll. You will need to use this command in an application with a MapControl and a ToolbarControl, or inside ArcMap.
- Add the command to the ToolbarControl. The command can be found in the .NET Samples category with the name, Buffer selected layer.
- Run the application and add any feature layer to the map (you can add as many feature layers as you want).
- Click the Buffer selected layer command to show the Buffer dialog box.
- From the layers drop-down list, select the layer that you want to buffer.
- Select the buffer distance and units.
- Click Buffer to run the Buffer tool. As the tool executes, note the messages on the messages dialog box.
BufferSelectedLayerCmd.cs | The command that opens the Buffer dialog box. |
BufferDlg.cs | The Buffer dialog box source code. |
BufferDlg.Designer.cs | The Buffer dialog box designer file. |
BufferSelectedLayerCmd.vb | The command that opens the Buffer dialog box. |
BufferDlg.vb | The Buffer dialog box source code. |
BufferDlg.Designer.vb | The Buffer dialog box designer file. |
Download the files for all languages
See Also:
How to run a geoprocessing toolAccessing licensing and extensions for the geoprocessor
How to get returned messages
Development licensing | Deployment licensing |
---|---|
Engine Developer Kit | Engine |
ArcGIS for Desktop Basic | ArcGIS for Desktop Basic |
ArcGIS for Desktop Standard | ArcGIS for Desktop Standard |
ArcGIS for Desktop Advanced | ArcGIS for Desktop Advanced |