Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.6K Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Create a loop that spans sections

Posted 12 years ago

Hello,

I have a created a notebook that is fairly in-depth and contains many sections. The sections are there more as documentation than anything else.

At the beginning of the notebook, I import data and use that data for the rest of the notebook. At the end, the notebook generates a document with the relevant results.

What I would like to do is create a loop that spans the entire notebook (i.e. spans multiple sections) for multiple sets of data and get multiple documents. Is it possible to do this with the sections intact? If I need to remove the sections, what is a good way to leave the documentation intact?

Thank you.

POSTED BY: will
2 Replies
Posted 12 years ago

David,

Thanks for the help. The tagging suggestion seemed like a lot of work.

After messing around with the second suggestion, it worked like a charm after I realized how to pass the info to the notebook doing the work. In my case the loop looks like:

Do[(work = testList[[i]][[1]]; NotebookEvaluate["\\folder\newTest.nb"];), {i, 1, Length[files]}]

where work is the variable I used in the evaluated notebook.

Thanks again, William

POSTED BY: will
POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard