Skip to main content

NewLayout

NewLayout [=(r,g,b[,a]) /C=color /HIDE=h /K=k /N=name /P=orientation /W=(left,top,right,bottom)] [as titleStr ]

The NewLayout operation creates a page layout.

Unlike the Layout operation, NewLayout can be used in user-defined functions. Therefore, NewLayout should be used in new programming instead of Layout.

NewLayout just creates the layout window. Use AppendLayoutObject to add objects to the window.

Parameters

The optional titleStr parameter is a string expression containing the layout's title. If not specified, Igor will provide one which identifies the objects displayed in the graph.

Flags

/B=(r,g,b[,a])Specifies the background color for the layout. r, g, b, and a specify the the color and optional opacity as RGBA Values. The default is opaque white.
/C=colorOnScreen
Obsolete. In ancient times, this flag switched the screen display of the layout between black and white and color. It is still accepted but has no effect.
/HIDE=hHides (h = 1) or shows (h = 0, default) the window.
/K=kSpecifies window behavior when the user attempts to close it.
k =0:Normal with dialog (default).
k =1:Kills with no dialog.
k =2:Disables killing.
k =3:Hides the window.
k =4:Kills with no dialog and is not saved with the experiment.
If you use /K=2 or /K=3, you can still kill the window using the KillWindow operation.
/N=nameRequests that the layout have this name, if it is not in use. If it is in use, then name0, name1, etc are tried until an unused window name is found. In a function or macro, S_name is set to the chosen layout name.
If /N is not used, a name of the form "Layoutn ", where n is some integer, is assigned. In a function or macro, the assigned name is stored in the S_name string. This is the name you can use to refer to the page layout window from a procedure. Use the RenameWindow operation to rename the window.
/P=orientationSets the orientation of the page in the layout to either Portrait or Landscape (e.g., Layout/P=Landscape). See Details below.
/W=(left,top,right,bottom)
Gives the layout window a specific location and size on the screen. Coordinates for /W are in points.

Details

When you create a new layout window, if preferences are enabled, the page size is determined by the preferred page size as set via the Capture Layout Prefs dialog. If preferences are disabled, as is usually the case when executing a procedure, the page is set to the factory default size.

See Also

AppendLayoutObject, RemoveLayoutObjects, ModifyLayout