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
Name of the Sherlock project.
- cca_name: str
Name of the CCA.
- matching_mode: str
Determines how parts are matched against the AVL
- duplication_mode: PartsListSearchDuplicationMode
Determines how duplicate part matches are handled when found
- avl_part_num: AVLPartNum
Determines what part number info in the parts list is updated from the AVL
- avl_description: AVLDescription
Determines if the part description is updated or not
- 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
- Return type:
UpdatePartsListFromAVLResponse
Examples
>>> from ansys.sherlock.core.types.parts_types import ( AVLDescription, AVLPartNum, PartsListSearchDuplicationMode, ) >>> 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=PartsListSearchDuplicationMode.FIRST, >>> avl_part_num=AVLPartNum.ASSIGN_INTERNAL_PART_NUM, >>> avl_description=AVLDescription.ASSIGN_APPROVED_DESCRIPTION >>> )