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 .

Members

Description
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
GPMessages

Remarks

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 OD Cost Matrix Layer | Create Route Layer | Create Vehicle Routing Problem Layer | Create Service Area Layer | Create Location Allocation Layer | Create Closest Facility Layer |

.NET Samples

ArcGIS GPConsole (Code Files: Program) | Calculate area geoprocessing function tool (Code Files: CalculateAreaFunction) | Closest facility application using the NAServer extension in ArcGIS Server via a GIS server (Code Files: ClosestFacility_GISServerAPIClass) | Closest facility solver (Code Files: frmClosestFacilitySolver) | Executing geoprocessing tools in the background (Code Files: RunGPForm) | Geoprocessing events listener (Code Files: GPEventHelper) | Import signposts (Code Files: ImportDynamapSignsFunction ImportMultiNetSignsFunction ImportNavStreetsSignsFunction) | Location-allocation solver (Code Files: frmLocationAllocationSolver) | Network Analyst Engine application (Code Files: frmNALayerProperties) | Origin-destination cost matrix solver (Code Files: frmODCostMatrixSolver) | Route application using the NAServer extension in ArcGIS Server via a GIS client (Code Files: Route_GISClientClass) | Route application using the NAServer extension in ArcGIS Server via a GIS server (Code Files: Route_GISServerAPIClass) | Service area application using the NAServer extension in ArcGIS Server via a GIS server (Code Files: ServiceArea_GISServerAPIClass) | Service area solver (Code Files: frmServiceAreaSolver) | Vehicle routing problem solver (Code Files: frmVRPSolver) |

.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 |