run_strain_map_analysis#
- Analysis.run_strain_map_analysis(project, cca_name, strain_map_analyses)#
Run one or more strain map analyses.
Available Since: 2023R2
- Parameters:
project (
str) – str: Name of the Sherlock project.cca_name (
str) – str: Name of the main CCA for the analysis.strain_map_analyses (
list[list[int|list[list[str]]]]) –list[list[RunStrainMapAnalysisType | list[list[str]]]]: Analyses consisting of two-element lists with these properties:
First element: SherlockAnalysisService_pb2.RunStrainMapAnalysisRequest. StrainMapAnalysis.AnalysisType.ValueType. Type of analysis to run.
Second element: list[list[str]] Strain maps assigned to the desired life cycle events for a given PCB side. Each inner list contains these properties in order:
phase_name (str): Life cycle phase name for the strain map assignment.
event_name (str): Life cycle event name for the strain map assignment.
pcb_side (str): PCB side for the strain map (
"TOP"or"BOTTOM").strain_map (str): Name of the strain map assigned to the life cycle event.
sub_assembly_name (str, optional): Name of the subassembly CCA to assign the strain map to.
- Return type:
- Returns:
- :
intStatus code of the response. 0 for success.
Examples
>>> from ansys.api.sherlock.v0 import SherlockAnalysisService_pb2 >>> from ansys.sherlock.core import launcher >>> sherlock, install_dir = launcher.launch_and_connect(transport_mode="wnua") >>> analysis_request = SherlockAnalysisService_pb2.RunStrainMapAnalysisRequest >>> sherlock.analysis.run_strain_map_analysis( >>> "AssemblyTutorial", >>> "Main Board", >>> [[ >>> SherlockAnalysisService_pb2.RunStrainMapAnalysisRequest. >>> StrainMapAnalysis.AnalysisType.RandomVibe, >>> [ >>> ["Phase 1", "Random Vibe", "TOP", "MainBoardStrain - Top"], >>> ["Phase 1", "Random Vibe", "BOTTOM", "MainBoardStrain - Bottom"], >>> [ >>> "Phase 1", >>> "Random Vibe", >>> "TOP", >>> "MemoryCard1Strain", >>> "Memory Card 1", >>> ], >>> ], >>> ]] >>> )