How to get multiple selection information using macro?

I created a macro to print a drawing when I select a part. My next step is to update the macro so that I can print the drawing when I select multiple parts/assemblies.

How to get the information of what parts/ assemblies that I have been selected in the assembly tree?

I attached the macro in this message

Thanks

SolidworksApi macros