MathGroup Archive 2003

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

Search the Archive

Re: Evaluate one notebook from within another

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

  > 	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
(AddOns/ExtraPackages/ProgrammingInMathematica/template.nb).


  • 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.