Dear All,
I will be glad if you help me with the code. I Already have a code where i need to enter load case number to get the reactions at the particular load case.
I have almost 1000 load cases and i want all the load cases to get in excel at once.
the code i have is
Private Sub CommandButton1_Click()
Dim objOpenSTAAD As ObjectDim supp_count As LongDim supp_nodes() As LongDim loadcase As LongDim dReactionArray(0 To 5) As DoubleDim count As IntegerDim count1 As Integer
Set objOpenSTAAD = GetObject(, "StaadPro.OpenSTAAD")
loadcase = Cells(1, 2).Value
supp_count = objOpenSTAAD.Support.GetSupportCount
ReDim supp_nodes(0 To (supp_count - 1)) As Long
objOpenSTAAD.Support.GetSupportNodes supp_nodes
For count = 1 To supp_count
objOpenSTAAD.Output.GetSupportReactions supp_nodes(count - 1), loadcase, dReactionArray
Cells(count + 2, 1).Value = supp_nodes(count - 1)
For count1 = 1 To 6
Cells(count + 2, count1 + 1).Value = dReactionArray(count1 - 1)
Next
Set objOpenSTAAD = Nothing
End Sub
You can follow the steps mentioned below to extract the reaction for all primary load cases --
Use the following function to extract the primary load case number --
n=ojb.Load.GetPrimaryLoadCaseCount
obj.Load.GetPrimaryLoadCaseNumbers loadcase
Note that you need to define loadcase as array variable and need to include the command Redim loadcase (n-1) before second command.
Now add an extra for loop as --
For i=0 to n-1
objOpenSTAAD.Output.GetSupportReactions supp_nodes(count - 1), loadcase(i), dReactionArray
**********Printing commands*******
With this change the reaction values for all the primary load cases are reported. Follow the same procedure for load combination cases.
Thank you .. can u please modify the above code with the comments you have done,. i cant able to get that