Does not work with Rhino 5 (64) sr13
I started reworking another script. If anyone would be interested, then go here.