Create new layer and set as current

The following sample shows how to create new layer in Rhino document and set as current using a layer name as an input. Download Grasshopper definition (BakeToLayer.ghx)