Select by Location Within a Distance Failed to Execute

1051
4
11-27-2019 04:17 PM
HeatherStettler
New Contributor II

In ArcPro I am trying to select lines that fall within a specified distance of points and am getting a 999999 error. Any workaround ideas?

Bonus question-is there a way to add an attribute query to this? i.e. select 'streets' that are within 300 ft of 'restaurants' where 'license' is 'Y'?

0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus

Q1  Both files in the same coordinate system? and in feet?

0 Kudos
HeatherStettler
New Contributor II

They were not! I corrected this but still get the same error.

0 Kudos
DanPatterson_Retired
MVP Emeritus

How did you correct it? did you project them to the same coordinate  system?

0 Kudos
KoryKramer
Esri Community Moderator

Have you tried anything from the error help?  999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl... 

If you have a scenario that consistently generates the 999999, please report that the Technical Support as the geoprocessing team considers unhandled exceptions a bug where the code could be improved to provide a better, more informative message if a tool cannot proceed for some reason.

That said, from the screenshot you provided, I *think* that maybe you've created a selection layer from a selection on another layer, correct? Which is why the input is 'streets selection'?  Does it make any difference if you feed in the original layer with the selection applied to the tool?  Still a 999999?

I tried using a selection layer as input and don't get an error:

For your bonus question, you could just set up a definition query (or multiple def queries) on your restaurants layer.  Before setting up your select by location, use the layer's Data > Definition Query toggle to only show restaurants where license = 'y'

Example where I have Streams where some are Intermittent and some are Perennial.

I can set up two Definition Queries on that layer.  

Perennial is Active:

Intermittent is active:

When working in the map, select the layer in the Contents pane, on the ribbon go to Feature Layer > Data > Definition query and toggle def queries on/off.

0 Kudos