I'm trying test on calling mathematica function from .NET application by running demo application MathKernelApp.exe which could be located at

C:\Program Files\Wolfram Research\Mathematica\11.2\SystemFiles\Links\NETLink\Examples\Part2\MathKernelApp\bin\Release

when a simple code invoked


the graphics shown immediately, found below, but this code is invoked not.


enter image description here and this code works in Notebook but not in the demo .net app.


If the picture or image of CurrentImage[] could be caputured, how the result(s) of CurrentImage[]//Dynamic shall be acquired in this case?

I've tried to modify some Properties of MathLink and re-compile the .net project, it still not work. but the upper codes' results executed in notebook seems the same form, is there any thing should be improved with the .NETLink?



I've found the problem of the demo .net project. some lines' codes should be modified properlly to enable the kernel sending result.

mathKernel.ResultFormat = Wolfram.NETLink.MathKernel.ResultFormatType.TraditionalForm;


//resultBox.Text = (string)mathKernel.Result;
this.graphicsBox.Image = (Image)mathKernel.Result;

Then re-compile the demo project and run it.The MathLink source for NETLink .net side should be read through to make best use of it.

C:\Program Files\Wolfram Research\Mathematica\11.2\SystemFiles\Links\NETLink\Source

The code CurrentImage[] works too, but CurrentImage[]//Dynamic not.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.