Re: Automatic grouping of animation cells
- To: mathgroup at smc.vnet.net
- Subject: [mg19182] Re: Automatic grouping of animation cells
- From: adam.smith at hillsdale.edu
- Date: Tue, 10 Aug 1999 02:52:44 -0400
- Organization: Deja.com - Share what you know. Learn what you don't.
- References: <7obah4$3pq@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
This is an addition to my previous post.
As already pointed out by Paul Abbot, my difficulties with P.J.
Hinton's formulation were that I had inadvertantly turned Cell Grouping
to Manual. With Cell Grouping | Automatic, his method works. In my
testing, I have found that the method I described works with either the
Automatic or Manual setting while his only works with the Automatic
setting.
Adam Smith
In article <7obah4$3pq at smc.vnet.net>,
adam.smith at hillsdale.edu wrote:
> Awhile back someone wanted asked how to automatically close a large
> number of graphics cells produced for animations. P.J. Hinton replied
> with the following (cut from the archives):
>
> >> Is there a way to automatically close the group of cells for a 100+
> >frame
> >> animation?
>
> >When is the group of cells to be closed?
>
> >Are you generating a large number of graphics and then attempting to
> >close the group of cells after the graphics are generated through
some
> >programmatic matter?
>
> >If so, you could do something like this little code snippet.
> >
> >Do[Plot[Sin[2 Pi f t], {t,0,1}],{f,1,5}];
> >SelectionMove[EvaluationNotebook[], After, EvaluationCell];
> >SelectionMove[EvaluationNotebook[], Next, CellGroup];
> >FrontEndTokenExecute["OpenCloseGroup"]
>
> Well, this works in closing all the cells and leaving only the input
> visible. But what I wanted to do was to group the graphics output and
> then collapse it, thus showing only the first frame. Thanks to the
> above I started playing around and came up with what I hope is a
useful
> solution to others:
>
> Do[Plot[Sin[2 Pi f t], {t,0,1}],{f,1,5}];
> SelectionMove[EvaluationNotebook[], All,GeneratedCell];
> FrontEndTokenExecute["CellGroup"]
> FrontEndTokenExecute["OpenCloseGroup"]
>
> It worked really well when I had a complicated Graphics[ ] expression.
>
> Adam Smith
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.