Skip to main content

system.kanoa.quality.config.addTolerance

Description

Adds an attribute tolerance.

Syntax

addTolerance(attrInfo, userId)

Parameters:
  • attrInfo (dict): Dictionary containing attribute tolerance info
  • userId (int): User ID

  • Returns:
  • attributeToleranceId (int): ID of the added attribute tolerance
  • Dictionary

    ParameterTypeRequiredNotes
    attributeIdint
    assetIdinte.g. None
    itemIdinte.g. None
    itemClassIdinte.g. None
    itemSetIdinte.g. None
    uelfloate.g. 10.0
    udlfloate.g. None
    uslfloate.g. 9.0
    uclfloate.g. 8.0
    tgtinte.g. 5
    lclinte.g. 3
    lslinte.g. 2
    ldlfloate.g. None
    lelinte.g. 0
    enabledboole.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}")