MathGroup Archive 2009

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

Search the Archive

how to use vb.net/netlink to export a dxf file

  • To: mathgroup at smc.vnet.net
  • Subject: [mg101747] how to use vb.net/netlink to export a dxf file
  • From: jonk <jkontuly at gmail.com>
  • Date: Thu, 16 Jul 2009 08:17:02 -0400 (EDT)

I am trying to write a vb.net program that connects to Mathematica,
performs some computation that results in a curve and exports that
curve as a dxf file. I thought the code below would work as I modified
some code I found on this site (discussion: how to save a mathematica-
made imagebox.image as jpg, gif, bmp in c#/.netlink? )

any help would be greatly appreciated. I am new to mathematica so in
case it helps to understand why I am trying to do this. I am an
architect using a 3d parametric modeling program that can execute
vb.net programs. the idea is to extend the program by using
mathematica to generate more complex curves. It could be especially
useful now that mathematica can export NURBS curves and surfaces. Very
exciting. Thanks again.

' This launches the Mathematica kernel:
    Dim ml As IKernelLink = MathLinkFactory.CreateKernelLink()

    ml.Evaluate("SetDirectory[\""C:/Documents And Settings/User/
Desktop/\""]")
    ml.WaitForAnswer()

    ml.Evaluate("gr = Plot[ Sin[x], {x, 0, 2*Pi}]")
    ml.Evaluate("Export[\""testMATH.dxf\"",gr, \""DXF\""]")
    ml.Close()


  • Prev by Date: Re: Add syntax highlighting to own command
  • Next by Date: Re: Add syntax highlighting to own command
  • Previous by thread: Re: Standard deviations and Confidence intervals with respect to errors
  • Next by thread: Re: how to use vb.net/netlink to export a dxf file