haasel

Geoprocessing procedure SelectLayerByLocation COMException

Discussion created by haasel on Jun 3, 2011
Latest reply on Jun 7, 2011 by kenbuja
Hi!

I try to call geoprocessing procedure SelectLayerByLocation but I got COMException error (HRESULT E_FAIL).
I also tried some other geoprocessing procedures (Buffer) and it run well.

Here is code:
...
ESRI.ArcGIS.DataManagementTools.SelectLayerByLocation SelectInWorkLayerBuffer = new SelectLayerByLocation();
SelectInWorkLayerBuffer.in_layer = net_layer;
SelectInWorkLayerBuffer.overlap_type = "INTERSECT";
SelectInWorkLayerBuffer.select_features = work_layer_buffer;
SelectInWorkLayerBuffer.selection_type = "NEW_SELECTION";
gp.Execute(SelectInWorkLayerBuffer, null); //COMException

Any idea?

Piotr

Outcomes