Message Boards Message Boards

[✓] Run the entire program in one go after making changes?

GROUPS:

I found that when I make changes in the input cells, I have to run every single calculation that depends on that input. Is there a command by which I can "Run All" the program once I finish the changes?

POSTED BY: Mohamed Hermas
Answer
2 months ago

In the top menu, use "Evaluation->Evaluate Notebook."

POSTED BY: David Keith
Answer
2 months ago

Thank you very much, David.

POSTED BY: Mohamed Hermas
Answer
2 months ago

Would be great to get a shortcut for that!

POSTED BY: Jose Escudero
Answer
2 months ago

I usually do CMD+A to select all cells and then SHIFT+ENTER to evaluate them all one after another. Not ideal but still handy.

POSTED BY: Kapio Letto
Answer
2 months ago

If you want to add a menu shortcut for that you can easily do so by editing this:

FrontEndExecute@
 FrontEnd`FindFileOnPath["MenuSetup.tr", "PrivatePathsTextResources"]

Maybe change this:

MenuItem["Evaluate Notebook", "EvaluateNotebook"]

to this:

MenuItem["Evaluate Notebook", "EvaluateNotebook", 
 MenuKey["Return", Modifiers -> {"Shift"}]]

However, if you're going to be modifying your program often, I'd suggest turning it into a collection of functions, each doing a small thing, and working that way. This is the best approach for larger scale work.

Notebooks are great for linear explorations, reports, small-scale iterative testing, etc. but if you need to change parameters often that will flow through to other calculations, it's best to take a developer point of view.

POSTED BY: Mark Boyer
Answer
2 months ago

Group Abstract Group Abstract