# Merge Layers

**URL:** <https://discourse.mcneel.com/t/merge-layers/86322>\
**Category:** Rhino for Mac\
**Created:** [July 17, 2019, 12:57pm UTC](https://discourse.mcneel.com/t/merge-layers/86322 "2019-07-17T12:57:52Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Karim\_tabbara](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/karim_tabbara/32/764834_2.png) [@Karim\_tabbara](https://discourse.mcneel.com/u/Karim_tabbara)\
**Post date:** [January 3, 2024, 12:36am UTC](https://discourse.mcneel.com/t/merge-layers/86322/7 "2024-01-03T00:36:30Z")

</div>

Hi Pascal and all ones looking for a merge layer that works with blocks

I finally managed to script a “full” merge layers from both or your scripts

Script Process

- Choose Source layers that will be merged
- Choose a unique target layer
- All Source Layers are merged to target
- All Source Layers in blocs and nested blocks are merged to target
- Prompt “Yes No” to Purge empty layers

I would LOVE to add an option for a complete layer deletion, even in nested blocks…  
Enjoy (and help if possible)  
Best regards

Test file and script  
[MergeLayersAndBlockLayers\_v01.py](https://discourse.mcneel.com/uploads/short-url/uSfjx7F91chnfiVD8jFiEizBXW.py) (2.4 KB)

[block\_script\_layer01\_00.3dm](https://discourse.mcneel.com/uploads/short-url/rQ4WG3qI7NlN5tzXx242j9juNr1.3dm) (351.1 KB)

---

_[View the full topic](https://discourse.mcneel.com/t/merge-layers/86322)._
