run_analysis#
- Analysis.run_analysis(project, cca_name, analyses)#
Run one or more Sherlock analyses.
Available Since: 2021R1
- Parameters:
project (
str) – str: Name of the Sherlock project.cca_name (
str) – str: Name of the CCA.analyses (
list[tuple[int,tuple[str,str]]]) – list[tuple[AnalysisType: List of tuples where each tuple contains an analysis type and a list of events. Each element is a tuple of (analysis_type, events):tuple[str – List of tuples where each tuple contains an analysis type and a list of events. Each element is a tuple of (analysis_type, events):
str]]] –
List of tuples where each tuple contains an analysis type and a list of events. Each element is a tuple of (analysis_type, events):
analysis_type: SherlockAnalysisService_pb2.RunAnalysisRequest.Analysis.AnalysisType.ValueType. Type of analysis to run.
events: list[tuple[str, str]] List of tuples containing (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", >>> [ >>> ( >>> SherlockAnalysisService_pb2.RunAnalysisRequest. >>> Analysis.AnalysisType.NaturalFreq, >>> [ >>> ("Phase 1", ["Harmonic Event"]) >>> ], >>> ) >>> ] >>> )