solidworks API to get list of all visible subassemblies

Hi

I wanted to get list of parts and subassemblies in a drawing view via solidworks API . Solidworks API code for drawing view- get visible components- gives only the list of parts and not the assemblies in the view. Is there any method to get the list of parts and assemblies visible in a particular drawing view.

Any help is appreciated.

Thanks in advance.

SolidworksApi/macros