export_net_list#

Parts.export_net_list(project, cca_name, output_file, col_delimiter=SherlockCommonService_pb2.TableDelimiter.COMMA, overwrite_existing=False, utf8_enabled=False)#

Export a net list to a delimited output file.

Available Since: 2024R2

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

  • cca_name (str) – Name of the CCA.

  • output_file (str) – Full path for the output file where the net list will be written.

  • col_delimiter (TableDelimiter, optional) – The delimiter character to be used. Defaults to TableDelimiter.COMMA.

  • overwrite_existing (bool, optional) – Flag to determine if existing .CSV files should be overwritten if they match the output_file. Defaults to False.

  • utf8_enabled (bool, optional) – Flag that specifies if UTF-8 will be used for .CSV files. Defaults to False.

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.parts.export_net_list(
    "Test",
    "Card",
    "Net List.csv",
    col_delimiter=TableDelimiter.TAB,
    overwrite_existing=True,
    utf8_enabled=True
)