Hi everybody,
Im trying to create a new field which will start with the value 1201 and increment by 1 until the end (82 values).
I have tried to use the code block to make it create such field but couldn't make it..
help please? Tnx
You could use itertools.count
Expression:
next(counter)
Code block:
import itertools counter = itertools.count(start=1201)
Please create new field with "Double"
Value
raka()
Code Block
rec=0def raka():global recpStart = 1201pInterval = 1if (rec == 0):rec = pStartelse:rec += pIntervalreturn rec
cheers!
short and elegant. Do you recommend to study the itertools ?
tnx man.. worked!
!!!!!!!!!!!!! 🙂
ログインすると、投稿したり、更新をフォローしたりできます。初めてですか?無料アカウントを登録しましょう。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.