COM interface in VBA | 4.2 Frame Optimization
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.
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.
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
Dim iStec3_cs As STEEL_EC3.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
' 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
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.
Do you have any questions or need advice?
Contact us or find various suggested solutions and useful tips on our FAQ page.
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
Design of steel members according to Eurocode 3
Programmable interface (API) based on the COM technology