COMException using getVariable from MLApp Matlab class on c#

68 Views Asked by At

I'm using MLApp for a .net framework project that uses WPF, and I'm able to run matlab commands, but when I try to use the getVariable function I get the following exception:

System.Runtime.InteropServices.COMException (0x80020009) en System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData) en MLApp.DIMLApp.GetVariable(String Name, String Workspace)

I changed the matlab settings and now that doesn't work. But before these changes, it was working fine, so I think it's a problem of the matlab setup I have.

How do I have to configure Matlab and .Net to fix it?

I have Matlab 2022b runtime, I registred COM server, and i used the command dotnetenv('framework') and the .net framework is loaded.

0

There are 0 best solutions below