Hi,
I am using RFEM 6.12.0012 (I had the same issue on 6.12.0010 so I updated but it didn’t fix it, I also note that the api is only on 2.12.11 so a slight mismatch but I don’t think it should affect it).
I have sucessfully created a borehole using the api. I am now trying to create a soil massif.
I have been refering these documentation pages:
Borehole — Dlubal API documentation
SoilMassif — Dlubal API documentation
Solid — Dlubal API documentation
To create the borehole I have:
def build_borehole_object(tc_no: str, crane_setout_point: Tuple[float, float, float], slab_mid_z: float,
geotech_data: Dict[str, Any], strata_material_map: Dict[int, int], no: int = 100) -> Any:
"""Build a single RFEM borehole object at the crane setout point.
The borehole layers start from the slab mid Z: the first layer starts
at slab_mid_z and extends down to the first strata bottom RL; subsequent
layers use top_rl - bottom_rl for thickness.
"""
name = f"{tc_no} Borehole"
x, y, _ = crane_setout_point
ground_water_rl = geotech_data.get("ground_water_rl")
table = geotech_data.get("ground_data_table") or []
layers = []
started = False
for i, strata in enumerate(table):
top_rl = strata.get("top_rl")
bottom_rl = strata.get("bottom_rl")
if top_rl is None or bottom_rl is None:
continue
if (not started) and (slab_mid_z <= top_rl and slab_mid_z >= bottom_rl):
thickness = float(slab_mid_z) - float(bottom_rl)
started = True
elif started:
thickness = float(top_rl) - float(bottom_rl)
else:
continue
mat_no = strata_material_map.get(i)
row_no = len(layers) + 1
layer_row = rfem.geotechnical_analysis.Borehole.LayersTableRow(
no=row_no,
description=str(strata.get("strata") or ""),
layer_no=row_no,
soil_material=mat_no or 0,
depth=thickness,
bottom_ordinate=float(bottom_rl),
)
layers.append(layer_row)
layers_table = rfem.geotechnical_analysis.Borehole.LayersTable(rows=layers)
borehole = rfem.geotechnical_analysis.Borehole(
no=no,
type=rfem.geotechnical_analysis.Borehole.TYPE_STANDARD,
name=name,
user_defined_name_enabled=True,
coordinates=common.Vector3d(x=float(x), y=float(y), z=float(slab_mid_z)),
groundwater=True if ground_water_rl is not None else False,
groundwater_ordinate=float(ground_water_rl) if ground_water_rl is not None else 0.0,
layers_table=layers_table,
comment="Created from geotechnical table"
)
return borehole
This works well.
To create the soil massif I have:
# Hardcoded soil massif size (meters)
SIZE_X = 100.0
SIZE_Y = 100.0
def build_soil_massif(tc_no: str, crane_setout_point: Tuple[float, float, float], slab_mid_z: float,
geotech_data: Dict[str, Any], borehole_no: int) -> Any:
"""Build a SoilMassif object centered on the crane setout / borehole.
The SoilMassif is configured per the user's spec: fixed size, rectangle
topology, groundwater enabled, assigned to the provided borehole, and
using FEM analysis.
"""
x, y, _ = crane_setout_point
soil_massif = rfem.geotechnical_analysis.SoilMassif(
type = rfem.geotechnical_analysis.SoilMassif.TYPE_STANDARD,
user_defined_name_enabled=True,
name=f"{tc_no} Soil Massif",
assigned_to_type=rfem.geotechnical_analysis.SoilMassif.ASSIGNED_TO_TYPE_BOREHOLES,
assigned_to_boreholes=[int(borehole_no)],
topology_type=rfem.geotechnical_analysis.SoilMassif.TOPOLOGY_TYPE_RECTANGLE,
analysis_type=rfem.geotechnical_analysis.SoilMassif.ANALYSIS_TYPE_FINITE_ELEMENT_METHOD,
depth_according_to_boreholes=True,
center_x=float(x),
center_y=float(y),
size_x=SIZE_X,
size_y=SIZE_Y,
rotation_about_z=0.0,
groundwater=True,
comment="Auto-generated soil massif from geotechnical table",
)
But when I go into the RFEM6 UI, it has definition type = Soil Solids (I want it to be Boreholes). I assumed that assigned_to_type=RFEM.geotechnical_analysis.SoilMassif.ASSIGNED_TO_TYPE_BOREHOLESwould have made it Boreholes?
When I change to Boreholes, all the info that I had from my api command seems to be saved (ie the size, but not the Borehole No., although from my log I know its using the correct borehole number).
When I change it to have type = TYPE_PHANTOM (as shown below)
soil_massif = rfem.geotechnical_analysis.SoilMassif(
type = rfem.geotechnical_analysis.SoilMassif.TYPE_PHANTOM,
user_defined_name_enabled=True,
name=f"{tc_no} Soil Massif",
assigned_to_type=rfem.geotechnical_analysis.SoilMassif.ASSIGNED_TO_TYPE_BOREHOLES,
assigned_to_boreholes=[int(borehole_no)],
topology_type=rfem.geotechnical_analysis.SoilMassif.TOPOLOGY_TYPE_RECTANGLE,
analysis_type=rfem.geotechnical_analysis.SoilMassif.ANALYSIS_TYPE_FINITE_ELEMENT_METHOD,
depth_according_to_boreholes=True,
center_x=float(x),
center_y=float(y),
size_x=SIZE_X,
size_y=SIZE_Y,
groundwater=True,
comment="Auto-generated soil massif from geotechnical table",
)
It becomes Definition Type = Borehole in the UI but the code stops as I get this error (I am not sure what PHANTOM is, but I assume it means its like a placeholder and not used in the FEA so it should be STANDARD?
2025-12-27 13:48:42 [ERROR] infrastructure.rfem_api.foundation.rfem6_foundation - Error in foundation model creation: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "Failed to create Soil Massif No. 1. Attribute 'type' or the attribute on which it depends is invalid or incorrectly defined: Invalid object type.
"
debug_error_string = "UNKNOWN:Error received from peer {created_time:"2025-12-27T06:48:42.359344+00:00", grpc_status:2, grpc_message:"Failed to create Soil Massif No. 1. Attribute \'type\' or the attribute on which it depends is invalid or incorrectly defined: Invalid object type.\n"}"
>
There’s no examples of the geotechnical analysis with the API and couldn’t find any related topics on the forum so I was hoping someone could help me out with what I am doing wrong ![]()
When I create it manually and export to python the soil massif doesn’t show up so I couldn’t figure out what the correct api code is that way ![]()
Update:
I realised that it was auto changing to be Definition Type: Soil Solids once I edit the created solid to have my surface as an integrated object (as when I commented out this code the soil massif definition type was Borehole). I guess there is no issue with it changing to soil solids.
My new issue is that while it calculates when the soil massif is 30 x 30 meters, it doesn’t calculate for 100 x 100 meters? Could I send my model privately to someone from dlubal to check out why?
Thanks,
Samuel


