STAAD.Pro Help

OS. Use Geometry Methods

  1. After the mStaadObj declaration, type Dim nodesCount As Integer and then press <Return>.

    This dimensions the variable nodesCount as an integer.

  2. Type Dim beamCount As Integer and then press <Return>.

    This dimensions the variable beamCount as an integer.

  3. After the mStaadObj initiation, type nodesCount = mStaadObj.geometry.GetNodeCount() and then press <Return>.

    This uses the OpenSTAAD method GetNodeCount() to return the number of nodes in the active STAAD.Pro model into the specified variable.

  4. Type beamCount = mStaadObj.geometry.GetMemberCount() and then press <Return>.

    Similarly, this uses the OpenSTAAD method GetMemberCount() to return the number of members in the active STAAD.Pro model into the specified variable.

    Note:
Your program at this point 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()
        
    End Sub
End Class