184x
001947
2025-04-09

Dlubal API: Practical Use Cases and Key Benefits

This article explores how the Dlubal API can enhance your experience with RFEM 6, showcasing practical use cases and highlighting key benefits.

In the realm of structural analysis and design, RFEM 6 offers powerful functionality for engineers, architects, and designers. One of the key elements to leverage these capabilities to their fullest is understanding how web services and APIs (Application Programming Interfaces) play a crucial role in enabling communication between RFEM 6 and other systems or software. RFEM 6 provides advanced integration through its Python API, allowing users to automate workflows, interact with models programmatically, and integrate RFEM into larger engineering solutions.

Practical Use Cases of the Dlubal API

Batch Analysis

Batch analysis is an important use case when customers need to iterate and analyze many different models. If working with global parameters within the RFEM GUI becomes too restrictive or inflexible for complex model variations, the API allows for seamless iteration and calculation of various models. This functionality is ideal for users who need to perform repetitive tasks or analyze multiple design scenarios quickly.

  • Scenario: You need to perform an analysis on multiple variations of a building's structural model, each with different material properties, loads, and boundary conditions. Manually adjusting each model in the RFEM GUI is time-consuming and human error-prone.
  • API Use Case: Using the Dlubal API, you can create a script that automatically iterates over a set of models, applies different parameters (e.g., material properties, load combinations), runs the analysis, and collects the results. This automation streamlines the process and ensures that all models are consistently analyzed.
  • Example Code:
import rfem
from dlubal.api.rfem.application import Application

# Initialize the API connection
with Application() as RFEM:
    RFEM.close_all_models(save_changes=False)
    RFEM.create_model(name='beam_model')

    # Create beam and apply loads
    RFEM.create_object_list([
        rfem.structure_core.Material(name='S235'),
        rfem.structure_core.Section(name='IPE 200', material=1),
        rfem.structure_core.Line(definition_nodes=[1, 2]),
        rfem.structure_core.Member(line=1, section_start=1)
    ])

    # Run static analysis
    RFEM.calculate()

    # Extract bending moment from results
    bending_moment = RFEM.get_result('Bending Moment', member_id=1)

    # Custom design check (simple example for bending)
    design_capacity = 1000  # Example design capacity in Nm
    if bending_moment > design_capacity:
        print("Warning: Bending moment exceeds design capacity")
    else:
        print("Design check passed")

In this example, you create and analyze multiple models with different material properties, automating the task of generating and analyzing numerous variations.

Custom Design Checks

Creating custom design checks is one of the most powerful use cases for the Dlubal API. This involves writing your own verification routines based on the results from RFEM’s static analysis. Many users currently rely on self-created Excel tools or VBA scripts to perform these checks, but with the Dlubal API, you can automate and streamline this process. By integrating custom checks directly within RFEM 6, users can significantly reduce errors, increase efficiency, and tailor the verification process to meet specific project requirements. This is one of the most important use cases for a majority of RFEM’s typical users, particularly those in professional engineering environments.

  • Scenario: You need to validate the bending capacity of a steel beam using custom design formulas, based on results from RFEM’s static analysis. Instead of using Excel or VBA, you want to integrate this check directly into RFEM.
  • API Use Case: You write a custom design check using the Dlubal API that processes the analysis results (e.g., bending moments) and compares them to the design criteria (e.g., code-based formula for bending capacity).
  • Example Code:
import rfem
from dlubal.api.rfem.application import Application

# Initialize the API connection
with Application() as RFEM:
    RFEM.close_all_models(save_changes=False)
    RFEM.create_model(name='beam_model')

    # Create beam and apply loads
    RFEM.create_object_list([
        rfem.structure_core.Material(name='S235'),
        rfem.structure_core.Section(name='IPE 200', material=1),
        rfem.structure_core.Line(definition_nodes=[1, 2]),
        rfem.structure_core.Member(line=1, section_start=1)
    ])

    # Run static analysis
    RFEM.calculate()

    # Extract bending moment from results
    bending_moment = RFEM.get_result('Bending Moment', member_id=1)

    # Custom design check (simple example for bending)
    design_capacity = 1000  # Example design capacity in Nm
    if bending_moment > design_capacity:
        print("Warning: Bending moment exceeds design capacity")
    else:
        print("Design check passed")

In this example, you use the API to perform a custom design check based on the bending moment extracted from the RFEM analysis, replacing manual tools like Excel or VBA.

Digital Workflows and Data Transfer

While the API cannot directly access proprietary file formats (such as those used by Tekla or Revit), it can support digital workflows by allowing users to create automated processes for transferring model data from readable formats into RFEM models. For example, users can automate the transfer of project or model data from external sources (such as custom design configurators or product data models) into RFEM 6, enabling a smoother and more efficient workflow for companies with proprietary data or design tools. This is particularly beneficial for professional users who need to integrate RFEM into their broader design workflows and data management systems.

  • Scenario: You have a design configurator that generates structural models in a proprietary format. You want to automate the process of transferring this data into RFEM to perform structural analysis.
  • API Use Case: You use the Dlubal API to automate the conversion of the external data format (e.g., CSV, XML) into RFEM 6 model data, such as creating nodes, members, and applying loads. This workflow reduces manual data entry and integrates RFEM into your overall design process.
  • Example Code:
