4

enter image description hereIs there a way how to iterate over feature classes in Model Builder in ArcGIS 10.3 using a number of different wildcards?

The wildcards I want to use are strings in the middle of the feature class names. If it was just one wildcard, I would use (asterisk)IVORY(asterisk) and it would do the trick but with a number of different ones it doesn’t work. I tried to type “IVORY or CAMEROON” and also “IVORY,CAMEROON” but neither worked.

It would probably be possible to do it creating submodels but when I have a large number of wildcards it would be too much work so I'm looking for a different solution.

Feature class names examples: "feature_class_1_NA300002_IVORY_COAST_AUS15" and "feature_class_2_NA300002_CAMEROON_MAR15" etc.

If possible, I would like to do it without the need to use a scripting language.

1

The short answer to if the wildcards that you are using can work is no.

You can however use a precondition to control the workflow. So the iterator lets everything through and then you say continue if it has ivory/cameroon.

The model is simply this:

Model

The Calculate Value tool is a precondition to the rest of the workflow, in this case simply adding a field.

The Calculate Value tool is set up as shown below:

Calculate Value tool

Please note indentation is critical in python!

An alternative solution is discussed here.

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.