How to rename bodies in part as an example

Hello,

I have part with a large number of bodies, I need to rename them, as you can see on attached example.

http://s7.postimg.org/4zpzzdua3/example.jpg

xxx = the user enters

yyy = -||-

first number = number of layer (ascending order)

second number = number of body in layer

I have macro which rename all visible bodies. But I need to keep only first layer visible, use macro, insert xxx,yyy and first number (1), then repeat with second layer, etc.

Any better idea how to rename these bodies faster?

I hope you could understand what I wrote.

SolidworksApi macros