has_results#
- dlubal.api.rstab.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.rstab.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 = rstab_app.has_results()
print(f"Has results: {has_results.value}")
# Check if there are results for any load combination
has_results = rstab_app.has_results(
loading=rstab.ObjectId(
object_type=rstab.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 = rstab_app.has_results(
loading=rstab.ObjectId(
no=2,
object_type=rstab.OBJECT_TYPE_LOAD_COMBINATION
)
)
print(f"Has results: {has_results.value}")
// Check if there are results for any loading
var hasResults = await RstabApp.has_results();
Console.WriteLine($"\nHas results: {hasResults}");
// Check if there are results for a specific loading type
var hasResults = await RstabApp.has_results(
loading: new Rstab.ObjectId
{
ObjectType = Rstab.ObjectType.LoadCase
}
);
Console.WriteLine($"\nHas results: {hasResults}");
// Check if there are results for a specific load combination (no=2)
var hasResults = await RstabApp.has_results(
loading: new Rstab.ObjectId
{
ObjectType = Rstab.ObjectType.LoadCase,
No = 2
}
);
Console.WriteLine($"\nHas results: {hasResults}");
Output:
Has results: True