I hope convert from OpenStaad VBA to VB.NET (*. exe).

Hi,

 I want to convert "OPENSTAAD VBA" to "VB.NET (*. exe)".

"VISUAL_STUDIO2010" and "StaadPro V8i" are using.

Preparation of program development "OpenSTAAD 1.0 Type Library" and "OpenSTAADUI" referred to.

 I can not convert [user dialog macro] to vb.net.

Example #

Begin Dialog UserDialog 590,490, "Rectangular Concrete Beam Parameters" '% GRID: 10,7,1,1

        Text (10, 14, 120, 14, "Number of Layers",. Text1)

        DropListBox (150, 14, 100, 56, LayerList (),. NoLayers)

End Dialog #

 I hope this part teaches you how to convert VB.NET without using forms and text boxes.

Regards, Koji

  • Dear Koji

    I have a problem regarding VB.Net. I have made one programe using VB6 for getting member force from staad. I used openstaad and got sucussesfully all the forces. Now, I making same programe in visual basic 2010. But I found problem to getting forces in force array. I used same sentance i.e (objOpenSTAAD.GetIntermediateMemberForcesAtDistance(Column, Dist, LC, Force(0)) in my new programe.

    Please help me.There is a any compatibily problem within Openstaad?

    My VB.net code is as below.

    Public Class Form1

       Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

           Dim Column As Long

           Dim LC As Long

           '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

           Dim TxtF_Path As String

           'Dim objOpenSTAAD

           Dim objOpenSTAAD As Object

           Dim Dist As Double

           Dim Ctr As Integer

           Dim Force(0 To 5) As Double

           ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

           'objOpenSTAAD = GetObject(, "StaadPro.OpenSTAAD")

           objOpenSTAAD = CreateObject("OpenSTAAD.Output.1")

           TxtF_Path = "D:\VB\Working\Column Design\STAAD\RW\P11_14_1_CHLORINATION SYSTEM_R2.std"

           objOpenSTAAD.selectSTAADFile(TxtF_Path)

           ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

           Column = 510

           LC = 7

           For Dist = 0 To 1 Step 0.25

               'objOpenSTAAD.output.GetIntermediateMemberForcesAtDistance(Column, Dist, LC, Force(0))

               objOpenSTAAD.GetIntermediateMemberForcesAtDistance(Column, Dist, LC, Force(0))

               For Ctr = 0 To 2 Step 1

                   Math.Round((Force(Ctr) * 4.44822), 3)

                   'Math.Round((Force(1) * 4.44822), 3)

                   'Math.Round((Force(2) * 4.44822), 3)

               Next Ctr

               'For ctr = 0 To 5 Step 1

               ' MsgBox("Fx  = " & Math.Round((Force(ctr) * 4.44822), 3))

               'MsgBox("Mx  = " & Math.Round((Force(1) * 4.44822), 3))

               'Next ctr

           Next Dist

           ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

           objOpenSTAAD.CloseSTAADFile()

           objOpenSTAAD = Nothing

           ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

           'Dim A As Double

           'Dim B As Double

           'A = 50

           'B = 25

           'MsgBox(" Maximum Value = " & Math.Max(A, B))

           'MsgBox(" Minmum Value = " & Math.Min(A, B))

       End Sub

       Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

       End Sub

    End Class

  • Although this is an old posting, you may want to know thart I have just posted a sample VB.NET project in the OpenSTAAD forum, communities.bentley.com/.../using-openstaad-in-a-simple-vb-net-project