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) – Name of the Sherlock project.

  • cca_from_mr_properties (list) –

    List of CCAs to be to be created from modeling regions consisting of these properties:

    • cca_namestr

      Name of the CCA.

    • modeling_region_idstr

      Name of the modeling region.

    • descriptionstr

      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.

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.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,
    },
    ]
)