The goal with my model is to locate features that intersect a feature class of sewer mains. After a sewer main is determined to intersect with a feature I need to remove the ability to select that feature from the list then continue. Right now I'm using a Switch Selection to select all the features that are left minus the previously selected mains, but unfortunately this idea doesn't work because if there were zero features selected during the intersect process the switch selection will result in returning the entire original table which would ruin the process of eliminating mains as I proceed down the list of features I need to intersect with.
I'm going to try to break this down in a linear format to make it easier to understand.
Select sewer mains that Intersect with a Buildings feature class > Assuming there are results create a feature layer from the selection > Perform a Switch Selection on the sewer mains table to find the remaining sewer mains > Use the Select by location to find the intersection of the remaining sewer mains against railroad tracks > Create a feature layer for those > Repeat until through the list.
I'm certain there are better ways to do this using Modelbuilder, but I'm mentally blocked from seeing them right now. I need some help please.
Also, I'd like to use Modelbuilder for this and not Python right now.
I'm pretty sure I'm making this more complicated than I need to so, I thank you all in advance.
Solved! Go to Solution.
Hummm, that's an interesting idea. I don't know if even saw that being an option. I have to test it first and see what happens. Thank you. Also, regardless of that solution you led me to find the Get Count tool, which I had forgotten about, and I bet I can make that work too.
@MehdiPira1 I'm not actually sure that solution works, but I haven't tested it yet. I think the suggested solution that you recommended might have the same flaw as the one that I first tried. That flaw being if there is no intersection of the features the table selection that will be returned would be the entire contents of the original table.
I sketched up a quick drawing of the flow to get to the solution. I hope it's legible.
I think the solution involves using a test case (If...Then....Else workflow) to see if the row count of the intersection is = 0 and then if that occurs I use the previous tables selection in the next part of my workflow. Doing that I should still be proceeding in the right direction instead of starting over with the original data table.