hexagon logo

Sequential trace codes in a loop

I haven't seen anyone post this yet. Nesting 4 parts across by 4 rows and sequentially numbering trace codes for each part and sending text to report window.
C1 =COMMENT/INPUT,NO,'Serial Number'
V2 =LOOP/START, ID = NO, NUMBER = 4, START = 1, SKIP = ,
OFFSET: XAXIS = 0, YAXIS = 140.88, ZAXIS = 0, ANGLE = 0
V1 =LOOP/START, ID = NO, NUMBER = 4, START = 1, SKIP = ,
OFFSET: XAXIS = 125, YAXIS = 0, ZAXIS = 0, ANGLE = 0
IF/V2==1 AND V1==1
TRACEFIELD/NO_DISPLAY,LIMIT=15 ; Number : C1.INPUT
COMMENT/REPT,"Part Number " + (C1.INPUT)
END_IF/
IF/V2==1 AND V1>1
TRACEFIELD/NO_DISPLAY,LIMIT=15 ; Number : C1.INPUT+V1-1
COMMENT/REPT,"Part Number " + (C1.INPUT+V1-1)
END_IF/
IF/V2==2
TRACEFIELD/NO_DISPLAY,LIMIT=15 ; Number : C1.INPUT+3+V1
COMMENT/REPT,"Part Number " + (C1.INPUT+3+V1)
END_IF/
IF/V2==3
TRACEFIELD/NO_DISPLAY,LIMIT=15 ; Number : C1.INPUT+7+V1
COMMENT/REPT,"Part Number " + (C1.INPUT+7+V1)
END_IF/
IF/V2==4
TRACEFIELD/NO_DISPLAY,LIMIT=15 ; Number : C1.INPUT+11+V1
COMMENT/REPT,"Part Number " + (C1.INPUT+11+V1)
END_IF/
COMMENT/REPT,"Row Number" + (-V2)
COMMENT/REPT,"Cup Number" + (-V1)
There is probably is a better way using loop counts, but this works.