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
Solved! Go to Solution.
This blog post promises to talk about it:
If you are stuck at "if" – Part 4 – Does Selection Exists model example | ArcGIS Blog
This should give you everything you need to implement if-then-logic for this task in ModelBuilder.
Using If-Then-Else logic for branching
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
This blog post promises to talk about it:
If you are stuck at "if" – Part 4 – Does Selection Exists model example | ArcGIS Blog
This link seems dead, even though it's linked from within esri help files, they can't find it either.
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.
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