I have a feature class that may or may not have a number of features selected. If there are features selected, I want to process them using a Model Builder sequence I have prepared. How do I check "if features are selected, continue, otherwise stop processing"? I tried the following from looking at another post, but regardless whether the Boolean Output is "True" or "False", the model still continues processing past the Boolean Output point. Does anyone have any suggestions to either improve upon my sequence or another solution that will do the checking for selected features?
Attached are two screenshots. One is the sequence I set up in Model Builder, with the "check for selected features" Calculate Value first, and the second is the code within that Calculate Value tool.
I would assume this is pretty basic, but it's stumping me. Thank you for any assistance.
Thank you, Bruce. It sounds like a very simple solution, and though it took me a while, I figured out where the Get Count tool is and I think I was able to make it a precondition -- never used either technique before. When I connected the Row Count to the next step in the process, I chose Precondition from the context menu. I assume that's how I'm supposed to do it. Unfortunately, even without a selection in my Layer, the Dissolve tool still ran in this example. I'm sorry to ask, but can you take another look and see if I've missed something? I'm still quite at amateur level with Model Builder.
Edit: Thinking about this further, and looking at the Python generated from the model, I can see that there's no check for "number of rows SELECTED" in this. I'm not sure how to do that part with the Get Count tool. Can you give me specifics as to how you recommend that part is done? Much appreciated!