# Add a layer in a wall structure

**URL:** <https://forum.dynamobim.com/t/add-a-layer-in-a-wall-structure/9098>\
**Category:** Developers\
**Created:** [January 24, 2017, 11:07am UTC](https://forum.dynamobim.com/t/add-a-layer-in-a-wall-structure/9098 "2017-01-24T11:07:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sergio\_Atero](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sergio_atero/32/5760_2.png) [@Sergio\_Atero](https://forum.dynamobim.com/u/Sergio_Atero)\
**Post date:** [January 24, 2017, 11:07am UTC](https://forum.dynamobim.com/t/add-a-layer-in-a-wall-structure/9098/1 "2017-01-24T11:07:02Z")

</div>

Hi everyone,

I have a set of walls and I want to add a new structure layer to all of them. I can’t found a method in API to add layer at index, so I tried to get the orignal layers, set in a list, add my layer and set to wall again, but I lost information (e.g. what layers are external or internal)

csLayers = list()  
layers= cs.GetLayers()

for l in layers:  
if(cont == layerIndex):  
csLayers.append(layerMaterial)   
csLayers.append(l)  
cont = cont + 1

cs.SetLayers(csLayers)

Any idea about another aproach to solve the problem?

Thanks

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [January 25, 2017, 10:12am UTC](https://forum.dynamobim.com/t/add-a-layer-in-a-wall-structure/9098/2 "2017-01-25T10:12:54Z")

</div>

I think it would be much easier to set a new type to your elements, like so:

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/1/216f30655baff4d3e981606459a65049a3d1b055.JPG)
