Using Check Sum Forces in API
Using Check Sum Forces in API
I'm attempting to use the Check Sum Forces tool in my API script. I'm a bit of rookie writing VBA but I have a little experience--but I have no experience writing VBA in the FEMAP API (as my pasted code probably shows). The goal of the script is to prompt the user to select a range of node IDs and have the Check Sum Forces tool sum the forces of the nodes around the global rectangular origin. I can't seem to get the feCheckSumForces2 command to work, I keep receive the error " Expecting '(' " for that line. Here is my code:
Dim model1 As femap.model
Dim set1 As femap.Set
Dim node1 As femap.Node
Set model1 = GetObject(,"femap.model")
Set set1 = model1.feSet
Set node1 = model1.feNode
Do While set1.Next
Dim origin(2) As Long
Dim checkParam(3) As Boolean
origin(0) = 0 : origin(1) = 0: origin(2) = 0
checkParam(0) = False : checkParam(1) = False : checkParam(2) = True : checkParam(3) = True
Dim checkoutput(26) As femap.OutputSet
checkoutput.feCheckSumForces2(checkParam, set1, 0, 0, origin, 0)
And for convenience, here is the help page on feCheckSumForces2 :
( useBodyLoad, expandGEOM, doLIST, useSETS, nodeSET, elemSET, loaddefSET, basePOINT, csysID, summedFORCES )
This function checks loads from the active load set and sums the forces around a specific location.
If True, body loads will be included in the calculation. If not, body loads will be ignored
If True, geometric loads are expanded before the check. If not, nonexpanded geometric loads will be ignored.
If True, a summary report is written.
If True, nodeSET and elemSET OR loaddefSET must specify the nodes and elements OR load definitions to consider in the summation. To use nodeSET and elemSET, set loaddefSET = 0, otherwise, loaddefSET will be used. If False, the full model is used.
The ID of a selection set that contains the IDs of the nodes to check. Alternatively, if you specify a negative value, this is simply the ID of the single node to check. Only used if useSETS=True and loaddefSET = 0
The ID of a selection set that contains the IDs of the elements to check. Alternatively, if you specify a negative value, this is simply the ID of the single element to check. Only used if useSETS=True and loaddefSET = 0.
The ID of a selection set that contains the IDs of the load definitions to check. Alternatively, if you specify a negative value, this is simply the ID of the single load definition. Only used if useSETS=True.
The coordinates of the location to sum about. Must be in global rectangular coordinates.
The coordinate system used to report and returned the summed loads.
The results of the force summation. Entries [0..5] are the nodal force summations. [6..8] contain the elemental force summation. [9..14] contain the total summation. [15-17] contain body translational acceleration. [18-20] contain body varying translational acceleration. [21-23] contain body rotational acceleration. [24-26] contain body rotational velocity.