update_parts_list_properties#

Parts.update_parts_list_properties(project, cca_name, part_properties)#

Update one or more properties of one or more parts in a parts list.

Available Since: 2024R2

Parameters:
project: str

Name of the Sherlock project.

cca_name: str

Name of the CCA.

part_properties: list[dict[str, list[str] | list[dict[str, str]]]]

Part properties consisting of these properties:

  • reference_designators: list[str], optional

    Reference designator for each part to be updated. If not included, update properties for all parts in the CCA.

  • properties: list[dict[str, str]]

    Part properties consisting of these properties:

    • name: str

      Name of property to be updated.

    • value: str

      Value to be applied to the chosen part property.

Returns:
:
int

Status code of the response. 0 for success.

Return type:

int

Examples

>>> from ansys.sherlock.core.launcher import launch_sherlock
>>> sherlock = launch_sherlock()
>>> sherlock.parts.update_parts_list_properties(
        "Test",
        "Card",
        [
            {
                "reference_designators": ["C1"],
                "properties": [
                    {"name": "partType", "value": "RESISTOR"}
                ]
            },
            {
                "reference_designators": ["C2"],
                "properties": [
                    {"name": "locX", "value": "1"}
                ]
            }
        ]
    )