SapObject.SapModel.Results.Setup.SetComboSelectedForOutput
Function SetComboSelectedForOutput(ByVal Name As String, Optional ByVal Selected As Boolean = True) As Long
Name
The name of an existing response combination.
Selected
This item is True if the specified response combination is to be selected for output, otherwise it is False.
This function sets a response combination selected for output flag.
The function returns 0 if the selected flag is successfully set, otherwise it returns nonzero.
Sub SetComboSelected()
'dimension variables
Dim SapObject As Sap2000.SapObject
Dim SapModel As cSapModel
Dim ret As Long
Dim Selected As Boolean
'create Sap2000 object
Set SapObject = New SAP2000.SapObject
'start Sap2000 application
SapObject.ApplicationStart
'create SapModel object
Set SapModel = SapObject.SapModel
'initialize model
ret = SapModel.InitializeNewModel
'open existing model
ret = SapModel.File.OpenFile("C:\SapAPI\Example
7-002.sdb")
'run analysis
ret = SapModel.Analyze.RunAnalysis
'deselect all cases and combos
ret = SapModel.Results.Setup.DeselectAllCasesAndCombosForOutput
'set combo selected for output
ret = SapModel.Results.Setup.SetComboSelectedForOutput("COMB1")
'close Sap2000
SapObject.ApplicationExit False
Set SapModel = Nothing
Set SapObject = Nothing
End Sub
Initial release in version 11.00.
DeselectAllCasesAndCombosForOutput