I am on the ModelBuilder of ArcGis10.3. I have a While iteration and I want to add a counter which indicates the number of the run at each run. This value can be also useful for in line variable substitution to save/load some data using the number of the run.
What I tried to do is to link the Continue with Calculate Value (2) which is my counter whose value is stored in the Main Value. Calculate Value (2) contains this:
Codeblock: def x(n):
if n==True: x=x+1
The code should be syntactically ok, because it allows me to run it, but it doesn't recognize "True" as a boolean value and it think it is a variable.
I was using a For iteration before and the counter was already part of the tool. Now with the While cycle I am not even sure if what I am trying to do is the easiest way to create a counter.