Select to view content in your preferred language

How to reference GeoProcessorSettings from Geoprocessor object

940
2
09-15-2010 02:32 AM
PeterGranberg
Occasional Contributor
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
Frequent Contributor
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
Occasional Contributor
Thank you for your reply.

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

/Peter
0 Kudos