I have the code in Mathematica nb.file and I want to use it in my VB application via Net/Link.
Is there any way how to use the code from nb.file directly? For example like I will execute the code in Mathematica via VB?
Asked
Active
Viewed 480 times
2

oers
- 18,436
- 13
- 66
- 75

user1658430
- 21
- 1
1 Answers
1
One way would be to construct a string with something like the following instructions and send it to the mathkernel Compute function within .NET:
Needs["JLink`"];
$FrontEndLaunchCommand = "Mathematica.exe";
UseFrontEnd[nb = NotebookOpen["C:\\Temp\\run.nb"];
SelectionMove[nb, Next, Cell];
SelectionEvaluate[nb];];
Pause[10];
CloseFrontEnd[];

Community
- 1
- 1

Chris Degnen
- 8,443
- 2
- 23
- 40