create_life_phase#
- Lifecycle.create_life_phase(project, phase_name, duration, duration_units, num_of_cycles, cycle_type, description='')#
Create a life phase.
Available Since: 2021R1
- Parameters:
project (
str) – str: Name of the Sherlock project.phase_name (
str) – str: Name of the life phase.duration (
float) – float: Event duration length.duration_units (
str) – str: Units for the event duration length. Options are"ms","sec", and"min".num_of_cycles (
float) – float: Number of cycles for the life phase.cycle_type (
str) – str: Cycle type. Options include"COUNT","DUTY CYCLE","PER YEAR", and"PER HOUR".description (
str) – str, optional: Description of the life phase. The default is"".
- Return type:
- Returns:
- :
intStatus code of the response. 0 for success.
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", >>> ) >>> sherlock.lifecycle.create_life_phase( >>> "Test", >>> "Example", >>> 1.5, >>> "sec", >>> 4.0, >>> "COUNT" >>> )