get_part_location#

Parts.get_part_location(project, cca_name, ref_des, location_units)#

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:
:
list[PartLocation]

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="Test",
    cca_name="Card",
    ref_des="C1,C2",
    location_units="in",
)
>>> print(f"{part_locations}")