# Changing Shelves through MEL?

**URL:** https://forum.highend3d.com/t/changing-shelves-through-mel/857
**Category:** Maya
**Tags:** mel
**Created:** [October 23, 2009, 1:37pm UTC](https://forum.highend3d.com/t/changing-shelves-through-mel/857 "2009-10-23T13:37:29Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rgkovach](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/r/13edae/32.png) [@rgkovach](https://forum.highend3d.com/u/rgkovach)
#### Post date: [October 23, 2009, 1:37pm UTC](https://forum.highend3d.com/t/changing-shelves-through-mel/857/1 "2009-10-23T13:37:29Z")

</div>

is it possible to switch which shelf is the active/visible shelf in a shelfTablayout through a MEL command?

I am looking into a way to tell maya which shelf I would like active when it starts up.

Thanks.

p.s. I looked into the prefs for Maya and tried to force a particular shelf to the top of the list, but it didn't seem to stick from session to session.

---

<div class="post-metadata">

### Author: ![thnkr](https://forum.highend3d.com/user_avatar/forum.highend3d.com/thnkr/32/115_2.png) [@thnkr](https://forum.highend3d.com/u/thnkr)
#### Post date: [October 23, 2009, 2:47pm UTC](https://forum.highend3d.com/t/changing-shelves-through-mel/857/2 "2009-10-23T14:47:17Z")

</div>

Here's an example&nbsp; [http://thnkr.com/wiki/index.php?title=Select\_a\_shelf\_tab\_with\_MEL](http://thnkr.com/wiki/index.php?title=Select%5C_a%5C_shelf%5C_tab%5C_with%5C_MEL)

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [October 24, 2009, 8:21am UTC](https://forum.highend3d.com/t/changing-shelves-through-mel/857/3 "2009-10-24T08:21:24Z")

</div>

shelfTabLayout -edit -selectTab "Curves" $gShelfTopLevel;

Is probably more intuitive than the index based approach.

Be sure to eval the commands deferred if you execute them in the userSetup.mel as the shelf isnt built yet when userSetup is called.
