ERROR 000800: The value is not a member of INVERT | NOT_INVERT executing SelectLayerByLocation

546
1
Jump to solution
03-10-2020 11:31 AM
David_RonaldSuárez_Urresti
New Contributor III

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?

0 Kudos
1 Solution

Accepted Solutions
David_RonaldSuárez_Urresti
New Contributor III

The problem was that selectLayerByLocation.out_layer_or_view  is not needed. I deleted that line and works.

View solution in original post

0 Kudos
1 Reply
David_RonaldSuárez_Urresti
New Contributor III

The problem was that selectLayerByLocation.out_layer_or_view  is not needed. I deleted that line and works.

0 Kudos