Go to: Synopsis. Return value. Flags. MEL examples.

Synopsis

deleteUI [-collection] [-control] [-editor] [-layout] [-menu] [-menuItem] [-panel] [-panelConfig] [-radioMenuItemCollection] [-toolContext] [-uiTemplate] [-window] string [string...]

deleteUI is undoable, NOT queryable, and NOT editable.

This command deletes UI objects such as windows and controls. Deleting a layout or window will also delete all of its children. If a flag is used then all objects being deleted must be of the specified type. This command may not be edited or queried.

NOTE: it is recommended that the type flags be used to disambiguate different kinds of objects with the same name.

Return value

None

Flags

collection, control, editor, layout, menu, menuItem, panel, panelConfig, radioMenuItemCollection, toolContext, uiTemplate, window
Long name (short name) Argument types Properties
-window(-wnd) create
Object names for deletion are all windows.
-layout(-lay) create
Object names for deletion are all layouts.
-control(-ctl) create
Object names for deletion are all controls.
-menu(-m) create
Object names for deletion are all menus.
-menuItem(-mi) create
Object names for deletion are all menu items.
-collection(-cl) create
Object names for deletion are all radio or tool collections.
-uiTemplate(-uit) create
Object names for deletion are all UI templates.
-radioMenuItemCollection(-ric) create
Object names for deletion are all radio menu item collections.
-panel(-pnl) create
Object names for deletion are all panels.
-editor(-ed) create
Object names for deletion are all editors.
-toolContext(-tc) create
Object names for deletion are all tool contexts.
-panelConfig(-pc) create
Object names for deletion are panel configurations.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

//    Example 1.
//
//    Create a simple window and then delete it and all of its children
//    with one 'deleteUI -window' command.
//
string $window = `window`;
paneLayout;
button;
showWindow $window;

deleteUI -window $window;

//    Example 2.
//
//    Create a window with a number of buttons and delete a few of the
//    buttons with the 'deleteUI -control' command.
//
string $window = `window`;
columnLayout;
string $b1, $b2, $b3;
button; button; button;
$b1 = `button`;
$b2 = `button`;
$b3 = `button`;
showWindow $window;

deleteUI -control $b1 $b2 $b3;