MAXScript Tools and Interaction with 3ds Max > Interacting with the 3ds Max User Interface > Custom User Interface Management >

# CUI Struct - UI Customization

The CUI Struct provides methods and 3ds Max system globals related to the loading and saving of custom user interface files and the management of custom user interface components and modes.

The following methods provide access to Custom User Interface (CUI) files:

    cui.getDir()

Returns the directory of the currently active CUI file as a string.

    cui.getConfigFile()

Returns the currently active CUI file name as a string.

    cui.setConfigFile <filename_string>

Sets the currently active CUI file to the specified file name.

    cui.saveConfig()

Saves the current CUI configuration data to the active .cui file

    cui.saveConfigAs <filename_string>

Saves current CUI configuration data to the specified file. The specified file is made the current CUI file.

    cui.loadConfig <filename_string>

Loads the CUI configuration data from supplied file. The specified file is made the current CUI file.

NoteThe Customize/Load Custom UI Scheme menu item is implemented as a macroScript. This macroScript is called macro_uischeme.mcr in the \ui\macroscripts directory, cui.loadConfig is only part of what needs to be done to switch over to a new UI scheme. The aforementioned macroScript will guide you through the other actions that also need to be performed.

    cui.RegisterDialogBar <RolloutFloater_or_Rollout> [minSize:<Point2>] [maxSize:<Point2>] [style:<Array>]

This method registers a MAXScript window as a dockable CUI window in MAX.

    cui.UnRegisterDialogBar <RolloutFloater_or_Rollout>

This method un-registers a dockable MAXScript window.

See cui.RegisterDialogBar and cui.UnRegisterDialogBar for details.

    cui.DockDialogBar <RolloutFloater_or_Rollout> <dockflag>

This method docks a registered dialog bar to the specified docking area.

    cui.FloatDialogBar <RolloutFloater_or_Rollout>

This method will float a registered dialog bar.

See cui.DockDialogBar and cui.FloatDialogBar for details.

    cui.getDockState <RolloutFloater_or_Rollout>

This method returns the current dock state of the registered dialog bar.

See cui.getDockState for details.

    cui.commandPanelOpen : Booleans

This 3ds Max system global variable lets you get and set whether the command panel is displayed or not.

See Command Panels for details.

    cui.showToolbar <string>

NEW in 3ds Max 2014: Displays the Toolbar specified by name.

Returns True on success, False if the toolbar name does not exist.

EXAMPLE:
    cui.showToolbar "Brush Presets"

    cui.expertModeOn()

Turns expert mode on.

    cui.expertModeOff()

Turns expert mode off.

    cui.getExpertMode()

Returns True of expert mode is on, False if it is off.

    cui.setAppTitle <string>

This method sets the title bar of the main 3ds Max window to the specified string.

Note

The title string will be automatically reset to default on file operations like Reset, New, Open etc.

#### See Also

- Menu and CUI Loading

- Custom User Interface Files

- cui.RegisterDialogBar and cui.UnRegisterDialogBar

- cui.DockDialogBar and cui.FloatDialogBar

- cui.getDockState

- Command Panels