> Script Details
Selection Memory - save and restore selection sets
report inappropriate content
Jan 20 2009
Status of work
ArcScripts is intended for the free exchange of scripts and tools related to ESRI software products. Please alert the moderator if this script is a demo, trial-version, or an advertisement for a retail product.
Save the current selection set, such that it can be restored again later.
This code will write any selected features, in all layers, to memory. The selection set can then be restored by reading in the features from memory.
To use, add some layers to the map then select some features from one or more layers. Display the Selection Memory toolbar, then use the Save Selection Set button to write the selected features to memory.
Change the selection set, then restore the previous selection using the Restore Selected Features button.
This code will honour the Interactive Selection Method, meaning that the saved selection can be added to the current selection set, selected from within it, etc. The current layer selectablity is also honoured, so if (for example) a layer was selectable when the selection set was saved, but is no longer selectable, it will not be selected by the Restore button.
Original coding - 26th July, 2006
Updated to handle annotation, migration to 9.2 - 13th March, 2008
Please report any problems or comments via the Contact Author option at http://arcscripts.esri.com/details.asp?dbid=14670