Geoprocessing events listener


Purpose
When using geoprocessing (GP) to execute tools, you usually get the tool execution results when it is done. In many cases, you need to listen to the GP events as they happen, for example, when a toolbox is loaded, or messages received while a tool is executing.
This sample demonstrates the implementation of a listener helper that allows you to listen to the various GP events. The TestListner application serves as the client that listens to the GP events.

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 and open the solution.
  2. Build the solution to make the GeoprocessorEventHelper class .dll and the TestListner test application.
  3. Right-click the project and select Set as Startup Project to ensure the TestListner project is the start-up project for the solution (notice the messages on the Output window in Visual Studio as they get fired by the geoprocessor). The application creates a random shapefile in the machine's temporary directory.

GeoprocessorEventHelper/GPEventHelper.cs GP events helper class implementation file.
TestListner/GPEventListner.cs Test application that uses the GP events helper class to listen to GP events.
Download the C# files
GeoprocessorEventHelper/GPEventHelper.vb GP events helper class implementation file.
TestListner/GPEventListner.vb Test application that uses the GP events helper class to listen to GP events.
Download the VB.NET files

Download the files for all languages




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