Results Access#
|
In this example we will demonstrate how to:
|
from dlubal.api import rfem, common
with rfem.Application() as rfem_app:
# --- get_results ---
# Retrieves complete, unprocessed results from the RFEM database.
# These results are returned wrapped in a DataFrame (.data).
results:common.Table = rfem_app.get_results(
results_type=rfem.results.ResultsType.STATIC_ANALYSIS_NODES_GLOBAL_DEFORMATIONS,
filters=[
rfem.results.ResultsFilter(column_id='loading', filter_expression='LC6')
]
)
print(f"\nResults:\n{results.data}")
# --- get_result_table ---
# Retrieves a pre-processed result table wrapped in a DataFrame (.data),
# containing only the most relevant values as displayed in the RFEM desktop application.
result_table:common.Table = rfem_app.get_result_table(
table = rfem.results.ResultTable.STATIC_ANALYSIS_NODES_GLOBAL_DEFORMATIONS_TABLE,
loading= rfem.ObjectId(
no=6,
object_type=rfem.OBJECT_TYPE_LOAD_CASE
)
)
print(f"\nResult Table:\n{result_table.data}")
# # --- has_results ---
# # Checks if results exist for a specified loading condition.
# # This is useful to confirm results availability before retrieving them,
# # preventing errors or unnecessary data requests.
# has_results = rfem_app.has_results(
# loading = rfem.ObjectId
# (
# no = 1,
# object_type = rfem.OBJECT_TYPE_LOAD_COMBINATION,
# )
# )
# print(f"\nResults Available: {has_results.value}")
using Rfem = Dlubal.Api.Rfem;
using Common = Dlubal.Api.Common;
ApplicationRfem? rfemApp = null;
try
{
rfemApp = new ApplicationRfem();
// --- get_results ---
// Retrieves complete, unprocessed results from the RFEM database.
// These results are returned wrapped in a DataFrame (.Data).
Common.Table results = rfemApp.get_results(
resultsType: Rfem.Results.ResultsType.StaticAnalysisMembersInternalForces
);
Console.WriteLine($"\nResults:\n{results.Data}");
// --- get_result_table ---
// Retrieves a pre-processed result table wrapped in a DataFrame (.Data),
// containing only the most relevant values as displayed in the RFEM desktop application.
Common.Table resultTable = rfemApp.get_result_table(
table: Rfem.Results.ResultTable.StaticAnalysisMembersInternalForcesTable,
loading: new Rfem.ObjectId
{
No = 1,
ObjectType = Rfem.ObjectType.LoadCombination
}
);
Console.WriteLine($"\nResult Table:\n{resultTable.Data}");
// --- has_results ---
// Checks if results exist for a specified loading condition.
// This is useful to confirm results availability before retrieving them,
// preventing errors or unnecessary data requests.
var hasResults = rfemApp.has_results(
loading: new Rfem.ObjectId
{
No = 1,
ObjectType = Rfem.ObjectType.LoadCombination,
}
);
Console.WriteLine($"\nResults Available: {hasResults}");
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
finally
{
if (rfemApp != null) rfemApp.close_connection();
}