Use layer name when exporting

Try with a - before _ViewCaptureToFile like-_ViewCaptureToFile
Test this first in rhino. Then you can see a lot of settings.
If you want to continue or exit the function use _Enter

Hope this helps.