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)



1 Like

Perfect, thank you!

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



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