jperezalv

Geoprocessor.SetParameterValue() not working

Discussion created by jperezalv on Jul 27, 2011
Latest reply on Jul 31, 2011 by jperezalv
Hi, everybody!

I'm developing a geoprocessing tool using C# and ArcObjects 10 SP2, following the instructions provided in How to create a script tool that runs an EXE. This tool receives correctly the parameters using Geoprocessor.GetParameterValue(), executes some System Tools and is expected to return an output parameter of type string.

The problem is that the execution of the Geoprocessor.SetParameterValue() method has no effect in the tool output parameter value, which always shows its default value. The tool executes successfuly, all messages are shown, but the output parameter is not modified.

I've tried using ESRI.ArcGIS.Geoprocessor.Geoprocessor, and I've also tried with Geoprocessor, IGeoprocessor and IGeoprocessor2 interfaces from the ESRI.ArcGIS.Geoprocessing assembly. Apparently, it should be very easy, but I don't know if I'm doing something wrong or it's just a bug.

I've been dealing with this for the last two days, so any help will be appreciated.
Thanks in advance,
Jorge

Outcomes