create_cca_from_modeling_region#

Project.create_cca_from_modeling_region(project, cca_from_mr_properties)#

Create one or more CCAs from modeling regions in a given project.

Parameters:
  • project (str) – str: Name of the Sherlock project.

  • cca_from_mr_properties (list[dict[str, bool | float | str]]) –

    list[dict[str, bool | float | str]]: CCAs to be created from modeling regions consisting of these properties:

    • cca_name: str

      Name of the CCA.

    • modeling_region_id: str

      Name of the modeling region.

    • description: str

      Description of the CCA.

    • default_solder_type: str

      The default solder type. The default is None.

    • default_stencil_thickness: float

      The default stencil thickness. The default is None.

    • default_stencil_thickness_units: str

      Units for default stencil thickness. The default is None.

    • default_part_temp_rise: float

      Default part temp rise. The default is None.

    • default_part_temp_rise_units: str

      Units for default part temp rise. The default is None. Options are "C", "F", and "K".

    • guess_part_properties: bool

      Whether to enable guess part properties. The default is None.

    • generate_image_layers: bool

      Whether to generate image layers or not. The default is None.

Return type:

int

Returns:

:
int

Status 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,
>>>     True,
>>>     project="Test",
>>>     cca_name="Card",
>>> )
>>> sherlock.project.create_cca_from_modeling_region(
>>>     "Test",
>>>     [{
>>>         'cca_name': 'Card',
>>>         'modeling_region_id': 'MR1',
>>>         'description': 'Test',
>>>         'default_solder_type': 'SAC305',
>>>         'default_stencil_thickness': 10,
>>>         'default_stencil_thickness_units': 'mm',
>>>         'default_part_temp_rise': 20,
>>>         'default_part_temp_rise_units': 'C',
>>>         'guess_part_properties': False,
>>>         'generate_image_layers': False,
>>>     },
>>>     ]
>>> )