Re: Names[] for definitions in the current window/notebook?
- To: mathgroup at smc.vnet.net
- Subject: [mg28876] Re: Names[] for definitions in the current window/notebook?
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Thu, 17 May 2001 04:22:48 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <9dnrmc$svp@smc.vnet.net> <XfiM6.12442$UE4.70076@ralph.vnet.net> <9dtbg4$fb6@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
BTW: The correct way to find out if a symbol has a
value that is a graphics would be
lst = ToExpression /@ ("Hold[" <> # <> "]" & /@ Names["Global`*"]);
hasGraphData =
Select[lst,
MemberQ[{Graphics, Graphics3D, SurfaceGraphics, DensityGraphics,
ContourGraphics}, Head[ReleaseHold[#]]] &];
(*and save the graphics *)
Export[#1 <> ".eps", #2,
"EPS"] & @@@ ({StringDrop[StringDrop[ToString[#], 5], -1],
ReleaseHold[#]} & /@ hasGraphData)
Regards
Jens