How to add Nodal Load using OpenSTAAD (VBA and python)


       
  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 Nodal Load using OpenSTAAD (VBA and python)

Solution:

You need to use AddNodalLoad function to JOINT LOAD to the specified node number(s).

Along with function AddNodalLoad, you also need to use function SetLoadActive to make the load active

Parameter:

AddNodalLoad:

[Input]  node:    Node number ID(s)

[Input]  fx:           Force in X direction.

[Input]  fy:           Force in Y direction.

[Input]  fz:           Force in Z direction.

[Input]  mx:        Moment in X direction.

[Input]  my:        Moment in Y direction.

[Input]  mz:         Moment in Z direction.

SetLoadActive 

[Input]   LoadNo: The load case reference number ID

Sample VBA syntax:

' (The below syntax will assign nodal load(Fx,Fy,Fz,Mz) at Node 1 and Node 2 under Load Case 1)

Set objOpenSTAAD = GetObject(, "StaadPro.OpenSTAAD")

Dim node(1) As Long

Dim fx(1) As Double

Dim fy(1) As Double

Dim fz(1) As Double

Dim mx(1) As Double

Dim my(1) As Double

Dim mz(1) As Double

Dim LC As Long

 

'Node ID

node(0) = 1

node(1) = 2

 

'Fx load

fx(0) = 10

fx(1) = 20

 

'Fy load

fy(0) = 10

fy(1) = 20

 

'Fz load

fz(0) = 11.5

fz(1) = 21.5

 

'Mx load

mx(0) = 0

mx(1) = 0

 

'My load

my(0) = 0

my(1) = 0

 

'Mz load

mz(0) = 1.2

mz(1) = 2.9

 

LC = 1 'Load Case ID

 

objOpenSTAAD.Load.SetLoadActive LC

 

For i = 0 To 1

    objOpenSTAAD.Load.AddNodalLoad node(i), fx(i), fy(i), fz(i), mx(i), my(i), mz(i)

Next i

Sample python syntax:

AddNodalLoad.py

 

Sample output (VBA):

Sample output (python):