Skip to main content

system.kanoa.tooling.rebuildCounters(toolingAssetId, userId)

Recomputes a tool's counts from scratch: the cycles its hosts ran (outfeed counts / parts per cycle) and their Running time over every window the tool was mounted, plus the corrections made by hand; since-PM and since-refurbishment counts start at the last PM and refurbishment. A tool counting its own shots keeps its cycle counts. Each change is logged as an adjustment.


Parameters​

toolingAssetId Integer: The tool

userId Integer: The user making the change


Returns​

(countsChanged, message)


Example​

toolingAssetId = 1
userId = 5
countsChanged, message = system.kanoa.tooling.rebuildCounters(toolingAssetId, userId)