0

I've looked around the website and the documentation but I've had no success. The task is simple: I'm looking for a Mathematica command that evaluates all the initialisation cells in a given notebook, not necessarily at startup.

I'm imagining something along the lines of CellEvaluateAll["InitialisationCells"] (this is of course pseudocode) but I can't even find relevant documentation on this.

Is there any built in way to achieve this?

OldTomMorris
  • 607
  • 3
  • 10
  • If you look at the bare menu on top of the notebook, you can go and click on the Evaluation option and you scroll you will find the option Evaluate Initialization Cells. Are you looking for something different than that? –  Feb 07 '20 at 08:39
  • 1
    @Darth_Bane Yes. I'm looking for an in-line command. – OldTomMorris Feb 07 '20 at 08:42
  • 1
    Is this the answer: https://mathematica.stackexchange.com/q/26123/5478? – Kuba Feb 07 '20 at 08:45
  • @Kuba I don't believe so. Am I right in saying that this does not allow me to evaluate the initialisation cells in the actual notebook that I'm working in? I have tried but cannot get it to work. – OldTomMorris Feb 07 '20 at 09:21
  • 3
    FrontEndTokenExecute["EvaluateInitialization"]; – Kuba Feb 07 '20 at 09:25
  • I think that's what I'm looking for! If you add it as an answer, I can accept it. – OldTomMorris Feb 07 '20 at 09:30

0 Answers0