2

I have a model in three blocks.

Block 1 iterates through feature classes in a DB clips them based on an extent boundary and stores into a folder.

Block 2 takes input folder and check through shapefiles for empty features and removes if any.

Block 3 removes unrequired attribute fields from Attribute Table.

What I want is that "Remove empty shapes" script runs only after "Clip" tool is completely done with all iterations (feature classes) and shape files are stored into folder!

What I tried is make precondition after "%Name%" but still after each itaration runs "Remove empty shapes" what makes process slower!

the same, I want that "Remove unnecessary Att. Fields" runs only after "Remove empty shapes" is done but for some reason these 2 last Blocks I cant set precondition at all!

enter image description here

  • Yes, put your iterator and clip "block" in its own model, that is block 1. Then drag that model into what you have and connect to block 2 as a precondition and block 2 becomes a precondition of block 3. Check out help file on preconditions. – Hornbydd Jun 23 at 1:57
  • its not working but i guess is because block 2 and 3 are python scripts maybe because of that but its not working.. I can connect "%Name%" with "remove empty shapes" as precondition but after each iteration runs "Remove shape files" which means it slows the process and I want it run only at the end of block 1 – gisgis Jun 23 at 16:43
  • Update your question to show us how your model looks now. The python script tools should not be a problem. – Hornbydd Jun 23 at 17:08
  • updated! any Idea ? – gisgis Jun 23 at 18:03
  • 1
    OK you have not understood what I said. Your iterator and clip tool must be in its own model. This then becomes a sub-model, which you drag and drop into your model above and connect as precondition. Your current setup is incorrect and highly inefficient as EVERYTHING runs with each loop of the iterator. When using iterators it is quite normal to have models within models. – Hornbydd Jun 23 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.