| Author |
Comment/Response |
jf
|
07/30/12 10:54am
NotebookEvaluate[nb] does what you want, but has subtleties. It returns to the main notebook outputs wrapped in Print and the last output of the sub-notebook.
For example:
sub-notebook contains
======
Print["subnotebook starting"]
Plot[Sin[x], {x, 0, 2 Pi}]
Pause[1]; Print["subnotebook almost finished"]
Plot[Cos[x], {x, 0, 2 Pi}]
======
then
NotebookEvaluate["/temp/sf29537subnb.nb"]
Pause[1]; Print["main notebook finished"]
in the main notebook returns
=====
subnotebook starting
subnotebook almost finished
(Cos plot)
main notebook finished
=====
See http://reference.wolfram.com/mathematica/ref/NotebookEvaluate.html
URL: , |
|