Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: programatically feed Mathematica kernel location to MathKernel.Connect Method ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg47800] Re: [mg47786] programatically feed Mathematica kernel location to MathKernel.Connect Method ?
  • From: Todd Gayley <tgayley at wolfram.com>
  • Date: Tue, 27 Apr 2004 04:46:54 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

At 01:42 AM 4/26/2004, cdj wrote:
>Hi all,
>
>I'm calling the mathematica kernel from c#, and I'm getting sick of
>entering the location of the mathematica kernel everytime I wanna
>perform a computation.
>
>I'd like to search the registry for a mathematica install, get the
>directory path to the kernel, and feed that path the Connect method
>(that seems like a good plan, at any rate). This way, when connect (or
>compute) is called, the whole open-kernel-dialog business is done away
>with, and the kernel is loaded without further input from the user.


That is already the default behavior for .NET/Link. If you call 
MathLinkFactory.CreateKernelLink() with no arguments, it automatically 
launches the Mathematica kernel. Same thing if you call 
MathKernel.Connect() with no arguments. You can even skip the call to 
Connect() and just have the kernel launched the first time you call Compute().

If you are calling MathKernel.Connect() with no arguments, you should not 
see a dialog box asking you to find the kernel. Try launching the 
MathKernelApp example program 
(NETLink\Examples\Part2\MathKernelApp\bin\Debug\MathKernelApp.exe) and see 
if you also see a dialog box. If you do, contact me directly and we can 
determine what it is about your installation of Mathematica that is causing 
the automatic search mechanism to fail.



Todd Gayley
Wolfram Research


  • Prev by Date: Re: Parametric Plot
  • Next by Date: RE: bug in IntegerPart ?
  • Previous by thread: Re: Re: FindRoot cannot find obvious solution
  • Next by thread: i don't understand mapping function over a long list