Re: Automatic grouping of animation cells
- To: mathgroup at smc.vnet.net
- Subject: [mg19144] Re: Automatic grouping of animation cells
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Thu, 5 Aug 1999 23:58:46 -0400
- Organization: University of Western Australia
- References: <7obah4$3pq@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
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): > > >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"] I am puzzled. Paul Hinton's code behaves exactly as you describe your code working, i.e., it groups the graphics output and then collapses it, showing only the first frame. And your code does not work for me. I suspect that the problem is either that you are not using Cell | Cell Grouping | Automatic Grouping or that you have modified the CellGroupingRules for Graphics cells in your StyleSheet. ____________________________________________________________________ Paul Abbott Phone: +61-8-9380-2734 Department of Physics Fax: +61-8-9380-1014 The University of Western Australia Nedlands WA 6907 mailto:paul at physics.uwa.edu.au AUSTRALIA http://physics.uwa.edu.au/~paul God IS a weakly left-handed dice player ____________________________________________________________________