ArcObjects Library Reference (GeoDatabase)  

IGPMessages Interface

Provides access to Geoprocessor messages.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

When To Use

The IGPMessages returns the messages that are generated during validation and execution of a geoprocessing tool. The GPMessages object is a container of a collection of GPMessage objects.

For the Validate method, the messages are returned as an array of GPMessage objects. The layout of the returned array is the same as the input array of values, which is the same as the array of tool parameter descriptions.

Also refer to Building Geoprocessing Function Tools .


Method Add Adds a message object to the messages.
Method AddAbort Adds an abort message to the messages.
Method AddError Adds an error message to the messages.
Method AddMessage Adds an informative message to the messages.
Method AddMessages Adds all messages from an existing messages object to this messages object.
Method AddWarning Adds a warning message to the messages.
Read/write property Callback The callback object associated with the GPMessages object.
Method Clear Clears the message objects from messages object.
Read-only property Count The message count.
Method GetMessage Provides a message object from the specified location.
Method InitializeMessages Creates a number of empty messages and adds them to this messages object.
Read-only property MaxSeverity The maximum message severity.
Read-only property Messages The array of message objects.
Method Replace Replace an existing message in a specified location with a new message object.
Method ReplaceAbort Creates message of type esriGPMessageTypeAbort and replaces it into a specified position.
Method ReplaceError Creates message of type esriGPMessageTypeError and replaces it into a specified position.
Method ReplaceMessage Creates message and replaces it into a specified position.
Method ReplaceWarning Creates message of type esriGPMessageTypeWarning and replaces it into a specified position.

CoClasses that implement IGPMessages

CoClasses and Classes Description


The GPMessages object manages an array of GPMessage objects. This object contains methods to generate and replace message objects. The Validate() method returns a GPMessages object that contains one message for each parameter.


See also IGPMessage

.NET Snippets

Create Vehicle Routing Problem Layer | Create Route Layer | Create Service Area Layer | Create Closest Facility Layer | Create OD Cost Matrix Layer | Create Location Allocation Layer

.NET Samples

Closest facility solver (Code Files: frmClosestFacilitySolver) | ArcGIS Network Analyst extension Engine application (Code Files: frmNALayerProperties) | Service area solver (Code Files: frmServiceAreaSolver) | Location-allocation solver (Code Files: frmLocationAllocationSolver) | Vehicle routing problem solver (Code Files: frmVRPSolver) | Origin-destination cost matrix solver (Code Files: frmODCostMatrixSolver) | Executing geoprocessing tools in the background (Code Files: RunGPForm) | Calculate area geoprocessing function tool (Code Files: CalculateAreaFunction) | Geoprocessing events listener (Code Files: GPEventHelper)

.NET Related Topics

Building a custom geoprocessing function tool | How to setup, solve, and save a network analysis problem | Opening a geoprocessing tool's dialog box in .NET | Running a geoprocessing tool using background geoprocessing