Scripting select same block for Rhino for Mac

Any help in writing a quick python command to select all the same block(s)? The block manager on Mac is cumbersome, as is using -selblockinstancenamed.

Blocktools for Mac would be the ideal solution of course :smiley:

Hello - not sure if this is what you need?

import rhinoscriptsyntax as rs

def SelSameBlocks():
    
    id = rs.GetObject('Select a block', 4096, preselect=True)
    if not id:return
    
    ids = rs.BlockInstances(rs.BlockInstanceName(id))
    if ids: rs.SelectObjects(ids)


SelSameBlocks()

-Pascal

1 Like

Perfect, thank you!

As I have you here - any news on make unique/SplitToNewBlock functionality?

Cheers

Ben

Any way of adapting the script so if you select multiple different blocks it selects all instances of them?

Thanks!

Hi - sorry if silly question - how do I load this “select same block” script into Rhino 8? Not familiar with macros, scripting, etc. but this seems to be exactly what I need. Thanks