Calls to functions to read and write tags and the utilization of picture names must then be
handled using the defined names:
GetTagDWord(ApcTagName1);
OpenPicture(ApcPicName1);
SetPictureName(ApcPicName2,"PictureWindow1",ApcPicName3);
2.13.3 How to Create a New Action
Introduction
In a client-server project, global actions are carried out on all computers in the project, whereas
local ones are carried out only on the computer to which they are assigned.
The procedure is identical for both global and local actions. By specifying, in the navigation
window, the location in which the action is saved, you specify its type (global or local).
Global Script suggests a default name for the new action.
A newly created action already contains the instruction #include "apdefap.h". Therefore, all
functions
are registered within the action. The name of the action is found in the third line. The
first three lines cannot be deleted nor modified. This means that every function can be called
from each action without requiring any special measures. Furthermore every action has a
returned value of type "int" and it is already set to a value of 0.
A returned value of an action can be used in conjunction with GSC Runtime for diagnostic
purposes.
The action code begins with a code framework in the form of comments. If this coding
framework is filled out in accordance with the coding rules, the tags and picture names are
recognized by CrossReference.
Procedure
1. In the navigation window, open the shortcut menu for the desired action type.
2. Select "New".
Alternative operation
Alternatively, you can also create a new action by clicking the associated button in the toolbar,
via the "File" menu or by using the corresponding key combination.
See also
GSC Runtime (Page 825)
WinCC Coding Rule (Page 805)
ANSI-C for Creating Functions and Actions
2.13 Creating and Editing Actions
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
806
System Manual, 11/2008,