How to create a command tab popupmenu

Hello,

I want to create a menu on a commandTab like the one in the picture - a menu with submenus. How can this be done?

Thanks

SolidworksApi macros