5

I've built a model in modelbuilder but cannot find an answer to this problem. Please help if you can.

Firstly I have an 'iterate feature class' tool drawing inputs out of a folder and then selecting attributes from the input table using SQL. I am then using the "get count" tool (which counts the rows selected) to test if any attributes were selected, this is a precondition to continue the model. However, if this precondition is 'false' then the model stops. I'd like for it to just continue with the next iteration of inputs. Is this possible, and if so, any insight would be great. I was thinking I might need if-then-else logic but not sure how to use it in this setting. Please advise. Here is an image of the model.

enter image description here

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Sep 16, 2011 at 0:51
1
  • One thing you could explore is exporting your model as a python script, and adjusting it there. Condition checking and iterations are a lot easier in python. Commented Nov 28, 2011 at 2:23

1 Answer 1

3

Without seeing your model it seems odd that your precondition is failing. I knocked a model together (see image below) and it worked fine. When the attribute query created a selection it was copied out when nothing was selected the export was skipped. It makes me wonder if you are using the correct select tool?

Example model

answered Sep 29, 2011 at 0:05

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.