MathGroup Archive 2005

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

Search the Archive

Re: Newbie question Re: C# and Mathematica via NETLink

  • To: mathgroup at
  • Subject: [mg54138] Re: Newbie question Re: C# and Mathematica via NETLink
  • From: "Hans Michel" <hmichel at>
  • Date: Fri, 11 Feb 2005 03:34:15 -0500 (EST)
  • References: <cuf4gf$gi1$>
  • Reply-to: "Hans Michel" <hmichel at>
  • Sender: owner-wri-mathgroup at


You want to add a reference to the .NET/Link in your project.

With visual studio you can Browse many objects, but until it is part of you 
project (include) you can't truly use it.

Create a Windows Application project. Under "Project" > Add Reference,  find 
and choose MathKernel  (Wolfram.NETLink) namespace.

If you need design time tools such as the MathPictureBox, 
DoubleBufferedPanel, MathKernel etc.. you can add component to your toolbox. 
When you drag and drop these components on you Form  it will add the proper 
reference to your project and will add the appropriate windows form designer 
generated code. You can look at that code for examples of how to initialize 
this object yourself.

There should be sample files with your Mathematica installation  look under


Additionally the .NETLink API Help files contains all the info you need. 
Look under the Mathematica Help Browser Add-ons & Links > Part 2 ...:
Use links to examples and API help.

That's it.


<forge666spamisbad at> wrote in 
message news:cuf4gf$gi1$1 at
> Hi-
> I am trying to call Mathematica from C# using NETLink.  I am using NETLink
> version 1.1 and can call a "ConsoleWindow" that creates a new Windows form
> with a title NETLink 1.1.  I note through my object browser in Microsoft
> Visual Suite that MathPictureBox and DoubleBufferedPanel are accessible.
> These are all members of Wolfram.NETLink.IU.
> I cannot access access any of the members of Wolfram.NETLink such as
> IKernelLink, IMathLink, etc.
> My question:
> Don't I need access to members of Wolfram.NETLink, such as IKernelLink in
> particular, to call Mathematica expressions?  There do not appear to be 
> ways
> to do this through the three members of Wolfram.NETLink.IU.
> Any comments suggestions or examples of code calls for a 
> WindowsApplication
> under C# would be apprecited
> Thanks,
> Rail

  • Prev by Date: Re: Domain and range
  • Next by Date: Re: Re: finding package in ExtraPackages`Enhancements`
  • Previous by thread: Re: Newbie question Re: C# and Mathematica via NETLink
  • Next by thread: Probable answer to a mystery