Script to insert random block

Anyone willing to help me with a simple script I can assign to a button / command? I have no scripting skills to speak of.

The script would:
1.) Count the number of blocks in the file = N
2.) Generate a random integer X between 1 and N
3.) Runs the Insert command using block X
4.) User can then place the box as desired.

Hi @Matt6,

Drag and drop the attached script on top of a running Rhino. Then run “InsertRandom”.

InsertRandom.rvb (1.2 KB)

– Dale

Dale. Thanks! It will be a few days yet until I can try it out but am excited to do so.