Select mulpitle sub-assemblies

I found the attached macro posted by Josh Brady a few years ago and it works great. If you select one component it will select the parent subassembly. I was wondering if it could be modified (and how to modify it) so I could select 2 or 3 different components from different subassemblies and have it select the different subassemblies? My plan is to add isolate to the end of the macro so I have the 3 subassemblies shown with one click.

Thanks in advance,

Mark

SolidworksApi macros