comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: restore all but ! variables
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: restore all but ! variables [message #60629] Thu, 29 May 2008 14:04 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
Jeremy Bailin wrote:
> Does anyone know of a convenient way of restoring the contents of a
> SAVEd file created using /ALL that will restore everything except for
> system variables (ie. anything starting with !)? I have some old .sav
> files from a different system with a different file structure, and
> doing a simple RESTORE over-writes things like !PATH that really need
> to be from the new system.

I think the IDL_Savefile class should be able to do what you want, but
the "everything else" needs to be enumerated i.e. regular variables
and common blocks should be sufficient:

IDL> save, /all, filename='all.sav'
IDL> exit
~$ idl
IDL> savfile = obj_new('idl_savefile', filename='all.sav')
IDL> savfile->restore, savfile->names(), /verbose ; regular
variables
IDL> savfile->restore, savfile->names(/common_block), /common, /
verbose ; common blocks
IDL> obj_destroy, savfile

Mike
--
www.michaelgalloy.com
Tech-X Corporation
Software Developer II
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: widget, draw and file pickup
Next Topic: Javabridge trial

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:22:50 PDT 2025

Total time taken to generate the page: 0.00437 seconds