Applies To | |||
Product(s): | STAAD.Pro | ||
Version(s): | All | ||
Environment: | N/A | ||
Area: | OpenSTAAD | ||
Subarea: | Load | ||
Original Author: | Bentley Technical Support Group, Shreyanka Bhattacharjee | ||
Problem Description:
How to add Plate Load (Pressure on full Plate; Concentrated Load, Partial Pressure on Plate) using OpenSTAAD (VBA and python)
Solution:
You need to use function AddElementPressure
Parameter for function AddElementPressure:
[Input] PlateNo : Plate number ID(s)
[Input] Direction: Load direction: (= 1 to 9 for LocalX, LocalY, LocalZ, GlobalX, GlobalY, GlobalZ, ProjectedX, ProjectedY and ProjectedZ respectively)
[Input] Pressure: Magnitude of the pressure or concentrate load on the element
[Input] x1: Top-Left coordinate X (local)
[Input] y1: Top-Left coordinate Y (local)
[Input] x2: Bottom-Right coordinate X (local)
[Input] y2: Bottom-Right coordinate Y (local)
Note:
Sample VBA Syntax:
Set objOpenSTAAD = GetObject(, "StaadPro.OpenSTAAD")
Dim PlateNo(1) As Long
Dim Direction As Long
Dim Pressure As Double
Dim x1 As Double
Dim y1 As Double
Dim x2 As Double
Dim y2 As Double
Direction = 5 '1= LX; 2=LY; 3= LZ; 4=GX; 5=GY; 6=GZ; 7=PX; 8=PY; 9=PZ
Pressure = -1.5
'Pressure on full Plate 1 and 2
PlateNo(0) = 1
PlateNo(1) = 2
objOpenSTAAD.Load.AddElementPressure PlateNo, Direction, Pressure, x1, y1, x2, y2
'Partial Pressure on Plate 3 and 4
PlateNo(0) = 3
PlateNo(1) = 4
x1 = -1
y1 = -1
x2 = 1
y2 = 1
objOpenSTAAD.Load.AddElementPressure PlateNo, Direction, Pressure, x1, y1, x2, y2
'Concentrated Load on Plate 5 and 6
PlateNo(0) = 5
PlateNo(1) = 6
x1 = -1
y1 = -1
x2 = 0
y2 = 0
objOpenSTAAD.Load.AddElementPressure PlateNo, Direction, Pressure, x1, y1, x2, y2
Python script:
communities.bentley.com/.../AddElementPressure.py
Sample Output: