Cicode Programming Reference > Cicode Function Categories > Page Functions > PageInfo

PageInfo

Gets information about the current page.

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

PageInfo(nType)

nType:

The type of page information required.

0 — Page name.

1 — Page number.

2 — Page title.

3 — Display file name.

4 — Symbol file name.

5 — Next page name.

6 — Previous page name

7 — Previous display count, incremented at each page scan. The page scan rate defaults to the value of the Citect.ini parameter [Page]ScanTime, and can be overridden per page by changing the scan time setting in the General tab of the page properties in Graphics Builder.

8 — Parent window number. Returns -1 if there is no parent.

9 — First child window number. Returns -1 if there are no children.

10 — Next child in child link. Returns -1 for the end of the list.

11 — Window mode (set by the WinNewAt() function).

12 — Width of window. If the target is a pinned window, the return value will represent the width of the window as it is on the unscaled version of the page that hosts it.

13 — Height of window. If the target is a pinned window, the return value will represent the height of the window as it is on the unscaled version of the page that hosts it.

14 — X position of window. If the target is a pinned window, the value will reflect the coordinates for the window based on its location on the unscaled version of the page that hosts it.

15 — Y position of window. If the target is a pinned window, the value will reflect the coordinates for the window based on its location on the unscaled version of the page that hosts it.

16 — Dynamic window horizontal scale.

17 — Dynamic window vertical scale.

Types 16 and 17 return a real number between 0 and 1 (as a STRING) and will be identical, as the dynamic scaling does not allow a change in the aspect ratio.

18 — Flashing color state. Type 18 returns one of the following:

"0" — the palette does not flash.

"1" — the palette is primary now.

"2" — the palette is secondary now.

19 — In animation cycle. Returns a 1 (true) or 0 (false).

20 — In communications cycle. Returns a 1 (true) or 0 (false).

21 — Width of background page.

22 — Height of background page.

23 — Returns the highest AN.

24 — Returns the number of ANs.

25 — Indicates when the page's "On Page Shown" event has been triggered. Returns 1 if triggered, 0 if it has not.

26 — The cluster that has been specified to host the page. Returns the cluster name, or an empty string if no cluster has been specified.

27 — Indicates whether the Cicode library used by the page is different from the currently loaded library. Returns 1 if different, 0 if the versions are the same.

28 — Return X Coordinate of Client rectangle origin.

29 — Return Y Coordinate of Client rectangle origin.

30 — Returns the name of the monitor the current page is displayed on at runtime. For example, in a project where three monitors "Screen 1", "Primary", and "Screen 2" have been configured as part of a multi-monitor screen profile, PageInfo(30) has been set on the monitor named "Left" which means "Left" would be displayed at runtime.

For more information refer to the topic Screen Profiles in the main help.

31 — Returns the "Content Type" configured for that page.

Return Value

The information (as a string).

Related Functions

PageDisplay, PageTransformCoords

Example

! If currently on page "MIMIC1";
Variable=PageInfo(0);
! Sets Variable to "MIMIC1".

Note: Before Citect SCADA 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 PageNumber 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 Citect SCADA.

See Also

Page Functions

Published June 2018