STAAD VBA Determine whether a node is a start or end of a member.

Hi,

I am currently working in VBA on a program that works with STAAD. I am at a point where the STAAD GetMemberEndForces function is used. It is then fed into a different Excel file where the Max Axial Force and Max Compressive Force are two inputs that will be populated using information from the first Excel and STAAD.

Is there a STAAD function or workaround to determine in VBA whether or not a node is the start or end of a member? The issue I am running into is that member end forces have different signs at different ends. At the start node, positive is compression and negative is tension, while at the end node, positive is tension and negative is compression. I need a way to determine which is the start and end nodes so I can correctly assign the loads as Max Axial Force and Max Compressive Force. In the scenario where the member is in compression, both of those forces will be the compressive force. In the scenario where the member is in tension, then the Max Axial Force and Max Compressive Force will be different. 

Here is my section of code below. There is way more code in VBA, but I tried to isolate just the important section. Hopefully all the variables in there are defined. LC by the way is the associated Load Case with the max loads. 

MaxLoad = 0
MinLoad = 0 

objOut.GetMemberEndForces MemNo, MemEnd, LC, FArray

If FArray(0) > 0 Then 
If FArray(0) > MaxLoad Then                    'This should acquire the max load
MaxLoad = FArray(0) 
LCSave = LC 
End If 
End If 

If FArray(0) < 0 Then                                  'This should acquire the max compressive load
If FArray(0) < MinLoad Then 
MinLoad = FArray(0) 
LCSave1 = LC 
End If 
End If

There are a few issues with this as is. First, it appears to only be checking the loads at the start node and not the end node. That needs to be fixed. Also as I said previously, I need the code to determine if it is a start or end node so it can correctly determine if the member is in tension or compression so the max forces can be correctly applied. 

Parents Reply Children
No Data