Dynamo Advance Steel Role to layer


Hello, I’m trying to create a Dynamo script that retrieves the roles of Advance Steel parts and assigns them to a layer with the same name. For example, a plate with the attached role, once selected, changes its layer to be in the attached layer.
I don’t know if I’m being very clear, but I can explain again if more details are needed.
I’m attaching an image of my beginnings. This is my first time working with Dynamo.