GPParameterInfo
A geoprocessing class that contains information about task parameters.
Property |
Type |
Description |
---|---|---|
Category |
string |
The parameter category. |
ChoiceList |
string[] |
The parameter choice list. |
DataType |
string |
The parameter data type. |
Direction |
The parameter direction. | |
DisplayName |
string |
The parameter display name. |
Name |
string |
The parameter name. |
ParamType |
The parameter type. | |
Value |
The parameter 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;
2/28/2020