Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Re: InitializationCellEvaluation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27312] Re: InitializationCellEvaluation
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Tue, 20 Feb 2001 03:05:21 -0500 (EST)
  • References: <96irk4$ddk@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

J:)rgen,

Some ideas,

nbe := Notebook[
 {Cell[BoxData[MakeBoxes[Print[XXX]]], "Input",
  InitializationCell->True]
    },
    Background -> RGBColor[.9, .9, 0.8],
    AutoGeneratedPackage->None
];

nbo=NotebookPut[nbe];

NotebookSave[nbo,"C:\\WINDOWS\\Desktop\\ZZZ.nb"]

NotebookClose[nbo]

FrontEndExecute[
    FrontEndToken[
      NotebookOpen["C:\\WINDOWS\\Desktop\\ZZZ.nb"],
      "EvaluateInitialization" ]
    ];

---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"jü" <juergen.ecker at algebra.uni-linz.ac.at> wrote in message
news:96irk4$ddk at smc.vnet.net...
> I've written a nb containing some initialization cells and set the nb and
> global options such that the initialization cells are automatically
> evaluated as soon as the nb is opened. it works fine, if I open the nb
> manually, but if I open it from inside another nb using NotebookOpen, the
nb
> is opened, but the initialization cells are not evaluated. What am I doing
> wrong?
>
> J:)rgen
>
>
>




  • Prev by Date: avoiding neg values in NDSolve
  • Next by Date: page breaks ?
  • Previous by thread: InitializationCellEvaluation
  • Next by thread: non-linear system