update_modeling_region#
- Layer.update_modeling_region(project, modeling_regions)#
Update one or more modeling regions in a specific project.
- Parameters:
project (
str) – str: Name of the Sherlock project.modeling_regions – Modeling regions to update. Each dictionary should contain:
- Return type:
- Returns:
- :
intStatus code of the response. 0 for success.
Examples
>>> from ansys.sherlock.core import launcher >>> sherlock, install_dir = launcher.launch_and_connect(transport_mode="wnua") >>> sherlock.project.import_odb_archive( >>> "ODB++ Tutorial.tgz", >>> True, >>> True, >>> True, >>> project="Tutorial Project", >>> cca_name="Card", >>> ) >>> modeling_regions = [ >>> { >>> "cca_name": "Card", >>> "region_id": "Region001", >>> "region_units": "mm", >>> "model_mode": "Enabled", >>> "shape": PolygonalShape(points=[(0, 0), (1, 1)], rotation=0), >>> "pcb_model_props": { >>> "export_model_type": "Sherlock", >>> "elem_order": "Second_Order", >>> "max_mesh_size": 0.5, >>> "max_mesh_size_units": "mm", >>> "quads_preferred": True, >>> }, >>> "trace_model_props": { >>> "trace_model_type": "Enabled", >>> "elem_order": "Second_Order", >>> "trace_mesh_size": 0.1, >>> "trace_mesh_size_units": "mm", >>> }, >>> "region_id_replacement": "NewRegion001", >>> } >>> ] >>> result = sherlock.layer.update_modeling_region("Tutorial Project", modeling_regions)