vectorKZ
New member
- Nov 11, 2015
- 6
Hello Eng-Tips,
I am writing a quick piece of code to store all of the freebody object properties in an active model session.
I am having difficulty using the GetElements method to retrieve all elements stored in the freebody entity. Documentation and examples for freebody objects in the API are sparse.
'Basic subroutine:
'Connect to existing femap session
Dim App As femap.model
Set App = GetObject(, "femap.model")
'Create freebody object
Dim fe_fbd As Object
Set fe_fbd = App.feFreebody
fe_fbd.First()
Dim rc as variant ' GetElements returns: 1. elm count(long), 2. elms (long)(array)
Dim elmcount as long
Dim elms(30) as long ' the 30# is just an example here
'walk the freebodies
While (fe_fbd.Next())
from this point I encounter numerous argument and type mismatch errors. Please help me with data structure or GetElements....
Regards,
KZ
I am writing a quick piece of code to store all of the freebody object properties in an active model session.
I am having difficulty using the GetElements method to retrieve all elements stored in the freebody entity. Documentation and examples for freebody objects in the API are sparse.
'Basic subroutine:
'Connect to existing femap session
Dim App As femap.model
Set App = GetObject(, "femap.model")
'Create freebody object
Dim fe_fbd As Object
Set fe_fbd = App.feFreebody
fe_fbd.First()
Dim rc as variant ' GetElements returns: 1. elm count(long), 2. elms (long)(array)
Dim elmcount as long
Dim elms(30) as long ' the 30# is just an example here
'walk the freebodies
While (fe_fbd.Next())
'do stuff here
rc = fe_fbd.GetElements
from this point I encounter numerous argument and type mismatch errors. Please help me with data structure or GetElements....
Regards,
KZ