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.

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

  • cca_name (str) – Name of the CCA.

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

  • matching_mode (PartsListSearchMatchingMode) – Matching mode for updates.

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

Returns:

Status code of the response. 0 for success.

Return type:

int

Examples

>>> from ansys.sherlock.core.launcher import launch_sherlock
>>> sherlock = launch_sherlock()
>>> 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",
    PartsListSearchMatchingMode.BOTH,
    PartsListSearchDuplicationMode.ERROR,
)