Helpful Hints and Tips: Excel VBA Script for Scaling/Reversing Load Records
Abstract: Helpful Hints and Tips on scripting an Excel VBA load scaling/reversal utility. The utility takes a SCW/SCP file, and allows the user to scale/reverse the existing load records via a scale factor. The rules are as follows:
- Traction and Force/Moment loads: Will multiply all vector components (e.g. X, Y, Fx, Mx) by a new parameter “ScaleFactor” with a value set by B2.
- TLAP Traction and TLAP-Bearing loads: All Fx, Fy, Fz, Mx, My, Mz values in each TLAP of each Case ID will be multiplied by the value set by B2. To reverse all TLAPs, set Scale factor = -1.
- Bearing loads: A parameter “ScaleFactor” will be automatically created with a value set by B2.
- If Direction = Mag/Dir and Scale Factor < 0, will multiply Magnitude by abs(ScaleFactor) and add 180 degrees to Angle (load reversal).
- If Direction = Mag/Dir and Scale Factor > 0, will multiply Magnitude by ScaleFactor only.
- If Direction = Vector, will multiply Fx and Fy by ScaleFactor.
Note: all load records in the model Filename (SCW/SCP) will be scaled (SCALE will be appended to all scaled Load ID’s), and a new SCP of FilenameScaled.scp will be saved.