Select to view content in your preferred language

Problem with 'Select By Layer By Location' tool

500
3
09-27-2024 01:17 PM
YosefBodovski1
Emerging Contributor

There is a problem with the 'Select By Layer By Location' tool. It doesn't add selection to the original feature layer. Instead  It generates a new layer called ".._Layer1" which shows on the map, but not recognizable by the Python script. It looks like a bug to me. I've seen some earlier posts related to this issue, but apparently it has never been addressed.

What's interesting is that 'Select By Location' icon which appears on top opens a different tool called 'Select By Location'. This tool does what it's supposed to do, but I can't find it in the list of tools and can't use it in my Python script.

 

3 Replies
DanPatterson
MVP Esteemed Contributor

Select Layer By Location (Data Management)—ArcGIS Pro | Documentation

creates  new layer from a layer as input,

if there is a selection already, you can add to the selection by using

selection_type

ADD_TO_SELECTION—The resulting selection will be added to an existing selection. If no selection exists, this is the same as the NEW_SELECTION option.


... sort of retired...
YosefBodovski1
Emerging Contributor

Sorry, but this is not what I am asking. My question is not about parameters of the tool, it is about its output. I don't understand why instead of creating selection in the input feature layer it generates a separate one which is not recognizable by the system.

Also, I am not sure I understand the '...sort of retired...' comment. The 'Select Layer By Location' tool is not retired, it appears in the ArcGIS Pro Toolbox and I am forced to use it in the Python script. The fact that it is different from the tool used in the Selection menu on the top of the screen is very confusing.

 

0 Kudos
DanPatterson
MVP Esteemed Contributor

;,,,sort of retired...'

that is my signature and current state


... sort of retired...
0 Kudos