When executing SelectLayerByLocation with arcobjects (c#) in 10.6.1, I am getting the errors:
ERROR 000622: Failed to execute (Select Layer By Location). Parameters are not valid.
ERROR 000800: The value is not a member of INVERT | NOT_INVERT.
My code is:
MakeFeatureLayer featureLayerTrafos = new MakeFeatureLayer(infeatures_transformador, out_layerTrafos);
RunTool(geoprocessor, featureLayerTrafos, null);
MakeFeatureLayer featureLayerBT = new MakeFeatureLayer(infeatures_bt, out_layerBT);
RunTool(geoprocessor, featureLayerBT, null);
SelectLayerByLocation selectLayerByLocation = new SelectLayerByLocation();
selectLayerByLocation.in_layer = featureLayerTrafos.out_layer;
selectLayerByLocation.out_layer_or_view = "TrafosConBT";
selectLayerByLocation.selection_type = "NEW_SELECTION";
selectLayerByLocation.overlap_type = "INTERSECT";
selectLayerByLocation.invert_spatial_relationship = "NOT_INVERT";
selectLayerByLocation.select_features = featureLayerBT.out_layer;
IGeoProcessorResult2 resultInt = RunTool(geoprocessor, selectLayerByLocation, null); //HERE I GET THE ERRORS
Any idea what is wrong?