Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'SelectionEvaluate' topicStudent Support Forum > General > "SelectionEvaluate"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
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: ,

Subject (listing for 'SelectionEvaluate')
Author Date Posted
SelectionEvaluate xlr8t 07/27/12 1:34pm
Re: SelectionEvaluate Michael 07/30/12 07:37am
Re: Re: SelectionEvaluate xlr8t 07/30/12 7:09pm
Re: SelectionEvaluate jf 07/30/12 10:54am
Re: Re: SelectionEvaluate xlr8t 07/30/12 7:11pm
Re: Re: Re: SelectionEvaluate jf 07/31/12 11:08am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic