CModel.SetUseStress

For ALTA models only. Specifies the use stress level(s) to use for calculations.

Syntax
VBA .SetUseStress(Index, StressValue) .SetUseStress_2(StressValues)

VB.NET .SetUseStress(Index, StressValue) .SetUseStress(StressValues)

Parameters
Index
 * Required. Integer. The 0-based index of the stress (e.g., the first stress in the model has an index = 0, the second stress has an index = 1, etc.).

StressValue
 * Required. Double. The value to use for the use stress level.

StressValues
 * Required. Double. An array of the use stress values. The order of the elements in the array correspond to the order of the stresses in the model (e.g., the first element of the array defines the use stress value of the first stress in the model, etc.)

Example
This example assumes that an ALTA model with ID #47 exists in project ID #1 of a repository.

VBA MyRepository Repository AModel cModel MyRepository.Project.SetCurrentProject(1) AModel = MyRepository.Model.GetModel(47) MyNumStresses MyNumStresses = AModel.NumStresses UseStressArray UseStressArray(MyNumStresses) UseStressArray(0) = 500 UseStressArray(1) = 750 AModel.SetUseStress_2(UseStressArray) ResultValue ResultValue = AModel.Reliability(100) MsgBox(ResultValue)

VB.NET MyRepository Repository AModel cModel MyRepository.Project.SetCurrentProject(1) AModel = MyRepository.Model.GetModel(47) MyNumStresses MyNumStresses = AModel.NumStresses UseStressArray(MyNumStresses-1) UseStressArray(0) = 500 UseStressArray(1) = 750 AModel.SetUseStress(UseStressArray) ResultValue ResultValue = AModel.Reliability(100) MsgBox(ResultValue)