update_parts_locations#

Parts.update_parts_locations(project, cca_name, part_loc)#

Update one or more part locations.

Available Since: 2022R2

Parameters:
project: str

Name of the Sherlock project.

cca_name: str

Name of the CCA.

part_loc: 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.

Returns:
:
int

Status code of the response. 0 for success.

Return type:

int

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"),
>>>     ]
>>> )