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) –

    List of part properties consisting of these properties:

    • reference_designatorsList of str, optional

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

    • propertieslist

      List of properties consisting of these properties:

      • namestr

        Name of property to be updated.

      • valuestr

        Value to be applied to the chosen part property.

Returns:

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