Reverse the direction of a line beam element
Reverse the direction of a line beam element
(OP)
I want to change the direction (NOT the orientation of standard shape cross section y-axis) of a line beam element by interchanging the end node A & B via API.
The ID of end node A and B are known. How to change the element's end node ID and put the element back to the model and update it?
The ID of end node A and B are known. How to change the element's end node ID and put the element back to the model and update it?





RE: Reverse the direction of a line beam element
editing the elements is an obvious solution (so there's some reason you're no doing this ... too many to do ??)
you may be able to do something with API (something like a macro in excel ?).
another day in paradise, or is paradise one day closer ?
RE: Reverse the direction of a line beam element
https://community.plm.automation.siemens.com/t5/CA...
FEMAP > Help > FEMAP User Community will direct you there as well.
There is not currently an API method to mimic the GUI tool "Modify > Update Elements > "Line Element Reverse Direction". However, if you simply want to Reverse the direction, the below API should do that for you.
Sub Main
Dim App As femap.model
Set App = feFemap()
Dim e As Elem
Dim eSet As Set
Set e = App.feElem
Set eSet = App.feSet
If eSet.Select(FT_ELEM, True, "Reverse Line Element(s)...") <> FE_OK Then End
eSet.Reset()
While eSet.Next()
e.Get(eSet.CurrentID)
zero = e.Node(0)
e.Node(0) = e.Node(1)
e.Node(1) = zero
e.Put(e.ID)
Wend
App.feViewRegenerate(0)
End Sub
RE: Reverse the direction of a line beam element
I always think that .Node() is only used to read the node and cannot be written to.