Re: How to call a notebook via a mathlink connection
- To: mathgroup at smc.vnet.net
- Subject: [mg21032] Re: How to call a notebook via a mathlink connection
- From: Rainer Schmid <schmid at humanmodeling.tecmath.com>
- Date: Sun, 12 Dec 1999 23:51:03 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Hi!
On 1 Dec 1999, P.J. Hinton wrote:
> >I've got following task to solve: I need to start a notebook from a C
> >program and execute a computation. The main problem is that it must be a
> >notebook. I have no problem to call a Mathematica package; but this won't do
> >it.
> >[...]
> >Any ideas what I can do?
>
> Why do you need work with the notebook directly Do you plan to have
> the notebook serve as a container of the results?
Our customer wants to use notebooks not as a container for the results but
as an extra interface for user-input (before the computation starts).
> It is possbile
> to read a complete notebook expression into the kernel, pattern match
> for all cells that have "Input" style and then evaluate the box forms.
I think I will manage to read a notebook into the kernel (at the moment
I don't understand your code but I think that I solved this problem by
using the frontend interactively). My problem at the moment is that I have
to start the frontend because of the notebooks. And I don't know how to
get a link to the kernel. If I try to communicate with the frontend I get
no returnpackets.
> nbExpr = Get[< notebook file >]
> inputCells = Cases[nbExpr, Cell[_, "Input", ___], -1];
> Map[ToExpression, inputCells]
Bye, Rainer.
--
Rainer Schmid Human Modeling
phone: ++49.6301.606.348 TECMATH AG
email: schmid at tecmath.de Sauerwiesen 2
67661 Kaiserslautern, Germany