system.kanoa.quality.config.addTolerance
Description
Adds an attribute tolerance.Syntax
addTolerance(attrInfo, userId)Parameters:
Returns:
Dictionary
| Parameter | Type | Required | Notes | 
|---|---|---|---|
| attributeId | int | ||
| assetId | int | e.g. None | |
| itemId | int | e.g. None | |
| itemClassId | int | e.g. None | |
| itemSetId | int | e.g. None | |
| uel | float | e.g. 10.0 | |
| udl | float | e.g. None | |
| usl | float | e.g. 9.0 | |
| ucl | float | e.g. 8.0 | |
| tgt | int | e.g. 5 | |
| lcl | int | e.g. 3 | |
| lsl | int | e.g. 2 | |
| ldl | float | e.g. None | |
| lel | int | e.g. 0 | |
| enabled | bool | e.g. True | 
Code Examples
# Usage example
tolerance_info = {'attributeId': 2, 'assetId': None, 'itemId': None, 'itemClassId': None, 'itemSetId': None, 'uel': 10.0, 'udl': None, 'usl': 9.0, 'ucl': 8.0, 'tgt': 5, 'lcl': 3, 'lsl': 2, 'ldl': None, 'lel': 0, 'enabled': True}
added_tolerance_id = system.kanoa.quality.config.addTolerance(attrInfo=tolerance_info, userId=123)
if added_tolerance_id is not None:
    print(f"Successfully added attribute tolerance with ID {added_tolerance_id}")