Quantcast
Channel: RAM | STAAD Forum - Recent Threads
Viewing all articles
Browse latest Browse all 16762

VBA GetSupportReactions

$
0
0

I use VBA to get support reactions. But results are always Zero. Please help me to find out what is the error.

Private Sub CommandButton1_Click()
Dim w1 As Object
Set w1 = Worksheets("Trial")
w1.Activate
w1.Range("D9:I2000").Select
Selection.ClearContents

Dim nNodeNo As Long

Dim nLC As Long

Dim pdReactions(6) As Long

(Please visit the site to view this file)
Set objOpenSTAAD = GetObject(, "StaadPro.OpenSTAAD")

n = w1.Cells(6, 3)
For ir = 9 To n + 8
nNodeNo = w1.Cells(ir, 2).Value

nLC = w1.Cells(ir, 3).Value


objOpenSTAAD.Output.GetSupportReactions nNodeNo, nLC, pdReactions(0)
For i = 1 To 6
If i < 4 Then
w1.Cells(ir, 3 + i).Value = Round(pdReactions(i - 1) * 4.44822, 3)
Else
w1.Cells(ir, 3 + i).Value = Round(pdReactions(i - 1) * 0.112985, 3)
End If
Next i
Next ir

Set objOpenSTAAD = Nothing
w1.Cells(1, 1).Select
End Sub


Viewing all articles
Browse latest Browse all 16762

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>