update_parts_from_AVL#

Parts.update_parts_from_AVL(project, cca_name, matching_mode, duplication_mode, avl_part_num, avl_description)#

Update the parts list from the Approved Vendor List (AVL).

Available Since: 2024R1

Parameters:
  • project (str) – str: Name of the Sherlock project.

  • cca_name (str) – str: Name of the CCA.

  • matching_mode (str) – str: Determines how parts are matched against the AVL

  • duplication_mode (int) – SherlockPartsService_pb2.DuplicationMode.ValueType: Determines how duplicate part matches are handled when found

  • avl_part_num (int) – SherlockPartsService_pb2.AVLPartNum.ValueType: Determines what part number info in the parts list is updated from the AVL

  • avl_description (int) – SherlockPartsService_pb2.AVLDescription.ValueType: Determines if the part description is updated or not

Return type:

UpdatePartsListFromAVLResponse

Returns:

:
UpdatePartsListFromAVLResponse
  • returnCode: ReturnCode
    • value: int

      Status code of the response. 0 for success.

    • message: str

      Indicates general errors that occurred while attempting to update parts

  • numPartsUpdated: int

    Number of parts updated

  • updateErrors: list<str>

    Errors found when updating part

Examples

>>> from ansys.api.sherlock.v0 import SherlockPartsService_pb2
>>> from ansys.sherlock.core import launcher
>>> sherlock, install_dir = launcher.launch_and_connect(transport_mode="wnua")
>>> sherlock.project.import_odb_archive(
>>>     "C:\\Program Files\\ANSYS Inc\\v241\\sherlock\\tutorial\\ODB++ Tutorial.tgz",
>>>     True,
>>>     True,
>>>     True,
>>>     True,
>>>     project="Test",
>>>     cca_name="Card",
>>> )
>>> sherlock.parts.update_parts_from_AVL(
>>>     project="Test",
>>>     cca_name="Card",
>>>     matching_mode="Both",
>>>     duplication_mode=SherlockPartsService_pb2.DuplicationMode.First,
>>>     avl_part_num=SherlockPartsService_pb2.AVLPartNum.AssignInternalPartNum,
>>>     avl_description=SherlockPartsService_pb2.AVLDescription.AssignApprovedDescription,
>>> )