Using RFEMv6.12.0010 and Dlubal API v6.2.10, was working fine during the past days, but suddenly since 2-3 hours ago it started crashing all the time. The application still locks RFEM, and console gives usual message 'Running without SSL'.
But when I call any methods to read from the application, such as
ModelList modelList = await applicationRFEM.get_model_list();
or
var info = await applicationRFEM.get_application_info();
the API jumps out of all the code and rushes to the end, without hitting any exception catchers or logging any exceptions, any output messages, anything in runtime messages or even in windows logger, while the application lock remains on RFEM 6.
This is very weird and I tried it with my main solution and a new dummy project (code below), tried a newly created API key, and the same behvaior happens. So there seems to be something wrong on the API/server side?
This has stopped all my work.
public class TestingDlubalApi2
{
public TestingDlubalApi2()
{
SetUp();
}
public ApplicationRfem Application { get; set; }
private string API_key => "removed for sharing code";
private async Task SetUp()
{
this.Application = new ApplicationRfem(API_key);
await CreateNewModel(this.Application);
}
public static async Task<ModelId> CreateNewModel(ApplicationRfem applicationRfem)
{
ModelId modelId = null;
try
{
string modelName = "test";
//var info = await applicationRfem.get_application_info();
//Console.WriteLine(info);
ModelList modelList = await applicationRfem.get_model_list();
List<ModelInfo> list_modelInfos = modelList.ModelInfo.ToList();
string guid = "";
if (list_modelInfos.Any(mi => mi.Name == modelName))
{
// model already exists. set it as active and delete all objects
guid = list_modelInfos.First(mi => mi.Name == modelName).Guid;
modelId = new ModelId()
{
Guid = guid
};
//await applicationRfem.set_active_model(modelId); // dlubal.API v 6.2.12
await applicationRfem.set_active_model(guid); // dlubal.API v 6.2.10
await applicationRfem.delete_all_objects();
}
else
{
modelId = await applicationRfem.create_model(name: modelName);
guid = modelId.Guid;
}
await applicationRfem.close_connection();
await applicationRfem.set_active_model(guid);
applicationRfem.delete_all_objects(guid);
}
catch (Exception e)
{
var stackTrace = new System.Diagnostics.StackTrace(e, true);
var message = e.Message + ":\r\n\r\n" + stackTrace + "\r\n\r\n" + "An error occurred";
Console.WriteLine(message);
}
return modelId;
}
}
