Environment:
-
RFEM: 6.10.0012
-
dlubal.api Python package: 2.12.10 (latest available, built for 6.10.0011)
Issue:
When using calculate_specific() or get_result_table() with RFEM.OBJECT_TYPE_LOAD_COMBINATION, the server rejects the request with "Only loading types are allowed".
My code is
from dlubal.api import rfem
# Build list of ObjectId for load combinations
loading = []
for rng in [(10, 17), (20, 27), (30, 37), (40, 47)]:
loading.extend([
rfem.ObjectId(no=i, object_type=rfem.OBJECT_TYPE_LOAD_COMBINATION)
for i in range(rng[0], rng[1] + 1)
])
# Run selective calculation
rfem_app.calculate_specific(
loadings=loading,
skip_warnings=True
)
My error is
2025-12-28 22:53:29 [WARNING] infrastructure.rfem_api.foundation.rfem6_foundation - Selective calculation failed. Error: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "Only loading types are allowed."
debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"Only loading types are allowed.", grpc_status:3, created_time:"2025-12-28T15:53:29.525489+00:00"}"
>. Attempted loadings: 32 items. Falling back to calculate_all.
Analysis:
I investigated by checking the enum values and logging what object_type my ObjectIds actually have:
# Debugging code to check values
from dlubal.api import rfem
# Check the constant value
print(f"OBJECT_TYPE_LOAD_COMBINATION = {rfem.OBJECT_TYPE_LOAD_COMBINATION}")
# Output: 161
# Create ObjectId and check what it contains
oid = rfem.ObjectId(no=10, object_type=rfem.OBJECT_TYPE_LOAD_COMBINATION)
print(f"ObjectId object_type = {int(oid.object_type)}")
# Output: 163 (!)
Expected: rfem.OBJECT_TYPE_LOAD_COMBINATION should be 161
Actual: The ObjectId ends up with object_type=163
Checking what 163 corresponds to:
print(f"OBJECT_TYPE_LOAD_COMBINATION = {rfem.OBJECT_TYPE_LOAD_COMBINATION}") # 161
print(f"OBJECT_TYPE_STATIC_ANALYSIS_SETTINGS = {rfem.OBJECT_TYPE_STATIC_ANALYSIS_SETTINGS}") # 163
So the ObjectId is being created with type 163 (OBJECT_TYPE_STATIC_ANALYSIS_SETTINGS) instead of 161 (OBJECT_TYPE_LOAD_COMBINATION), which the server correctly rejects as "not a loading type".
Am I doing something wrong? or is it a bug? or is it because of the mismatch between the python version and the RFEM6 version and will be solved when the next package update comes?
Thanks,
Samuel