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.
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.
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.
;,,,sort of retired...'
that is my signature and current state