Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to run/call a Mathematica Notebook from another Notebook

776 views
Skip to first unread message

Prash

unread,
Aug 13, 2006, 6:07:22 AM8/13/06
to
HI,

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

say, I want Notebook A and B to be executed and then Notebook C. How do
I run/call Notebooks A and B from C ?

Regards,
Prashanth

Jean-Marc Gulliet

unread,
Aug 14, 2006, 7:12:41 AM8/14/06
to
For example,

nb= NotebookOpen["C:\\Program Files\\Wolfram
Research\\Mathematica\\5.2\\AddOns\\Applications\\WebServices\\Examples\\WolframWebSearch.nb"];
SelectionMove[ nb, All, Notebook]
SelectionEvaluate[nb]
NotebookClose[nb]

Check section 2.11.3 "Manipulating Notebooks from the Kernel" of _The
Mathematica Book_,
http://documents.wolfram.com/mathematica/book/section-2.11.3

HTH,
Jean-Marc

Jens-Peer Kuska

unread,
Aug 16, 2006, 3:51:30 AM8/16/06
to
Hi,

the classic way is to mark *all* input in notebook A and B
as initialization, when you save the notebooks, the FrontEnd will
ask you to generate a *Package* from the initialization cells
and you should say "yes". Now you can call
Get["A.m"];
Get["B.m"]
in notebook C and you are done ...

Regards
Jens

0 new messages