Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

how to find packages when using NETLINK

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54343] how to find packages when using NETLINK
  • From: Andreas Tanner <tanner at ivs.tu-berlin.de>
  • Date: Sat, 19 Feb 2005 02:31:43 -0500 (EST)
  • Organization: Technische Universitaet Berlin, Deutschland
  • Sender: owner-wri-mathgroup at wolfram.com

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