# How to control layers when exporting an SVG

**URL:** <https://discourse.processing.org/t/how-to-control-layers-when-exporting-an-svg/21758>\
**Category:** Processing.py\
**Created:** [June 11, 2020, 2:56am UTC](https://discourse.processing.org/t/how-to-control-layers-when-exporting-an-svg/21758 "2020-06-11T02:56:49Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Post date:** [June 13, 2020, 9:50pm UTC](https://discourse.processing.org/t/how-to-control-layers-when-exporting-an-svg/21758/6 "2020-06-13T21:50:24Z")

</div>

Inkscape adds its own embellishments to the standard SVG format, including attributes to define layers. Add these two `inkscape:`-prefixed attributes to your Processing code:

```auto
    ...
    group.set('id', svg)
    group.set('inkscape:groupmode', 'layer')
    group.set('inkscape:label', svg)
    ...

```

BTW, I’m in the process of ordering an AxiDraw (A3) right now. Thanks to you, I’m learning how it works before I’ve even got my hands on it 😃

---

_[View the full topic](https://discourse.processing.org/t/how-to-control-layers-when-exporting-an-svg/21758)._
