update_parts_locations#

Parts.update_parts_locations(project, cca_name, part_loc)#

Update one or more part locations.

Available Since: 2022R2

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

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

  • part_loc (list[tuple[str, str, str, str, str, str, str]]) –

    list[tuple[str, str, str, str, str, str, str]]: List defining the part locations. The list consists of these properties:

    • refDes: str

      Reference designator of the part.

    • x: str

      Value for the x coordinate.

    • y: str

      Value for the y coordinate.

    • rotation: str

      Rotation.

    • location_units: str

      Locations units.

    • board_side: str

      Board side.

    • mirrored: str

      Mirrored.

Return type:

int

Returns:

:
int

Status code of the response. 0 for success.

Examples

>>> 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_locations(
>>>     "Test",
>>>     "Card",
>>>     [
>>>         ("C1", "-2.7", "-1.65", "0", "in", "TOP", "False"),
>>>         ("J1", "-3.55", "-2.220446049250313E-16", "90", "in", "TOP", "False"),
>>>     ]
>>> )