How can I display the stresses of a surface via RF‑COM?


The stresses of a surface can be displayed via the COM interface. First, you need the interface for the model (IModel) and then the interface for the calculation (ICalculation2). Using this interface, you can get the interface for the results (IResults2):

Sub stresses_surfaces_example()
Dim iApp As RFEM5.Application
Dim iModel As RFEM5.model
Set iModel = GetObject(, "RFEM5.Model")

On Error GoTo E

If Not iModel Is Nothing Then
    '   get interface from model
    Set iApp = iModel.GetApplication
    '   get interface from calculation
    Dim iCalc As RFEM5.ICalculation2
    Set iCalc = iModel.GetCalculation
    '   get interface from results from loadcase 1
    Dim iRes As RFEM5.IResults2
    Set iRes = iCalc.GetResultsInFeNodes(LoadCaseType, 1)
    '   get equivalent stresses
    Dim str_equ() As RFEM5.SurfaceEquivalentStresses
    str_equ = iRes.GetSurfaceEquivalentStresses(1, AtNo, VonMisesHypothesis)
End If

If Err.Number <> 0 Then
    MsgBox Err.Number & " " & Err.description
End If

If Not iApp Is Nothing Then
End If

The GetSurfaceEquivalentStresses function requires the specification of the calculation hypothesis. In this case, the results of the von Mises stress are displayed. Please note that the COM interface uses SI units so the stress is transferred in N/m².


COM Mises Stresses IResults ICalculation



Contact us

Did you find your question?
If not, contact us via our free e-mail, chat, or forum support, or send us your question via the online form.

+49 9673 9203 0

RFEM Main Program
RFEM 5.xx

Main Program

Structural engineering software for finite element analysis (FEA) of planar and spatial structural systems consisting of plates, walls, shells, members (beams), solids and contact elements

Price of First License
3,540.00 USD
RFEM Other
RF-COM 5.xx

Add-on Module

Programmable interface (API) based on the COM technology

Price of First License
580.00 USD