MathGroup Archive 2012

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

Search the Archive

Fwd: Evaluation of a whole notebook from another one

OK, here is a routine I wrote before v8 came out, perhaps it will help:

(* Pre Mathematica v8 routine to evaluate notebooks in companion directory \
(likely equivaent to v8's NotebookEvaluate *)
evaluateNB[name_String, debug_Symbol: True] := Module[{path, nb},
   path = FileNameJoin[{NotebookDirectory[], name}];
   If[debug, Print["evaluating Notebook: ", path]];
   nb = NotebookOpen[path];
   If[True,(* pre Mathematica v8:
    evaluation was queued for later *)
    SelectionMove[nb, All, Notebook];
   If[False,(* post Mathematica v8:
    immediate evaluation *)

On Sat, Aug 4, 2012 at 9:42 AM, Dr. Robert Kragler <kragler at
> wrote:

> **
> Hi,
> yes you are right, but this command is only available from Mathematica version 8,
> not in version 7 for which I have written my code (the procedures comprise
> more than 3000 lines and it is not trivial to use it in version 8). What I
> need is a workaround for version 7.
> Thanks for your reply and your interest in this matter.
> Regards
>                  Robert Kragler
> Am 04.08.2012 18:14, schrieb James Stein:
> You do indeed  "miss"  a command such as NotebookEvaluate.
> Mathematica has a command by that exact name!
> It appears to do just what you desire...
> --
> Dr. Robert Kragler
> Email : kragler at
> URL :

  • Prev by Date: Re: Why no OSX SystemDialogInput["RecordSound"]?
  • Next by Date: Re: How to Extract Conditional Expression?
  • Previous by thread: Re: Evaluation of a whole notebook from another one
  • Next by thread: Re: Evaluation of a whole notebook from another one