## SwitchToViewByType

### Introduced

v4.0

### Description

Makes the specified view in a docked layout visible if it's hidden. For example, you can use this command to change the main toolbar from the Toolbar Panel to the Weight Paint Panel or the Palettes Panel.
You specify the type of the view (you can get it from the SIObject.Type property of the View object) to identify it. Alternatively, you can use the SwitchToView command, which allows you to pick from multiple instances of one view type by using its SIObject.Name instead. Note: This command cannot switch between any of the toolbar menus on the Toolbar Panel. However, you can use this command with the Type argument set to "Toolbar Panel" to open the toolbar panel and then use the SwitchToolbar command to switch between toolbar menus (Model, Animate, Render, Simulate, and Hair).

### Scripting Syntax

    SwitchToViewByType( ViewType );

### Parameters

Parameter | Type | Description
--- | --- | ---
ViewType | String | Type of the view to display (see the OpenView command for a list of possible values).

### Examples

#### VBScript Example

    '
    ' This example opens the Palettes Panel, then the Toolbar Panel, then switches
    ' to the Simulate and then Hair menus on that panel. (It happens so fast
    ' that you can't really see it well in the UI, but you can run each line
    ' individually to see each result.)
    '
    SwitchToViewByType "Palettes"
    SwitchToViewByType "Toolbar Panel"
    SwitchToolbar 4
    SwitchToolbar 5

### See Also

SwitchToView OpenView SwitchToolbar OpenXSIExplorer OpenAnimationEditor OpenTransientExplorer OpenNetView Layout.CreateView