Block Tricks- please advise

IF I have 40 blocks and it’s just one object inside. but they are all unique blocks.

AND I want to change the inside element to a layer. so I can hide/unhide, layer colors etc

IS there a way to do this without going into ea individual block to highlight/change and switch out the layer?

Hello- Try: Combine all into one block. BlockEdit, and run down the list of the internal blocks, highlight in the list, select the object, and modify the layer or what ever, still one at a time but it will be a lot quicker than repeating BlockEdit 40 times.
Then Explode that top level block one level to separate out the 40 again -…Explode, not ExplodeBlock.
And, no, I did not try this.

1 Like

I didn’t try Pascal’s suggestion, but AFAIK, if you don’t want to go one-by-one (especially hard if your block instances are non-uniformly scaled so BlockEdit won’t let you…), this can be done only via script. Luckily, your RhinoScript works now :wink: , so try this:
DIG_BlockObjectsLayers.rvb (4.4 KB)

It works one more complex and nested blocks as well; plus you can either pick block instances or select from the list…

EDIT: Please note, it will only change the layers of objects INSIDE blocks, not the block instances themselves. The instances will stay on their original layers but these are easy to move via Rhino UI.



@jarek excellent.

@pascal. Thanks pascal I will use this often

I do often run into some weird bug when I have multiples of same block inside a main block and when I blockedit and try to individually go into any one of the same block it doesn’t seem to register that it is there…

How to “Select Objects” Layer of multiple blocks

Not sure what you mean but please take a look at Pascal’s instructions. I did not try it yet.

Pascal’s instructions apply only to the layer outside the block.

Layers inside a block cannot be selected.

Not really, in Pascal’s method case, you need to make a parent block from all the blocks you want to deal with, then go child-by-child in the list, highlight, use SelAll command to select all objects of this block, set correct layer, move on to the next. Still a lot of clicking but at least you don’t need to leave the Block Edit model. Or use the script above. It just does it…

You see this picture.

Can’t select layer 1 of multiple blocks

It is not possible in Rhino to select by layer of objects inside of a block, unless you are in BlockEdit mode, then you can select by layer but only objects inside the block you are currently editing.

hi. right. Rhino can’t do it