Hi,
Please could someone help me in extracting forces from STAAD using DotNET?
Not able to extract Primary LoadCase number for extracting Forces.
here is my sample code:
' Get BeamLIST Dim myBeamNos As Integer = myStaadObj.Geometry.GetMemberCount ' Get LoadCase Numbers Dim myLoadCasesCount As New Integer myLoadCasesCount = myStaadObj.Load.GetLoadCombinationCaseCount 'Get Primary Load Case Numbers Dim myLoadCaseList() As Integer = Nothing myStaadObj.Load.GetLoadCombinationCaseNumbers(myLoadCaseList) ReDim myLoadCaseList(myLoadCasesCount) Dim myLoadCases As Integer = myLoadCaseList(0)
As per your description, you want to extract the primary load case numbers to extract the member forces. But in your code, you have used the commands to extract the combination case numbers. Following is an example of the correct syntax --
1. Extract the total primary load case count in a long variable -- Load.GetPrimaryLoadCaseCount
2. Extract the primary load case number and store it in long array -- Load.GetPrimaryLoadCaseNumbers
Following is a VBA example of the same--
Dim Lprim As Long
Dim Lprimcase() As Long
Set suro= GetObject(, "StaadPro.OpenSTAAD")
Lprim = suro.Load.GetPrimaryLoadCaseCount
ReDim Lprimcase(0 To (Lprim - 1)) As Long
suro.Load.GetPrimaryLoadCaseNumbers Lprimcase
Answer Verified By: Surojit Ghosh