COM Interface in VBA | Creating a Parts List
Parts lists give information about which and how many parts are necessary for creating a building. They are the basis for identifying the needs and purchasing the components. Parts lists can be created in the design modules such as RF-/STEEL EC3, RF-/TIMBER Pro and so on. Additionally, a customized parts list can be created with the RF-COM/RS-COM interface.
This article shows creating a tool to display a parts list for members, cross-sections and materials from RFEM. The programming environment is VBA in Excel.
The parts list for the members, cross-sections and materials is displayed in the spreadsheets "Parts List", "Parts List by Cross-Section" and "Materials List" after clicking on the [Parts List] or [Materials List] button. It is necessary that the corresponding RFEM file is already opened.
The RFEM object libraries Dlubal RFEM Type Library v3.4 and Dlubal RFEM Type Library v5.5 as well as Microsoft Scripting Runtime have to be integrated in the VBA editor first by clicking "Tools" → "References". The object library Dlubal RFEM Type Library v3.4 is necessary to get the cross-section values.
The Excel file with the source code for creating a parts list can be downloaded under Downloads at the bottom of this article. The single steps are explained in the comments.
Summary and Outlook
In this article, a tool was developed to display a parts list from RFEM. It is also possible to create a corresponding tool in RSTAB.
The tool is started in Excel. It is also an option to include it into the RFEM or RSTAB interface. This is described in the linked article.
Parts List, Material, VBA
Do you have any questions or need advice?
Contact us via e-mail, chat or forum. Find also 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
Programmable interface (API) based on the COM technology