CModel.SetUseStress

For ALTA models only. Sets the use stress level for one or multiple stresses of a cModel object.

This method does not apply to published models, which are model resources that have been published from and are associated with an existing analysis/data source.

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 for which the use stress level will be updated.

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

StressValues
 * Required. Double. 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).

Example
Dim 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)