Skip to main content

system.kanoa.quality.config.addTolerance

This function requires KanoaQDS module

Description

Adds an attribute tolerance in KanoaQDS.

Syntax

addTolerance(attrInfo, userId)
  • Parameters
      dict attrInfo - Dictionary, e.g., {'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}
      int userId - User ID
  • Returns
      int attributeToleranceId - ID of the added attribute tolerance.
  • 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}")