COM Interface in VBA | Creating a Parts List

Technical Article

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.

Figure 01 - Creating a Parts List

Inserting Reference

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.

Figure 02 - Including Dlubal RFEM Type Libraries and Microsoft Scripting Runtime

Source Code

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.

Keywords

Parts List, Material, VBA

Downloads

Links

Contact us

Contact Dlubal Software

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.

(267) 702-2815

info-us@dlubal.com

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