Cicode Programming Reference > Cicode Function Categories > Page Functions Introduction > 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(Type)

Type:

The type of page information required:

0 - Page Name

1 - Page Number

2 - Page Title

3 - Display filename

4 - Symbol filename

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

13 - Height of window

14 - X position of window

15 - Y position of window

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 - The number of animation points on a page

24 - The value of the highest animation point on the page

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.

Return Value

The information (as a string).

Related Functions

PageDisplay

Example

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

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 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 CitectSCADA.

See Also

Page Functions