Baking from Grasshopper using C# script

What about specifying which layer you are baking to? And delete by layer? And materials?

This is done with Python: