Sub Trail()
Dim lGetLoadCombinationCaseCount As Long, j As Integer, lstLoadNum() As Long
Dim Start As Integer, EndlC As Integer, N As Integer, loadcas As Integer
Dim objOpenSTAAD As Object
Dim dReactionArray(6) As Double
Dim PrimaryLCs As Integer, LoadCombs As Integer, totalLoads As Integer
Dim lstLoadPrimaryNums() As Long, lstLoadCombinationNums() As Long, m As Integer
Dim NodesA As Long, supp_count As Long
Range("A42:I5000").Select
Selection.ClearContents
Set objOpenSTAAD = GetObject(, "StaadPro.OpenSTAAD")
NodeA = Cells(37, 3).Value
PrimaryLCs = objOpenSTAAD.Load.GetPrimaryLoadCaseCount
LoadCombs = objOpenSTAAD.Load.GetLoadCombinationCaseCount
totalLoads = PrimaryLCs + LoadCombs
ReDim lstLoadNum(totalLoads) As Long
ReDim lstLoadPrimaryNums(PrimaryLCs) As Long
objOpenSTAAD.Load.GetPrimaryLoadCaseNumbers lstLoadPrimaryNums
ReDim lstLoadCombinationNums(LoadCombs) As Long
objOpenSTAAD.Load.GetLoadCombinationCaseNumbers lstLoadCombinationNums
For i = 0 To PrimaryLCs - 1
lstLoadNum(i) = lstLoadPrimaryNums(i)
' lstLoadName(i) = objOpenSTAAD.Load.GetLoadCaseTitle(lstLoadPrimaryNums(i))
Next i
For i = PrimaryLCs To totalLoads - 1
lstLoadNum(i) = lstLoadCombinationNums(i - PrimaryLCs)
' lstLoadName(i + PrimaryLCs) = objOpenSTAAD.Load.GetLoadCaseTitle(lstLoadCombinationNums(i))
Next i
For i = 0 To totalLoads - 1
loadcase = lstLoadNum(i)
objOpenSTAAD.Output.GetSupportReactions NodeA, loadcase, dReactionArray
Cells(42 + i, 2).Select
Cells(42 + i, 2) = loadcase
Cells(42 + i, 1) = NodeA
For m = 0 To 5
Cells(i + 42, 3 + m).Value = dReactionArray(m)
Next m
Next i
End Sub
↧
I am trying to extract support reactions of a particular node for all Load case and combinations. But my script is extraction "0" values for all forces. Need help!
↧