Author Topic: Programmatically preloading data and configurations  (Read 6651 times)

Ron D.

  • Administrator
  • Newbie
  • *****
  • Posts: 39
    • View Profile
Programmatically preloading data and configurations
« on: April 20, 2015, 09:58:04 PM »
Hi All,

If you have many datasets to load, particularly when there are repetitive tasks involved in Sliver such as selecting variables, brushing ranges of lines in different colors and perhaps hiding some brushes, and particularly when you want to set specific ranges on the axes, it may be useful to programmatically perform all these functions.

This can be done (and has been done by at least one user) with a script that writes each of your datasets and its Sliver configuration into a session file that can then be "restored" in Sliver. Session files are normally created through the File-->Save Session menu option and then restored through the File-->Restore Session menu option. However, the session file is simply a text file, and you can create your own custom session files for your data. The session file format for Sliver v1.2 is described in Appendix C of the Sliver v1.2 User's Manual. It includes not only the data but also the any selections, brushing or visible/hidden attributes for the data.

Another advantage of the session file is that the last n lines of it provide the minimum and maximum ranges of each axis (assuming there are n axes), so this allows you to customize the ranges as well. In fact, even without scripting it can be handy to save a session file and then edit the last n lines to whatever axis ranges you want before restoring it.

Ron