MathGroup Archive 2008

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

Search the Archive

Re: Executing external notebook

  • To: mathgroup at
  • Subject: [mg92771] Re: Executing external notebook
  • From: Vince Virgilio <blueschi at>
  • Date: Mon, 13 Oct 2008 06:16:31 -0400 (EDT)
  • References: <gcq09i$c30$>

On Oct 11, 6:48 am, pdin... at wrote:
> I have a really trivial question, but nevertheless am stuck.
> Within a notebook file, how do I execute an external notebook and keep
> all the results in memory?
> For example I have 5 files,
> main1.nb
> main2.nb
> main3.nb
> main4.nb
> main5.nb
> each of which must call
> common.nb
> which contains code that is common to all 5 main files.
> It seems like this should be easy to do but I cannot find an
> appropriate command (Get seems like it is intended for this purpose,
> but perhaps I am not using it correctly).

I frequently do something similar to this. NotebookGet[] (http:// and nearby
functions should serve you well. Further, you can even do
substitutions on the expression returned from NotebookGet[] for
presentation-level batch programming. Bottom line is that it's
worthwhile to learn about the notebook programming functions.

This is not to the exclusion of packages, which others have advised. I
advocate those as well. However, I've found notebook programming and
packages strongly complement each other.

Vince Virgilio

  • Prev by Date: Re: Variable amount of Buttons in Mathematica
  • Next by Date: Re: Getting rid of those deprecated Do[] loops?
  • Previous by thread: Re: Executing external notebook
  • Next by thread: Re: Executing external notebook