how to find top level assembly using Document Manager API

is there a way - built into the API of SolidWorks or the Document Manager - to find a Top Level Assembly from a list of assemblies in a folder?

SolidworksApi macros