Can't delete block if it is nested in other blocks

When you open the Blockmanager and select the block and hit the Delete button you will get a question IF the block isn’t used in nested blocks:
image

Does that do the trick for you?

IF it is in a nested block definition you will get this:
image

Why Rhino thinks it is unable to delete those is beyond me, because it is easy to run through all block definitions and edit their content in code. If this is done just once on all definitions it would purge all levels of multi leveled nested blocks too since each level IS another block.

@Gijs do you know who’s lap this would fall into?

2 Likes

hi @Holo I don’t see why this could not work either but maybe I am missing something.
RH-81715 BlockManager: can’t delete blocks that are nested in other blocks

3 Likes

Hi @Holo,

I’m struggling to think of a use case where you would want to start a chain of deletions from the nested block. Every time I come up with one I end up thinking “No, I put that there for a reason - I need to do [some alternative] in the outer block.” If I start by deleting the inner block then I lose the pointers to all the outer blocks that contained it, so I might miss some of the alternatives.

This isn’t to say the need is not there, rather that I’m not imaginative enough to find examples that drive it. If you have time, can you help me out?

Regards
Jeremy

Piggy-backing on this thread to suggest the same feature be available with managing blocks with layers

It would be nice to have something like “deep-select-all-objects-on-layer” that highlights all objects (including those nested, hidden, or locked) on a layer. If a block is on that layer, its bounding box would be highlighted.

Similarly, something like “deep-delete-layer” that would remove layers nested in blocks

Additional to the above ideas it would be extremely useful to “show only” preview what could be deleted if click delete/yes.

Its a quite a maintain to climb with complex files especially when working on someone else’s file

I often import large architecture files and there furniture blocks can be nested together in other blocks that we want to delete. And thus it would be nice to be able to delete say all chairs also those nested into diner blocks. I see that this could lead to empty blocks so these needs to be purged automatically… I hadn’t thought of that though.

Another scenario would be that I want to keep all bolts in a mechanical assembly, but I would like to delete all washers and nuts… but then I am left with a blocks containing just a block of the bolt… another not so good scenario… (Thinking while I’m typing here as you probably figured)

So yeah… I guess there isn’t a clean path forward for this just now.

@gijs you have any thoughts on this?

I guess Rhino would have to ask if we want to continue and then delete possible empty blocks or explode blocks IF we delete content and thus leaving the higher level block with only one nested block.

I don’t see any harm in the potentiality of empty blocks. I find it highly annoying if I want to do something, know it is possible, but the request is refused.

1 Like

Good point. Thanks for chiming in.