AnsweredAssumed Answered

Custom geoprocessing function tool

Question asked by brettlawson on Jul 28, 2015
Latest reply on Jul 29, 2015 by limgeomatics_u2

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

 

Message was edited by: Brett Lawson It appears that using the DEFileTypeClass works, but now I'm curious as to what the difference between that class and the GPDataFileTypeClass

Outcomes