GPToolInfo

A geoprocessing class containing information about a tool in a geoprocessing service.

Property

Type

Description

Category

string

The category of the tool.

DisplayName

string

The display name of the tool.

Extent

Envelope

The extent of the tool.

Help

string

The help for the tool.

Name

string

The name of the tool.

ParameterInfo

GPParameterInfo[]

Information about the parameters of the tool.

Remarks

The structure includes information on the parameters for the tool. In addition it includes the name, help string, and extent for the tool. The extent property supplies the client application with the valid extent of the tool. The tool extent will be based on the model environment setting. The extent is optional.

An instance has an array of GPParameterInfo, each describing a specific parameter. Each parameter has a name, a direction (Input or Output), a parameter type (Required or Optional), a data type (for e.g. double), a ChoiceList (a list of acceptable values for the parameter expressed as a list of strings), and a default value.

Examples

C#

GPToolInfo viewshedToolInfo = gpserver.GetToolInfo("Viewshed");

//create the point for the viewshed tool from the default schema

GPParameterInfo gpPI = viewshedToolInfo.ParameterInfo[0];

//Use the default schema

GPFeatureRecordSetLayer inPoint = (GPFeatureRecordSetLayer)gpPI.Value;

RecordSet inPointRS = inPoint.RecordSet;

Record[] records = new Record[1];

Record rec = new Record();

rec.Values = new object[3];

//id field

rec.Values[0] = 0;

//shape field

PointN p = new PointN();

p.X = -13100000.0;

p.Y = 4200000.0;

rec.Values[1] = p;

//offset field

rec.Values[2] = 70;

//add the record to the set of records.

records[0] = rec;

inPointRS.Records = records;

11/8/2016