Cancel
Showing results for 
Search instead for 
Did you mean: 

Femap Beam List Axial and Total Shear - API

Pioneer
Pioneer

Hi

I am requesting the Cbeam element axial and shear forces using the Femap API from custom Tools-> Post Processing->Beam List Axial and Total Shear.

This API is printing the Axial and Shear forces for all the beams in the model based on the following calculations.

I am using Nei Nastran and when I looked into the API code it says

 

    rc = ouVec1.Get( 3018 ) 'Beam Shear 1
    rc = ouVec2.Get( 3020 ) 'Beam Shear 2
    rc = ouVec3.Get( 3022 ) 'Beam Axial Force

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

    While feElem.Next
        If feElem.type = FET_L_BEAM Then

            shear1 = ouVec1.value( feElem.ID )
            shear2 = ouVec2.value( feElem.ID )
            axial = ouVec3.value( feElem.ID )

            totalShear = Sqr( shear1 * shear1 + shear2 * shear2 )

            Msg = "For Element " + Str$(feElem.ID) + " Axial, Total Shear " + Str$( axial ) + " " + Str$( totalShear )
            rc = App.feAppMessage( FCM_NORMAL, Msg)

 

https://knowledge.autodesk.com/support/nastran/learn-explore/caas/CloudHelp/cloudhelp/2018/ENU/NSTRN...

 

I assume it should be 3018 and 3019 instead of 3020 for shear calculation.

rc = ouVec1.Get( 3018 ) 'Beam Shear 1
    rc = ouVec2.Get( 3019 ) 'Beam Shear 2

 

Any Comments

Regards

srini

2 REPLIES

Re: Femap Beam List Axial and Total Shear - API

Siemens Phenom Siemens Phenom
Siemens Phenom

srinir,

 

This API was updated for Femap 11.0.0.

 


Rem File: ListBeamAxialandTotalShear.BAS
Sub Main
    Dim App As femap.model
    Set App = feFemap()

    Dim ouSetID As Long
    Dim ouVec1 As femap.Output
    Set ouVec1 = App.feOutput
    Dim ouVec2 As femap.Output
    Set ouVec2 = App.feOutput
    Dim ouVec3 As femap.Output
    Set ouVec3 = App.feOutput

    Dim feView As femap.View
    Set feView = App.feView
    Dim viewID As Long

    Dim totalShear As Double
    Dim shear1 As Double
    Dim shear2 As Double
    Dim axial As Double

    rc = App.feAppGetActiveView( viewID )

    rc = feView.Get( viewID )

    ouSetID = feView.OutputSet

    ouVec1.setID = ouSetID
    ouVec2.setID = ouSetID
    ouVec3.setID = ouSetID

    rc = ouVec1.Get( 3018 ) 'Beam Shear 1
    rc = ouVec2.Get( 3019 ) 'Beam Shear 2
    rc = ouVec3.Get( 3022 ) 'Beam Axial Force

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

    While feElem.Next
        If feElem.type = FET_L_BEAM Then

            shear1 = ouVec1.value( feElem.ID )
            shear2 = ouVec2.value( feElem.ID )
            axial = ouVec3.value( feElem.ID )

            totalShear = Sqr( shear1 * shear1 + shear2 * shear2 )

            Msg = "For Element " + Str$(feElem.ID) + " Axial, Total Shear " + Str$( axial ) + " " + Str$( totalShear )
            rc = App.feAppMessage( FCM_NORMAL, Msg )
        End If
    Wend

    
End Sub

Re: Femap Beam List Axial and Total Shear - API

Pioneer
Pioneer

Hi Catania

Thank you so much. I am using the Femap 10.0.2. Forgot to mention in the post

 

Regards

srinivas