Go to: Synopsis. Return value. MEL examples.
saveShelf
string string
saveShelf is undoable, NOT queryable, and NOT editable.
This command saves the specified shelf (first argument) to the specified file (second argument).| boolean | True if successful. |
// Create a window with a shelf in it.
//
string $window = `window`;
string $tabs = `tabLayout`;
string $shelf = `shelfLayout`;
shelfButton -image1 "commandButton.xpm" -command ("print \"Hello\\n\"");
tabLayout -edit -tabLabel $shelf "Example Shelf" $tabs;
showWindow $window;
// At this point the example would be made more interesting if you
// put some additional items on this shelf.
// Now save the shelf in the temp directory.
//
string $tempDir = `internalVar -userTmpDir`;
saveShelf $shelf ($tempDir + "ExampleShelf");