NewNotebook
NewNotebook [flags ] [as titleStr ]
The NewNotebook operation creates a new notebook document.
Parameters
the optional titleStr is a string containing the title of the notebook window.
Flags
| /FG=(gLeft, gTop, gRight, gBottom ) | |||||||||||
| Specifies the frame guide to which the outer frame of the subwindow is attached inside the host window. | |||||||||||
| The standard frame guide names are FL, FR, FT, and FB for the left, right, top, and bottom frame guides, respectively, or user-defined guide names as defined by the host. Use * to specify a default guide name. | |||||||||||
| Guides may override the numeric positioning set by /W. | |||||||||||
| /HOST=hcSpec | Embeds the new notebook in the host window or subwindow specified by hcSpec. The host window or subwindow must be a control panel. Graphs and page layouts are not supported as hosts for notebook subwindows. | ||||||||||
| When identifying a subwindow with hcSpec, see Subwindow Syntax for details on forming the window hierarchy. | |||||||||||
| See Notebooks as Subwindows in Control Panels for more information. | |||||||||||
| /ENCG=textEncoding | textEncoding specifies the text encoding for the new notebook. This determines the text encoding used for later saving the notebook to a file. | ||||||||||
| See Text Encoding Names and Codes for a list of accepted values for textEncoding. | |||||||||||
| This flag was added in Igor Pro 7.00. | |||||||||||
| This flag is relevant for plain text notebooks only and has no effect for formatted notebooks because formatted text notebooks can contain multiple text encodings. See Plain Text File Text Encodings and Formatted Text Notebook File Text Encodings for details. | |||||||||||
| If you omit /ENCG or pass 0 (unknown) for textEncoding , the notebook's text encoding is determined by the default text encoding - see The Default Text Encoding for details. | |||||||||||
| For most purposes, UTF-8 (textEncoding =1) is recommended. Other values are available for compatibility with software that requires a specific text encoding. This includes Igor Pro 6 which uses MacRoman (textEncoding =2), Windows-1252 (textEncoding =3) or Shift-JIS (textEncoding =4) depending on the operating system and localization. | |||||||||||
| This flag has an optional form that allows you to control whether the byte order mark is written when the notebook is later saved to disk. It applies to Unicode text encodings also. The form is: | |||||||||||
/ENCG = {textEncoding, writeBOM} | |||||||||||
| If you use the simpler form or omit /ENCG entirely, the notebook's writeBOM property defaults to 1. | |||||||||||
| See Byte Order Marks for background information. | |||||||||||
| /F=format |
| ||||||||||
| /K=k | Specifies window behavior when the user attempts to close it. | ||||||||||
| |||||||||||
| /N=winName | Sets the notebook's window name. | ||||||||||
| /OPTS=options | Sets special options. options is a bitwise parameter interpreted as follows: | ||||||||||
| |||||||||||
| All other bits are reserved for future use and are currently ignored. Pass zero for all reserved bits. | |||||||||||
| If /OPTS is omitted, all bits default to zero. | |||||||||||
| See Setting Bit Parameters for details about setting bits. | |||||||||||
| /V=visible |
| ||||||||||
| /W=(left,top,right,bottom) | |||||||||||
| Sets window location. Coordinates are in points for normal notebook windows. | |||||||||||
| When used with the /HOST flag, the specified location coordinates can have one of two possible meanings: | |||||||||||
| |||||||||||
Details
A notebook has a file name, a window name, and a window title. In the simplest case these will all be the same.
The file name is the name by which the operating system identifies the notebook once it is saved to disk. When you initially create a notebook, it is not associated with any file. However it still has a file name. This is the name that will be used when the file is saved to disk.
The window name is the name by which Igor identifies the window and therefore the name you specify in operations that act on the notebook.
The window title is what appears in the window's title bar. If you omit the title, NewNotebook uses a default title which is the same as the window name.
If you specify the window name and the notebook format and omit the window title, this is the simplest case. NewNotebook creates the document with no user interaction. The file name, window name and window title will all be the same. For example:
NewNotebook/N=Notebook1/F=0
If you omit the window name NewNotebook chooses a default name (e.g., Notebook0) and presents the standard New Notebook dialog.
If you omit the format or specify a format of -1 (either plain or formatted text), NewNotebook presents the standard New Notebook dialog. For example::
NewNotebook/N=Notebook1 // no format specified