I am looking to create a Microsoft Excel Spreadsheet that pulls reactions out of RAM Frame using DataAccess and Visual Basic for Applications (VBA). Is there a sample VBA project or other guidance anywhere in the forums with code to read the lateral reactions (Major and Minor axis - shear, moment, and axial loads) for each load combination for a beam, a column, and a wall? With that, I would be able to manipulate this information within VBA as needed.
I am kind of new to programming with DataAccess and the 451 page Developer's Guide is a lot to wrap my head around. Any other resources/spreadsheets for DataAccess that anyone could suggest would also be greatly appreciated. Thank you!
Answer Verified By: Tom Curry
Hi Eric,
I've tried to build a excel spreadsheet to extract member force from analysed RAM SS model and found your code. But I get an error in IForces.GetLatBeamForcesLeftAt with the notification as image below. Do you have any idea about this? Thanks a lot.
Khanh_Testing.xls
You are passing in a couple of incorrect arguments. The DataAccess manual installs with the program in the manuals folder. The installation location is typically here:
C:\Program Files\Bentley\Engineering\RAM Structural System\manuals
1. The method takes a beam unique ID (always ends in 02 for a beam), but you appear to be passing in a beam label (member number you see in Modeler).
2. The method takes a load case index from the list of analyzed cases, but you are passing in a load case unique ID.
Also, I recommend that you include the Option Explicit declaration and declare all variables with the data type the DataAccess methods expect. Undeclared variables in VBA default to a variant data type. Many DataAccess methods will fail if you attempt to pass in a variant rather than the expected data type.