Building Blocks - Save DS selections from multi-compound SD file

This script is an example of how multiple compounds in a single .sd file can be processed, and then output to a single multi-compound .msv file.
Compare the syntax here to the related script, which loops through multiple .sd files and writes out individual .msv files:
Building Blocks - Save DS selections from all SD files in a folder.pl

Also, see how this can be used as a perl-on-server component in the following protocols:

Run Ligand Pharmacophore Mapping and save selected mapped atoms to a multi-compound .msv file

and

Run Ligand Pharmacophore Mapping and save selected mapped atoms to individual .msv files

===========================================================================================================

Save this script to a local directory or location accessible from the DS Files Explorer