0

I have created this ModelBuilder model

enter image description here

in above expression value is 1 by default but I want to run expression value 2,3,4,5 and up to 50 (it may vary based my dataset).

I tried for while iteration but results not fruitful

0

2 Answers 2

3

You dont mention what field type you have. But I have a string field called kkod with integers in it.

This model is working if I use the for loop output as input to a string variable, then use the string as input to an SQL expression variable:

enter image description here

2
  • great and it's working. Sep 16, 2021 at 9:24
  • 1
    Nice, please accept my answer with the checkbox!
    – BERA
    Sep 16, 2021 at 10:13
0

The ModelBuilder does have a for loop implementation which sounds more appropriate than while in your use case.

This being said, iteration capabilities within ModelBuilder for ArcMap (which it seems you're using) are relatively limited. You can't batch custom models, and I think you are only allowed one iteration per model. To get around these, you can export your model as a script and do it programmatically.

1
  • i tried to use for loop but i can i connect for loop to expression Sep 15, 2021 at 19:34

Your Answer

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

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