×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*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.

# FEMAP API Element length

## FEMAP API Element length

(OP)
Hi,

I am really beginner for APi programming.

I have to include element length inside equation.

Try to make API program that I can calculate beam/bar element buckling by use analytical method from element axial forces.

Equation where I need element length is

Nelem = (pii^2 x E x I) / elem.length^2

All other is clear, but the problem is to found correct method to included element length.

Larson HT

### RE: FEMAP API Element length

Hi Larson HT,

I dont know if this will help you, but its what a figure out to measure a element length.

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

'--Create a solid
App.feSolidPrimitive(0,1,True, Array(0,0,0), Array(20, 5, 5), TEST_1)

'--Create a material
[ Dim Material_test As femap.Matl
Set Material_test = App.feMatl
Material_test.Ex = 100
Material_test.Nuxy = 0.3
Material_test.Put(Material_test.NextEmptyID())

'--Create a property
Dim Property_test As femap.Prop
Set Property_test = App.feProp
Property_test.type = FET_L_SOLID
Property_test.matlID = Material_test.ID
Property_test.Put(Property_test.NextEmptyID())

'--Mesh
App.feMeshHexSolid(-1, Property_test.ID, False, False,False,False,False, 0)

'--Get one Element
'Dim Set_Elem As femap.Elem
'Set Set_Elem = App.feElem
'Set_Elem.Get(1)

'--Get the first node of the element you want the length
Dim First_Node As femap.Node
Set First_Node = App.feNode
First_Node.SelectID("Select the first node")

'--Get the second node of the element you want the length
Dim Second_Node As femap.Node
Set Second_Node = App.feNode
Second_Node.SelectID("Select the second node")

'--Get the distance/Length between nodes
Dim VecBase As Variant
Dim vecDist As Variant
Dim Dist_bet_Nodes As Double
App.feMeasureDistanceBetweenNodes(First_Node.ID, Second_Node.ID, 0, 0, 1, VecBase, vecDist, Dist_bet_Nodes)

MsgBox "The element Legth is " & Dist_bet_Nodes

#### 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.

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:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!