This article was translated by Google Translator

View original text

25 November 2019

FAQ 004181 EN

Thomas Günthel

Modeling | Structure



How can I create a result beam by using the COM interface?


First, a result beam is created exactly like a normal member:

    Dim model As RFEM5.model
    Set model = GetObject(, "RFEM5.Model")

    On Error GoTo e

    Dim data As IModelData
    Set data = model.GetModelData

    Dim members(0) As RFEM5.Member
    members(0).No = 3
    members(0).LineNo = 12
    members(0).Type = ResultBeamType
    members(0).StartCrossSectionNo = 1
    members(0).EndCrossSectionNo = 1
    members(0).Comment = "result beam 1"

    data.SetMembers members

Then, the interface IMember has to be taken from the corresponding member, and the GetExtraData method is used to get the interface to IResultMember. This interface can now be used to read or write the ResultMember data. Please note that a Prepare-/Finishmodification block is required when writing:

    Dim iMem As IMember
    Set iMem = data.GetMember(3, AtNo)
    Dim iRMem As IResultBeam
    Set iRMem = iMem.GetExtraData
    Dim RMem As ResultBeam
    RMem = iRMem.GetData
    RMem.IncludeSurfaces = "1"
    RMem.IncludeSolids = "all"
    RMem.Integrate = WithinCuboidGeneral
    Dim params(0 To 3) As Double
    RMem.Parameters = params
    RMem.Parameters(0) = 0.5
    RMem.Parameters(1) = 0.5
    RMem.Parameters(2) = 0.1
    RMem.Parameters(3) = 0.1
    iRMem.SetData RMem

The completed EXCEL macro and the corresponding test file are attached.


COM Result beam ResultMember


Contact us

Contact to Dlubal

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