Skip to main content

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

- assetNameStringRequired
- assetTypeIdIntegerRequired. Any asset type; there's no seeded tooling type
- parentIdIntegerWhere the tool is stored in the asset tree (a storage bin, say)
- enabledBooleanDefaults to True
- sortOrderInteger
- hasPositions, holdsInserts, scalesOutputBooleanWhat the tool does. Default False
- lifeUnitString'cycles', 'runMinutes' or 'calendarDays'. The limits below are read in this unit
- lifetimeLimit, pmInterval, refurbIntervalIntegerNone = no limit
- refurbLimitIntegerRefurbishments before the tool is worn out
- warnPctFloatPercent of a limit at which the tool comes due
- calibrationIntervalDaysInteger
- calibrationDueDate
- setupMinutes, teardownMinutesInteger

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)