run_analysis#
- Analysis.run_analysis(project, cca_name, analyses)#
Run one or more Sherlock analyses.
Available Since: 2021R1
- Parameters:
- project: str
Name of the Sherlock project.
- cca_name: str
Name of the CCA.
- analyses: list of ``elements``
- elements: list[tuple[RunAnalysisRequestAnalysisType, tuple[str, str]]]
Tuples (
type,event)- analysis_type: RunAnalysisRequestAnalysisType
Type of analysis to run.
- event: list[tuple[str, str]]
Tuples (
phase_name,event_name)- phase_name: str
Name of the life cycle phase.
- event_name: str
Name of the life cycle event.
- Returns:
- :
intStatus code of the response. 0 for success.
- Return type:
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.analysis.run_analysis( >>> "Test", >>> "Card", >>> [ >>> (RunAnalysisRequestAnalysisType.NATURAL_FREQ, >>> [ >>> ("Phase 1", ["Harmonic Event"]) >>> ] >>> ) >>> ] >>> )