Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Manipulating notebooks. Request for examples

  • To: mathgroup at smc.vnet.net
  • Subject: [mg48393] Manipulating notebooks. Request for examples
  • From: Oleksandr Pavlyk <pavlyk at phys.psu.edu>
  • Date: Fri, 28 May 2004 00:50:21 -0400 (EDT)
  • Organization: Penn State University; Department of Physics
  • Reply-to: pavlyk at phys.psu.edu
  • Sender: owner-wri-mathgroup at wolfram.com

Dear Mathgroupers,

I create a fresh notebook and copy there a content from
another file-based notebook. The handle to the  notebook
is nb. Notebook is created invisible, and is structured
having title section and some chapters.

If I further issue

NotebookFind[nb, "InsertHere", All, CellTags];
SelectionMove[nb, All, CellContents ];
NotebookWrite[nb, "Some data"];
FrontEndTokenExecute[nb, "SelectAll"];
FrontEndTokenExecute[nb, "SelectionCloseAllGroups"];

and then

SetOptions[nb, Visible -> True ];

I find the notebook with every group closed except the one
that contains freshly written data.

But if I first set it visible and then perform manipulations,
the whole title cellgroup is closed.

I wonder if this behavior is natural, or I am doing something wrong.

I am rather new to notebook manipulations so far, so if you maybe
know of some good (a relatively small) example of proper way to
manipulate notebooks I would appreciate the reference. I am
almost confident that such one should be among packages already
shipped with Mathematica but my first attempt to find such failed
short of success.

Documentation on notebooks is far from complete unfortunately. For 
example it never mentions that FrontEndTokenExecute or NotebookFind
can take notebook object as an argument. So good example is very
much needed.

Thank you in advance,
Sasha


  • Prev by Date: Re: removing letters from alphanumeric data
  • Next by Date: RE: removing letters from alphanumeric data
  • Previous by thread: Re: Eigensystem: different solution in V5.0 and V4.1 [SOLVED: BUG in 5.0]
  • Next by thread: [newbie] from right to left