OpenSTAAD and MicroStation

I have had several requests to see OpenSTAAD used in specific applications, Excel, Word and MicroStation.  So here is a simple enough example attached to this blog to whet your appetite.  It is a very simple DGN file with an area that will be used to display text.  That text will be taken from a STAAD.Pro model and made up from a load case number and the title.

1)      Start STAAD.Pro and open a model with some load cases defined.

2)      Start MicroStation and open the file DGN file OpenSTAAD.dgn

3)      Load the VBA macro OpenSTAAD.mvba using the Project Manager

4)      From the project run the macro named DisplayLoadCaseName

5)      This displays a list of the load cases in the model, select one and click OK

6)      The text of the selected load case name is added to the DGN is the space provided.

Ok, so this is no major piece of engineering software, but it is simple enough to follow if you open the VBA editor and follow the steps of how an OpenSTAAD object is created:-

Dim oStd As Object

Set oStd = GetObject(, "StaadPro.OpenSTAAD")

 It gets the primary load case names and numbers:-

LCases = oStd.Load.GetPrimaryLoadCaseCount()

oStd.Load.GetLoadCaseTitle(lstLoadNums(i)

similar functions used for load combinations,  then the names are displayed in a dialog box:-

frmSelectLoadCase.Show

and the selected text in the dialog box is used to display in the model, i.e.

CreateTextElement1(Nothing, frmSelectLoadCase.ListBox1.Text, point, Matrix3dIdentity)

 

Essentially data from a live STAAD.Pro model has been used to make decisions as to what to display in the DGN model.  A similar approach can be used for more complex decisions, e.g. use OpenSTAAD to GetMemberEndForces and based on the results add your standard connection details into the DGN.  Alternatively simply use the values of reactions from the STAAD model to add to a foundation plan using GetSupportReactions.   Find out what functions are available in the online OpenSTAAD help file that is installed with STAAD.Pro I am sure you have your own ideas and good luck.

 

OpenSTAAD.zip