EERA
Analyses with Visual Basic Macros
EERA analyses can be performed using not only the EERA menu but also user-defined Visual Basic Macros. An example of a large number of EERA analyses using VB macros can be found Bardet et al. (2001). This task however requires some knowledge of VBA programming.
User-defined VBA routines can be written within Excel to change automatically some particular analysis parameters and/or input files and perform a large series of analyses using the EERA add-in routines. These user-defined VB macros can be written without viewing the Fortran 90 and Visual Basic source code of the EERA add-in. However in order to call the EERA add-in routines, users will have to (1) check "trust access to Visual Basic projects" using Tools, Macros, Security of the Excel menu and (2) add a reference to the EERA add-in using the Tools, References... of the VBA menu.
The EERA routines, which can be called by VBA, are those called by the EERA menu, i.e.,
VB Routine Name EERA Menu Name Read_Earthquake Process Earthquake Data Main_calculation Calculate Compatible Strain Recalculate_All Calculate Output... All of the above Get_History Calculate Output... Acceleration/Velocity/Displacement Get_Strain Calculate Output... Stress-Strain Get_Amplification Calculate Output... Amplification Get_Fourier Calculate Output... Fourier Spectrum Get_Spectra Calculate Output... Response Spectra
The workbook Driver_EERA.xls contains an example of VB macros which were used to generate several hundreds of EERA analyses in Bardet et al. (2001). In this example, the analysis results were first generated in separate workbooks, then summarized in several summary graphs. The calculations were performed using the user-defined routine Driver_Calculation. The analysis results were extracted and plotted on summary graphs using the user-defined routines Import_Data and Plot_Data. Users with some knowledge of VBA can adapt the macros of Driver_EERA.xls and devise many other strategies to operate EERA automatically. The VB macros of Driver_EERA.xls were first constructed using the Macros recording features of Excel, and then modified to accommodate loops on a larger number of earthquake files.