# Select each object that was a block exploded. Help?

**URL:** <https://discourse.mcneel.com/t/select-each-object-that-was-a-block-exploded-help/198252>\
**Category:** Rhino\
**Tags:** windows, selection, blocks, modeling, layers\
**Created:** [January 22, 2025, 2:09pm UTC](https://discourse.mcneel.com/t/select-each-object-that-was-a-block-exploded-help/198252 "2025-01-22T14:09:06Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gustavo\_Soares\_Silva](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gustavo_soares_silva/32/512213_2.png) [@Gustavo\_Soares\_Silva](https://discourse.mcneel.com/u/Gustavo_Soares_Silva)\
**Post date:** [January 22, 2025, 2:09pm UTC](https://discourse.mcneel.com/t/select-each-object-that-was-a-block-exploded-help/198252/1 "2025-01-22T14:09:07Z")

</div>

Hello. I have this situation where I imported an external file into Rhino, and everything came in as blocks. The blocks had different layers from the geometry inside them. For instance, my furniture blocks are on the “Furni” layer, but the geometry inside those blocks is on the “Terrain” layer. I need to place both the blocks and the internal geometry on the same “Furni” layer.

What I did was explode the blocks and change their layer, but now I need to group them again. It’s very tedious to manually select each piece of furniture, especially those surrounded by other furniture.

Is there a command to select connected geometries or a way to explode these blocks as groups? Ideally, each piece of furniture that was a block would become a group, allowing me to edit their internal layers without having to go into each block individually.

Edit:

UPDATED FILE:  
[furniproblem.3dm](https://discourse.mcneel.com/uploads/short-url/xwAObHtjrTuDnQu2Wgq6UIHBWJI.3dm) (14.4 MB)

---

<div class="post-metadata">

**Author:** ![wim](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/wim/32/747482_2.png) [@wim](https://discourse.mcneel.com/u/wim)\
**Post date:** [January 23, 2025, 8:20am UTC](https://discourse.mcneel.com/t/select-each-object-that-was-a-block-exploded-help/198252/2 "2025-01-23T08:20:21Z")

</div>

Hi Gustavo -

> [@Gustavo\_Soares\_Silva](#):
>
> [furnigrouping.3dm](https://discourse.mcneel.com/uploads/short-url/jJB4wSBTitkFhyrCdb47Jr2As37.3dm) (14.2 MB)  
> Heres the file…

That file doesn’t contain any blocks, so it’s hard to tell what to do.

When you want to move the geometry in a block definition to a different layer, you can go into block edit mode and move the objects to that different layer.  
-wim

---

<div class="post-metadata">

**Author:** ![Gustavo\_Soares\_Silva](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gustavo_soares_silva/32/512213_2.png) [@Gustavo\_Soares\_Silva](https://discourse.mcneel.com/u/Gustavo_Soares_Silva)\
**Post date:** [January 23, 2025, 1:21pm UTC](https://discourse.mcneel.com/t/select-each-object-that-was-a-block-exploded-help/198252/3 "2025-01-23T13:21:02Z")

</div>

Oh, man, sorry. I made it the manual way and saved as the “problem” file… When I finish this project I’ll replicate that situation again.

This block edit mode don’t work in this case. Imagine I have 50 blocks, i’ll have to enter and change layer for each of this blocks. Its a time consuming workflow… Or I’m wrong and there is a way to block edit all 50 blocks in the same time?

---

<div class="post-metadata">

**Author:** ![wim](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/wim/32/747482_2.png) [@wim](https://discourse.mcneel.com/u/wim)\
**Post date:** [January 23, 2025, 1:31pm UTC](https://discourse.mcneel.com/t/select-each-object-that-was-a-block-exploded-help/198252/4 "2025-01-23T13:31:58Z")

</div>

Hi Gustavo -

> [@Gustavo\_Soares\_Silva](#):
>
> Imagine I have 50 blocks

I don’t know if that means block definitions or block instances.

> [@Gustavo\_Soares\_Silva](#):
>
> When I finish this project I’ll replicate that situation again.

Looking forward to a file.  
-wim

---

<div class="post-metadata">

**Author:** ![Gustavo\_Soares\_Silva](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gustavo_soares_silva/32/512213_2.png) [@Gustavo\_Soares\_Silva](https://discourse.mcneel.com/u/Gustavo_Soares_Silva)\
**Post date:** [January 24, 2025, 2:17pm UTC](https://discourse.mcneel.com/t/select-each-object-that-was-a-block-exploded-help/198252/5 "2025-01-24T14:17:32Z")

</div>

> [@wim](#):
>
> I don’t know if that means block definitions or block instances.

Instances. I really must learn this differences!

> [@Gustavo\_Soares\_Silva](#):
>
> Edit:
> 
> UPDATED FILE:  
> [furniproblem.3dm](https://discourse.mcneel.com/uploads/short-url/xwAObHtjrTuDnQu2Wgq6UIHBWJI.3dm) (14.4 MB)

I have edited the primary post with the updated file 😃

---

<div class="post-metadata">

**Author:** ![Tom\_P](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/tom_p/32/766520_2.png) [@Tom\_P](https://discourse.mcneel.com/u/Tom_P)\
**Post date:** [January 24, 2025, 2:41pm UTC](https://discourse.mcneel.com/t/select-each-object-that-was-a-block-exploded-help/198252/6 "2025-01-24T14:41:08Z")

</div>

**quick and dirty**  
more a macro with a loop than a script…

save all open documents  
save document to work on with new name.

open  
\_scripteditor  
copy paste below and run

```auto
#! python3
import rhinoscriptsyntax as rs
rs.EnableRedraw(False)
rs.Command("_selNone")
rs.Command("_selBlockInstance")
objs = rs.SelectedObjects(False,False)
for obj in objs:
    rs.Command("_selNone")
    rs.SelectObject(obj);
    rs.Command("_explode")
    newObjs = rs.SelectedObjects(False,False)
    if (len(newObjs) > 1):
        rs.Command("_group")
rs.EnableRedraw(True)

```

---

<div class="post-metadata">

**Author:** ![Gustavo\_Soares\_Silva](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gustavo_soares_silva/32/512213_2.png) [@Gustavo\_Soares\_Silva](https://discourse.mcneel.com/u/Gustavo_Soares_Silva)\
**Post date:** [January 24, 2025, 2:49pm UTC](https://discourse.mcneel.com/t/select-each-object-that-was-a-block-exploded-help/198252/7 "2025-01-24T14:49:38Z")

</div>

Oh man, you are a genius! Thanks a lot. That was so beautiful to see running. I should learn programing to do crazy stuff like this. Is Python the best language to learn to use in rhino?

> [@Tom\_P](#):
>
> save all open documents  
> save document to work on with new name.

Why the saving? It can crash the software?

---

<div class="post-metadata">

**Author:** ![Tom\_P](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/tom_p/32/766520_2.png) [@Tom\_P](https://discourse.mcneel.com/u/Tom_P)\
**Post date:** [January 24, 2025, 2:57pm UTC](https://discourse.mcneel.com/t/select-each-object-that-was-a-block-exploded-help/198252/8 "2025-01-24T14:57:22Z")

</div>

> [@Gustavo\_Soares\_Silva](#):
>
> Python the best language

Python offers probably the best ratio of effort to result.  
Personally I prefer c# - but maybe just because I use it for plug-in development.  
There are a few topics about this - search the forum if you want to know more.

> [@Gustavo\_Soares\_Silva](#):
>
> Why the saving

just if something goes wrong, you will not lose data, and not hate me.  
there might be some special cases where the macro stops or never stops - there is no error checking…

---

<div class="post-metadata">

**Author:** ![Gustavo\_Soares\_Silva](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gustavo_soares_silva/32/512213_2.png) [@Gustavo\_Soares\_Silva](https://discourse.mcneel.com/u/Gustavo_Soares_Silva)\
**Post date:** [January 24, 2025, 8:42pm UTC](https://discourse.mcneel.com/t/select-each-object-that-was-a-block-exploded-help/198252/9 "2025-01-24T20:42:00Z")

</div>

understood, thank you, ill search about

---

<div class="post-metadata">

**Author:** ![nickkim](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/nickkim/32/604747_2.png) [@nickkim](https://discourse.mcneel.com/u/nickkim)\
**Post date:** [February 3, 2025, 8:44am UTC](https://discourse.mcneel.com/t/select-each-object-that-was-a-block-exploded-help/198252/10 "2025-02-03T08:44:55Z")

</div>

Hi Gustavo,

I noticed your issue seems to be resolved, but I wanted to share an alternative solution that might work well for similar situations. We encountered a similar problem during our work, which led us to develop a specific command for cases like this.

When a block is created, it is assigned to the active layer at that moment. Even if you copy or move it to another layer, the block components still belong to the original layer. While working with the parent layer turned on can be a workaround, it often causes confusion, especially when you need to edit objects separately.

The **ExplodeBlockInSameLayer** command helps in such cases. It allows you to explode a block while keeping its geometry on the designated layer. If you first organize furniture (or other objects) by layer while they are still blocks, you can later explode them without the hassle of manually reassigning each piece, making the process much more efficient.

This command is part of **byrhinogadget** , a free Rhino plugin that includes many useful tools. You can install it via **Food4Rhino** or by searching for “byrhinogadget” in Rhino’s **Package Manager**.

Below are the introduction page and a demo video:  
🔗 Plugin introduction page: [Free plugin - byRhinoGadget](https://discourse.mcneel.com/t/free-plugin-byrhinogadget/193581)  
📺 YouTube video: [https://www.youtube.com/watch?v=1E5\_0Mjc6lA&ab\_channel=byRhino3D](https://www.youtube.com/watch?v=1E5_0Mjc6lA&ab_channel=byRhino3D)  
(The video is in Korean, but you can enable automatic English subtitles for better understanding.)

I hope this suggestion is helpful! Let me know if you have any questions. 😊

---

<div class="post-metadata">

**Author:** ![Gustavo\_Soares\_Silva](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gustavo_soares_silva/32/512213_2.png) [@Gustavo\_Soares\_Silva](https://discourse.mcneel.com/u/Gustavo_Soares_Silva)\
**Post date:** [February 3, 2025, 12:24pm UTC](https://discourse.mcneel.com/t/select-each-object-that-was-a-block-exploded-help/198252/11 "2025-02-03T12:24:41Z")

</div>

I liked what I saw with this plugin. Already downloaded and will try with the next modelling i’ll start. Thanks a lot for your contribution. Many great features with this plugin 😮 and already uptaded for rhino 8!

---

<div class="post-metadata">

**Author:** ![nickkim](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/nickkim/32/604747_2.png) [@nickkim](https://discourse.mcneel.com/u/nickkim)\
**Post date:** [February 4, 2025, 12:26am UTC](https://discourse.mcneel.com/t/select-each-object-that-was-a-block-exploded-help/198252/12 "2025-02-04T00:26:27Z")

</div>

That’s great to hear! If you run into any issues, feel free to let us know. There are many other useful commands in **byrhinogadget** , so exploring them might be helpful too!

---

<div class="post-metadata">

**Author:** ![spb](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/spb/32/635310_2.png) [@spb](https://discourse.mcneel.com/u/spb)\
**Post date:** [February 10, 2025, 4:46pm UTC](https://discourse.mcneel.com/t/select-each-object-that-was-a-block-exploded-help/198252/13 "2025-02-10T16:46:18Z")

</div>

> [@Gustavo\_Soares\_Silva](#):
>
> a way to explode these blocks as groups?

[\_ExplodeBlock](https://docs.mcneel.com/rhino/8/help/en-us/commands/explode.htm#ExplodeBlock) has a GroupOutput option. It appears to create groups only for top level instances, not for nested instances.