import rfem
import csv
from dlubal.api.rfem.application import Application

# Initialize the API connection
with Application() as RFEM:
    RFEM.close_all_models(save_changes=False)
    RFEM.create_model(name='automated_model')

    # Load project data from an external CSV file
    with open('project_data.csv', 'r') as file:
        reader = csv.reader(file)
        for row in reader:
            node_id = int(row[0])
            x_coord = float(row[1])
            y_coord = float(row[2])

            # Create nodes from the CSV data
            RFEM.create_object_list([
                rfem.structure_core.Node(coordinate_1=x_coord, coordinate_2=y_coord)
            ])

    # Continue with the workflow by creating members, applying loads, etc.
    # Process further data from the CSV to build the full model

    # Run the analysis
    RFEM.calculate()
    results = RFEM.get_results()

    # Process and output results

In this example, you automatically create an RFEM model from external data (CSV in this case), allowing you to integrate RFEM into your existing workflows and bypass manual data entry.

Summary of Advantages of Using the Dlubal API

As already seen from the practical use cases discussed above, the Dlubal API unlocks a wealth of opportunities for structural engineers and design teams, enabling them to improve efficiency, precision, and integration across various phases of the project. Below are the core benefits summarized:

1. Enhanced Productivity

The Dlubal API automates time-consuming tasks that are traditionally done manually, such as model creation, load application, and analysis result extraction. By eliminating repetitive actions, the API allows you to focus on higher-value aspects of your work, dramatically boosting overall productivity.

2. Seamless Integration into Existing Workflows

The API allows for easy integration with other design and analysis tools, ensuring that RFEM 6 can coexist with your existing software ecosystem. Whether working with BIM tools, CAD systems, or custom data sources, the API helps streamline the exchange of data, reducing the likelihood of errors and ensuring consistency across platforms.

3. Scalable Solutions for Complex Projects

When working on large-scale or highly complex projects, the Dlubal API becomes an indispensable tool. Its ability to automate batch processing of multiple models, perform large-scale analyses, and manage a vast amount of data efficiently makes it ideal for tackling intricate designs and calculations that would otherwise be too cumbersome to handle manually.

4. Flexibility for Customization

Unlike rigid software interfaces, the Dlubal API offers full flexibility for customizing workflows to suit your unique project needs. Whether you need custom reporting, design checks, or special analyses, you have the ability to create exactly what your project requires. This reduces dependency on third-party tools and allows you to work more autonomously.

5. Future-Proofing Your Workflow

With modern features like gRPC for faster communication and Docker for easy deployment, the Dlubal API ensures that your workflows remain optimized and scalable as technology evolves. The lean interface and straightforward design also guarantee that you won’t face unnecessary complexities down the line, ensuring long-term compatibility and ease of use.

6. Real-Time Data Processing

The ability to filter and capture only the relevant data from your models allows for real-time updates and immediate feedback, which is crucial for iterative design processes. Whether it’s tweaking load combinations or testing material properties, the API empowers you to make decisions faster and with greater precision.

7. Greater Accuracy and Consistency

Automating checks and analysis through the API ensures a higher level of consistency and accuracy compared to manual methods. Custom checks can be built directly into the workflow, ensuring that results align with the specific criteria required for each project. This reduces the risk of human error and enhances the overall quality of your designs.

8. Increased Innovation Potential

The Dlubal API opens up new possibilities for innovation by giving developers the flexibility to build custom applications, tools, and integrations. Whether you're creating new interfaces, working on cross-platform solutions, or developing entirely new features, the API serves as a powerful foundation for driving innovation within your organization or team.

9. Cost-Effective Design Solutions

By reducing the amount of time spent on repetitive tasks and improving efficiency, the Dlubal API helps companies save on labor costs while increasing throughput. Additionally, its automation features can help speed up project timelines, resulting in quicker turnarounds and more competitive pricing for clients.

10. Optimized Resource Management

Through more effective use of system resources—by automating tasks and simplifying data management—the Dlubal API ensures that your workflows are not just faster but also more resource-efficient. This translates into reduced hardware and processing demands, which can be particularly valuable for large-scale projects or when operating under tight time constraints.

Conclusion

The Dlubal API for RFEM 6 empowers users to automate and optimize their workflows, integrate with other tools, and enhance their structural analysis capabilities. With faster communication, a unified syntax, and a lean interface, the API provides a robust foundation for improving efficiency and customization. Whether you’re automating analysis, creating custom reports, or integrating RFEM 6 with other systems, the Dlubal API offers the flexibility you need to streamline your engineering tasks.


Author

Ms. Kirova is responsible for creating technical articles and provides technical support to Dlubal customers.



;