# Customizing Label Export

**URL:** <https://forum.audacityteam.org/t/customizing-label-export/48274>\
**Category:** General Audio Programming\
**Created:** [February 13, 2018, 4:36am UTC](https://forum.audacityteam.org/t/customizing-label-export/48274 "2018-02-13T04:36:30Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![steve](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://forum.audacityteam.org/u/steve)\
**Post date:** [February 14, 2018, 4:04am UTC](https://forum.audacityteam.org/t/customizing-label-export/48274/7 "2018-02-14T04:04:25Z")

</div>

> [@Muxson](#):
>
> Pulling the track name automatically would be a great time-saver, for sure.

This is the code to create a label at the current selection, using the selected track name as the label text:

```plaintext
(let ((start (get '*selection* 'start))
      (end (get '*selection* 'end))
      (trackname (get '*track* 'name)))
  (list (list 0 (- end start) trackname)))

```

To turn this into a plug-in effect, you would just need to add plug-in headers (see: [Missing features - Audacity Support](http://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference#Nyquist_Plug-in_Header))

> [@Muxson](#):
>
> Would it be possible to use it automatically as the filename?

No, because the file name is created when you export the labels, and that’s all coded into Audacity.

---

_[View the full topic](https://forum.audacityteam.org/t/customizing-label-export/48274)._
