has_results#

dlubal.api.rfem.Application.has_results(self, *, loading=None, model_id=None)#

Checks whether the model has calculation results. Returns true if results are available.

Parameters:
  • loading (dlubal.api.rfem.object_id_pb2.ObjectId | None) – Allowed types: OBJECT_TYPE_CONSTRUCTION_STAGE, OBJECT_TYPE_DESIGN_SITUATION, OBJECT_TYPE_LOAD_CASE, OBJECT_TYPE_LOAD_COMBINATION, OBJECT_TYPE_RESULT_COMBINATION

  • model_id (dlubal.api.common.model_id_pb2.ModelId | None) – Unique identifier of the model.

Return type:

BoolValue

Active model is used if this field is not set.

Returns:

google.protobuf.wrappers_pb2.BoolValue

Parameters:
  • loading (ObjectId | None)

  • model_id (ModelId | None)

Return type:

BoolValue


Example

# Check if there are results for any loading type
has_results = rfem_app.has_results()
print(f"Has results: {has_results.value}")

# Check if there are results for any load combination
has_results = rfem_app.has_results(
    loading=rfem.ObjectId(
        object_type=rfem.OBJECT_TYPE_LOAD_COMBINATION
    )
)
print(f"Has results: {has_results.value}")

# Check if there are results for a specific load combination (no=2)
has_results = rfem_app.has_results(
    loading=rfem.ObjectId(
        no=2,
        object_type=rfem.OBJECT_TYPE_LOAD_COMBINATION
    )
)
print(f"Has results: {has_results.value}")

Output:

Has results: True