Geoprocessing Service Execute method

Executes 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 GPValue objects corresponding to the input parameters. Parameter values must be passed in the correct order (the order corresponding to the order of ParameterInfo objects in the Tool).  The results of execution are returned as a GPResult that contains an array of GPValue objects (the order corresponding to the order of ParameterInfo objects in the Tool) and the job messages.

  

The Options parameter is used to indicate various options for returning result values. If the options is null, the default options are used.  The Options parameter, a GPResultOptions object, references a number of properties, including DensifyFeatures, TransportType, SpatialReference, Format, and FormatProperties.

 

 

 

Keyword

Type

Default Value

Composite

bool

false

VectorsToRasters

bool

true

ImageSize

long

1024

PaletteSize

long

256

IconSize

long

32

Scale

double

1.0

DPI

double

96

IgnoreScaleFactor

bool

false

IgnoreVisibility

bool

false

FeatureLimit

double

10+6

 

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#