Layout.CreateView

Description

Creates a new View object. The new view is a temporary view and not attached to this layout; therefore saving the layout will not make the new view part of the layout either.

Note: Some types of views can only have a single instance, for example the "View Manager" and "Script Editor". If the view is already existing inside the current layout or as a floating view then this method will not create a new instance, and will return the existing view.

Scripting Syntax

oReturn = Layout.CreateView( ViewType, ViewName );

Return Value

View

Parameters

Parameter Type Description
ViewType String The type of view to create. All available types can be found in the .xsivw and .xsitb files under the Application\Views and Application\Toolbars folders located in the standard factory, user and workgroup locations.
ViewName String Required string providing the name of the view.

Important: Blank characters found in the view name, such as space and tabs, are converted to underscores ("_").

Examples

JScript Example

// Create a new Explorer view
var layout = Application.Desktop.ActiveLayout;
var v = layout.CreateView( "Explorer", "My explorer" )
v.Move( 10, 10 )

See Also

OpenView OpenNetView