MathGroup Archive 2005

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

Search the Archive

how to find packages when using NETLINK


Hi,
Mathematica doesn't find my packages when I call it from Visual C#. In 
fact, the Path variable returns "Null". Here is the code I try:

##############
System.Threading.Thread.CurrentThread.CurrentCulture = new 
System.Globalization.CultureInfo("en-us");

IKernelLink ml = MathLinkFactory.CreateKernelLink("-linkmode launch 
-linkname 'c:\\program files\\wolfram 
research\\mathematica\\4.2\\mathkernel'");

ml.Evaluate("$Path");
ml.WaitForAnswer();
Console.WriteLine(ml.GetObject().ToString());
###############

this throws a System.NullReferenceException.


I also tried to set the Path via
###############
string s = "$Path=Flatten[{\"C:\\Documents and Settings\\Andreas 
Tanner\\My Documents\",  $Path}]";
			ml.Evaluate(s);
###############
but this doesn't work either, that is, a package in that directory 
doesn't load via <<MyPackage.

Any hints?
???

--Andreas


  • Prev by Date: Re: Leading Zeros?
  • Next by Date: Show command trims bitmap edges? (newbie)
  • Previous by thread: Re: my mathematica no longer renders graphics, even after reinstall
  • Next by thread: Re: how to find packages when using NETLINK