CModel.SetUseStress

Updates the use stress level for one or multiple stresses.

Syntax

 * SetUseStress( Index, StressValue)
 * SetUseStress( StressValues )

Parameters
 * Index: The 0-based index of the stress for which the use stress level will be updated.
 * StressValue: The value to use for the new use stress level.
 * StressValues: An array of new use stress values that correspond to the array of stresses in the model (e.g., the first stress value will become the use stress level for the first stress).

Usage Example
Private WithEvents MyRepository As New Repository

Dim Success As Boolean = False Success = MyRepository.ConnectToRepository("RepositoryFileNamePath")

Dim ListOfModels As NameIdPair ListOfModels = MyRepository.GetAllModelsInfo

Dim AModel as cModel AModel = MyRepository.GetModel(ListOfModels(0).ID)

Dim MyNumStresses As Integer MyNumStresses = AModel.NumStresses

Dim UseStressArray(MyNumStresses - 1) As Double UseStressArray(0) = 500 UseStressArray(1) = 750

AModel.SetUseStress(UseStressArray)