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!
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.
Hey Eric, I am using a similar vba script as the one set up here except its just for max load cases forces via GetLatBraceForces command. I have found though that if you do not analyze all load cases and the cases not analyzed do not fall at the end of the load case list, then you cannot retrieve data from x amount of load cases found at the end of the list, where x = number of cases not selected for analysis. Any way around this? It may seem like a nonproblem at first but for example when you aren't running your seismic drift load cases errors happen. I tried to loop through and count the amount of non-analyzed cases to add to the total number of cases to loop through but it seems numAnalyzedFrameLoadCases will be less than that number, even though the non-analyzed cases are indexed when you loop through the total number. Hope this made sense