OpenSTAAD V8i

2.1 Programming Languages

Although OpenSTAAD supports all major programming languages used today capable of calling COM components, it is impractical to document the usage of each and every function in all of these languages. Most of the example programs or code snippets for each documented OpenSTAAD function are written in VBA for Excel or AutoCAD VBA.  The reason is that with OpenSTAAD 2.0 and higher, STAAD.Pro is equipped with a functional VBA editor capable of writing macros only in VBA.

OpenSTAAD supports Visual Basic for Applications, which is an implementation of Microsoft's Visual Basic language and an associated IDEClosed.

Documentation for VBA is beyond the scope of this manual and Bentley does not provide direct support on how to write VBA macros.  There are, however, several useful and free sites on the Web to assist a beginner on writing macros in STAAD, Excel, AutoCAD, or any other VBA compliant software. It should be noted that the VBA language is the same from software to software. However, the functions, objects, and core libraries will obviously vary.

The sites recommended by Bentley are as follows:

Also, it is worth noting that many third-party programs such as Microsoft Office Excel or Autodesk AutoCADhas a nice Record Macro feature.  You can run the recorder and then select any commands from Excel’s menus and toolbars.  The corresponding VBA syntax will automatically be generated.  Look under ‘Recording Macros’ in the Excel help for additional information.

For additional information on using macros and VBA in Excel or other Microsoft Office programs, Microsoft's MSDN is a recommended starting point: