Hi David, try this and let me know if it does what you want:
1. make a new button in a toolbar (hold down CTRL and drag an existing button)
2. hold down SHIFT and right-click the new button to edit its macro
3. in the 'Left mouse button command' text box, paste the following
Code:
! _-RunScript (
Dim objects, object, layer
objects = Rhino.GetObjects("Select objects to rename")
If IsArray(objects) Then
For Each object In objects
layer = Rhino.ObjectLayer(object)
Rhino.ObjectName object, layer
Next
End If
)
4. click OK to stop editing the button's macro
5. left-click the new button
6. you will be prompted to select some objects
7. after you do that, the names of the selected objects will be changed to their layer names