-
Type
MsgBox(nodesCount, vbInformation,
"No. of Nodes in the Model ")
and then press Return.
The numerical nodeCount
value is added to a text
string in a message box when the button is clicked.
-
Type
MsgBox(beamCount, vbInformation,
"No. of Members in the Model ")
.
Similarly, the beamCount
value is added to a
text string in a message box when the button is clicked.
Your final program should look
like:Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim mStaadObj As Object
Dim nodesCount As Integer
Dim beamCount As Integer
mStaadObj = GetObject(, "StaadPro.OpenSTAAD")
nodesCount = mStaadObj.geometry.GetNodeCount()
beamCount = mStaadObj.geometry.GetMemberCount()
MsgBox(nodesCount, vbInformation, "No. of Nodes in the Model ")
MsgBox(beamCount, vbInformation, "No. of Members in the Model ")
End Sub
End Class