7

I am building a model to process between two and five files (the number of inputs changes depending on the scenario). I would like to have the option for the users to input up to five files, but toggle on/off unneeded inputs as required.

Each input is processed the same way (define projection, add field, calculate field, project and buffer) and then the two to five files are merged at the end.

Batch processing is not possible however as the calculate field is based on a variable entered manually per file (Machine Tail Number) (IE input file 1, name variable 1. Input file 2, name variable 2 etc.)

I have tried to implement a toggle on/off using a boolean precondition. However this just stops the process, a data input is required for the validation check.

Can anyone think of a way to toggle on/off inputs?

Do you have any suggestions?

enter image description here

enter image description here

3

What you want to do is make use of Iterate Feature Classes. That way you'll only need to have the entire model up there once. Just have the user put the Feature Classes they want to work on in the same folder or GDB, then feed that into the model. At the end of it you have two options:

  1. Use Collect Values, then feed that into the Merge.
  2. Create an empty output file with all the fields you'll need, set that as a prerequisite to the iterator, then use Append, rather than Merge, with that results file as the target with the "NO_TEST" schema type.

I recommend option 2. Collect values sometimes doesn't work properly without the use of submodels. You could also create the results template on your own and just have that copied by the model, rather than creating it new from scratch each time.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.