I have not looked into this in detail but I think that you will want to look at the lower level db* commands such as dbCreateFigGroup and dbAddFigToFigGroup - this is essentially what the other command is doing: creating a fig group and putting the selected figures in that group. Create a procedure that creates a fig group and then adds each of the selected figures to that fig group in turn.
Any time you see a "Hi" in the name of a command, or "hi" as the prefix, this is short for "human interface" and typically would involve some interaction with the user through a form, menu, bindkey etc. In this case the function has a "le" prefix which indicates it is for the layout editor tool and then the Hi part of the name suggests that it will invoke or need a form to gather further input from the user.
Hopefully this information helps.