AnsweredAssumed Answered

What is the right IGPDataType for a GPDataFile parameter

Question asked by sclark98 on May 23, 2012
I am consuming a GPservice in which there are two input and one output parameters:

Display Name: GisToCad

Category:
Execution Type: esriExecutionTypeAsynchronous
Parameters:

Parameter: output_dwg

Data Type: GPDataFile
Display Name: output.dwg
Direction: esriGPParameterDirectionOutput
Parameter Type: esriGPParameterTypeRequired
Category:

Parameter: Search_Feature_

Data Type: GPString
Display Name: Search Feature:
Direction: esriGPParameterDirectionInput
Default Value: 3192000 1364001 3195999 1363996 3192000 1360999 3192000 1364001
Parameter Type: esriGPParameterTypeOptional
Category:

Parameter: Feature_Types_To_Read_

Data Type: GPMultiValue:GPString
Display Name: Feature Types To Read:
Direction: esriGPParameterDirectionInput
Default Value:
Parameter Type: esriGPParameterTypeOptional
Category:


I am having trouble setting the output parameter:

// Set output parameter properties.
IGPParameterEdit3 outParameter = new GPParameterClass();
outParameter.Direction = esriGPParameterDirection.esriGPParameterDirectionOutput;
outParameter.ParameterType = esriGPParameterType.esriGPParameterTypeRequired;
IGPDataType outputType = (IGPDataType)new ESRI.ArcGIS.Geoprocessing.GPDataFileTypeClass();
outParameter.DataType = outputType;
parameters.Add(outParameter);

When I go to execute, I keep getting this message:

"ERROR 000622: Failed to execute (GisToCad). Parameters are not valid.\nERROR 000623: Invalid value type for parameter output_dwg."

I tried variations of GPDataFile but GPDataFileTypeClass seems to be the only one that can cast into a DataType. What is the invalid value type that I am setting?

Outcomes