COM interface in VBA | 4.2 Frame Optimization

Technical Article

Part 4.1 of this article series described the connection of the RF‑/STEEL EC3 add‑on module and the members and load combinations to be designed were already defined. This part will focus on the optimization of cross‑sections in the module and the transfer to RFEM. The elements already explained in the previous parts are not described again.

Optimization Process

The aim is to only transfer the members of a certain cross‑section to the RF‑/STEEL EC3 design. In the following example, all members with the ‘IPE 300’ cross‑section should be optimized. It is assumed that the member numbers are known.

Figure 01 - Structural System

The optimization in RF‑STEEL EC3 is performed on the basis of the internal forces calculated previously in RFEM. This means that the stiffnesses modified due to the cross‑section changes in the module are not taken into account. This has the advantage, that the optimization is performed without recalculating the structure and thus, it can be done quite quickly. The disadvantage is that due to the modified stiffness, a redistribution can happen, which can also lead to significantly modified internal forces. Thus, the optimized cross‑section can be overloaded.

For efficient optimization, it is useful to always optimize only a few cross‑sections in the module and then transfer the new cross‑sections to RFEM and check the result again in the module.

Activating Optimization in RF-STEEL EC3

In order to optimize a cross‑section in the module, it is necessary to activate this option for the individual cross‑section. In contrast to the manual operation of the program, it is not possible to select how to perform the optimization, but only whether the optimization is to be performed. In order to activate this option, the cross‑sections must be searched according to the description. As an alternative, you can also search for the cross‑section number, of course. If a match is found, the respective cross‑section is modified and transferred to the module. Then, the loop is interrupted as only one cross‑section is examined in this case.

' Set the optimization for the desired cross‑section
count = iStec3Case.moGetCrossSectionsCount
Dim crsc_ec3_idx As Long
crsc_ec3_idx = -1

For i = 0 To count - 1
 iStec3_cs = iStec3Case.moGetCrossSection(i, AT_INDEX)
 If InStr(LCase(iStec3_cs.Description), LCase(crsc_desc)) > 0 Then
  iStec3_cs.Optimization = True
  iStec3Case.moSetCrossSection i, AT_INDEX, iStec3_cs
  crsc_ec3_idx = i
  Exit For
 End If
Next i

' Perform calculation

After activating the optimization, the calculation of the module case starts.

Transferring Cross-Section to RFEM

The cross‑section is transferred by using the cross‑section number. For this, you should get the interface of the RFEM cross‑section and then enter a new TextID or a new cross‑section identifier. RFEM recognizes the identifier and get the corresponding cross‑section from the library after the transfer.

' Transfer the cross-section to RFEM
' Get a new cross‑section description from RF‑STEEL EC3
iStec3_cs = iStec3Case.moGetCrossSection(crsc_ec3_idx, AT_INDEX)

' Get the cross‑section interface and properties from RFEM
Dim iCrsc As RFEM5.ICrossSection
Set iCrsc = iModelData.GetCrossSection(crsc_no, AtNo)
Dim crsc As RFEM5.CrossSection
crsc = iCrsc.GetData

' Cross‑section modification to a new cross‑section from RF‑STEEL EC3
crsc.Description = ""
crsc.TextID = iStec3_cs.Description

' Transfer cross‑section properties
iCrsc.SetData crsc


Especially in the case of recurring structures, the optimization option in RF‑/STEEL EC3 provides a great work facilitation. It is important to check the structure with the optimized cross‑sections by a recalculation in RFEM. An iterative process would be easily feasible using the COM interface. In such a way, automated optimization can significantly facilitate and speed up the workflow.



Contact us

Contact to Dlubal

Do you have any questions or need advice?
Contact us or find various suggested solutions and useful tips on our FAQ page.

+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

RFEM Steel and Aluminium Structures

Add-on Module

Design of steel members according to Eurocode 3