RFEM6 API II C# | calculate_specific Error

Hello Dlubal Community,

After upgrading to RFEM 6.12.7, an error occurs when calling calculate_specific. The same code still worked in version 6.12.1. What can I do to fix this error?

Here is the code that causes the error:

public RfemCalculationResult CalculateSpecific(RfemCalculateSpecificLoading[] loadings, bool skipWarnings)
    {
        List<ObjectId> ids = loadings.Select(x => new ObjectId()
        {
            No = x.Number,
            ObjectType = ObjectType.LoadCombination
        }).ToList();

        _operationResult = Application.calculate_specific(ids, skipWarnings).GetAwaiter().GetResult();

        return new RfemCalculationResult(_operationResult.Succeeded, _operationResult.Message);
    }

The argument ids looks approximately like this, where No refers to the number of the load combination.

[
  { No: 1, ObjectType: LoadCombination },
  { No: 2, ObjectType: LoadCombination },
  { No: 3, ObjectType: LoadCombination }
]

Expected behavior:

  • The method calculate_specific should calculate the specified load combinations and return a successful result.

Actual behavior:

  • A Grpc.Core.RpcException occurs:
Grpc.Core.RpcException : Status(StatusCode="InvalidArgument", Detail="Only load types are allowed.")

What I have already done:

  • Searched the changelog for breaking changes
  • Downgraded to Dlubal.Api: 6.12.1 in combination with RFEM 6.12.0006

Info

RFEM version: 6.12.0007
Dlubal.Api version: 6.12.7

Hi hasslernils,
I’ve tried it on my local PC and it seems running. I would guess, there is issue with version descrepancy between client and server. Can you double check, that client version is really 6.12.7 when you use RFEM 6.12.0007?
Ready to help more but need this confirmation first.
Regards

1 Like

Hi Tomas,

you are absolutely right, i switched versions so many times that i got it mixed up. I was using 6.12.6 with RFEM 6.12.0007. With the right versions it works as expected.
That's also why i immediately deleted the post again, i reopened it so future users can still reference it.

Sorry for your inconvenience!

Best regards
Nils

Great Nils, happy to help.