Jump to content

Autorun Incremental Part Number


Recommended Posts

I'm running parts in Autorun. The part are serialized, and the reports have to be tied to the serial number. Is there a way to force the incremental part number to hold to 4 places?

Calypso is currently adding an additional digit, like:

0008
0009
00010 - this should (obviously) be 0010

Any advice?
Link to comment
https://qualityforum.zeiss.com/topic/17522-autorun-incremental-part-number/
Share on other sites

It does stupid stuff since its a string, not a numeric value.

Are you ok with resetting the number once the plan is started?
if len(getRecordHead("partnbinc")) > 4
	if subStr(getRecordHead("partnbinc"),1,1).asInteger == 0
		setRecordHead("partnbinc",subStr(getRecordHead("partnbinc"),2,len(getRecordHead("partnbinc"))))
	endif
endif
Don't know if autorun will handle partnbinc diffrent from how its usually done. But you could give it a try.
×
×
  • Create New...