Geoprocessing Service Execute method

Execute a synchronous geoprocessing tool.

 

Execute(string ToolName, GPValue[] Values, GPResultOptions Options, PropertySet EnvironmentValues)

 

Parameter

Description

ToolName

The name of a server tool in a geoprocessing service.

 

Values

An array of GPValue instances, one for each input to the tool.

 

Options
 

A GPResultOptions instance defining how the result values are returned.   Can be null. If specified, results are modified using these options during tool execution.   

 

EnvironmentValues

A PropertySet of name value pairs which can be used to modify tool execution.  Can be null.  Environment values can be general or specific to the operations within the tool.  

 

 

Return Value

 

A GPResult object.

 

Remarks

 
The Execute method allows the caller to execute a tool synchronously where the caller passes in an array of GPValues corresponding to the input parameters. Parameter values must be passed in the correct order (the order corresponding to the order of ParameterInfos in the Tool).  The results of execution are returned as a GPResult that contains an array of GPValues (the order corresponding to the order of ParameterInfos in the Tool) and the job messages.
 
Environment values can be general or specific to the operations (tools) within the server tool.  General environment values apply to all operations.   Specific environment values only affect specific operations.   By default, the server tool does not provide information on the operations it contains, only the input and output types.   The service publisher must provide information on the operations within the tool for consumers to know which environment values are valid.  See the Environment Settings topic in the ArcGIS Desktop help for geoprocessing tools (tools within a server tool).     

 

Examples

C#

VB.NET

Java