Select to view content in your preferred language

Delete selected features from select by location

2508
5
Jump to solution
11-04-2015 12:29 PM
RebeccaWilson
Occasional Contributor

Hello,

I'm trying to create a tool in Model Builder that identifies protection areas (buffers) that, through time, have become misaligned and are no longer centered on the feature that they were created for. I then want to take the selected features and delete them. I'm planning on making this a tool that can be run on a semi-regular basis to check for discrepancies, delete the feature, then run through the rest of the tool that re-creates the buffer and/or creates buffers for new features.

My problem is, the delete feature will delete ALL the buffers if there are no selections. I haven't been able to find much help as to how to implement an if/then condition that applies to select by location. All the help seems to only apply to selections based on attributes.

I feel like I'm missing something simple here. If there are no selected misaligned features/buffers, I just need the tool to then continue onto the rest without deleting any features.

Thank you,

Rebecca

0 Kudos
1 Solution

Accepted Solutions
5 Replies
FreddieGibson
Honored Contributor

This should give you everything you need to implement if-then-logic for this task in ModelBuilder.

Using If-Then-Else logic for branching

http://desktop.arcgis.com/en/desktop/latest/analyze/modelbuilder/using-if-then-else-logic-for-branch...

You want to use the following tool to check the number of features selected.

Get Count (Data Management)

http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/get-count.htm

DarrenWiens2
MVP Honored Contributor
AndrewBarker3
Regular Contributor

This link seems dead, even though it's linked from within esri help files, they can't find it either.  

0 Kudos
curtvprice
MVP Esteemed Contributor

That blog post series is very useful, but it is based on ArcMap and Pro's Model Builder has better branching tools now. I would guess that's why the powers that be pulled from the blog. Pity.

0 Kudos
RebeccaWilson
Occasional Contributor

Thanks for your help, both of you. I had read those articles previously, but I think I had to step away for a while and come back before I was really able to understand how to apply the information.

Thanks again!

Rebecca

0 Kudos