Returning a feature class as an output parameter ArcObjects Toolbox Tool

696
1
11-14-2011 09:33 AM
AaronHigh
New Contributor III
Hi,

I've been working on writing some ArcObjects tools for use in a toolbox that will ultimately be published to ArcGIS Server. I'm having some trouble in an attempt to return a feature class as a parameter. I've attempted to use the SetParamaterValue() in the IGeoProcessor2 interface to return it, however it will consistently crash the toolbox in Arc when I set it to expect an output feature class. I can't seem to find any documentation for doing this in ArcObjects .NET aside from returning strings. I know it can be done in ArcPy, so I assume there is a way in ArcObjects .NET.
0 Kudos
1 Reply
DuncanHornby
MVP Notable Contributor
Aaron,

I dabbled in developing a geoprocessing tool a few years ago in 9.3 as a way of teaching myself.  Didn't get very far!

I have some vague memory that I had to "pack" my parameters. Look at the IGPUtilities interface and PackGPValue method? Just an idea...

Duncan
0 Kudos