The visual maxscript editor has issues... doesn't make nice code and is generally useless. So instead I made this...
Visit my facebook page for more info
Run the mcr file and find it in your customise user interface windows under 'DW Tools'
Version 1_0 - Release
Version 1_1 - Bug fixed which could allow nested groups, which maxscript doesn't like and would therefore crash.
Version 1_2 - Released unencrypted so that it works in 3dsmax 2017 and well... because who doesn't like to learn (judge) from other people's code....