import_odb_archive_single_project#

Project.import_odb_archive_single_project(archive_file, project, cca_name, project_dir, process_layer_thickness, include_other_layers, process_cutout_file, guess_part_properties, ims_stackup=False, polyline_simplification=False, polyline_tolerance=0.1, polyline_tolerance_units='mm', overwrite=False)#

Import an ODB++ archive file, in single project mode.

Available Since: 2027R1

Parameters:
  • archive_file (str) – str: Full path to the ODB++ archive file.

  • project (str) – str: Name of the Sherlock project. The default is None, in which case the name of the ODB++ archive file is used for the project name.

  • cca_name (str) – str: Name of the CCA name. The default is None, in which case the name of the ODB++ archive file is used for the CCA name.

  • project_dir (str) – str: Directory where the Sherlock project is loaded into.

  • process_layer_thickness (bool) – bool: Whether to assign stackup thickness.

  • include_other_layers (bool) – bool: Whether to include other layers.

  • process_cutout_file (bool) – bool: Whether to process cutouts.

  • guess_part_properties (bool) – bool: Whether to guess part properties.

  • ims_stackup (bool) – bool, optional: Whether to generate an IMS stackup

  • polyline_simplification (bool) – bool, optional: Whether to enable polyline simplification

  • polyline_tolerance (float) – float, optional: Polyline simplification tolerance

  • polyline_tolerance_units (str) – str, optional: Polyline simplification tolerance units

  • overwrite: – When set to True, if the project parameter is set to a project name that already exists, overwrite that project, otherwise an error will be raised andno import will occur.

  • Returns

  • -------

  • :

  • int – Status code of the response. 0 for success.

Return type:

int

Examples

>>> from ansys.sherlock.core import launcher
>>> odb_path = "C:\\Users\\username\\ODB++ Tutorial.tgz"
>>> project_test_path = "C:\\Users\\username\\testprojectarea"
>>> sherlock, install_dir = launcher.launch_and_connect(
>>>     transport_mode="wnua",
>>>     single_project_path=project_test_path
>>> )
>>> sherlock.project.import_odb_archive_single_project(
>>>     odb_path,
>>>     "Tutorial",
>>>     "Main Board",
>>>     project_test_path,
>>>     True,
>>>     True,
>>>     True,
>>>     True,
>>>     ims_stackup=True,
>>>     polyline_simplification=True,
>>>     polyline_tolerance=0.1,
>>>     polyline_tolerance_units="mm"
>>> )