MathGroup Archive 2003

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

Search the Archive

Re: Evaluate one notebook from within another

  • To: mathgroup at
  • Subject: [mg43526] Re: [mg43515] Evaluate one notebook from within another
  • From: jmt <jmt at>
  • Date: Fri, 19 Sep 2003 03:41:49 -0400 (EDT)
  • Organization: dxdydz
  • References: <>
  • Reply-to: jmt at
  • Sender: owner-wri-mathgroup at

  > 	1. I can open a notebook "X.nb" from within another notebook
  > "A.nb" by putting into A,nb the expression
  > NotebookOpen["C:\............\X.nb"]. How do I make the default path
  > the one to where all my notebooks are, so I can leave out the explicit
  > path statement? (Just use a variable for the path and use StringJoin?)

Set your working directory to the directory containing A.nb. Answers to this 
questions (two solutions) have been posted last week.

  > 	2. How do I make X.nb evaluate with an expression in A.nb?
  > When I want to open and evaluate all the files in my job, I don't want
  > to have to evaluate them all manually.

Tag the cell containing the expression you want to evaluate, and use the 
FrontEnd functions to locate and then evaluate this cell.

  > 	3. Or am I going about this all wrong? I want to split all the
  > code in my job into sensible functional files and execute them easily.

Write packages. Have a look at Roman Maeder's package template

  • Prev by Date: Re: Convert all graphics to reduce file size?
  • Next by Date: Re: Comparing regression slopes?
  • Previous by thread: Evaluate one notebook from within another
  • Next by thread: Mathematica 5.0 for students.