Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

How to run/call a Mathematica Notebook from another Notebook?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92981] How to run/call a Mathematica Notebook from another Notebook?
  • From: "P.Wholey" <p.wholey at gmail.com>
  • Date: Wed, 22 Oct 2008 05:36:39 -0400 (EDT)

Hi, dear friends!

I want to use b.nb to run a.nb.

in a.nb, the codes are:

Export["1.png", Plot[BesselJ[0, x^2], {x, 0, 5}], "PNG"]

in b.nb, I used the Jean-Marc codes (see
http://groups.google.com/group/comp.soft-sys.math.mathematica/browse_thread/thread/7a65e3b985ec2ba1/f3d67aee7c6d9b80?lnk=gst&q=notebook#f3d67aee7c6d9b80):

nb= NotebookOpen["a.nb"];
SelectionMove[ nb, All, Notebook]
SelectionEvaluate[nb]
NotebookClose[nb]

I ran the a.nb directly, and I got the exported 1.png.

Then I ran the b.nb. I saw the a.nb had been run and then closed, but
I can not get the 1.png.

Any ideas, thanks!


  • Prev by Date: Re: Speeding up a list construction
  • Next by Date: initialize cells
  • Previous by thread: Re: Is it possible to reverse "Color Schames" function ?
  • Next by thread: initialize cells