How to set output parameter to a zip file in a custom geoprocessing function tool?

المشرف العام

Administrator
طاقم الإدارة
I'm trying to write a custom geoprocessing function tool in ArcObjects that I can then expose as a service on ArcServer. The output parameter will be a zip file that contains a filegeodatabase. I have marked the parameter as a required and attempted to set some of the default properties of the GPDataFile class, but when I run my try task, no matter what I type into the "Output Export File" input box I get a message saying that it is required. Does anybody have any samples on how to use and set the properties of the GPDataFile class to be used as an output parameter.

IGPDataFile gRDL = new GPDataFileClass(); gRDL.DataType = "zip"; gRDL.DatasetName = "TableName"; IGPParameterEdit3 inputParameter = new GPParameterClass(); inputParameter.DataType = new GPDataFileTypeClass(); // Default Value object inputParameter.Value = gRDL as IGPValue; // Set Parameter properties inputParameter.Direction = esriGPParameterDirection.esriGPParameterDirectionOutput; inputParameter.DisplayName = "Output Export File"; inputParameter.Name = "out_export_file"; inputParameter.ParameterType = esriGPParameterType.esriGPParameterTypeRequired; return inputParameter; Thanks,

Brett



أكثر...
 
أعلى