Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Rod Element

Status
Not open for further replies.

VH88

Aerospace
Joined
Feb 20, 2020
Messages
9
Location
US

Can someone please tell me why I have the return code of 8, which is FE_BAD_TYPE, when executing "Element.PutAllArray"? What did I do wrong here? The script below prompts user to select nodes and a rod property, then create rod elements.

-------------------------------------------------------------
Sub Main
Dim App as femap.model
Set App = feFemap()

Dim NodeList As femap.SortSet
Set NodeList = App.feSort

Dim Element As femap.Elem
Set Element = App.feElem

Dim entID, propID, elemTYPE, topology, layer, color, formulation, orient, offset, release, orientSET, orientID, connectTYPE, connectSEG As Variant
Dim Nodes (1) As Long
Dim pset As femap.Set
Set pset = App.feSet
Dim pid As Long

rc = NodeList.Select(FT_NODE, False, "Select Nodes")
rc = pset.SelectID (FT_PROP, "Select a Rod Property", pid)

While NodeList.Next()
Nodes (0) = NodeList.Current
Nodes (1) = NodeList.Next


entID = Element.NextEmptyID
propID = pid
elemTYPE = 1
topology = 0
layer = 1
color = 124
formulation = 0
orient = 0
offset = 0
release = 0
orientSET = 0
orientID = 0
connectTYPE = 0
connectSEG = 0

rc = Element.PutAllArray( 1, entID, propID, elemTYPE, topology, layer, color, _
formulation, orient, offset, release, orientSET, orientID, Nodes, connectTYPE, connectSEG )

App.feViewRegenerate( 0 )
Wend
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top