Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

WinCopy

  • Last UpdatedFeb 02, 2024
  • 3 minute read

Copies the graphics image of the active window to the Windows Clipboard. You can paste this Clipboard image into other applications.

This function is a blocking function. It blocks the calling Cicode task until the operation is complete.

Note:
• This function might not work as expected if called directly from the Kernel; instead, this function should be called from a graphics page.
• 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

WinCopy( [xScale] [, yScale] [, bSwapBlackWhite] [, sMap] )

xScale:

The x scaling factor for the item being copied. This argument is optional, as a default setting of 1 is used to maintain the current horizontal scaling of the image. The outcome is proportional to 1; for example, 0.5 halves the width of the image.

yScale:

The y scaling factor for the item being copied. This argument is optional, as a default setting of 1 is used to maintain the current vertical scaling of the image. The outcome is proportional to 1; for example, 0.5 halves the height of the image.

bSwapBlackWhite:

Swaps the colors black and white for the purpose of printing pages with a lot of black content. Use the default value of 1 to swap black and white (optional).

sMap:

The file name or path of a text based map file used to specify colors to swap when printing. By default Plant SCADA will look in the bin directory for the map file. The format for the map file is:

RRR GGG BBB RRR GGG BBB [HHH] [SSS] [LLL]//
RRR GGG BBB RRR GGG BBB [HHH] [SSS] [LLL]//

Where:

RRR is a decimal red intensity value between 000 and 255.

GGG is a decimal green intensity value between 000 to 255.

BBB is a decimal blue intensity value between 000 to 255.

HHH, SSS and LLL are optional tolerance values to enable swapping a range of colors. Default values are shown below.

HHH is a decimal value representing the Hue tolerance. Valid range is 0 to 360. Default = 0.

SSS is a decimal value representing the Saturation tolerance. Valid range is 0 to 255. Default = 2 * Hue tolerance.

LLL is a decimal value representing the Luminance tolerance. Valid range is 0 to 255. Default = 2 * Hue tolerance.

Leading zeros are not required, however they aid readability.

The first three RGB values specify the FROM color, and the second three RGB values specify the TO color. The tolerance values are applied to the FROM color when replacing individual pixels in the image.

Comments may be placed at the end of each line, or on individual lines, and needs to be proceeded with // or !.

Example

043 043 255 155 205 255 025 000 025
//Change dark blue to light blue using Hue and Luminance tolerance of 25.
000 000 000 255 255 255 //Swap black to white with no tolerance

Note: If swap color ranges overlap, the behavior is undefined (i.e. a color that falls in both ranges may end up as either color)

Return Value

0 (zero) if successful, otherwise an error code is returned.

WinPrint

Example

WinCopy();

! Copies the active window to the Windows Clipboard.

WinCopy(0.5,0.5);

! Copies the active window to the Windows Clipboard at half the
current size.

See Also

Window Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in