CommonVBSCode Property
Description
Defines the higher-level common declaration section of the actions for the active picture or
returns it.
The action editor of the Graphics Designer is used to configure actions at events and
properties.
In the declaration section of the actions, you can declare tags for a process image
as well as create functions and procedures. In Runtime, each VBS action can access these
tags, functions and procedures if the picture is active.
If you set "CommonVBSCode", the string is copied to the "Event" and "Property" declaration
sections in the action editor. Any code there is overwritten. Therefore, set "CommonVBSCode"
first before setting the subordinate declaration sections with "CommonVBSEventArea" or
"CommonVBSPropertyArea".
Example
In the following example, a tag that is common to all picture objects is declared in the active
picture. The common declaration section is then output :
Sub DefineTagInActiveDocument
ActiveDocument.CommonVBSCode = "DIM actionIsdone" & vbCrLf
MsgBox ActiveDocument.CommonVBSCode
End Sub
See also
Document Object (Page 1847)
CommonVBSEventArea property
Description
Defines the "Event" declaration section of the actions for the active picture or returns it.
The action editor of the Graphics Designer is used to configure actions, for example, at events.
To this purpose, you can declare tags for a process image as well as create functions and
procedures
in the "Event" declaration section of the actions. In Runtime each VBS action that
was configured for an event can access these tags, functions and procedures if the picture is
active.
If you set "CommonVBSEventArea", the string is copied to the "Event" declaration section in
the action editor. Any code there is overwritten. Therefore, first read the code set, for example
with "CommonVBSCode" before you set the declaration section with
"CommonVBSEventArea".
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
2078
System Manual, 11/2008,