How to reference GeoProcessorSettings from Geoprocessor object

743
2
09-15-2010 02:32 AM
PeterGranberg
New Contributor III
Hi
Im using VS2008 and C# to run a GPProcess with a geoprocessor object. I need to access the IGPEnvironmentManager from the GeoProcessor object. In the old school (prior ArcGIS 9.2 and Visual Basic) this was simple because you created a gp object from the CreateObject("geoprocessing.gpdispatch.1") which was QI:able to the IGPComHelper which gives you access to the IGPEnvironmentManager.

How can I do this from the managed GeoProcessor object in C#?
0 Kudos
2 Replies
JohnHauck
Occasional Contributor II
If you just need to set environment values for your GPProcess then you can use Geoprocessor::SetEnvironmentValue.

If you are looking to do something else could you provide some additional details?
0 Kudos
PeterGranberg
New Contributor III
Thank you for your reply.

I was looking for a solution to programaticly set the HowLongToKeepResults on the IGeoProcessorSettings2 interface.

/Peter
0 Kudos