system.kanoa.tooling.addTool(toolInfo, userId)
Adds a tool: an isTooling asset (never OEE-enabled) with its tooling info and life counter rows. Tool names are unique within a site (the site its location is under; tools outside any site are a group of their own), because a tag mounts a tool by name.
Parameters
toolInfo Dictionary
| - assetName | String | Required |
| - assetTypeId | Integer | Required. Any asset type; there's no seeded tooling type |
| - parentId | Integer | Where the tool is stored in the asset tree (a storage bin, say) |
| - enabled | Boolean | Defaults to True |
| - sortOrder | Integer | |
| - hasPositions, holdsInserts, scalesOutput | Boolean | What the tool does. Default False |
| - lifeUnit | String | 'cycles', 'runMinutes' or 'calendarDays'. The limits below are read in this unit |
| - lifetimeLimit, pmInterval, refurbInterval | Integer | None = no limit |
| - refurbLimit | Integer | Refurbishments before the tool is worn out |
| - warnPct | Float | Percent of a limit at which the tool comes due |
| - calibrationIntervalDays | Integer | |
| - calibrationDue | Date | |
| - setupMinutes, teardownMinutes | Integer |
userId Integer: The user making the change
Returns
(toolingAssetId, message)
Example
toolInfo = {'assetName': 'assetName', 'assetTypeId': 1, 'parentId': 1, 'enabled': True, 'sortOrder': 1}
userId = 5
toolingAssetId, message = system.kanoa.tooling.addTool(toolInfo, userId)