update_parts_list#

Parts.update_parts_list(project, cca_name, part_library, matching_mode, duplication_mode)#

Update a parts list based on matching and duplication preferences.

Available Since: 2021R1

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

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

  • part_library (str) – str: Name of the parts library.

  • matching_mode (str) – str: Matching mode for updates.

  • duplication_mode (PartsListSearchDuplicationMode) – PartsListSearchDuplicationMode: How to handle duplication during the update.

Return type:

int

Returns:

:
int

Status code of the response. 0 for success.

Examples

>>> import SherlockCommonService_pb2
>>> import SherlockPartsService_pb2
>>> from ansys.sherlock.core import launcher
>>> sherlock, install_dir = launcher.launch_and_connect(transport_mode="wnua")
>>> sherlock.project.import_odb_archive(
>>>     "ODB++ Tutorial.tgz",
>>>     True,
>>>     True,
>>>     True,
>>>     True,
>>>     project="Test",
>>>     cca_name="Card",
>>> )
>>> sherlock.parts.update_parts_list(
>>>     "Test",
>>>     "Card",
>>>     "Sherlock Part Library",
>>>     SherlockCommonService_pb2.MatchingMode.Both,
>>>     SherlockPartsService_pb2.DuplicationMode.Error,
>>> )