Exporting security usergroups

Hi Team,

In AX2009 .I want to export the security groups of particular user ( .asg) file . There is a code in X++ to do that . I have done that but after the refresh its all gone.

I need this as this user has 64 usergroups and We are converting all the permissions of these 64 usergroups into 1 Usergroup.

Please help

Thanks

Manoj