mik1971

How to get IFeatureLayer from using Geoprocessor and SelectLayerByLocation

Discussion created by mik1971 on Jun 26, 2013
Latest reply on Jun 27, 2013 by kenbuja
Hi there!
I would appreciate if anybody can tell please
if it possible (and how(please provide a code))
to get IFeatureLayer from using Geoprocessor and SelectLayerByLocation
///////////////////////
some pseudo code here

Geoprocessor gp = new Geoprocessor();
IFeatureClass pCurrentFeatureClass = // some code to OpenFeatureClass
MakeFeatureLayer makeFeatureLayer = new MakeFeatureLayer();
makeFeatureLayer.in_features = pCurrentFeatureClass;
makeFeatureLayer.out_layer = "CurrentFeatureLayer";
SelectLayerByLocation selectLayerByLocation = new SelectLayerByLocation();
selectLayerByLocation.in_layer = "CurrentFeatureLayer";
gp.Execute(selectLayerByLocation,null);
//////////////////////

HERE: HOW TO GET IFeatureLayer? // in order to get ISelectionSet in the "pCurrentFeatureClass" after SelectLayerByLocation
//////////////////////////////////////
Please do not provide solutions with GP.CopyFeatures, mainly because I need to save ObjectID from the pCurrentFeatureClass.
Please do not provide ArcObjects solutions with IQueryFilter.

Outcomes