get_part_location#

Parts.get_part_location(project: str, cca_name: str, ref_des: str, location_units: str) list[PartLocation]#

Return the location properties for one or more part.

Available Since: 2022R1

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

  • cca_name (str) – Name of the CCA.

  • ref_des (str) – Comma separated list of reference designators of parts to retrieve locations for.

  • location_units (str) – Valid units for a part’s location.

Returns:

PartLocation for each part that corresponds to the reference designators.

Return type:

list[PartLocation]

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",
)
>>> part_locations = sherlock.parts.get_part_location(
    project="Tutorial",
    cca_name="Main Board",
    ref_des="C1,C2",
    location_units="in",
)
>>> print(f"{part_locations}")