List of Sum of forces in FEMAP API


I am trying to make a list of sum of forces for every load set which does the action of fechecksumforces. 

but it is time consuming to loop arround. 

I cant use fechecksumforceses here cause am not aware of how to make a loadset to be active.


i loop over every load set and make a sum of y directional nodal force and list in excel.

1. is there an easier or quicker way to do the same 

2. can we make a particular load set to be active so that we can use fechecksumforces in the loop

below is the prog :

Sub Main()
Dim App As femap.model
Set App = GetObject(, "femap.model")
Dim ls As femap.LoadSet
Dim val(0 To 2) As Double
Dim el As femap.elem
Dim ln As Double
Set ls = App.feLoadSet
Dim l As femap.LoadMesh
Set el = App.feElem

cs = Array(0, 0, 0)
row = 1
col = 1
While ls.Next()

' tmp2 = App.feCheckSumForces(True, False, False, 1, 1, cs, 0, sumforce)
'MsgBox (sumforce(1))
tmp = ls.ResetNextLoad(FT_SURF_LOAD, True, 0, False, False)
val(0) = 0
val(1) = 0
val(2) = 0

While ls.NextLoad(l)
'MsgBox (str$(l.setID) + "&" + str$(l.meshID))
'ld = l.Load(1)
ln = 1

val(0) = val(0) + l.Load(0) * ln
val(1) = val(1) + l.Load(1) * ln
val(2) = val(2) + l.Load(2) * ln

Worksheets("Sheet6").Cells(row + i, col) = ls.Title
Worksheets("Sheet6").Cells(row + i, col + 1) = val(0)
Worksheets("Sheet6").Cells(row + i, col + 2) = val(1)
Worksheets("Sheet6").Cells(row + i, col + 3) = val(2)
'MsgBox (val)
i = i + 1
End Sub


And in this prog too i have a problem. while a particular load is a distributed load, i am unable to find its direction. I had applied the load in y global but the load is turned on in "XOn". 

Could anyone help me with this issue.



Re: List of Sum of forces in FEMAP API

You can make a load set active by setting its "Active" property equal to the ID of the set you want to be active.

Do While fLoadSet.Next
fLoadSet.Active = fLoadSet.ID