Get a list of all top level groups

I’m trying to write a script that will present a pull-down list of all the top-level groups. My first problem is that I don’t know how to ask DTP for the list. Can someone get me started?


tell application "DEVONthink Pro"
-- Note: record(s) is a shortcut for "children of root"
set theTopLevelGroups to every record of current database whose type is group