omron — PrintWindow

Appendix: Built-in Scripting Language Note: This function cannot be used with Tasks or in the Global Procedures script. Syntax PrintWindow( strScreenName , optNumOrientation , optNumID , optStrMnemonicList ) strScreenName The name of the screen to be printed. If this parameter is omitted, then the currently active screen will be printed. (This parameter must be omitted when executing the function on a Windows Embedded target system.) optNumOrientation A numeric flag specifying the paper orientation: Default value is 0. Note: The optNumOrientation parameter is not supported when running the project on a Windows Embedded target system. optNumID The specific instance number of the screen.

(The ID is assigned when the screen is opened with the Open function.) This is an optional parameter; the default ID is 0. optStrMnemonicList A string that describes how the custom properties of any generic objects or linked symbols in the screen will be completed when the screen is printed. This string has the following syntax… # Label : Value …where Label is the name of the property and Value is the tag, expression or literal value that the property will receive. You can declare two or more mnemonics, as long as they are separated by spaces. See the Examples section below for an example. Note:

The optStrMnemonicList parameter does not work for a screen that is already open; if the screen has been opened, then the custom properties have already received their default values. Returned value This function does not return any value. Examples Tip: You can use this function to print graphical reports that include Alarm/Event Control and Trend Control objects. Page 540 InduSoft Web Studio Value Description 0 Portrait 1 Landscape Tag Name Expression PrintWindow( ) // Prints the currently active screen in portrait orientation. PrintWindow( "Main", 1 ) // Prints the "Main" screen in landscape orientation. PrintWindow( TagScreenName ) // Prints the screen specified by TagScreenName.

PrintWindow( "Main", 1, 10 ) // Prints the "Main" screen with ID 10. PrintWindow ( "Main", 1, 0, "#Mne1:Tag1 #Mne2:Tag2" ) // Prints the "Main" screen, replacing the custom properties Mne1 and Mne2 with Tag1 and Tag2, respectively.