Run Analysis Iteratively in a loop using OpenSTAAD VBA

Is there a way to run analysis in a iterative loop using OpenSTAAD. For example, I would like to run analysis 15 times while changing a certain parameter each time. I tried using 'objOpenSTAAD.Analyze' in a loop but after each iteration as follows 

    For i = 1 To 3
    'Run Analysis
        objOpenSTAAD.Analyze
        'Change to Postprocessing
        objOpenSTAAD.View.SetInterfaceMode 1
        lLoadCase = 1
        lNodeNo = 8
        'Get Nodal Displacement
        objOpenSTAAD.Output.GetNodeDisplacements lNodeNo, lLoadCase, Disp
        Sheet4.Cells(3 + i, 2).Value = Disp(0)
        objOpenSTAAD.View.SetInterfaceMode 0
    Next i

BUT

I have to manually click on 'Go to postprocessing' radio button and then chick on the load case for which the results need to be viewed etc. I want to avoid manual intervention. Any help or example problem please?

Parents
  • Hi Suro,

    obj.SetSilentMode(1) did the trick, I also added Application.Wait as suggested by you. Thank you very much. I however need another suggestion. In this loop of mine, I am trying to play with different breadths and widths for say a set of beams and columns. So in each iteration, I use the following commands to assign the new breadth and depth to the column and beams

    Property_Beam = objOpenSTAAD.Property.CreatePrismaticRectangleProperty(b2, b2)
    'Columns
    Property_Col = objOpenSTAAD.Property.CreatePrismaticRectangleProperty(b1, b1)
    'Beams

    and then assign the above property ids to corresponding members.

    Unfortunately my number of iterations are of the order 10000 to 100,000 and 2 member properties are getting added in each run.. I am not sure if the STAADs GUI can save those many member properties. 

    Iteration number is so huge because I am calculating the probability of failure of the structure. So I have to play with a huge set of breadths and widths

    My question : Is there a way to delete a member property via OpenStaad by keying in a certain properly ID? If the answer is no, do you think STAAD can handle 100,000 property ids in its GUI? I tried 100 runs and it worked well. But afraid to go beyond that

    Thanks in advance,

    Regards,

    Karthik 

Reply
  • Hi Suro,

    obj.SetSilentMode(1) did the trick, I also added Application.Wait as suggested by you. Thank you very much. I however need another suggestion. In this loop of mine, I am trying to play with different breadths and widths for say a set of beams and columns. So in each iteration, I use the following commands to assign the new breadth and depth to the column and beams

    Property_Beam = objOpenSTAAD.Property.CreatePrismaticRectangleProperty(b2, b2)
    'Columns
    Property_Col = objOpenSTAAD.Property.CreatePrismaticRectangleProperty(b1, b1)
    'Beams

    and then assign the above property ids to corresponding members.

    Unfortunately my number of iterations are of the order 10000 to 100,000 and 2 member properties are getting added in each run.. I am not sure if the STAADs GUI can save those many member properties. 

    Iteration number is so huge because I am calculating the probability of failure of the structure. So I have to play with a huge set of breadths and widths

    My question : Is there a way to delete a member property via OpenStaad by keying in a certain properly ID? If the answer is no, do you think STAAD can handle 100,000 property ids in its GUI? I tried 100 runs and it worked well. But afraid to go beyond that

    Thanks in advance,

    Regards,

    Karthik 

Children