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?
You can do this using few OpenSTAAD functions. As you have mentioned that you want to automate the whole process so that no inputs or controls are required during the run, so you need to eliminate the analysis pop-up window using the silent analysis method --
obj.SetSilentMode (1)
Also you need to store all the inputs in an array variable, create a loop which changes the model with relevant input before analysis and then analyze the model. Don't forget to introduce an application wait time function to freeze the program during analysis.
If you want to extract any data from STAAD model, you can add the relevant OpenSTAAD function after the analysis function. It is better to add analysis status check OpenSTAAD function to check the analysis completion status before extracting any result.
Answer Verified By: Surojit Ghosh