Cicode Programming Reference > Cicode Function Categories > Page Functions Introduction > PageDisplay

PageDisplay

Displays a graphics page in the active window. The page needs to be in one of the operator's current areas. The page to be displayed is identified by its Page Name or the Page Number.

When this function is executed, it tests whether or not the identified page is based on a CSV_Include project template. If it is, the function uses TaskNew to run a CSV version of the PageDisplay function, "CSV_MM_PageDisplay". This confirms if multi-monitor support is required. As TaskNew is used to execute this function, no return value becomes available to PageDisplay. Under these circumstances, PageDisplay will return zero (0).

If this function is called to change the page in a pop-up window of a CSV_Include project, the page displayed by the base window will change. To change this default behaviour, set the [Page]NewPageInBase parameter to 0. Then a pop-up window can be changed with this function in single monitor mode.

You can specify if the page operates within the context of a particular cluster in a multiple cluster project. When the page launches during runtime, the ClusterName argument is used to resolve any tags that have a cluster omitted.

CitectSCADA stores the current page (onto a stack) before it displays the required page. You can call PageLast() to re-display the pages on the stack.

You cannot call this function from the Exit command field (see Page Properties) or a Cicode Object.

Note: This function is not supported in the server process in a multiprocessor environment. Calling this function from the server process results in a hardware alarm being raised.

Syntax

PageDisplay(Page,[ClusterName])

Page:

The name or page number of the page to display (in quotation marks ""). Can be prefixed by the name of a host cluster, that is "ClusterName.Page". This will take precedence over the use of the ClusterName parameter if the two differ.

ClusterName:

The name of the cluster that will accommodate the page at runtime (in quotation marks ""). The specified cluster is used to resolve any tags that have a cluster omitted. If the Page parameter is prefixed with the name of a cluster, this parameter will not be used. This parameter is optional, however if you omit a cluster context in the Page properties, then any tags which omit an explicit Cluster. TagName will be ambiguous and become unresolved if you have multiple clusters defined in the project.

Return Value

0 (zero) if the page is successfully displayed, otherwise an error is returned.

If the page is based on a CSV_Include project template, the function will return 0 (zero) as a CSV version of the function is executed via TaskNew.

Related Functions

PageGoto, PageLast

Example

Buttons

Text

Mimic Page

Command

PageDisplay("Mimic")

Comment

Display the "Mimic" page

System Keyboard

Key Sequence

Page ############## Enter

Command

PageDisplay(Arg1)

Comment

Display a specified page

PageDisplay("MIMIC1");
! Displays page "MIMIC1".
PageDisplay("MIMIC2");
/* Displays page "MIMIC2" and places page "MIMIC1" onto the PageLast stack. */
PageDisplay("10");
/* Displays page "10" and places page "MIMIC2" onto the PageLast stack. */
PageLast();
/* Displays the last page on the stack, that is page "MIMIC2" and removes it from the stack. */

Note: Before CitectSCADA version 5.0, page records could be edited in the Project Editor. One of the fields available for configuration was "Page Number". The value entered for a page could then be used in runtime with the Page Cicode functions such as PageDisplay(), PageGoto(), and PageInfo(1).
For example, PageDisplay("1") can be used to display the page that has "1" (without the quotes) set in the Page Number field. PageInfo(1) returns the Page Number of the current page.
From version 5.0 on, this feature is only backwards-supported. The "Alias" field in the project Pages.DBF file still contains the Page Numbers from upgraded projects; however, the Pages database records are no longer available for direct editing in CitectSCADA.

See Also

Page Functions

Cluster Context

Improved Client Side Online Changes