One of the major capabilities that is available to STAAD.Pro users is the flexibility that it can provide engineers to create their own user defined tables with a macro using OpenSTAAD.
This blog post is to show how that can be done with a practical example which is attached for you to download and add to your own copy of STAAD. Feel free to use this as a template for creating your own tables.
The macro contains the following routines:-
1) Main. This is the primary routine from which the macro is launched and checks that STAAD.Pro is running and the model loaded has available results which are needed for this example. However if the table you wish to construct does not require the model to have been analysed, then clearly that part of the routine can be removed.
2) STAADTable. Once the validation is done, this routine is called to produce the table in STAAD. As this table will require a selection of load cases, it includes a call to a routine to select load cases called SelectLoadCases, then the routine to create the empty table called CreateTable and finally to fill the table with data called FillTable
3) ResetEnvTable. A simple routine to make sure the table is cleared and a label added in column 1 of each row for this example to mirror the labels used in the general Envelope sheet of the Node displacement table.
4) SelectLoadCases. This is routine that displays a user dialog to select the load cases and combinations from which the node displacements will be used to form the final table. This makes use of a couple of other routines AddLoadCaseToSelected, and ExcludeLoadCaseFromSelected to maintain two lists of load cases, those that are available from STAAD.Pro and those that will be used to create the table.
5) AddLoadCaseToSelected. When the [>] button is pressed, this routine
6) ExcludeLoadCaseFromSelected. When the [Exclude] button is pressed the load case in the selected Load Case list is removed from the list.
7) CreateEnvList. A simple routine that creates a list of the load case numbers from the text of the dialog box Selected Load Cases.
8) FillTable. Populates the table with the calculated data which has been put into a 2 dimensional array (ie. row, column)
9) CreateTable. The routine that forms the table framework and sets the headings. Note that it also checks to see the unit system so that the headers can include the appropriate units. Also note that there are commented out lines that indicate how additional sheets can be added to the Report that could be used for other data such as End Forces or Reactions.
The macro should be loaded using the option in the STAAD.Pro Edit menu, 'Edit Existing VB Macro...' thus:-
The macro is run using the icon thus:-
The dialog that is generated when the macro is run (clearly the available and selected load cases are dependant on the data in the model loaded in STAAD.Pro):-
A typical table that would be generated in STAAD.Pro if the model has been analysed and has results available:-
The sample file attached to this blog has been renamed to a TXT file. If you download it, then it should be renamed to 'Table Envelope.VBS' and it is recommended that it is kept in the \STAAD\Plugins folder (however that is not obligatory as STAAD.Pro can use macro files located elsewhere on the computer).
I hope you find this example useful and create tables in STAAD.Pro displaying the data you would like to see in the way you want to see it.