Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


FEMAP API Force Balance

FEMAP API Force Balance

FEMAP API Force Balance

I am trying to extract a force balance from a set of nodes and elements for a given results set. I made sure that my results included grid point forces. When I run the below code I get:

Return code: -1
API Error (Line 43): (10023) Array index out of range.
--> App.feAppMessage( FCM_NORMAL, "Force X: " + Str$( res( 0 ) ) )

Any help on this would be great, thanks!


Sub Main

' Init model
Dim App As femap.model
Set App = feFemap()

' Init output set
Dim fOS As femap.OutputSet
Set fOS = App.feOutputSet

' Init variables
Dim nArr As Long
Dim i As Long
Dim values As Variant
Dim ents As Variant
Dim loadSetID As Long
Dim rc As Long

loadSetID = 1

' Init element and node sets
Dim fsElem As femap.Set
Dim fsNd As femap.Set
Set fsElem = App.feSet
Set fsNd = App.feSet

fsElem.Select( FT_ELEM, True, "Select them elements!" )
fsNd.Select( FT_NODE, True, "Select them nodes!" )

fOS.Get( loadSetID )

Dim bPoint(3) As Variant
bPoint( 0 ) = 1.1
bPoint( 1 ) = 2.2
bPoint( 2 ) = 3.3

' Declare number of sets and results variables
Dim nSets As Long
Dim res As Variant

' Call force balance
rc = App.feOutputForceBalance( fOS.ID, fsNd.ID, fsElem.ID, 0, bPoint, nSets, res)

' Write results and return code out
App.feAppMessage( FCM_NORMAL, "Return code: " + Str$( rc ) )
App.feAppMessage( FCM_NORMAL, "Force X: " + Str$( res( 0 ) ) )

End Sub

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close