update_potting_region#

Layer.update_potting_region(request: UpdatePottingRegionRequest) list[SherlockCommonService_pb2.ReturnCode]#

Update one or more potting regions in a specific project.

Available Since: 2025R1

Parameters:

request (UpdatePottingRegionRequest) – Contains all the information needed to update one or more potting regions per project.

Returns:

Return codes for each request.

Return type:

list[SherlockCommonService_pb2.ReturnCode]

Examples

>>> from ansys.sherlock.core.launcher import launch_sherlock
>>> from ansys.sherlock.core.types.layer_types import PolygonalShape
>>> from ansys.sherlock.core.types.layer_types import PottingRegionUpdateData
>>> from ansys.sherlock.core.types.layer_types import PottingRegion
>>> sherlock = launch_sherlock()
>>>
>>> update_request1 = PottingRegionUpdateData(
    potting_region_id_to_update=potting_id,
    potting_region=PottingRegionData(
        cca_name=cca_name,
        potting_id=potting_id,
        potting_side=potting_side,
        potting_material=potting_material,
        potting_units=potting_units,
        potting_thickness=potting_thickness,
        potting_standoff=potting_standoff,
        shape=PolygonalShape(
            points=[(0, 1), (5, 1), (5, 5), (1, 5)],
            rotation=45.0
        )
    )
)
>>> update_request2 = PottingRegionUpdateData(
    potting_region_id_to_update=potting_id,
    potting_region=PottingRegionData(
        cca_name=cca_name,
        potting_id=potting_id,
        potting_side=potting_side,
        potting_material=potting_material,
        potting_units=potting_units,
        potting_thickness=potting_thickness,
        potting_standoff=potting_standoff,
        shape=PolygonalShape(
            points=[(0, 1), (5, 1), (5, 5), (1, 5)],
            rotation=0.0
        )
    )
)
>>> potting_region_requests = [
    update_request1,
    update_request2
]
>>> return_codes = sherlock.layer.update_potting_region(request)