2

I am trying to use the "Select layer by location" tool, in Model Builder, ArcGis. This tools has 2 input files: "Input Feature Layer" and "Selecting Features".
I cannot connect the "Input Feature Layer".
When I drag and drop the "Connect" arrow (which is used to link layers to tools), The tool only shows "Selecting Features" (Fig. 1). Ok... I have tried to open the tool, and choose from there, the "Input Feature Layer", but it creates a duplicate of that layer (Fig. 2). By creating a duplicate, all the steps of this model stop at this particular step.
What can be causing this error? I work in ArcGis 10.2.2 and use no extensions.

enter image description here

  • 3
    I would like to add to this question which you have an answer for. Have you tried reading the help file for the tool? All tools have help pages and on the help page is a section called Syntax and the far right column explicitly states the data type of the input/output parameter. So raster to polygon creates a FeatureClass and select by locations takes a FeatureLayer as input. You should get into the habit of reviewing this section of the help file when building models. – Hornbydd Apr 19 '15 at 20:36
  • Yes I absolutely agree. The ESRI tool documentation is super good and I've learned arcpy mostly straight from it. However, as @Andrei found with the shapefile, and as I mentioned at the end of my answer, the "Data Type" column does not always list every possible data type. I've found it to be a little murky sometimes with datasets vs. feature layers. – mr.adam Apr 20 '15 at 13:37
4

The problem is that the dataset you are currently trying to use as the input feature layer is technically not a feature layer, it's a shapefile. What you need to do is use the Make Feature Layer tool on the shapefile, and then use the resulting feature layer for the selection process.

It's a little confusing, but realize that when you add a shapefile into ArcMap, what you see in the table of contents is actually a feature layer made from the shapefile (the shapefile is just the data source). So you are very used to dealing with feature layers, you just don't know it.

It's interesting that, as you observed, while you can't use the shapefile as the input features, you can use it as the selecting features. Looking at the documentation for that tool, it seems like only a feature layer would work as an input for that parameter, but apparently that's not the case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.