Cancel
Showing results for 
Search instead for 
Did you mean: 

Finding area for individual plate elements

Experimenter
Experimenter

Is there a simple way to list out the area of plate elements? I can find the area using Tools>Section Properties>Mesh Properties but when I select multiple elements, it gives me the combined area. Any other methods to list out the individual element areas instead of clicking through that menu a few thousand times?

3 REPLIES

Re: Finding area for individual plate elements

Phenom
Phenom

Hi,

A simple bit of code will do the trick! Launch this in the API window:

AP

 

 

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

    Dim d As Double, s As String, tot As Double

    Dim elSet As femap.Set, elSet2D As femap.Set, el As femap.Elem
    Set elSet = App.feSet
    Set elSet2D = App.feSet
    Set el = App.feElem

    If elSet.Select(FT_ELEM,False,"Select elements") = FE_CANCEL Then End

    'filter user selection: keep only 2D els
    elSet2D.AddRule(FTO_TRIA3,FGD_ELEM_BYSHAPE)
    elSet2D.AddRule(FTO_TRIA6,FGD_ELEM_BYSHAPE)
    elSet2D.AddRule(FTO_QUAD4,FGD_ELEM_BYSHAPE)
    elSet2D.AddRule(FTO_QUAD8,FGD_ELEM_BYSHAPE)
    elSet.RemoveNotCommon(elSet2D.ID)

    App.feAppMessage(FCM_ERROR,"  El ID  -  Area  ")
    While el.NextInSet(elSet.ID)
        el.GetFaceArea(1,d)
        tot = tot+d
        App.feFormatReal(d,8,3,FRFM_EXPONENTIAL,s)
        App.feAppMessage(FCM_NORMAL,CStr(el.ID) & " : " & s)
    Wend

    App.feFormatReal(tot,8,3,FRFM_EXPONENTIAL,s)
    App.feAppMessage(FCM_ERROR,"Total area = " & s)
End Sub

Re: Finding area for individual plate elements

Legend
Legend

The power of API.

Seifeddine Naffoussi

Re: Finding area for individual plate elements

Siemens Phenom Siemens Phenom
Siemens Phenom

If you don't mind other information coming out with the area all you really have to do is use the Tools->Mass Properties->Mesh Properties command and turn on the "List Properties for Individual Elements" option. The first column in the listing after the ID will contain the area if you choose planar elements (or length for line elements or volume for solid elements)