WinCC Programming en-US en-US
WinCC Programming en-US en-US
WinCC V8.0
WinCC: Scripting (VBS, ANSI-C,
VBA)
System Manual
09/2023
A5E52671436-AB
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree of danger.
DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.
WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.
CAUTION
indicates that minor personal injury can result if proper precautions are not taken.
NOTICE
indicates that property damage can result if proper precautions are not taken.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will
be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to
property damage.
Qualified Personnel
The product/system described in this documentation may be operated only by personnel qualified for the specific
task in accordance with the relevant documentation, in particular its warning notices and safety instructions.
Qualified personnel are those who, based on their training and experience, are capable of identifying risks and
avoiding potential hazards when working with these products/systems.
Proper use of Siemens products
Note the following:
WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended or
approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and maintenance
are required to ensure that the products operate safely and without any problems. The permissible ambient
conditions must be complied with. The information in the relevant documentation must be observed.
Trademarks
All names identified by ® are registered trademarks of Siemens AG. The remaining trademarks in this publication
may be trademarks whose use by third parties for their own purposes could violate the rights of the owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the
information in this publication is reviewed regularly and any necessary corrections are included in subsequent
editions.
Contents
WinCC provides the possibility of dynamizing the Runtime environment using the Visual Basic
Script. It is possible to use VBS to program global actions and procedures as well as dynamizing
graphic objects and triggering actions in Runtime.
This chapter will show you
• How to work with VBScript editors
• How to create and edit procedures
• How to create and edit actions
• How to activate VBScripts in Runtime
• How to execute diagnostics on scripts in Runtime
• The object model of graphic Runtime system
• Detailed examples on using VBScript
Introduction
In addition to the C script, WinCC also provides the VBScript programming language as a
programming interface in order to make the WinCC Runtime environment dynamic.
Possible applications
VBScript (VBS) provides access to tags and objects of the graphical Runtime system in Runtime
and enables execution of picture-independent actions:
• Tags: Tag values can be read and written, for example, to specify tag values for the PLC by
clicking the mouse when positioned on a button.
• Objects: Object properties can be made dynamic using actions and actions can be triggered
by events influencing objects.
• Picture-independent actions: Picture-independent actions can be triggered cyclically or
according to tag values, e.g. for the daily transfer of values into an Excel table.
VBS can be used at the following points in WinCC:
• In the Global Script Editor: This is used to configure picture-independent actions and
procedures. The procedures can be used in picture-dependent and picture-independent
actions. Several procedures are compiled in a topic-related module.
• In Graphics Designer: Picture-dependent actions can be configured with which the properties
of graphic objects can be made dynamic or caused to respond to events in Runtime.
• In user-defined menus and toolbars: Here you configure procedures called in Runtime using
the menu and toolbars.
Note
Updating Changed Configuration in Runtime
A changed VB script that is connected with "Menus and toolbars" is only updated after
Runtime is restarted.
If you change the properties of "Menus and toolbars" in Runtime, the changes are only
applied in the following cases:
• After a picture change, if the configuration change does not affect the basic picture.
• When you load another configuration file and reload the modified configuration file.
Application scenarios
VBS can be used in Runtime, for example:
• to configure setpoint value specification for tags for the operation of a graphic object in order
to define a value for the PLC by clicking a mouse, for example.
• to configure switching the Runtime language for the operation of a graphic object.
• to configure color changes, e.g. cyclically (flashing) or displaying statuses (motor on).
Apart from the specific WinCC applications, the general functionality of VBS can also be used
to customize your Windows environment, e.g.:
• to transfer data to another application (e.g. Excel).
• to start external applications from WinCC.
• to create files and folders.
The automation objects in your environment are available for customizing your Windows
environment.
Note
All the objects supplied with the Windows Script Host (WSH) from Microsoft can be integrated
in the environment using the standard VBS method CreateObject. However, there is no direct
access to the WSH object itself using VBS from WinCC.
There is no guarantee or WinCC support for the VBS functionality with regard to its adaptation
to the Windows environment.
VBS and C
VBScript can be used in WinCC parallel to C-Script, but do not mix the script types:
• VBScripts and C-scripts can be configured within a picture and project.
• C-scripts cannot be invoked in VBScripts and vice versa.
• VBS provides internal interfaces to tags and picture objects while the C environment enables
access to other WinCC subsystems (e.g. the report system).
• The syntax for path information is different. When addressing object in subdirectories, the
folders are separated by single or double backslashes:
– VBScript: single backslash "\"
– C: double backslash "\\"
Introduction
Procedures are used to make code, created only once, available at several points in a project.
Instead of entering the code several times, simply call in the corresponding procedure. The code
is clearer and easier to maintain.
Related procedures should be stored in modules. When a certain procedure is retrieved via an
action in Runtime, the module that contains that procedure is loaded. Observe the following
when structuring the modules and procedures:
• The more modules that must be loaded when a picture is called in, the worse the
performance in Runtime.
• The larger a module, the more procedures are contained and, thus, the longer the loading
time for the module.
Organize the modules sensibly, e.g. a module with procedures for a specific system part/
picture.
Another type of structuring of procedures in modules is the functional structuring, e.g. a
module containing mathematical functions. Use this structure, for example, for modules
which should be used globally for projects. The following example illustrates a module
containing mathematical functions derived from the standard functions:
Procedure Features
The procedures in WinCC have the following properties:
• They are created and modified by the user.
• They can be protected against modification and viewing by means of a password.
• They do not have a trigger.
• They are stored in a module.
WinCC does not provide predefined procedures, but does provide code templates and
Intellisense, for example, to simplify programming. Procedures differ according to module
assignment in:
• Standard procedures apply globally to projects located on the computer on which they were
created.
• Project procedures can only be used within the project in which they were created.
Module Features
A module is a file in which one or more procedures are stored. The modules in WinCC have the
following properties:
• They can be protected against modification and viewing by means of a password.
• The have the file extension *.bmo.
See also
Creating and Editing Procedures (Page 40)
VBScript Editors (Page 27)
Basic Principles of VBScript (Page 881)
Actions (Page 19)
Using Visual Basic Script in WinCC (Page 12)
1.4 Actions
Introduction
An action is always started by a trigger. An action, for example, is triggered in Runtime when an
object is operated by a mouse click, a certain time has occurred or a tag has been modified.
Action Features
Actions are defined once in Global Script and then available independent of the picture. Global
Script actions are only valid in the project in which they were defined. Actions linked to a graphic
object are only valid in the picture in which they were defined.
Note
VBS does not currently allow the creation of computer-specific actions.
The following applies for clients in a multi-user system: All global actions configured on a server
are also executed on a client when a project is opened.
The following applies to clients in a distributed system: If actions should be used on a client
computer, copy all the action files in the corresponding project directory on the client.
Action Trigger
Triggers are required to execute actions in Runtime. A trigger is linked to an action thus forming
the triggering event which calls the action. Actions without triggers will not be carried out.
The following trigger types are available in WinCC:
• Timer: Acyclic or cyclic trigger, e.g. for calling a picture or every hour.
• Tags: Change of value
• Event: Modification of object properties (e.g. change of color) or event on an object (e.g.
mouse click).
In Graphics Designer
Two actions of the same type can be executed simultaneously in Runtime. In order, for
example, that cyclic actions are not hindered by an action executed by a mouse click,
event triggered actions and cyclic/tag triggered actions in Graphics Designer are executed
independently of each other.
Note
Please note that synchronization between both action types in WinCC may only be executed by
the DataSet object or by internal WinCC tags. As a result of the separate processing, no common
data area exists between event triggered and cyclic/tag triggered actions.
If processing cyclic actions in pictures, for example, is prevented by a high system load or
another action, the action is started once at the next opportunity. Cycles which are not
executed are not retained in a queue but rejected.
After a change of picture, scripts still running are automatically stopped 1 minute after the
change of picture.
Scripts which are still running when Runtime is terminated are stopped after 5 seconds.
In Global Script
Picture-independent actions from Global Script are executed in Runtime in succession after
being triggered. If an action is triggered while another action is in progress, the second
action is retained in a queue until it can be executed.
Note
Please note that synchronization between actions in Global Script and in Graphics Designer may
only be executed by the DataSet object or by internal WinCC tags. There is no common data area
between the actions in Graphics Designer and in Global Script.
See also
Creating and Editing Actions (Page 56)
Basic Principles of VBScript (Page 881)
Modules and Procedures (Page 16)
Using Visual Basic Script in WinCC (Page 12)
Introduction
An action configured with VBS in WinCC is always valid for the project in which it was defined.
Procedures have the following areas of application:
• Standard procedures apply globally to projects located on the computer on which they were
created.
• Project procedures can only be used in the project in which they were created. If a project is
copied, the project procedures (modules) are copied together with the project.
Note
Tags used in an action or procedure must also be available on the target computer. If the tag is
not available, the action or procedure is not executed.
Procedures which are called in an action must be available on the target computer. If the
procedure is not available, a Runtime error occurs during Runtime.
Storing Procedures
If procedures need to be copied in other project directories in order to be able to use then in other
projects or different computers, observe the storage path of the procedures in the WinCC file
system:
• Standard procedures: <WinCC-
Installationsverzeichnis>\ApLib\ScriptLibStd\Modulname.bmo
• Project procedures: <Projektverzeichnis>\ScriptLib\Modulname.bmo
Note
Since procedures are always stored in modules, always copy the module (*.bmo) in which the
procedure is contained.
The copied procedures/modules are visible after updating the Global Script navigation
window (context menu command "Update") or restarting the editor.
Storing Actions
If actions need to be copied in other project directories in order to be able to use then in other
projects or different computers, observe the storage path of the actions in the WinCC file system:
<Projektverzeichnis>\ScriptAct\Aktionsname.bac
Each action is stored in a separate file. When an action is copied, all the triggers related to it
are also copied.
Note
Only actions created in Global Script are stored in the WinCC file system. Actions which are
programmed in Graphics Designer are always stored with the current picture and cannot be
transferred individually. If a Graphics Designer picture is copied into another project directory,
the actions stored with the picture are also copied.
The copied actions are visible after updating the Global Script navigation window (context
menu command "Update") or restarting the editor.
See also
Modules and Procedures (Page 16)
Renaming a Procedure or Module (Page 54)
Saving a Procedure (Page 52)
Protecting a Module with a Password (Page 51)
How to add module-related information (Page 49)
Using Standard and Project Procedures (Page 48)
How to Write Procedure Codes (Page 45)
Creating a New Procedure (Page 44)
Creating and Editing Procedures (Page 40)
Note
Tags can also be directly linked in Graphics Designer by marking the graphic object and selecting
the "Linking ..." command from the shortcut menu.
' VBS1
HMIRuntime.Tags("Tagname")
If tags are addressed with different formulations in the code, this can be notified by the
following section of the CrossReference:
' WINCC:TAGNAME_SECTION_START
Const TagNameInAction = "TagName"
' WINCC:TAGNAME_SECTION_END
Note
It is not possible to guarantee the compilation of combined tag names from the CrossReference.
'VBS2
HMIRuntime.BaseScreenName = "Screenname"
If pictures are addressed with different formulations in the code, this can be notified by the
following section of the CrossReference:
' WINCC:SCREENNAME_SECTION_START
Const ScreenNameInAction = "ScreenName"
' WINCC:SCREENNAME_SECTION_END
Note
Always enter picture names without the extension "PDL" for reasons of compatibility with future
versions.
See also
VBS Reference (Page 106)
VBScript Editors (Page 27)
Basic Principles of VBScript (Page 881)
Actions (Page 19)
Modules and Procedures (Page 16)
Using Visual Basic Script in WinCC (Page 12)
Introduction
Global tags can be defined in the Global Script Editor which can then be used in all actions and
procedures.
See also
Basic Principles of VBScript (Page 881)
Structure of VBScript Files (Page 94)
Introduction
You can program VB scripts in two places in WinCC:
• In Global Script:
Global Script is the central editor for VBS programming.
You open it using the WinCC Explorer.
• In Graphics Designer:
In the Graphics Designer, you program actions on object properties or events on graphic
objects.
You open the Action Editor in the Graphics Designer from the shortcut menu in the properties
dialog of a graphic object.
Note
This documentation primarily describes Global Script and, when appropriate, points out
deviations in the functionality of the Graphics Designer.
You can find a detailed description of the Action Editor in the Graphics Designer under the WinCC
help topic "Dynamization".
No Unicode support
VB scripts do not support Unicode in actions and procedures.
See also
The Global Script Editor (VBScript) (Page 28)
Introduction
Global procedures and actions are created and edited in the Global Script editor.
Global Script provides a similar range of functions to that of the C script editor in WinCC.
More information
Description of the action editor for the creation of picture-based actions and procedures in
the Graphics Designer:
• "Working with WinCC > Process Picture Dynamics > Dynamizing Using VBS Action"
Global Script is also automatically started when a module or action is opened by double-
clicking in WinCC Explorer.
1
2
Note
Calling direct help
If information on individual editor commands or icons is required, select the "?" > "Direct help"
menu icon.
Then click the mouse button on the corresponding icon/command.
This provides fast, direct help on all the operating elements in the editors.
Press "ESC" to exit "What's This?" help mode.
Window docking
Window docking is a useful tool for the flexible arrangement of windows.
You can reposition windows to obtain separate windows, or to group windows in tab groups.
For example, you can arrange your actions horizontally, vertically, or as tab group.
You can automatically hide windows and show them again when needed.
See also
Deleting Actions or Procedures (Page 39)
Working with the Toolbars (Page 36)
Working in the Editing Window (Page 32)
The Global Script editor (ANSI-C) (Page 898)
How to use channel methods (Page 81)
Introduction
Procedures and actions are edited in the Editing window.
The declaration area can also be used to make general settings to be used globally for the
current picture, e.g.:
• Tag Definitions
• Procedures which you only want to use in this picture
Note
Declaration area: No executable code
Do not create any directly executable codes in the declaration area.
Please note that when creating a tag, it must not contain a value (Value = VT_EMPTY).
Initialize the tags after declaration with the corresponding value.
When making definitions in the declaration area, pay attention to the structure of the Script
files, as described under "Structure of VBScript files".
Note
Do not use "Option explicit" in the code
Do not use the "Option explicit" instruction in the code because it may cause Runtime errors.
Code Templates
In the "Code templates" tab in the Navigation window of the Editor, you can find a selection of
frequently used instructions, such as for loops and conditional instructions.
The templates can be inserted in the procedure code with "Drag&Drop".
If you want to insert a code template into your code, you have to replace the "_XYZ_"
placeholder in the templates with the respective data.
Selection Dialogs
If WinCC tags or objects are used in the code, the following selection dialogs are available for use:
Icon Function
Opens a tag selection dialog and returns the selected tag name as the return value.
Opens a tag selection dialog and returns the tag name with an associated reference.
Opens a browser to select a picture or object whose name is returned as a return value.
Opens a dialog for selecting pictures and returns the picture name, with the server prefix
if applicable.
Bookmarks
Bookmarks can be set in the code to find certain parts in the code more easily:
Icon Function
Sets a bookmark in the line where the cursor is currently located.
Icon Function
Jumps ahead to the next bookmark in the code.
Line numbers
The line numbers of the scripts are displayed by default in the Editing window of the editor.
The line numbers are particularly helpful in the case of extensive scripts to identify individual
lines and navigate quickly to the desired line.
Show or hide line numbers:
• Icon "Deactivate/Activate Line Number":
• "View" Menu
See also
Structure of VBScript Files (Page 94)
The Global Script Editor (VBScript) (Page 28)
Purpose
In their default position, the toolbars are located below the menu bar, at the top of the VBS editor.
The buttons arranged on the toolbars enable quick, easy access to the functions provided in
Global Script and the action editor in Graphics Designer.
Global Script/Graphics Designer provide the following toolbars:
• "Default" toolbar
• "Editor" toolbar
• "Edit" toolbar
• Graphics Designer: Additional buttons in the "Edit" toolbar
"Default" toolbar
"Editor" toolbar
Indents the line, in which the cursor is located, one position to the left. --
Opens the "Replace" dialog for search and replace in the code. <CTRL+H>
"Edit" toolbar
Only displays the Script files in the navigation window (Global Script only). --
Only displays the syntactically correct files in the navigation window (Global Script only). --
Executes a Syntax Check in the code of the current Editing window. <F7>
Opens a tag selection dialog returns the selected tag name as the return value. <CTRL+U>
Opens a tag selection dialog and returns the tag name with an associated reference. <CTRL+W>
Opens a browser to select a picture or object whose name is returned as a return value. <CTRL+Q>
Opens a picture selection dialog for pictures and returns the picture name, with the <CTRL+B>
server prefix if necessary.
Opens the "Info/Trigger" dialog. <CTRL+T>
See also
The Global Script Editor (VBScript) (Page 28)
Introduction
If an action, procedure or a module is deleted in a script editor, the code and corresponding file
are deleted in the project directory.
Be careful only to delete procedures which are no longer used in other procedures or actions.
If an action attempts to call in a procedure which no longer exists, the action is stopped in
Runtime at the fault point. A non-existing reference in the code is not detected by the syntax
check.
Note
Procedures can only be deleted within a module by deleting the code, not in the editor's
navigation window.
Procedure
1. Open Global Script.
2. Select the action or module to be deleted in the navigation window.
3. Select the "Delete" command from the context menu.
4. To delete a procedure: Open the relevant module and delete the corresponding code in the
editing window.
See also
Actions (Page 19)
Modules and Procedures (Page 16)
The Global Script Editor (VBScript) (Page 28)
Introduction
Projects and standard procedures can be programmed in WinCC using VBS:
• Project procedures can only be retrieved in the current project.
Since procedures are stored in the project directory, they are automatically included when
copying a project.
• Standard procedures can be called in by all computers linked to a project.
When a project is copied onto another computer, the standard procedures must be copied
into the corresponding directory on the target computer manually.
The copied procedures are directly available for use in Runtime. The become visible in the
editor when the view is updated.
In addition to the procedures you have programmed, you can use general VBS functions
(e.g. Abs, Array,... Year). These general VBS functions can be invoked in the code using the
"Function List" command from the context menu.
In addition, WinCC provides the most popular instructions as code templates (e.g. If...Then,
When...While). The code templates can be moved from the navigation window's Code
Templates tab control directly into your code via Drag&Drop.
If you insert a code template into your code, it is important to note that, for example,
conditions in the templates are identified by "_XYZ_". You must replace these placeholders
with the appropriate information.
Using Procedures
Procedures are used for the central creation and maintenance of codes which are to be
implemented at several point in the configuration.
Codes are written and saved in a procedure and the procedure is called in with the current
parameters in actions or other procedures instead of repeatedly entering the same code.
Create procedures for repeated functionalities, e.g.
• Calculations with different starting values (procedure with return value)
• Checking tag values (procedure with return value)
• Executing tasks (procedure with return value)
This is linked to the following advantages:
• The code is only programmed once.
• Modifications are only made at one point, namely in the procedure, not in each action.
• The action code is shorter and, thus, remains clearer.
Related procedures should be stored in modules in WinCC.
Note
Global tags: Global Script and Graphics Designer
Procedures can be used in actions in Global Script and Graphics Designer.
In order to use a global tag defined in Global Script in an action in Graphics Designer, observe the
following:
• In order that access can be made to the tag, it is necessary to call in the procedure in which
the tag is defined.
In order to use a global tag in picture-independent actions in Global Script, observe the
following:
• In order that access can be made to the tag, at least one procedure in the module containing
the tag must be called in at least one global action.
This means that a picture currently displayed only works with the modified procedure after
the picture has been reloaded.
Note
If a module contains a syntactically incorrect procedure, the module can no longer be loaded.
Procedures can no longer be called from the module.
If you save a module that contains only syntactically incorrect procedures, this will be
displayed in the navigation window with this adjacent symbol.
System behavior if actions or procedures are changed, deleted and saved at Runtime
If a local action or local procedure, which is called in a global action, is saved during Runtime, all
local and global actions are reset on the associated computer.
If a global action or global procedure that is called in a global action is saved during Runtime,
all local and global actions of the entire project are reset, including those on all computers.
Such a reset might reinitialize for examples tags and times that are used as triggers for
actions, triggering the action at that stage.
Static tags used in the reset actions are reinitialized.
If the procedure is not called in a global action, the actions are not reset.
See also
Multiple Use of Procedures and Actions (Page 21)
Renaming a Procedure or Module (Page 54)
Saving a Procedure (Page 52)
Protecting a Module with a Password (Page 51)
How to add module-related information (Page 49)
Using Standard and Project Procedures (Page 48)
How to Write Procedure Codes (Page 45)
Creating a New Procedure (Page 44)
Examples of VBScript (Page 844)
Modules and Procedures (Page 16)
Introduction
Standard projects and procedures can be programmed with Global Script in WinCC.
The type of procedure is defined by the assignment to a project or standard module. The
procedure to create standard or project procedures is identical.
On creating a new procedure, WinCC automatically assigns a standard name "procedure#",
in which case # represents a continuous number. If the procedure is edited in the editing
window, assign the procedure a corresponding name via which the procedure can be called
in an action later. The name appears in the navigation window when the procedure is saved.
Note
Procedure names must be unique within a project. If a procedure with the same name already
exists, the module is identified as syntactically incorrect. Module names can be used twice when
the modules are stored in different directories.
Global procedures (valid for the for entire project) can only be programmed Global Script.
Procedures can be called via actions in Graphics Designer and picture-related procedures
created in the declaration area of an action. Using a global action in Global Script, it is
possible to create procedures directly in the code which are then only applicable for this
action.
An action must be programmed in order to call in a procedure.
Procedure
The following procedure describes the creation of a new procedure in Global Script:
1. Open Global Script.
2. In the navigation window, select the standard modules or project modules tab control
according to whether a standard procedure or project procedure is to be created.
3. Open an existing module or create a new module using the menu commands "File" > "New"
> "Project Module" or "File" > "New" > "Standard Module".
4. After having created a new module, the structure of a procedure without return value is
already entered in the editing window:
5. Enter the procedure name direct in the code: Sub "Procedure name".
6. To insert one procedure in an existing module: Select the module in the navigation window
and then select the "Insert New Procedure" shortcut menu command.
The "New Procedure" dialog appears:
7. Enter a procedure name and select whether the procedure should have a return value
parameter. The definition of a tag for the return value is then entered in the code (Dim RetVal).
8. Confirm your settings with "OK".
Note
A new procedure can also be entered directly in a module. In the case of procedures without
return value, always begin with the instruction "Sub <Procedure name>" and conclude with "End
Sub". In the case of procedures with return value, always begin with the instruction "Function
<Procedure name>" and conclude with "End Function". The new procedure is displayed in the
navigation window when the module is saved.
See also
Creating and Editing Procedures (Page 40)
Multiple Use of Procedures and Actions (Page 21)
Renaming a Procedure or Module (Page 54)
Saving a Procedure (Page 52)
Protecting a Module with a Password (Page 51)
How to add module-related information (Page 49)
Using Standard and Project Procedures (Page 48)
How to Write Procedure Codes (Page 45)
Modules and Procedures (Page 16)
Introduction
Procedure codes are written in the Global Script editor window. The code of each procedure can
call in other procedures via their procedure names.
Procedures can be created with or without return values. Use the return value to receive
information about successful execution of the procedure, for example.
If you modify a procedure in a picture, the modification will not take effect until the next time
you load the picture.
Note
Full intellisense for all objects can only be utilized in the Graphics Designer if the list is accessed
using the object name and the result is assigned to a tag. Otherwise, you are only offered a list
of standard properties.
Example of a full intellisense:
Dim Variable
Set Variable = ScreenItems ("Circle1")
Variable.<Intellisense selection>
If picture window limits are exceeded during addressing, it is once again only the standard
properties which are offered since the picture of the picture window is not loaded.
Code Templates
In the "Code templates" tab in the Navigation window of the Editor, you will find a selection
of frequently used instructions, e.g. for loops and conditional instructions. The templates can
be inserted in the procedure code with "drag-and-drop".
If you want to insert a code template into your code, you have to replace the "_XYZ_"
placeholder in the templates with the respective data.
Selection Dialogs
If WinCC tags or WinCC objects are used in the code, the following selection dialogs are
available for use:
• Opens a tag selection dialog and returns the selected tag name as the return value.
• Opens a tag selection dialog and returns the tag name with an associated reference.
• Opens a picture/object browser in which a picture/object can be selected whose name is
then used for the return value.
• Opens a picture selection dialog for pictures and returns the picture name, with the server
prefix if necessary.
Syntax Check
Global Script supports you with a syntax check which you can perform after the code has
been created. Syntax errors in the code are displayed in the output window of the editor.
You can move to the erroneous point in the code by double-clicking the error in the output
window.
Note
The syntax check can only detect syntax errors in the code. Programming errors, such as missing
references, only become visible in Runtime. You should therefore also always check your scripts
in the Runtime environment.
Changing a Procedure
If a procedure is modified during Runtime, the modification becomes active at the following
times:
• Procedures called from actions or other procedures in pictures become active following a
picture change.
• Procedures in Global Script become active directly after being called again.
Procedure
1. Open Global Script.
2. Open the module containing the procedure to be edited.
3. After double clicking on the procedure in the navigation window, the cursor skips to the
beginning of the required procedure.
4. Edit the procedure. If you create a procedure with a return parameter, e.g. to program
recurring evaluations or reviews, indicate the return value with "procedurename = RetVal" at
the end of the procedure.
See also
How to Write Procedure Codes (Page 45)
Multiple Use of Procedures and Actions (Page 21)
Introduction
Use the drag&drop function in the navigation window or the context menu to insert a procedure
in the current code.
Project procedures can only be used within the current project, standard procedures are
available for all projects on the computer.
Procedures, once created, can be used in other projects or on other computers. To do this,
copy the module containing the procedures in the appropriate project or standard directory.
Note
In the general declaration part of screens, no check is made whether a procedure or function
name has already been assigned. Therefore, a name could occur several times and it is not
defined which function will be executed. This is standard behavior of the MS Scripting Engine.
Procedure
1. Open the procedure or action in which the procedure should be inserted.
2. Use the drag&drop function to move the procedure to be inserted from the navigation
window to the correct position in the code.
or
3. Place the cursor at the position in the code where you would like to insert teh procedure.
4. Mark the procedure in the navigation window with the mouse.
5. Choose pop-up menu command "Transfer Procedure Retrieval".
See also
Creating and Editing Procedures (Page 40)
Multiple Use of Procedures and Actions (Page 21)
Renaming a Procedure or Module (Page 54)
Saving a Procedure (Page 52)
Protecting a Module with a Password (Page 51)
How to add module-related information (Page 49)
How to Write Procedure Codes (Page 45)
Creating a New Procedure (Page 44)
Modules and Procedures (Page 16)
Introduction
Related information can be added to each module in order to quickly recognize the functionality
of the module or the procedures contained in it when edited at a later date.
If several operators are involved in configuring a project, you should provide module-related
information for your colleagues.
Note
Settings valid for the entire module
Open the dialog for editing the module-related information using the "Info/Trigger" button.
The dialog can also be called if an open procedure is selected in the navigation window.
The information stored in this dialog is always valid for the entire module and all the procedures
contained in it.
Procedure
1. Open Global Script.
2. Select the module in which information is to be added in the navigation window.
3. Click the "Info/Trigger" toolbar button, or select the "Info" menu command.
The "Properties..." dialog appears.
See also
Multiple Use of Procedures and Actions (Page 21)
Renaming a Procedure or Module (Page 54)
Saving a Procedure (Page 52)
How to add module-related information (Page 49)
Using Standard and Project Procedures (Page 48)
How to Write Procedure Codes (Page 45)
Creating a New Procedure (Page 44)
Modules and Procedures (Page 16)
Creating and Editing Procedures (Page 40)
Introduction
A module can be assigned a password to protect it from unauthorized access. The password is
a part of the module-related information.
Note
If a module is protected by a password, all the procedures contained in it are also protected by
the password.
Procedure
1. Open Global Script.
2. Select the module to be assigned a password in the navigation window.
3. Click the button "Info/Trigger" in the toolbar or choose the pop-up menu command "Info".
The "Properties..." dialog appears.
4. Activate the check box "Password".
The dialog "Enter Password" is displayed.
5. Enter a password and confirm it.
6. Confirm your settings with OK.
Result
If an attempt is made to open the module or a procedure contained in it, a prompt appears
requesting the password.
Change Password
To change the password, open in the Properties dialog and click the "Change" button. Then
enter the new password.
Note
If you forget the module password, the module cannot be edited.
Note
The "Info/Trigger" dialog can also be called if an open procedure is selected in the navigation
window. The information stored in this dialog is always valid for the entire module and all the
procedures contained in it.
See also
Multiple Use of Procedures and Actions (Page 21)
Renaming a Procedure or Module (Page 54)
Saving a Procedure (Page 52)
How to add module-related information (Page 49)
Using Standard and Project Procedures (Page 48)
How to Write Procedure Codes (Page 45)
Creating a New Procedure (Page 44)
Modules and Procedures (Page 16)
Creating and Editing Procedures (Page 40)
Introduction
Individual procedures are never stored but the module in which the procedure has been
programmed.
Before saving a module, check the code is syntactically correct. When saving a module,
the procedures contained are automatically checked and, in the case of syntax errors, a
prompt appears as to whether the module should be saved with the errors or not. In this
way, for example, modules and procedures can be saved which are not fully programmed.
Syntactically incorrect procedures do not run in Runtime.
Note
If a module contains a syntactically incorrect procedure, the module can no longer be loaded.
Procedures can no longer be called from the module.
Note
The syntax check can only detect syntax errors in the code. Programming errors, such as missing
references, only become visible in Runtime. Therefore, always check the scripts in the Runtime
environment and use a debugger, if necessary, to detect and eliminate errors.
Only syntactically correct modules are called in Runtime.
A list of all the possible syntax errors is available in the Appendix under " Basic Principles of
VBScript".
If a procedure is subjected to a syntax check prior to saving, any errors are displayed in the
lower part of the editor window. Double click on an error line to access the error position in
the code directly.
Use the "Save As" command to store the module under another name. Note that the new
module is only displayed in the navigation window after updating the view.
Requirement
The procedure/module to be saved must be open in the editor window.
Procedure
1. Click in the toolbar.
2. If syntax errors appear in the output window, double click on the error line and correct the
error in the code. Repeat steps 1 and 2 until the code is correct.
3. Save the module by clicking in the toolbar.
Note
Pictures with modified procedures must be opened and saved once again in Graphics
Designer
In addition to saving in the VBS editor, the corresponding picture must be opened and saved
once again in Graphics Designer when the project module is changed. The change is then
applied in Runtime. Only once the picture has been saved is the information applied to the
picture file via the required project modules.
See also
Diagnostics (Page 82)
Multiple Use of Procedures and Actions (Page 21)
Introduction
Note here that procedure names must always be unique within a project. Duplicate
procedure names trigger an error during the syntax check.
In contrast to procedure names, you can use the same names for modules if the modules
involved are stored in different directories.
Note
The module name is always identical to the file name of the module in the WinCC file system. If
you change a module name, e.g. in Windows Explorer, the new module name is applied in the
navigation window of Global Script.
Procedure
Renaming a procedure
1.
Open the procedure you want to rename.
2.
Enter the new name in the header of the procedure.
3.
Save the procedure so that the name is applied to the navigation window. Procedure names
are always unique and must not be used more than once.
Renaming a module
1.
Close the module that you want to rename.
2.
Select the module in the navigation window and select the shortcut menu command
"Rename".
3.
Enter the new name in the navigation window. Module names are always unique within the
directory and must not be used more than once.
See also
Multiple Use of Procedures and Actions (Page 21)
Saving a Procedure (Page 52)
Protecting a Module with a Password (Page 51)
How to add module-related information (Page 49)
Using Standard and Project Procedures (Page 48)
How to Write Procedure Codes (Page 45)
Creating a New Procedure (Page 44)
Modules and Procedures (Page 16)
Creating and Editing Procedures (Page 40)
Introduction
When using VBS in WinCC, there is no differentiation between local (valid for entire project) and
global (valid on all computers) actions, as opposed to C. A configured action is always valid
globally.
A copied action is available for use in Runtime following a restart or opening and saving the
action. The become visible in the editor when the view is updated.
VBS actions can be used in to make graphic objects and object properties dynamic in Runtime
or to execute picture-independent actions.
Note
Please note that the object name length of objects made dynamic in Graphics Designer is limited
to approx. 200 characters, and each special character used in an object name is converted to
five characters in the script files. The special characters are represented by a four-place
hexadecimal code behind the preceding X. If the name of an object made dynamic is too long,
a corresponding error message appears. Further information is available in this help under
"Structure of VBScript Files".
Note
If you make an object property dynamic with a VBS action via the return value of a script, the
value of the object property is written only if it has changed in relation to the last script run. It
is not considered if the value had been changed from another location.
Therefore it is illegal to change properties which have been made dynamic by VBS action via the
return value from another location (e.g., other C scripts or VBS scripts).
if you do not observe this, wrong values can be the results.
Executing Actions
An action can be assigned several triggers. The action is always executed when one of the
triggering events occurs. Observe the following:
• Actions in Global Script cannot be executed simultaneously. The action triggered last is held
in a queue until the action currently being performed is completed.
• When using Graphics Designer, cyclically and tag-driven actions cannot be triggered
simultaneously. If the execution of a tag-driven action hinders the execution of a cyclic
action, the cyclic action is executed when the tag-driven action has finished. The cyclic action
is held in a queue during the non-execution phase. When the current action is completed, the
cyclic action is executed with the normal cycle.
• In Graphics Designer, event-driven actions cannot be executed simultaneously.
The action types mentioned do not prevent each other being executed: The execution of
actions in Global Script has no influence on actions in Graphics Designer. In the same way,
in Graphics Designer, the execution of cyclically or tag-driven actions has no effect on the
execution of event-driven actions.
Note
Actions in pictures which are still running one minute after the picture has been deselected are
terminated by the system. This is recorded in a logfile entry.
Locating Actions
All the actions used in a picture can be displayed by means of the picture properties. To do this
mark the picture in WinCC Explorer and select the "Properties" context menu command. After
double clicking on an entry, detailed information on the type of dynamics appears.
It is also possible to display all the tags and pictures used in actions by means of the WinCC
CrossReference. CrossReference can also be used for the to link tag connections of Graphics
Designer actions easily.
Note
Use the standard formulations
HMIRuntime.BaseScreenName = "Screenname" and HMIRuntime.Tags("Tagname") when
addressing pictures and tags in your code in order to ensure that the pictures and tags are
registered by the CrossReference.
editor window. Double click on the corresponding error line to access the related point in the
code.
Note
The syntax check can only check objects known to the system at the moment of execution.
Therefore, the tags and objects addressed in the scripts must be created in WinCC.
Only syntactically correct actions are executed in Runtime.
The automation objects "PDLRuntime" and "WinCC Runtime Project" cannot be used in VBS
actions.
Display of Actions
If you save a syntactically incorrect action, it will be displayed in the navigation window with
this adjacent symbol.
If you save a syntactically correct action without trigger, it will be displayed in the Global
Script navigation window with this adjacent symbol.
If you save a syntactically correct action with trigger, it will be displayed in the Global
Script navigation window with this adjacent symbol.
Note
Actions can only be saved in the Graphics Designer if they have the correct syntax. If an action
with errors should still be retained and exited, however, enter the comments.
See also
Structure of VBScript Files (Page 94)
Action and Procedure Names in the Debugger (Page 96)
How to Rename an Action (Page 78)
Saving Actions (Page 67)
Protecting an Action with a Password (Page 66)
How to add action-related information (Page 64)
Introduction
When a new action is created, the editor automatically suggests a file name (Action#.bac), which
can be changed.
Actions can be configured in Global Script and Graphics Designer.
• Global Script is used to configure actions which can be executed, picture-independently, in
Runtime. Open Global Script via WinCC Explorer.
• Graphics Designer is used to configure a new action, related to the properties of a graphic
object, by clicking on the right mouse button in the "Dynamic" column of the Properties tab
control and selecting VBS Action. An action, related to an event, is created in the same way
using the Events tab control.
In both cases, the Action Editor of the Graphics Designer opens.
Note
The precise procedure for linking actions with graphic objects is described under the WinCC help
topic "Dynamics".
Procedure
1. Open Global Script.
2. Activating the Actions Tab Control in the Navigation Window.
3. Click in the toolbar or choose the menu command "File" > "New" > "Action".
A new action is opened in the editor window. The action appears in the navigation window
after it has been saved.
Note
When creating a new action, the "Option explicit" instruction is automatically entered in the
declaration area and cannot be deleted. The instruction is necessary as it prevents errors caused
by the incorrect notation of tags without declaration.
The instruction requires that tags are always defined in your code with the "Dim" instruction.
Do not use the "Option explicit" instruction in the code because it may cause Runtime errors.
See also
How to Rename an Action (Page 78)
Saving Actions (Page 67)
Protecting an Action with a Password (Page 66)
How to add action-related information (Page 64)
How to Edit Actions (Page 61)
Triggers (Page 68)
Creating and Editing Actions (Page 56)
Actions (Page 19)
Introduction
An action is edited in the same way as a procedure in the editor window of the editor or in the
Graphics Designer action editor.
In order that an action can be executed in Runtime, it requires a trigger. Actions which are
triggered by an event in Graphics Designer do not require the assignment of a trigger.
If an action is modified during Runtime, the change is applied when the picture is reloaded
(in the case of actions in Graphics Designer) or the next time the action is called (in the case
of actions in Global Script).
Note
A change in the code in Runtime cannot be applied when another action is being carried out at
the same time.
A procedure call can be inserted in the action by dragging the procedure from the editor
navigation window with "drag-and-drop" and dropping it in the corresponding position of the
code in the editor window. C scripts cannot be called in VBS actions.
In the declaration area, you can also make general settings which you want to use globally
for the current picture, e.g.:
• Tag Definitions
• Procedures which you only want to use in this picture
In the declaration area of the actions, you may define global tags independent of each other
in the areas "Event" and "Properties" of an object. There is no link between global tags of
identical names in both areas.
Note
Always make sure that the procedures in the declaration area have correct syntax, i.e. with "Sub"
- "End Sub". Do not create directly executable codes in the declaration area as this can cause
Runtime errors.
If global tags are used in the declaration area of actions Graphics Designer, note that the event-
driven and cyclic/tag-driven actions are processed separately in Runtime. There is no
synchronization of global tags between the two Runtime systems in Runtime. If synchronization
of tags is required, configure these using the DataSet object or internal WinCC tags.
When making definitions in the declaration area, pay attention to the structure of the Script
files, as described under "Structure of VBScript files".
Note
Full intellisense for all objects can only be utilized in the Graphics Designer if the list is accessed
using the object name and the result is assigned to a tag. Otherwise, only a list of standard
properties is offered.
Example of full intellisense:
Dim Variable
Set Variable = ScreenItems ("Circle1")
Variable.<Intellisense>
If picture window limits are exceeded during addressing, it is once again only the standard
properties which are offered since the picture of the picture window is not loaded.
Code Templates
In the "Code templates" tab in the Navigation window of the Editor, you will find a selection
of frequently used instructions, e.g., for loops and conditional instructions. The templates
can be inserted in the procedure code with "drag-and-drop".
If you want to insert a code template into your code, you have to replace the "_XYZ_"
placeholder in the templates with the respective data.
Selection Dialogs
If WinCC tags or WinCC objects are used in the code, the following selection dialogs are
available for use:
• Opens a tag selection dialog and returns the selected tag name as the return value.
• Opens a tag selection dialog and returns the tag name with an associated reference.
• Opens a picture/object browser in which a picture/object can be selected whose name is
then used for the return value.
• Opens a picture selection dialog for pictures and returns the picture name with the server
prefix, if necessary.
Syntax Check
Global Script supports you by providing a syntax check which you can perform after the code
has been created. Syntax errors in the code are displayed in the output window of the editor.
You can move to the erroneous point in the code directly by double-clicking the error in the
output window.
Note
The syntax check can only detect syntax errors in the code. Programming errors, such as missing
references, only become visible in Runtime. Therefore, always check the scripts in the Runtime
environment and use a debugger, if necessary, to detect and eliminate errors. The way to test
scripts with a debugger is described in this documentation under the topics "Diagnostics" >
"Testing with the Debugger".
Procedure
1. Open Global Script.
2. Double click on the action on the Action tab control in the navigation window.
3. Edit the action.
See also
Using Global Tags in VBS (Page 25)
Testing with the Debugger (Page 89)
Structure of VBScript Files (Page 94)
How to Rename an Action (Page 78)
Saving Actions (Page 67)
Protecting an Action with a Password (Page 66)
How to Edit Actions (Page 61)
Creating a New Action (Page 60)
Triggers (Page 68)
Creating and Editing Actions (Page 56)
Actions (Page 19)
Introduction
Related information can be added to every action in Global Script in order that the function of
an action can be recognized at a later date when editing.
If several operators are involved in configuring a project, you should provide action-related
information for your colleagues.
Note
More information can only be made available for actions in Global Script, not for actions in
Graphics Designer.
When an action is changed and saved, the current date of change is entered automatically
and is unchangeable.
The following information can be added:
• "Created by"
• "Changed by"
• "Comment", e.g. functionality of the action
It is also possible to define a password for the action. More information on assigning
passwords is provided in "Protecting Actions with a Password".
Procedure
1. Open Global Script.
2. Open the action for which information should be added.
3. Click the "Info/Trigger" toolbar button, or select the "Info" menu command.
The "Properties..." dialog appears.
See also
How to Rename an Action (Page 78)
Saving Actions (Page 67)
Protecting an Action with a Password (Page 66)
How to Edit Actions (Page 61)
Creating a New Action (Page 60)
Triggers (Page 68)
Introduction
An action in Global Script can be protected against unauthorized access by assigning a password
to it. The password is a part of the action-related information.
Note
Only actions in Global Script can be assigned a password, not actions in Graphics Designer.
Procedure
1. Open Global Script.
2. Open the action to be protected by a password.
3. Click the button "Info/Trigger" in the toolbar or choose the pop-up menu command "Info".
The "Properties..." dialog appears.
4. Select the "Password" check box.
5. Click the "Change" button. The "Enter Password" window opens.
6. Enter a password and confirm it.
7. Confirm your settings with OK.
Result
If an attempt is made to open the action, the system requests the password is entered.
Change Password
To change the password, open in the Properties dialog and click the "Change" button. Then
enter the new password.
Note
If you forget the action password, the action cannot be edited.
See also
How to Rename an Action (Page 78)
Saving Actions (Page 67)
How to add action-related information (Page 64)
How to Edit Actions (Page 61)
Creating a New Action (Page 60)
Triggers (Page 68)
Creating and Editing Actions (Page 56)
Actions (Page 19)
Introduction
Before an action can be run in Runtime, it must be saved. Save an action as any other Windows
file using the "File" > "Save" commands or the corresponding icon.
Note
Actions in Graphics Designer are automatically applied on closing the action editor with the
picture. Functions can only be saved in the Graphics Designer if they have the correct syntax. If
an action with errors should still be retained and exited, however, enter the comments.
A list of all the possible syntax errors is available in the Appendix under " Basic Principles of
VBScript".
In order to save an action under a different name, e.g. to use an action as a basis for another
action, use the "Save As" command.
Note that, when using "Save As", only the file name is changed and not the action name.
Prior to Saving
Before saving an action, check the code is syntactically correct. The syntax errors in the code are
displayed in the output window of Global Script. Double click on an error line to access the error
position in the code directly.
Note
The syntax check can only detect syntax errors in the code. Programming errors, such as missing
references, only become visible in Runtime. Therefore, always check the scripts in the Runtime
environment and use a debugger, if necessary, to detect and eliminate errors.
If actions are saved without running a syntax check beforehand, the editor comments that a
syntactically incorrect action will be saved which cannot subsequently be run in Runtime.
Syntactically incorrect actions are displayed with the adjacent icon in the navigation
window.
Procedure
1. Click in the toolbar.
2. If errors are displayed in the lower part of the editor window, double click on the error line and
correct the error in the code. Repeat steps 1 and 2 until the code is correct.
3. Save the action by clicking in the toolbar.
See also
Actions (Page 19)
How to Rename an Action (Page 78)
Protecting an Action with a Password (Page 66)
How to add action-related information (Page 64)
How to Edit Actions (Page 61)
Creating a New Action (Page 60)
Triggers (Page 68)
Creating and Editing Actions (Page 56)
1.10.7 Triggers
1.10.7.1 Triggers
Trigger Types
The following trigger types are available:
Acyclic triggers
Acyclic triggers consist of a specified date and time.
The action specified by such a trigger is performed once at the date and time specified.
Cyclic triggers
Cyclic triggers consist of a specified time interval and starting point.
Time-controlled triggers are used for actions in Global Script and for actions to make graphic
objects dynamic.
The following types of cyclic triggers are available:
Tag triggers
Tag triggers consist of one or more specified tags.
The action associated with such a trigger is performed each time a change in the value of
one of these tags is detected.
Tag triggers are used for actions in Global Script and for actions to make graphic objects
dynamic.
How the tag values are queried may be customized for each tag.
Select from the following modes:
• Cyclic query of the tag value:
Specify a standard cycle.
The tag value is queried at the defined intervals (e.g. every 2 seconds).
The action is triggered when the system detects a change of the tag value.
Depending on the size of the cycle, it is possible that the tag value is changed but it is not
detected by the system.
If, for example, a cycle of 5 minutes has been set, the tag value may change several times
within the 5-minute period but only the value set when the next query is made is detected.
The value changes between the two queries are not registered.
• Changes in the tag value:
Each change in the tag value is detected by the system.
The action is executed each time the tag value changes.
Event-driven
When an action is configured related to an event on a graphic object, the action is triggered
when a specific event has occurred, e.g. following a mouse click or the change of the
background color due to another action.
Animation cycle
As of WinCC V7.0, the "animation cycle" trigger type is available for the dynamization of
objects with VBS.
The animation cycle allows you to switch actions on and off in Runtime and to change the
time in which the trigger is executed.
For more detailed information, refer to "Animation trigger (Page 72)".
Actions in Global Script and Graphics Designer do not affect each other.
Note
Execute action depending on the result
If the action should not be executed at each event, it is possible to define a condition in the
action, the result of which controls whether the action is executed or not.
Improving performance
The tag triggers should preferably be used over cyclic triggers:
• With cyclic actions, the action is always executed, e.g. every 20 seconds.
The tag trigger only executes the action if a change in the value of the tag has been detected
in the case of cyclic queries.
This reduces the load on the system and increases performance.
• If a tag trigger is used, configure the "Upon Change" cycle to start as seldom as possible.
This query cycle causes the tag to trigger the action following every change.
This causes high system loads.
Tag triggers in actions in Graphics Designer can be "linked" using CrossReference, i.e.
replaced by other tags at all or selected points.
Further information on CrossReference is available in the WinCC documentation under
"Working with WinCC".
See also
Actions (Page 19)
Animation trigger (Page 72)
How to add a trigger of the type "Tag" (Page 75)
How to add a trigger of the type "Timer" (Page 74)
How to delete a trigger (Page 77)
How to change a trigger (Page 76)
Creating and Editing Actions (Page 56)
Introduction
As of WinCC V7.0, the "animation cycle" trigger art is available for the dynamization of objects
with VBS. The animation cycle allows you to switch actions on and off in Runtime and to change
the time in which the trigger is executed.
Animation cycles
You use the trigger by writing an action and using the "animation cycle" trigger type.
This action can be activated or deactivated in Runtime with the "ActivateDynamic" and
"DeactivateDynamic" methods. The methods are described in the VBS reference of the WinCC
Information System. The correct syntax of the methods deviates from the description in the
VBS reference and is shown in the following two examples.
Example
With an action at the determined property "Position X" (left), the rectangle is shifted 5 pixels to
the right. Select the "animation cycle" event in the action as the trigger.
Enter the following as action in the "Left" property:
item.Left = item.Left + 5
You can switch the action on and off at the property "Position X" with the following methods.
The trigger is switched on in Runtime with the "ActivateDynamic" method:
Dim obj
Set obj = ScreenItems.Item("Rectangle1")
obj.ActivateDynamic "Left", "CycleTime1s"
Dim obj
Set obj = ScreenItems.Item("Rectangle1")
obj.DeactivateDynamic "Left"
Note
The WinCC tags remain requested even when the trigger is switched off.
See also
ActivateDynamic method (Page 732)
Triggers (Page 68)
Add
"Timer" type triggers execute an action at a certain time. "Timer" type triggers can be cyclic or
acyclic triggers.
• Acyclic triggers Trigger an action once at the configured time.
• Cyclic triggers Trigger an action at regular intervals. The time interval and start time for the
time must be triggered. If a standard cycle is selected as the cyclic trigger, the start time is
always the start of Runtime. User-specific cycles can also be selected as standard cycles.
Note
Cyclic triggers guarantee a high updating rate of the system but require high system loads.
Choose cyclic triggers only for those actions, where the update is very important.
With high system loads, some actions may not be executable.
"Timer" type triggers are used to make the properties in Graphics Designer dynamic and
execute global actions.
Procedure
1. Open the action.
2. Click the button "Info/Trigger" in the toolbar or choose the pop-up menu command "Info".
The "Properties..." dialog appears.
3. Select the "Triggers" tab.
4. Select the "Timer" trigger and then select the trigger type to be created: cyclic or acyclic.
5. Click on the "Add" button. The "Add Trigger" dialog appears.
– If the "acyclic" trigger type has been selected: Enter a relevant trigger name and define the
time at which the action should be executed.
– If the "cyclic" trigger type has been selected: Enter a relevant trigger name and define the
start time at which the action should be executed for the first time. Enter a cycle at which
the action should be repeated.
6. Click OK to confirm your entries.
Note
An action can be assigned several triggers. The action is always executed when one of the
triggering events occurs.
See also
How to delete a trigger (Page 77)
How to add a trigger of the type "Tag" (Page 75)
Triggers (Page 68)
Creating and Editing Actions (Page 56)
Actions (Page 19)
Introduction
"Tag" type triggers execute an action following the change of a tag value. Any internal or external
tag stored in WinCC can be used as a trigger tag.
Actions with tag triggers can be executed at the following times:
• On change of tag: The action is executed each time the tag value changes. Since this setting
causes a very high system utilization, the updating rate should be set as low as possible.
• Query the tag status according to standard cycle (including user cycles): Define a cycle in
whose intervals the tag value should be queried. The action is only executed when the tag
value has changed when queried. When the query status is a large value, it is possible that
the tag value changes but it is not detected by the system. In this case the action is not
performed.
If an action is linked with several tags, the action is executed when one of the tag values
changes.
Procedure
1. Open the action.
2. Click the button "Info/Trigger" in the toolbar or choose the pop-up menu command "Info".
The "Properties..." dialog appears.
3. Select the "Triggers" tab.
4. Select "Trigger" as the tag.
5. Click on the "Add" button. The "Add Trigger" dialog appears.
6. Enter the name of the tag to be used as the trigger or click the button beside the "Tag Name"
field in order to select a tag from the tag selection dialog.
7. Double-click on the "Standard cycle" field to open the selection dialog for the tag update cycle:
Select a cycle and click on OK to confirm the selection.
See also
How to delete a trigger (Page 77)
How to add a trigger of the type "Tag" (Page 75)
Introduction
A defined trigger can be modified at any time, even during Runtime.
Procedure
1. Open the action whose triggers should be modified.
2. Click the button "Info/Trigger" in the toolbar
or choose the pop-up menu command "Info/Trigger". The "Properties..." dialog appears.
Alternatively, call in the dialog without executing the action by double clicking on the trigger
in the navigation window.
3. Select the "Triggers" tab.
4. Select the trigger to be modified and click the "Change" button.
See also
Triggers (Page 68)
How to delete a trigger (Page 77)
How to add a trigger of the type "Tag" (Page 75)
How to add a trigger of the type "Timer" (Page 74)
Creating and Editing Actions (Page 56)
Actions (Page 19)
Introduction
Defined triggers can be deleted at any time. Triggers can also be deleted during Runtime.
If a trigger is deleted in Runtime, it only takes effect after the action is saved.
Note
Actions without trigger are not executed in Runtime. None of the actions which used the deleted
trigger are executed any longer.
Procedure
1. Open the Global Script Editor or the Graphics Designer action editor.
2. Open the action.
3. Click the "Info/Trigger" toolbar button or select the "Info/Trigger" menu command. The
"Properties..." dialog appears.
4. Select the "Triggers" tab.
Note
Triggers can also be deleted directly in the Global Script navigation window using the "Delete"
command in the context menu.
See also
Actions (Page 19)
How to change a trigger (Page 76)
How to add a trigger of the type "Tag" (Page 75)
How to add a trigger of the type "Timer" (Page 74)
Triggers (Page 68)
Creating and Editing Actions (Page 56)
Introduction
Actions can be renamed in Global Script. When an action is renamed, the action name and file
name are changed.
The action to be renamed must not be open in the editor window.
Procedure
1. Open Global Script.
2. Select the name of the action to be renamed in the editor's navigation window.
3. Select the "Rename" command from the context menu.
4. Enter a new name for the action with the extension *.bac.
See also
Protecting an Action with a Password (Page 66)
Saving Actions (Page 67)
How to add action-related information (Page 64)
How to Edit Actions (Page 61)
Creating a New Action (Page 60)
Triggers (Page 68)
Creating and Editing Actions (Page 56)
Actions (Page 19)
Introduction
Scripts defined in Global Script are always executed when the configured trigger occurs.
Scripts in the graphical Runtime system are executed when the picture is called in and the
configured event or trigger occurs.
So that the picture-independent, Global Script global actions can be executed, the "Global
Script Runtime" application must be activated in the startup list of the runtime computer.
Procedure
1. Open the "Computer" editor in the WinCC Configuration Studio.
2. Select the computer name in the navigation area.
The "Processes when starting WinCC Runtime" tab is displayed.
3. Activate the "Global Script Runtime" option.
See also
Creating and Editing Actions (Page 56)
Creating and Editing Procedures (Page 40)
VBScript Editors (Page 27)
Using Visual Basic Script in WinCC (Page 12)
Channel methods
You can use channel methods to access methods from the following channels:
• OPC UA WinCC Channel
• SinumerikNC
Example
ip_IN1_DINT=10
ip_IN2_DINT=20
If IsArray(op_OUT1_DINT) Then
For
iterator=0 To UBound(op_OUT1_DINT)
HMIRuntime.Trace "Result of OPCUA Method is "&op_OUT1_DINT(iterator) &vbCrlf
Next
Else
HMIRuntime.Trace "Result of OPCUA Method is "&op_OUT1_DINT &vbCrlf
End If
See also
The Global Script Editor (VBScript) (Page 28)
1.13 Diagnostics
1.13.1 Diagnostics
Introduction
If the scripts are executed and tested in Runtime, the Diagnostics window can be used to display
an analysis quickly.
Diagnostics Tools
WinCC provides a range of tools with which to analyze the behavior of actions in Runtime:
• The GSC Runtime and GSC Diagnostics application windows
• Use of a debugger
Note
Runtime errors in VBS are not displayed
Some script errors are neither output via trace nor displayed via the error dialog.
Debugger
You can use the "Microsoft Visual Studio 2008" debugger to test your VB scripts in Runtime.
The debugger is included in the WinCC Setup. If another Visual Studio version is already
installed, Microsoft Visual Studio 2010 for example, use the debugger of this version.
See also
Testing with the Debugger (Page 89)
GSC Runtime (Page 86)
GSC Diagnostics (Page 83)
Trace Method (Page 833)
Introduction
GSC Diagnostics displays the chronological sequence of calls of the trace methods contained in
the actions in the Diagnostics window. This also applies to Trace instructions in procedures
which are called in actions. The targeted implementation of Trace instructions, e.g. for the
output of tag values, enables the progress of actions and the procedures called in them to be
traced.
Application
In order to use GSC Diagnostics, insert a GSC Diagnostics type application window in a process
screen. The GSC Diagnostics attributes can be used to control the appearance of the GSC
Diagnostics window.
In the case of a picture change, the content of the GSC Diagnostics window is deleted.
Note
Messages are also displayed in the "GSC Diagnostics" window when the debugger is activated.
See also
GSC Diagnostics Toolbar (Page 85)
GSC Diagnostics Attributes (Page 84)
Inserting the GSC Diagnostics Window into a Picture (Page 84)
Trace Method (Page 833)
Introduction
In order to use GSC Diagnostics, insert a GSC Diagnostics process screen. The process screen can
be an existing picture or a picture which serves customized diagnostics purposes. GSC
Diagnostics cannot be inserted directly in the process screen as an application but is inserted as
an application in an application window. In this case, the application window is a component
part of the process screen.
Requirements
Graphics Designer has been started and the process screen is open.
Procedure
1. Use the "Smart Objects" object palette to insert the "Application Window" in the picture.
2. Select the "Global Script" option from the "Window Contents" dialog and confirm the
selection with "OK".
3. Select the "GSC Diagnostics" option from the "Templates" dialog.
4. Confirm the selection with OK in order to insert the Diagnostics window.
See also
GSC Diagnostics Toolbar (Page 85)
GSC Diagnostics Attributes (Page 84)
GSC Diagnostics (Page 83)
Overview
GSC Diagnostics has attributes which affect the appearance of the GSC Diagnostics window in
Runtime. These relate to the geometric attributes, particularly to the following:
• Display: This attribute defines whether the window should be visible or hidden. The attribute
can be made dynamic with the name Visible.
• Sizeable: This attribute defines whether the size of the window should be changeable in
Runtime.
• Movable: This attribute defines whether the window should be moveable or not during
Runtime.
• Border: This attribute defines whether the without is provided with a border. If the window
has a border, its height and width can be modified in Runtime.
• Title: This defines whether the window has a title bar.
• Can be maximized: This attribute defines whether the title bar should contain the button to
maximize the window.
• Can be closed: This attribute defines whether the title bar should contain the button to close
the window.
• Foreground: This attribute defines whether the window should always be in the foreground.
See also
GSC Diagnostics Toolbar (Page 85)
Inserting the GSC Diagnostics Window into a Picture (Page 84)
GSC Diagnostics (Page 83)
Overview
The GSC Diagnostics toolbar enables the output in the diagnostics window to be controlled and
to save, print and open window content:
See also
GSC Diagnostics Attributes (Page 84)
Inserting the GSC Diagnostics Window into a Picture (Page 84)
GSC Diagnostics (Page 83)
Introduction
GSC Runtime is a window which displays the dynamic behavior of all Global Script actions in
Runtime. In addition, GSC Runtime can also be used during Runtime to influence the execution
of each individual action and provide access to the Global Script editor.
Actions
C actions and VBS actions are differentiated in the GSC Runtime window:
• Symbolizes a C action
• Symbolizes a VBS action
The following information is issued:
• Action name: The name of the action
• ID: Action ID. They are used internally by the system. GSC Runtime supplies the
corresponding action name together with the Action ID. The link between ID and action
name is only valid until Runtime is stopped or, during Runtime, until an action is saved.
• Status: Provides information on the current status of the action. Refer to the table below for
the possible statuses.
• Activation Interval: The time in the form Hour:Minute:Second, which should elapse between
the action being called.
• Return Value: The return value of the action
• Started On: Date and time the current action was started
• Next Start: Date and time the action will be started again
• Error message: Contains the error text in the case of an error
Actions Status
Possible action status:
• Action was activated.
• Action was deactivated
• Action was stopped.
• Action in progress
• Error logging on the action!
• Error executing the action!
Pop-Up Menu
The following functions are available for every action in the pop-up menu:
• Log off: The relevant action will not be executed again when the current execution has
finished.
• Log on: The relevant action will be executed again when the next trigger event occurs
• Start: The relevant action will be executed once.
• Edit: The relevant action will be opened in the Global Script editor for editing. Runtime will
remain active. If the edited action is compiled (when necessary) and saved the changes will
be applied by the Runtime system immediately.
The option of opening the pop-up menu for every action can be controlled by assigning an
authorization.
In order to use GSC Runtime, insert a GSC Runtime type application window in a process
screen. The GSC Runtime attributes can be used to control the appearance of the GSC
Runtime window.
Note
Updating the GSC Runtime window increases the system load. The system load is dependent on
how many actions are visible in the window. The system load can be lowered by reducing the
height of the window so that fewer lines are visible.
See also
How to insert the GSC Runtime Window into a Picture (Page 87)
GSC Runtime Attributes (Page 88)
Introduction
In order to use GSC Runtime, insert a GSC Runtime process screen. The process screen can be an
existing picture or a picture which serves customized diagnostics purposes. GSC Runtime cannot
be inserted directly in the process screen but is inserted as an application in an application
window. In this case, the application window is a component part of the process screen.
Requirements
Graphics Designer has been started and the process screen is open.
Procedure
1. Use the "Smart Objects" object palette to insert the "Application Window" in the picture.
2. Select the "Global Script" option from the "Window Contents" dialog and confirm the
selection with "OK".
See also
GSC Runtime (Page 86)
GSC Runtime Attributes (Page 88)
Overview
GSC Runtime has attributes which affect the appearance of the GSC Runtime window in
Runtime. These relate to the geometric attributes, particularly to the following:
• Display: This attribute defines whether the window should be visible or hidden. The attribute
can be made dynamic with the name Visible.
• Sizeable: This attribute defines whether the size of the window should be changeable in
Runtime.
• Movable: This attribute defines whether the window should be moveable or not during
Runtime.
• Border: This attribute defines whether the without is provided with a border. If the window
has a border, its height and width can be modified in Runtime.
• Title: This defines whether the window has a title bar.
• Can be maximized: This attribute defines whether the title bar should contain the button to
maximize the window.
• Can be closed: This attribute defines whether the title bar should contain the button to close
the window.
• Foreground: This attribute defines whether the window should always be in the foreground.
See also
GSC Runtime (Page 86)
How to insert the GSC Runtime Window into a Picture (Page 87)
Overview
You can use the "Microsoft Visual Studio 2008" debugger to test your VB scripts in Runtime.
The debugger is included in the WinCC Setup. If another Visual Studio version is already
installed, Microsoft Visual Studio 2010 for example, use the debugger of this version.
Procedure
1. Start the setup with the following file:
– VS 2008 Shell Redist\Integrated Mode\Vside.enu.exe
2. Follow the instructions and accept the default settings.
The following program is installed:
– Microsoft Visual Studio 2008 Shell (Integrated Mode) - ENU
3. When you start the debugger the first time, the "Visual Studio Just-In-Time Debugger" dialog
opens.
Select the entry "New instance of Visual Studio 2008".
To specify "Visual Studio 2008" as the default debugger, select the "Set the currently selected
debugger as the default." setting.
See also
Principles of Debugging (Page 92)
Executing Script Commands (Page 103)
How to Determine and Modify Tag and Property Values (Page 102)
How to Set Bookmarks in Scripts (Page 101)
Deleting Breakpoints (Page 101)
Setting Breakpoints (Page 99)
Processing Scripts Step-by-Step (Page 98)
Selecting a Script for Editing (Page 97)
Action and Procedure Names in the Debugger (Page 96)
Structure of VBScript Files (Page 94)
How to Activate the Debugger (Page 91)
Diagnostics (Page 82)
Principle
There are several ways of activating the debugger:
• Automatic activation of the debugger when an error occurs in Runtime.
• Opening an error box in Runtime via which the debugger can be activated.
• Starting the debugger from the Start menu and opening a running runtime script.
Procedure
The following procedure describes the first two points, activating the debugger in WinCC.
1. Open the "Computer" editor in the WinCC Configuration Studio.
2. Select the "Local settings" entry in the navigation area.
3. Activate the desired options under "VBS debug options" in the "Properties - Local settings"
area.
The debug behavior for actions in Global Script and Graphics Designer can be set
independently of each other.
4. Determine the behavior when an error occurs in runtime:
– "Graphics Debugger" / "Script Debugger":
The debugger is started directly when an error occurs.
– "Graphics error dialog" / "Script error dialog":
When an error occurs, a dialog with information on the error opens.
You start the debugger using a button in the dialog.
See also
How to Set Bookmarks in Scripts (Page 101)
Executing Script Commands (Page 103)
How to Determine and Modify Tag and Property Values (Page 102)
Deleting Breakpoints (Page 101)
Introduction
You can use the "Microsoft Visual Studio 2008" debugger to test your VB scripts in Runtime.
The debugger is included in the WinCC Setup. If another Visual Studio version is already
installed, Microsoft Visual Studio 2010 for example, use the debugger of this version.
The debugger can be used to:
• View the script source code to be debugged
• Step-by-step processing of the scripts to be checked
• Display and modify tag and property values
• View and monitor the script progress
Note
Please note that the code displayed in the debugger is write-protected. The code cannot be
changed directly in the debugger but only test the necessary changes.
Error types
A distinction is made between the following types of error by the debug:
Syntax errors
Syntax errors occur, for example, when a key word is written incorrectly or a parenthesis is
not closed. When a syntax check from WinCC is used, syntax errors can be excluded before
testing the scripts in Runtime. In principle, only syntactically correct scripts can be saved in
Graphics Designer. The WinCC syntax check also checks:
• Whether the procedure names are unique in Global Script
• Whether an action module in Global Script contains only one procedure
• Whether the action part in Graphics Designer contains only one procedure
As a result of the syntax check in WinCC, the script is parsed without being executed. The
script is parsed again directly before executing in Runtime. All the script parts are parsed,
even those which are executed after a certain action has been executed at a later time.
If the script contains syntax errors, the script is not executed in Runtime.
Runtime error
A Runtime error occurs when an attempt is made to execute an invalid/erroneous action, e.g.
because a tag has not been defined. In order to intercept Runtime errors, use the "On Error
Resume Next" command in the VBScript. The command causes the subsequent command to
be executed following a Runtime error. The error code can subsequently be checked using
the Err object. In order to deactivate the processing of Runtime errors in the script, use the
"On Error Goto 0" command.
Logical errors
The debugger is particularly helpful in clearing up logical errors. A logical error occurs when
an unexpected result is received because, for example, a condition was incorrectly checked.
To clear logical errors, go through the scripts step-by-step in order to detect the part which
does not function properly.
Basic Procedure
When an error has occurred and the debugger is open, the script appears in a window, write-
protected. It is possible to navigate through the script document, set breakpoints, execute the
script again in Runtime and to process the script step-by-step.
The most important steps for successful debugging of the scripts are described under
"Processing Scripts Step-by-Step".
The source codes of the scripts cannot be edited directly in the scripts. When an error has
been detected, the error can be corrected in the original script in WinCC, e.g. load the picture
again and update it in the debugger.
Note
Tips and tricks for debugging, frequently occurring error codes and other information is
available in the Microsoft Script Debugger online help.
See also
Testing with the Debugger (Page 89)
Executing Script Commands (Page 103)
How to Determine and Modify Tag and Property Values (Page 102)
Principle
In order not to hinder the simultaneous processing of cyclic and event-driven scripts in the
graphical Runtime system, the event-driven actions and cyclic/tag-driven actions are strictly
separated during processing. In this way, a cyclic action, for example, cannot hinder the
execution of an action initiated by clicking a button.
To ensure this, the event-driven actions and the cyclic/tag-driven actions are stored in
separate script files when saving a picture. If a global picture section has been defined in
actions in Graphics Designer, this is copied into both scripts. In the same way, modules which
are used in an action are also copied in both script files.
If a tag from a module should be used, the corresponding module must be called in.
Otherwise, the module is not copied in the script file and an error is generated.
Note
Since the two script files are handled separately, they have no common data area. Therefore,
there is no synchronization of global tags between the two script files. If synchronization is
required, implement this using the DataSet object or internal WinCC tags.
Note
Please note that the actions and procedures of the graphic Runtime system are not displayed
with the action name in the script file under which it was saved in WinCC. The name conventions
for actions and procedures in the script files sate described in "Action and Procedure Names in
the Debugger".
See also
How to Activate the Debugger (Page 91)
Executing Script Commands (Page 103)
How to Determine and Modify Tag and Property Values (Page 102)
How to Set Bookmarks in Scripts (Page 101)
Deleting Breakpoints (Page 101)
Setting Breakpoints (Page 99)
Processing Scripts Step-by-Step (Page 98)
Selecting a Script for Editing (Page 97)
Action and Procedure Names in the Debugger (Page 96)
Principles of Debugging (Page 92)
Testing with the Debugger (Page 89)
Diagnostics (Page 82)
ObjektName_OnLButtonDown
ObjektName_OnLButtonUp
ObjektName_OnRButtonDown
ObjektName_OnRButtonUp
Keyboard events ObjektName_OnKeyDown
ObjektName_OnKeyUp
Object events ObjektName_OnObjectChanged
ObjektName_OnSetFocus
Events on properties ObjektName_PropertyName_OnPropertyChanged
ObjektName_PropertyName_OnPropertyState‐
Changed
Picture events Document_OnOpen
Document_OnClosed
Note
If you wish to determine the name of an object in Runtime, press <CTRL+ALT+SHIFT> and
position the mouse over the corresponding object. The picture name and object name then
appears in a tooltip.
See also
Executing Script Commands (Page 103)
How to Determine and Modify Tag and Property Values (Page 102)
How to Set Bookmarks in Scripts (Page 101)
Deleting Breakpoints (Page 101)
Setting Breakpoints (Page 99)
Processing Scripts Step-by-Step (Page 98)
Selecting a Script for Editing (Page 97)
Structure of VBScript Files (Page 94)
Principles of Debugging (Page 92)
How to Activate the Debugger (Page 91)
Testing with the Debugger (Page 89)
Diagnostics (Page 82)
Introduction
If the Microsoft Script Debugger is called in Windows instead of automatic activation using
WinCC, scripts which are currently running can be called in for editing in Runtime.
Requirement
Runtime is activated, the picture to be debugged is active.
Procedure
1. Start Microsoft Visual Studio 2008.
2. Create a new script file:
– File > New > File… > Select script template "Windows Script Host".
3. Start debugging with "Debug > Attach to Process".
Select, for example, gscrt.exe or pdlrt.exe.
See also
Executing Script Commands (Page 103)
How to Determine and Modify Tag and Property Values (Page 102)
How to Set Bookmarks in Scripts (Page 101)
Deleting Breakpoints (Page 101)
Setting Breakpoints (Page 99)
Processing Scripts Step-by-Step (Page 98)
Action and Procedure Names in the Debugger (Page 96)
Structure of VBScript Files (Page 94)
Principles of Debugging (Page 92)
How to Activate the Debugger (Page 91)
Testing with the Debugger (Page 89)
Diagnostics (Page 82)
Introduction
The Microsoft Script Debugger can be used to process the scripts step-by-step in order, for
example, to locate logical errors systematically. The effect of each individual script line can be
tested in Runtime.
5. In order to go through the script document step-by-step, select one of the following menu
commands:
"Debug" > "Step Into": Skip to the next code line. If the script calls a procedure in this line, it
skips to the procedure using the "Step Into" command. The procedure called can then be
processed step-by-step.
"Debug" > "Step Over": Skips the procedure called. The procedure is called but the debugger
does not stop at the individual lines of the procedure. Instead, it moves to the next line of the
current script after the procedure has been executed.
6. To interrupt the step-by-step processing of a procedure, select the "Debug" > "Step Out" menu
commands. The debugger then skips to the next action.
7. Proceed step-by-step to the end of the document or select the "Debug" > "Run" menu items
to start the script again in Runtime.
See also
Principles of Debugging (Page 92)
Executing Script Commands (Page 103)
How to Determine and Modify Tag and Property Values (Page 102)
How to Set Bookmarks in Scripts (Page 101)
Deleting Breakpoints (Page 101)
Setting Breakpoints (Page 99)
Selecting a Script for Editing (Page 97)
Action and Procedure Names in the Debugger (Page 96)
Structure of VBScript Files (Page 94)
How to Activate the Debugger (Page 91)
Testing with the Debugger (Page 89)
Diagnostics (Page 82)
Introduction
Breakpoints can be set in a script to stop at specific points when processing it and to start the
debugger. Set a breakpoint in front of a line, for example, which you suspect contains a script
error.
It is possible to:
• Set breakpoints at specific lines to locate logical errors in the script step-by-step.
• Set a breakpoint and call the debugger before the next line in the script is processed. These
procedure is used, for example, for events such as "Change picture".
When a script file is updated in the debugger, all the breakpoints are lost.
Requirements
Runtime is activated, the picture to be debugged is active.
Procedure
Setting a breakpoint
1. Start the debugger and select the script. If automatic activation of the debuggers in WinCC
has been selected, the debugger is called in as soon as an erroneous script is executed.
2. Position the cursor on the action in which a breakpoint should be set.
3. Open the "Debug" menu and select the "Toggle Breakpoint" item or the icon from the
toolbar.
The next executable line will be marked by a red dot.
4. Switch to WinCC Runtime and execute the action you wish to debug.
The Debugger stops at the first breakpoint it finds in the script. The current line is displayed
on a yellow background. The script can then be processed step-by-step.
See also
Deleting Breakpoints (Page 101)
Executing Script Commands (Page 103)
How to Determine and Modify Tag and Property Values (Page 102)
How to Set Bookmarks in Scripts (Page 101)
Setting Breakpoints (Page 99)
Selecting a Script for Editing (Page 97)
Action and Procedure Names in the Debugger (Page 96)
Structure of VBScript Files (Page 94)
Principles of Debugging (Page 92)
How to Activate the Debugger (Page 91)
Testing with the Debugger (Page 89)
Diagnostics (Page 82)
Introduction
When an error has been cleared properly, the breakpoints in a script can be cleared individually
or all together.
Procedure
1. Position the cursor in the line whose breakpoint is to be deleted.
2. Open the "Debug" menu and select the "Toggle Breakpoint" item or the icon from the
toolbar.
The next line will be displayed without a mark.
3. To delete all the breakpoints in a script, open the "Debug" menu and select the "Clear all
Breakpoints" entry or the icon from the toolbar.
See also
Executing Script Commands (Page 103)
How to Determine and Modify Tag and Property Values (Page 102)
How to Set Bookmarks in Scripts (Page 101)
Setting Breakpoints (Page 99)
Selecting a Script for Editing (Page 97)
Action and Procedure Names in the Debugger (Page 96)
Structure of VBScript Files (Page 94)
Principles of Debugging (Page 92)
How to Activate the Debugger (Page 91)
Testing with the Debugger (Page 89)
Diagnostics (Page 82)
Introduction
During the debug routine, bookmarks can be set on code lines so that they can be found easier
again one line later.
See also
Executing Script Commands (Page 103)
How to Determine and Modify Tag and Property Values (Page 102)
Deleting Breakpoints (Page 101)
Setting Breakpoints (Page 99)
Selecting a Script for Editing (Page 97)
Action and Procedure Names in the Debugger (Page 96)
Structure of VBScript Files (Page 94)
Principles of Debugging (Page 92)
How to Activate the Debugger (Page 91)
Testing with the Debugger (Page 89)
Diagnostics (Page 82)
Introduction
While a script is running in Runtime, the "Command Window" of the debugger can be used, for
example, to compile and modify values of tags or properties in the script currently running. It is
possible, for example, to reset a process value for a script to zero without having to stop the
process.
Note
If you wish to determine the name of a WinCC object in Runtime, click <CTRL+ALT+SHIFT> and
position the mouse over the corresponding object. The picture name and object name then
appears in a tooltip.
Requirements
The script runs in Runtime and the debugger is opened.
Procedure
1. Set at least one breakpoint in the current script.
2. Switch to WinCC Runtime and trigger an action which causes the script to be executed.
The Debugger stops at the first breakpoint.
3. Open the "View" menu and activate the "Command Window" entry.
The "Command Window" opens.
4. In order to determine the value of a tag or property, enter a "?" followed by a Space and the
name of the tag or property whose value is to be determined, e.g. "?myTag".
Press <RETURN> to execute the command.
5. In order to modify the value of a tag/property, assign a value in the VBS syntax.
See also
Principles of Debugging (Page 92)
Executing Script Commands (Page 103)
How to Set Bookmarks in Scripts (Page 101)
Deleting Breakpoints (Page 101)
Setting Breakpoints (Page 99)
Selecting a Script for Editing (Page 97)
Action and Procedure Names in the Debugger (Page 96)
Structure of VBScript Files (Page 94)
How to Activate the Debugger (Page 91)
Testing with the Debugger (Page 89)
Diagnostics (Page 82)
Introduction
While a script is running in Runtime, the "Command Window" of the debugger can be used to
execute script commands directly and thus manipulate the running of the current script. The
script commands can be executed directly for test purposes without creating the command in a
script and activating it. It is possible, for example:
• To retrieve methods
• To retrieve procedures
• To manipulate object properties
"Command Window" can basically be used to execute all commands which can also be
executed from a VBScript.
Requirements
The script runs in Runtime and the debugger is opened.
Procedure
1. Set at least one breakpoint in the current script.
2. Switch to WinCC Runtime and trigger an action which causes the script to be executed.
The Debugger stops at the first breakpoint.
3. Open the "View" menu and activate the "Command Window" entry.
The "Command Window" opens.
4. Enter the required command and press "ENTER".
Note
If a faulty command is entered in the Command window, no error message is issued in Runtime.
The message "<Script Error> appears in the Command window instead.
See also
How to Determine and Modify Tag and Property Values (Page 102)
How to Set Bookmarks in Scripts (Page 101)
Deleting Breakpoints (Page 101)
Setting Breakpoints (Page 99)
Selecting a Script for Editing (Page 97)
Action and Procedure Names in the Debugger (Page 96)
Structure of VBScript Files (Page 94)
Principles of Debugging (Page 92)
How to Activate the Debugger (Page 91)
Testing with the Debugger (Page 89)
Diagnostics (Page 82)
Principle
The actions and procedures configured in both Global Script and in Graphics Designer can be
documented in WinCC.
The documentation options are distinguished between:
• Print Feedback Doc: In Graphics Designer, all the configured actions are printed with the
feedback of the current picture. The Feed Back contains the C-actions and VBS actions,
located beside each other, differentiated by the source text (C or VBScript).
• Print current script: The Feed Back in Global Script always contains the currently open
procedure or action.
WinCC provided predefined print layouts for the layout of the Feed Back. Customized
print layouts can also be developed and linked to the Print Job tab control with "Project
Documentation - Setup".
Procedure
1. Open Global Script or Graphics Designer according to the scripts to be documented.
2. Configure the print job, if necessary, using the "Project Documentation - Setup" command.
3. Use the "View Project Documentation" command to preview the data to be printed.
4. Select the menu commands "File" > "Print Project Documentation" to print the data.
See also
Creating and Editing Actions (Page 56)
Creating and Editing Procedures (Page 40)
VBScript Editors (Page 27)
Using Visual Basic Script in WinCC (Page 12)
$FWLYH3URMHFW
7DJV 7DJ6HW
7DJ 7DJ
$FWLYH6FUHHQ
+0,5XQWLPH
6FUHHQV
6FUHHQ $FWLYH6FUHHQ,WHP
6FUHHQ,WHPV
6FUHHQ,WHP
/D\HUV
/D\HU
'DWD6HW
'DWD,WHP
/RJJLQJ 'DWDORJV
$ODUPORJV
$ODUPV 3URFHVV9DOXHV
$ODUP 3URFHVV9DOXH
Object
The VBS object model of the Faceplate type provides you with access to the graphic objects
and Faceplate tags of the Faceplate type in Runtime.
Objects
Objects and lists are provided for access to all the objects in the graphic Runtime systems:
Graphic objects, pictures, layers and tags.
Properties
The properties of the individual objects can be used to modify specific graphic objects and tags
in Runtime , e.g. activating an operating element per mouse click or triggering a color change
by modifying a tag value.
Methods
Methods, which are applied to individual objects, can be used to read tag values for further
processing or display diagnostics messages in Runtime.
See also
Object types of the ScreenItem object (Page 144)
Methods (Page 730)
Properties (Page 301)
Objects and Lists (Page 108)
Overview
The objects and lists provided in WinCC object models enables access to graphic objects and tags
in Runtime.
Example:
Access to Tags
In WinCC, tags are accessed directly in Runtime using the superordinate "HMIRuntime" object.
Tag values can be read out or set anew.
Lists
Lists of WinCC object models behave in the same way as standard collections of VBS. Exception:
The "Tags" list has no Enum function.
Available Objects
• Alarm
• Alarms
• AlarmLogs
• DataItem
• DataLogs
• DataSet
• HMIRuntime
• Item
• Layer
• Layers
• Logging
• ProcessValues
• ProcessValue
• Project
• ScreenItem
• ScreenItems
• Screen
• Screens
• Tag
• Tags
• TagSet
See also
ScreenItems Object (List) (Page 129)
TagSet Object (List) (Page 142)
Tags Object (List) (Page 140)
Tag Object (Page 138)
Screens Object (List) (Page 135)
Screen Object (Page 132)
ScreenItem Object (Page 126)
Description
+0,5XQWLPH
$ODUPV 3URFHVV9DOXHV
$ODUP 3URFHVV9DOXH
Note
The properties of the alarm object are not automatically updated when the values of the
properties change.
See also
Alarms object (list) (Page 111)
Description
+0,5XQWLPH
$ODUPV 3URFHVV9DOXHV
$ODUP 3URFHVV9DOXH
Usage
Using the "Alarms" list you can:
• Access a message in the list (Item method)
• Create a new alarm object (Create method)
• Read the alarm ID of the message (AlarmID attribute)
• Set the status of a message (State property)
• Set the time stamp of the message (Timestamp property)
• Generate an instance of the alarm object (Instance property)
• Read the name of the computer on which the message came (ComputerName property)
• Read the name of the user who triggered the message (UserName property)
• Set the names of the process value blocks (ProcessValues property)
• Set the comment of the message (Comment property)
• Set the server prefix of the message (Context property)
Example
In the following example, the message with the alarm number "1" configured in the Alarm
Logging Editor will be triggered:
'VBS360
Dim MyAlarm
Set MyAlarm = HMIRuntime.Alarms(1)
MyAlarm.State = 5 'hmiAlarmStateCome + hmiAlarmStateComment
MyAlarm.Comment = "MyComment"
MyAlarm.UserName = "Hans-Peter"
MyAlarm.ProcessValues(1) = "Process Value 1"
MyAlarm.ProcessValues(4) = "Process Value 4"
MyAlarm.Create "MyApplication"
See also
TimeStamp Property (Page 641)
ComputerName property (Page 386)
Context property (Page 387)
State property (Page 603)
AlarmID property (Page 307)
Instance property (Page 468)
Comment property (Alarm Logging) (Page 384)
UserName property (Page 697)
ProcessValue property (Page 560)
Description
/RJJLQJ $ODUPORJV
'DWDORJV
Using the object, swapped archive segments of Alarm Logging may be reconnected to
Runtime, or previously swapped archive segments of Alarm Logging may be deleted again.
Therein
• Archive segments to be swapped are copied to the common archiving directory of the WinCC
project, or
• previously swapped archive segments are deleted in the common archiving directory.
Using parameters you may control from where archive segments are to be swapped. You
may also specify the time period over which archive segments are to be swapped or deleted.
Archive segments are copied to the common archiving directory of the project.
If an error occurred during the operation with archiving segments, the method used returns
an error message. Additional information may be found under the subject heading "Error
Messages from Database Area".
Usage
Previously swapped archive segments of Alarm Logging may be connected with Runtime
("Restore" method).
Previously swapped archive segments of Alarm Logging may be deleted from the Runtime
project ("Remove" method).
Example:
In the following example, archive segments from Alarm Logging are swapped and the return
value is output as Trace.
'VBS187
HMIRuntime.Trace "Ret: " &
HMIRuntime.Logging.AlarmLogs.Restore("D:\Folder","2004-09-14","2004-09-20",-1) & vbNewLine
See also
Error Messages from Database Area (Page 842)
Restore Method (Page 814)
Remove Method (Page 809)
DataLogs Object (Page 115)
Logging Object (Page 123)
Description
+0,5XQWLPH
'DWD6HW
'DWD,WHP
6FUHHQV 'DWD6HW
6FUHHQ 'DWD,WHP
The DataItem object is used to access the contents of the DataSet list. Values or object
references are stored in the list as DataItem.
Access uses the name under which the value was added to the list. Single access using an
index is not recommended since the index changes during adding or deleting of values. The
index may be used to output the complete contents of the list. The output is in alphabetical
order.
Note
For object references it must be ascertained that objects are multiread-enabled.
Example:
The example shows how the value of 'Motor1' is output as Trace.
'VBS163
HMIRuntime.Trace "motor1: " & HMIRuntime.DataSet("motor1").Value & vbNewLine
The following example enumerates all DataItem objects of the DataSet list. Name and value
are output as Trace.
'VBS164
Dim data
For Each data In HMIRuntime.DataSet
HMIRuntime.Trace data.Name & ": " & data.Value & vbNewLine
Next
Note
For objects, value may possibly not be output directly
See also
Screen Object (Page 132)
HMIRuntime Object (Page 119)
DataSet Object (List) (Page 116)
Value Property (Page 700)
Name Property (Page 523)
Description
/RJJLQJ $ODUPORJV
'DWDORJV
Using the object, swapped archive segments of Tag Logging may be reconnected to Runtime,
or previously swapped archive segments of Tag Logging may be deleted again. Therein
• Archive segments to be swapped are copied to the common archiving directory of the WinCC
project, or
• previously swapped archive segments are deleted in the common archiving directory.
Using parameters you may control from where archive segments are to be swapped. You may
also specify the time period over which archive segments are to be swapped or deleted. In
addition, you may set the archive type ("Tag Logging Fast", "Tag Logging Slow", "Tag Logging
Fast and Tag Logging Slow"). Archive segments are copied to the common archiving directory
of the project.
If an error occurred during the operation with archiving segments, the method used returns
an error message. Additional information may be found under the subject heading "Error
Messages from Database Area".
Usage
Previously swapped archive segments of Tag Logging may be connected with Runtime ("Restore"
method).
Previously swapped archive segments of Tag Logging may be deleted from the Runtime
project ("Remove" method).
Example:
In the following example, fast archive segments from Tag Logging are swapped and the return
value is output as Trace.
'VBS188
HMIRuntime.Trace "Ret: " &
HMIRuntime.Logging.DataLogs.Restore("D:\Folder","2004-09-14","2004-09-20",-1,1) &
vbNewLine
See also
Error Messages from Database Area (Page 842)
Restore Method (Page 814)
Remove Method (Page 809)
AlarmLogs Object (Page 113)
Logging Object (Page 123)
Description
+0,5XQWLPH
'DWD6HW
'DWD,WHP
6FUHHQV 'DWD6HW
6FUHHQ 'DWD,WHP
Using the DataSet object, data may be exchanged across several actions.
A DataSet object is global and defined by the Screen object. Any VBS action may access the
data.
The DataSet object at the Screen object must be addressed according to picture hierarchy
and shall persist as long as the picture is displayed. The global object persists over the entire
Runtime time period.
Access uses the DataItem object.
Note
Objects of type Screen, Screens, ScreenItem, ScreenItems, Tag and TagSet cannot be included in
the DataSet list.
The DataSet object does not support any classes.
Usage
Using the "DataSet" list, you may:
• Output or process (enumerate) all objects in the list.
• Output the number of elements contained ("Count" property).
• To process a specific object in the list ("Item" method).
• Add an object to the list ("Add" method).
• Remove a specific object from the list ("Remove" method).
• Remove all objects from the list ("RemoveAll" method).
Access to list elements uses:
HMIRuntime.DataSet("Itemname")
HMIRuntime.Screens("Screenname").DataSet("Itemname")
In a picture, you may access the DataSet object of the picture by using:
DataSet("Itemname")
If upon access the stated name does not exist in the list, VT_Empty is returned and an
Exception is triggered.
Example:
The example shows how to add a value to the list, how to read it and remove it. It make sense
to perform this in several different actions.
'VBS162
HMIRuntime.DataSet.Add "motor1", 23
HMIRuntime.Trace "motor1: " & HMIRuntime.DataSet("motor1").Value & vbNewLine
HMIRuntime.DataSet.Remove("motor1")
See also
DataItem Object (Page 114)
RemoveAll Method (Page 812)
Remove Method (Page 809)
Item Method (Page 789)
Count property (listing) (Page 389)
Add Method (Page 733)
Description
+0,5XQWLPH
$FWLYH3URMHFW
7DJV
7DJ
$FWLYH6FUHHQ
6FUHHQV
6FUHHQ
/RJJLQJ
$ODUPV
$ODUP
Usage
The "HMIRuntime" object can be used for the following, for example:
• Read or set the current Runtime language ("Language" property).
• Read or set the name of the current base picture ("BaseScreenName" property).
• Read the path of the active Runtime project ("ActiveProject" property).
• Access tags ("Tags" property).
• Access tags of a list ("DataSet" property).
• Exit Runtime ("Stop" method).
• Display messages in a diagnostics window ("Trace" method).
Example:
The following command terminates WinCC Runtime:
'VBS3
HMIRuntime.Stop
See also
Screens Object (List) (Page 135)
TagSet Object (List) (Page 142)
Tags Object (List) (Page 140)
Logging Object (Page 123)
DataSet Object (List) (Page 116)
Visible Property (Page 716)
Trace Method (Page 833)
Tags Property (Page 614)
Stop Method (Page 832)
AlignmentLeft Property (Page 309)
Logging Property (Page 498)
Language Property (Page 472)
DataSet Property (Page 406)
CurrentContext Property (Page 401)
BaseScreenName Property (Page 344)
ActiveProject Property (Page 303)
ActiveScreen Property (Page 303)
MenuToolBarConfig Property (Page 508)
Alarms object (list) (Page 111)
Description
The "Item" object provides a reference to the current object.
Usage
The "Item" object is used, for example, to address the properties of the object currently selected
in Graphics Designer.
Example:
In the following example, a rectangle has been created. When the object has been selected, all
the properties of the current object can be set a background color red:
'VBS195
Item.BackColor = RGB(255,0,0)
See also
Objects and Lists (Page 108)
Description
6FUHHQV
6FUHHQ
/D\HUV
/D\HU
The layer object returns the result of access to the layers list.
Parent Object
Picture, in which the picture layer is.
Usage
Depending on certain events, the Layer object can be used to obtain access to the properties of
a complete layer in order, for example, to hide or unhide a layer with operating elements
according to the operator authorization.
Example:
In the following example, Layer 1 is set invisible:
'VBS4
Layers(2).Visible = vbFalse
See also
Layer Object (Page 121)
Visible Property (Page 716)
Parent Property (Page 543)
Name Property (Page 523)
Description
6FUHHQV
6FUHHQ
/D\HUV
/D\HU
The Layers list enables access to all 32 layers of the graphical Runtime system.
Parent Object
Picture, in which the picture layer is.
Usage
The "Layers" list can be used to:
• Process all layers in the list ("_NewEnum" property).
• Count all layers contained in the list ("Count" property).
• Process a layer from the list ("Item" method).
The properties represent default properties and methods of a list and are not described in
detail in the WinCC documentation.
See also
Parent Property (Page 543)
Item Method (Page 789)
Count property (listing) (Page 389)
Layer Object (Page 121)
Description
+0,5XQWLPH
/RJJLQJ $ODUPORJV
'DWDORJV
Using the object, swapped archive segments may be reconnected to Runtime, or previously
swapped archive segments may be deleted again. Therein
• Archive segments to be swapped are copied to the common archiving directory of the WinCC
project, or
• previously swapped archive segments are deleted in the common archiving directory.
Using parameters you may control from where archive segments are to be swapped. You
may also specify the time period over which archive segments are to be swapped or deleted.
Archive segments are copied to the common archiving directory of the project.
If an error occurred during the operation with archiving segments, the method used returns
an error message. Additional information may be found under the subject heading "Error
Messages from Database Area".
Usage
Previously swapped archive segments of Alarm Logging and Tag Logging may be connected
with Runtime ("Restore" method).
Previously swapped archive segments of Alarm Logging and Tag Logging may be deleted
from the Runtime project ("Remove" method).
Example:
In the following example, archive segments from Alarm Logging and Tag Logging are swapped
and the return value is output as Trace.
'VBS189
HMIRuntime.Trace "Ret: " &
HMIRuntime.Logging.Restore("D:\Folder","2004-09-14","2004-09-20",-1) & vbNewLine
See also
Error Messages from Database Area (Page 842)
DataLogs Object (Page 115)
AlarmLogs Object (Page 113)
Restore Method (Page 814)
Remove Method (Page 809)
DataLogs Property (Page 405)
AlarmLogs Property (Page 308)
Description
$ODUPV 3URFHVV9DOXHV
$ODUP 3URFHVV9DOXH
Note
Only the 10 predefined ProcessValues are supported.
See also
ProcessValues Object (List) (Page 125)
Description
$ODUPV 3URFHVV9DOXHV
$ODUP 3URFHVV9DOXH
Usage
Using the "ProcessValues" list, you can:
• Edit a ProcessValue from the list ("Item" method)
• Display or edit all the objects in the list (_NewEnum attribute)
• Count all ProcessValues contained in the list (Count property)
• Read or set the values of the ProcessValue object (Value property)
The properties represent default properties and methods of a list and are not described in
detail in the WinCC documentation.
See also
Alarms object (list) (Page 111)
ProcessValue Object (Page 124)
Count property (listing) (Page 389)
Value Property (Page 700)
Item Method (Page 789)
Description
+0,5XQWLPH
$FWLYH3URMHFW
Using the object, information may be requested from the current Runtime project.
The project object is returned as the result of ActiveProject.
Usage
Using the "Project" object, you may:
• Read the path of the current Runtime project ("Path" property).
• Read the name of the current Runtime project, without path or file extension ("Name"
property).
Example:
The following example returns name and path of the current Runtime project as Trace:
'VBS159
HMIRuntime.Trace "Name: " & HMIRuntime.ActiveProject.Name & vbNewLine
HMIRuntime.Trace "Path: " & HMIRuntime.ActiveProject.Path & vbNewLine
See also
ActiveProject Property (Page 303)
Name Property (Page 523)
Path Property (Page 545)
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
The ScreenItem object returns the result of access to the ScreenItem list.
Parent Object
Picture containing the picture element.
Usage
The ScreenItem object can be used to access the properties of graphic objects within a picture
according to certain events.
The "ScreenItem" object can be used for the following, for example:
• To activate or deactivate the visualization of an object ("Visible" property).
• To release or block the operation of an object ("Enabled" property).
• Change the width and height of an object ("Height" and "Width" properties).
• Change the position of an object ("Top" and "Left" properties).
• Read and define a layer in which a graphic object is located ("Layer" property).
• Read or define the name of a graphic object ("ObjectName" property).
• Define a reference to the superordinate picture ("Parent" property).
Using the "Activate" method, the focus is set on the respective ScreenItem object. If the focus
cannot be set because the object is non-operable, for example, an error is generated. Using
error processing (On Error Resume Next), the error may be evaluated.
Standard ob‐ Smart objects Windows ob‐ Tube ob‐ Controls Others
jects jects jects
Ellipse 3D bar Button Double T- Siemens HMI Sym‐ Customized Ob‐
piece bol Library ject
Ellipse arc Application Check box Polygon tube WinCC AlarmCon‐ Group
window trol
Ellipse seg‐ Bar Radio box Tube bend WinCC digital/
ment analog clock con‐
trol
Circle Picture win‐ Round button T-piece WinCC Function‐
dow TrendControl
Circular arc Control Slider WinCC gauge con‐
trol
Pie segment I/O field WinCC Online‐
TrendControl
Line Faceplate In‐ WinCC OnlineTa‐
stance bleControl
Polygon Graphic object WinCC RulerCon‐
trol
Polyline Combo box WinCC Slider Con‐
trol
Rectangle List box WinCC UserArchi‐
veControl
Rounded rec‐ Multiple row
tangle text
Connector OLE object
Group display
Text list
Status display
Detailed descriptions of the individual object types is provided under "ScreenItem Object
Types". The ScreenItem object's "Type" property can be used to address the object types via
the VBS Type ID.
Object properties
The "ScreenItem" object has different properties according to the features. The following section
describes the properties which all ScreenItem object types have:
When a specific object type is addressed, certain further properties are added to the standard
properties:
The additional properties are indicated in the descriptions of the individual object types.
Example
In the following example, the radius of a circle is set to 2 in Runtime per mouse click:
See also
Object types of the ScreenItem object (Page 144)
Example: How to Read Tag Values (Page 851)
Example: Writing tag values (Page 849)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
Parent Property (Page 543)
Left Property (Page 489)
Layer Property (Page 474)
Height Property (Page 456)
Enabled Property (Page 416)
Activate Method (Page 731)
Objects and Lists (Page 108)
Properties (Page 301)
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Parent Object
Picture containing the picture element.
Usage
The "ScreenItems" list can be used to:
• To display or edit all objects in the list (i.e. all objects within a picture) ("_NewEnum"
property).
• To count the objects in a picture ("Count" property).
• To process a specific object in the list ("Item" method).
The properties are standard properties and methods of a collection and are not described in
detail in the WinCC documentation.
'Control1 is a WinCC-Control
'VBS197
Dim Control
Set Control=ScreenItems("Control1")
Control.type
Example
In the following example, the name of the objects in the current picture are displayed in a
message box:
See also
Count property (listing) (Page 389)
Example: How to Read Tag Values (Page 851)
Example: Writing tag values (Page 849)
ScreenItem Object (Page 126)
Parent Property (Page 543)
Item Method (Page 789)
Object types of the ScreenItem object (Page 144)
Description
+0,5XQWLPH
6FUHHQV
6FUHHQ $FWLYH6FUHHQ,WHP
6FUHHQ,WHPV
6FUHHQ,WHP
/D\HUV
/D\HU
'DWD6HW
'DWD,WHP
The Screen object returns the result of access to the Screen list. All the properties and
methods of this object can also be edited directly in Runtime. The "Screen" object represents
a WinCC picture in Runtime and contains all the properties of the picture document and
picture view.
The "Screen" object also contains the following:
• A list of all the graphic objects contained in the addressed picture which can be addressed by
the "ScreenItems" object.
• A list of all the layers contained in the addressed picture which can be addressed by the
"Layers" object.
Parent Object
A picture window in which the Screen object is embedded.
When the Screen object is the basic picture, the Parent object is not defined and set to zero.
Usage
The "Screen" object can be used for the following, for example:
• To release or block the operation of a screen ("Enabled" property).
• Change the width and height of a screen ("Height" and "Width" properties).
Example:
In the following example, the width of the first picture in Runtime is increased by 20 pixels:
'VBS7
Dim objScreen
Set objScreen = HMIRuntime.Screens(1)
MsgBox "Screen width before changing: " & objScreen.Width
objScreen.Width = objScreen.Width + 20
MsgBox "Screen width after changing: " & objScreen.Width
Note
Always enter picture names without the extension "PDL" for reasons of compatibility with future
versions.
See also
ScreenItems Property (Page 576)
Refresh Method (Page 808)
Activate Method (Page 731)
Description
+0,5XQWLPH
6FUHHQV
6FUHHQ $FWLYH6FUHHQ,WHP
6FUHHQ,WHPV
6FUHHQ,WHP
/D\HUV
/D\HU
'DWD6HW
'DWD,WHP
By using the picture window technique, several windows can be opened simultaneously in
WinCC Runtime but only one basic picture exists. The "Screens" list enables access to all open
pictures in Runtime using the picture names. The Screens list contains all invisible pictures.
Usage
When configuring a multi-user project, it is essential to specify the server prefix to access a
picture which is not on the local computer.
The "Screens" list can be used to:
• Display or edit all the pictures within the list ("_NewEnum" property).
• To count the pictures in a project ("Count" property).
• To process a specific picture in the list ("Item" method).
• Initiate new drawing of all visible pictures ("Refresh" method).
The properties are standard properties and methods of a collection and are not described in
detail in the WinCC documentation.
The access code, required in the VBS environment in the
HMIRuntime.Screens(<Zugriffsschlüssel>) instruction, must fulfill the syntax requirements:
[<Grundbildname>.]<Bildfenstername>[:<Bildname>] ...
.<Bildfenstername>[:<Bildname>]
This means:
• The access code expresses the picture hierarchy.
• The picture names in the code can be omitted at any point.
• The "AccessPath" property of the "Screen" object corresponds to the full access code.
• Always enter picture names without the extension "PDL" for reasons of compatibility with
future versions.
• The basic picture can be addressed by the access code ".
In addition, it has been defined that the basic picture can be addressed with Index 1.
Examples
The pictures are addressed by the hierarchy information in the list. There are two options here,
with or without use of the picture name. In the following examples, a basic picture
"BaseScreenName" is configured with a picture window "ScreenWindow". The picture window
contains the picture "ScreenName".
'VBS8
Set objScreen = HMIRuntime.Screens("BaseScreenName.ScreenWindow:ScreenName")
'VBS9
Set objScreen = HMIRuntime.Screens("ScreenWindow")
'VBS10
Set objScreen = HMIRuntime.Screens(1)
'VBS11
Set objScreen = HMIRuntime.Screens("")
'VBS12
Set objScreen = HMIRuntime.Screens("BaseScreenName")
See also
ScreenItem Object (Page 126)
Refresh Method (Page 808)
Description
The "HMIRuntime" component was deactivated in the faceplate type. The new "SmartTags"
component was added for the faceplate type. With the SmartTags object you can dynamize the
faceplate type. You can only access the faceplate variables and the properties of the faceplate
type. You cannot access the normal WinCC tag management system. The normal WinCC tag
management system is not available in the faceplate type.
Usage
Using the "SmartTags" object, you can:
• Access the faceplate tags in a faceplate type.
Syntax: SmartTags("<tagname>")
• Access the properties of a faceplate type.
Syntax: SmartTags("Properties\<propertyname>")
Example 1
Insert a rectangle and a button in a faceplate type. Define a faceplate variable var1. Connect the
"Width" property of the rectangle to faceplate variable var1. Dynamize the "OnClick" event of the
button as follows with VBS.
'VBS306
Dim w
w = SmartTags("var1")
w = w + 10
SmartTags("var1") = w
When you activate Runtime, the faceplate variable is incremented by 10 every time you click
the button. This increases the rectangle width by 10.
'VBS307
Dim w
Set w = SmartTags("var1")
w.value = w.value + 10
Example 2:
Insert a rectangle and a button in a faceplate type. Define the instance-specific property "wide".
Link the "Width" property of the rectangle to the instance-specific property "wide". Dynamize the
"OnClick" event of the button as follows with VBS:
'VBS308
Dim w
w = SmartTags("Properties\wide")
SmartTags("Properties\wide") = w + 50
When you activate Runtime, the instance-specific property "wide" is increased by 50 every
time you click the button. This increases the rectangle width by 50.
See also
SmartTag property (Page 596)
Description
+0,5XQWLPH
7DJV 7DJ6HW
7DJ 7DJ
A tag object is returned via the "Tags" list. A tag object can be used to address all the
properties and methods of a tag.
When creating a tag object, all the properties are installed with the following values:
• Value = VT_EMPTY
• Name = Tag name
• QualityCode = BAD NON-SPECIFIC
• TimeStamp = 0
• LastError = 0
• ErrorDescription = " "
Note
A summary of possible Quality Codes may be found in WinCC Information System under key
word "Communication" > "Diagnostics" or "Communication" > "Quality Codes".
Use
The "Tag" object can be used to:
• Read information for the tag ("Name", "QualityCode", "TimeStamp", "LastError" and
"ErrorDescription" properties)
• Set a value for a tag ("Write" method, "Value" property)
• Read a value for a tag ("Read" method, "Value" property)
Read the value of a "Tag1" tag:
'VBS13
Dim objTag
Set objTag = HMIRuntime.Tags("Tag1")
objTag.Read()
MsgBox objTag.Value
'VBS14
Dim lngVar
lngVar = 5
MsgBox lngVar
Note
Tag names must not contain any special characters.
Please note that when creating a tag, it must not contain a value (Value = VT_EMPTY). Initialize
the tags after declaration with the corresponding value.
Notes on Cross-Reference
All the pictures which are addressed with the standard formulation
HMIRuntime.Tags("tag name")
are automatically compiled by the Cross-Reference of WinCC and then listed in the picture
properties.
If tags are addressed with different formulations in the code, this can be notified by the
following section of the Cross-Reference:
' WINCC:TAGNAME_SECTION_START
Const TagNameInAction = "TagName"
' WINCC:TAGNAME_SECTION_END
Note
It is not possible to guarantee the compilation of combined tag names from the Cross-Reference.
See also
Name Property (Page 523)
Example: How to Read Tag Values (Page 851)
Example: Writing tag values (Page 849)
Write Method (Page 835)
Read Method (Page 804)
Value Property (Page 700)
TimeStamp Property (Page 641)
QualityCode Property (Page 561)
LastError Property (Page 472)
ErrorDescription Property (Page 421)
Comment property (Tag Logging) (Page 384)
Description
+0,5XQWLPH
7DJV 7DJ6HW
7DJ 7DJ
The "Tags" list enables access to tags in WinCC Runtime. The result of access to the "Tags" list
is returned by an object of the type "Tag". The Tag object can be used to access all the tag
properties and methods.
Note
"Tags" is a list with a restricted functional scope. The tags in the list cannot be accessed via the
index but only by using the tag names. The standard methods get_Count and get_NewEnum
cannot be used in the Tags list.
Usage
Tags in the list are accessed via:
HMIRuntime.Tags("Tagname")
The Tags list is used to declare tags (tag objects) for read and write access. To ensure that
read and write access is carried out without errors, the corresponding tags must be available
in WinCC tag management.
In VBS you can address tags directly via the name and set and read values. If you want
to access additional tag properties, request the quality code, for example, you will always
have to address tags via the tag listing. The tag object returned enables access to all tag
properties and methods. You have to form an instance for the object, to write a binary tag
with HMIRuntime.Tags("Variable").Value=TRUE, for example.
The "CreateTagSet" method can be used to generate a "TagSet" object that enables
simultaneous access to several tags.
Example:
There are two options when creating tags:
• With specification of the server prefix: For tags in multi-user systems which are not stored
locally.
• Direct use of the tag name: For tags stored locally on the computer.
'VBS15
Dim objTag
Set objTag = HMIRuntime.Tags("Serverprefix::Tagname")
If the server prefix is entered directly, the "ServerPrefix" property is assigned the
corresponding value.
'VBS16
Dim objTag
Set objTag = HMIRuntime.Tags("Tagname")
If just the tag name is used, the "ServerPrefix" and "TagPrefix" properties are assigned the
values from the current context (current picture window).
See also
Example: How to Read Tag Values (Page 851)
Example: Writing tag values (Page 849)
Item Method (Page 789)
CreateTagSet Method (Page 737)
Tag Object (Page 138)
Description
The object "TagSet" enables simultaneous access to several tags in one call.
This features better performance and lower communication load than single access to
various tags.
Usage
Possible uses of the TagSet object:
• Add tags to the list ("Add" method)
• Access tag objects contained in the list, and their properties ("Item" method)
• Write all tags of the list ("Write" method)
• Read all tags of the list ("Read" method)
• Remove single tags from the list ("Remove" method)
• Remove all tags from the list ("RemoveAll" method)
'VBS169
Dim myTags
myTags = HMIRuntime.Tags.CreateTagSet
myTags("Tagname")
For error-free read or write access to these tag objects, the corresponding tags must be
created in the WinCC tag management.
If an error occurred during read/write access, the method used will return an error message
using the "LastError" and "ErrorDescription" properties.
Synchronous reading/writing
Synchronous writing and reading of the tags is possible.
The optional "Writemode" parameter can be used to write process tags directly to the AS with
"1", for example "group.Write 1".
Use the optional "Readmode" parameter to read process tags with "1" directly from the AS or
channel, for example "group.Read 1".
Example:
The following example shows you how to generate a TagSet object, add tags and write values.
'VBS168
Build a Reference to the TagSet Object
Dim group
Set group = HMIRuntime.Tags.CreateTagSet
'Add Tags to the Collection
group.Add "Motor1"
group.Add "Motor2"
'Set the Values of the Tags
group("Motor1").Value = 3
group("Motor2").Value = 9
'Write the Values to the DataManager
group.Write
See also
LastError Property (Page 472)
Example: How to Read Tag Values (Page 851)
Example: Writing tag values (Page 849)
Write Method (Page 835)
RemoveAll Method (Page 812)
Remove Method (Page 809)
Read Method (Page 804)
Introduction
The following section lists all the available types of the "ScreenItem" object.
The features of the "ScreenItem" object represent all the graphic objects available in WinCC
Graphics Designer.
The object types are divided into the following groups according to their arrangement in
Graphics Designer:
• Standard objects
• Smart objects
• Windows objects
• Tube objects
• Controls
There are also the object types
• Customized Object
• Group
See also
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Group (Page 300)
Customized Object (Page 298)
Controls (Page 220)
Ellipse
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Usage
In the following example, the object with the name "Ellipse1" is moved 10 pixels to the right:
'VBS17
Dim objEllipse
Set objEllipse = ScreenItems("Ellipse1")
objEllipse.Left = objEllipse.Left + 10
See also
FillStyle Property (Page 430)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
ToolTipText Property (Page 660)
Ellipse arc
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "Ellipse Arc"
Usage
In the following example, the object with the name "EllipseArc1" is moved 10 pixels to the right:
'VBS18
Dim objEllipseArc
Set objEllipseArc = ScreenItems("EllipseArc1")
objEllipseArc.Left = objEllipseArc.Left + 10
See also
RadiusHeight Property (Page 562)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
ToolTipText Property (Page 660)
StartAngle Property (Page 603)
RadiusWidth Property (Page 562)
Ellipse segment
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "Ellipse Segment"
Usage
In the following example, the object with the name "EllipseSegment1" is moved 10 pixels to the
right:
'VBS19
Dim objEllipseSeg
Set objEllipseSeg = ScreenItems("EllipseSegment1")
objEllipseSeg.Left = objEllipseSeg.Left + 10
See also
Layer Object (Page 121)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
ToolTipText Property (Page 660)
StartAngle Property (Page 603)
RadiusWidth Property (Page 562)
RadiusHeight Property (Page 562)
PasswordLevel Property (Page 545)
Parent Property (Page 543)
ObjectName Property (Page 526)
Left Property (Page 489)
Height Property (Page 456)
FlashRateBorderColor Property (Page 438)
FlashRateBackColor Property (Page 438)
FlashBorderColor Property (Page 435)
FlashBackColor Property (Page 435)
FillStyle Property (Page 430)
FillingIndex Property (Page 429)
Filling Property (Page 428)
FillColor Property (Page 428)
Circle
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Usage
In the following example, the object with the name "Circle1" is moved 10 pixels to the right:
'VBS20
Dim objCircle
Set objCircle= ScreenItems("Circle1")
objCircle.Left = objCircle.Left + 10
See also
Properties (Page 301)
BorderStyle Property (Page 359)
Activate Method (Page 731)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
ToolTipText Property (Page 660)
Radius Property (Page 562)
PasswordLevel Property (Page 545)
Parent Property (Page 543)
ObjectName Property (Page 526)
Left Property (Page 489)
Layer Object (Page 121)
Height Property (Page 456)
FlashRateBorderColor Property (Page 438)
FlashRateBackColor Property (Page 438)
FlashBorderColor Property (Page 435)
FlashBackColor Property (Page 435)
FillStyle Property (Page 430)
FillingIndex Property (Page 429)
Filling Property (Page 428)
FillColor Property (Page 428)
Enabled Property (Page 416)
BorderWidth Property (Page 359)
BorderFlashColorOn Property (Page 359)
BorderFlashColorOff Property (Page 358)
BorderColor Property (Page 357)
BorderBackColor Property (Page 357)
BackFlashColorOn Property (Page 325)
BackFlashColorOff Property (Page 325)
Circular arc
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "Circular Arc"
Usage
In the following example, the object with the name "CircularArc1" is moved 10 pixels to the right:
'VBS21
Dim objCircularArc
Set objCircularArc = ScreenItems("CircularArc1")
objCircularArc.Left = objCircularArc.Left + 10
See also
StartAngle Property (Page 603)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
Pie segment
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "Pie Segment"
Usage
In the following example, the object with the name "PieSegment1" is moved 10 pixels to the
right:
'VBS22
Dim objCircleSeg
Set objCircleSeg = ScreenItems("PieSegment1")
objCircleSeg.Left = objCircleSeg.Left + 10
See also
Type Property (Page 686)
BorderColor Property (Page 357)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
Top Property (Page 662)
ToolTipText Property (Page 660)
StartAngle Property (Page 603)
Radius Property (Page 562)
PasswordLevel Property (Page 545)
Parent Property (Page 543)
ObjectName Property (Page 526)
Left Property (Page 489)
Layer Object (Page 121)
Height Property (Page 456)
FlashRateBorderColor Property (Page 438)
FlashRateBackColor Property (Page 438)
FlashBorderColor Property (Page 435)
FlashBackColor Property (Page 435)
FillStyle Property (Page 430)
FillingIndex Property (Page 429)
Filling Property (Page 428)
FillColor Property (Page 428)
Line
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Usage
In the following example, the object with the name "Line1" is moved 10 pixels to the right:
'VBS23
Dim objLine
Set objLine = ScreenItems("Line1")
objLine.Left = objLine.Left + 10
See also
PasswordLevel Property (Page 545)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
ToolTipText Property (Page 660)
RotationAngle Property (Page 567)
ReferenceRotationTop Property (Page 564)
ReferenceRotationLeft Property (Page 564)
Parent Property (Page 543)
ObjectName Property (Page 526)
Left Property (Page 489)
Layer Object (Page 121)
Height Property (Page 456)
FlashRateBorderColor Property (Page 438)
FlashBorderColor Property (Page 435)
Enabled Property (Page 416)
BorderWidth Property (Page 359)
BorderStyle Property (Page 359)
BorderFlashColorOn Property (Page 359)
BorderFlashColorOff Property (Page 358)
BorderEndStyle Property (Page 358)
BorderColor Property (Page 357)
BorderBackColor Property (Page 357)
Layer Property (Page 474)
Polygon
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Usage
In the following example, the object with the name "Polygon1" is moved 10 pixels to the right:
'VBS24
Dim objPolygon
Set objPolygon = ScreenItems("Polygon1")
objPolygon.Left = objPolygon.Left + 10
See also
ReferenceRotationTop Property (Page 564)
BackFlashColorOn Property (Page 325)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
ToolTipText Property (Page 660)
RotationAngle Property (Page 567)
Polyline
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Usage
In the following example, the object with the name "Polyline1" is moved 10 pixels to the right:
'VBS25
Dim objPolyline
Set objPolyline = ScreenItems("Polyline1")
objPolyline.Left = objPolyline.Left + 10
See also
Layer Object (Page 121)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
ToolTipText Property (Page 660)
RotationAngle Property (Page 567)
ReferenceRotationTop Property (Page 564)
Rectangle
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Usage
In the following example, the object with the name "Rectangle1" is moved 10 pixels to the right:
'VBS26
Dim objRectangle
Set objRectangle = ScreenItems("Rectangle1")
objRectangle.Left = objRectangle.Left + 10
The instruction causes the VBScript engine to initiate the follow-on command in the case of a
Runtime error.
The error code can subsequently be checked using the Err object. In order to deactivate the
handling of Runtime errors in scripts, use the following command:
On Error Goto 0
Handling errors always relates to the procedure layer. If a script in a procedure causes an
error, VBScript checks whether an error handling measure is implemented in this layer. If not,
control is transferred one layer up (to the calling procedure). If there is no error handling
measure here either, the control is transferred yet another layer up. This continues until
either the top module level is reached or the code for Runtime error handling is located. If
the activation of the Runtime error handling fails, the control is transferred to the top level
on the internal VBScript Runtime error handing. This opens an error dialog and stops the
script.
The "On Error Resume Next" command can be installed on all layers (i.e. also in procedures).
When the error handling measure is use, it can basically be determined whether the user is
actually using the required implementation type.
In addition, it can be ensured that there is no termination of execution due to a faulty access
to the object.
See also
Properties (Page 301)
BorderFlashColorOn Property (Page 359)
Activate Method (Page 731)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
ToolTipText Property (Page 660)
PasswordLevel Property (Page 545)
Parent Property (Page 543)
ObjectName Property (Page 526)
Left Property (Page 489)
Layer Object (Page 121)
Height Property (Page 456)
FlashRateBorderColor Property (Page 438)
FlashRateBackColor Property (Page 438)
Rounded rectangle
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "Rounded Rectangle".
Usage
In the following example, the object with the name "RoundedRectangle1" is moved 10 pixels to
the right:
'VBS28
Dim objRoundedRectangle
Set objRoundedRectangle = ScreenItems("RoundedRectangle1")
objRoundedRectangle.Left = objRoundedRectangle.Left + 10
The instruction causes the VBScript engine to initiate the follow-on command in the case of a
Runtime error.
The error code can subsequently be checked using the Err object. In order to deactivate the
handling of Runtime errors in scripts, use the following command:
On Error Goto 0
Handling errors always relates to the procedure layer. If a script in a procedure causes an
error, VBScript checks whether an error handling measure is implemented in this layer. If not,
control is transferred one layer up (to the calling procedure). If there is no error handling
measure here either, the control is transferred yet another layer up. This continues until
either the top module level is reached or the code for Runtime error handling is located. If
the activation of the Runtime error handling fails, the control is transferred to the top level
on the internal VBScript Runtime error handing. This opens an error dialog and stops the
script.
The "On Error Resume Next" command can be installed on all layers (i.e. also in procedures).
When the error handling measure is use, it can basically be determined whether the user is
actually using the required implementation type.
In addition, it can be ensured that there is no termination of execution due to a faulty access
to the object.
See also
FlashBackColor Property (Page 435)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
ToolTipText Property (Page 660)
PasswordLevel Property (Page 545)
Parent Property (Page 543)
ObjectName Property (Page 526)
Left Property (Page 489)
Layer Object (Page 121)
Height Property (Page 456)
FlashRateBorderColor Property (Page 438)
FlashRateBackColor Property (Page 438)
FlashBorderColor Property (Page 435)
FillStyle Property (Page 430)
Static text
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "Static Text"
Usage
In the following example, the object with the name "StaticText1" is moved 10 pixels to the right:
'VBS30
Dim objStaticText
Set objStaticText = ScreenItems("StaticText1")
objStaticText.Left = objStaticText.Left + 10
See also
ObjectName Property (Page 526)
BorderFlashColorOn Property (Page 359)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
ToolTipText Property (Page 660)
Text list (Page 199)
PasswordLevel Property (Page 545)
Parent Property (Page 543)
Orientation Property (Page 540)
Left Property (Page 489)
Layer Object (Page 121)
Height Property (Page 456)
ForeFlashColorOn Property (Page 448)
ForeFlashColorOff Property (Page 447)
ForeColor Property (Page 446)
FontUnderline Property (Page 446)
FontSize Property (Page 445)
FontName Property (Page 444)
FontItalic Property (Page 444)
FontBold Property (Page 443)
FlashRateForeColor Property (Page 439)
Connector
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Usage
In the following example, the object with the name "Connector1" is moved 10 pixels to the right:
'VBS31
Dim objConnector
Set objConnector = ScreenItems("Connector1")
objConnector.Left = objConnector.Left + 10
See also
ScreenItems Object (List) (Page 129)
Activate Method (Page 731)
Properties (Page 301)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
TopConnectedObjectName Property (Page 663)
TopConnectedConnectionPointIndex Property (Page 663)
Top Property (Page 662)
ToolTipText Property (Page 660)
Parent Property (Page 543)
Orientation Property (Page 540)
ObjectName Property (Page 526)
Left Property (Page 489)
Layer Property (Page 474)
Height Property (Page 456)
Enabled Property (Page 416)
BottomConnectedObjectName Property (Page 360)
BottomConnectedConnectionPointIndex Property (Page 360)
3D Bar
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "3D Bar"
Usage
In the following example, the object with the name "3DBar1" is moved 10 pixels to the right:
'VBS32
Dim objBar
Set objBar = ScreenItems("3DBar1")
objBar.Left = objBar.Left + 10
The instruction causes the VBScript engine to initiate the follow-on command in the case of a
Runtime error.
The error code can subsequently be checked using the Err object. In order to deactivate the
handling of Runtime errors in scripts, use the following command:
On Error Goto 0
Handling errors always relates to the procedure layer. If a script in a procedure causes an
error, VBScript checks whether an error handling measure is implemented in this layer. If not,
control is transferred one layer up (to the calling procedure). If there is no error handling
measure here either, the control is transferred yet another layer up. This continues until
either the top module level is reached or the code for Runtime error handling is located. If
the activation of the Runtime error handling fails, the control is transferred to the top level
on the internal VBScript Runtime error handing. This opens an error dialog and stops the
script.
The "On Error Resume Next" command can be installed on all layers (i.e. also in procedures).
When the error handling measure is use, it can basically be determined whether the user is
actually using the required implementation type.
In addition, it can be ensured that there is no termination of execution due to a faulty access
to the object.
'VBS148
Sub OnClick(ByVal Item)
Dim objScreenItem
'
'Activation of errorhandling:
On Error Resume Next
For Each objScreenItem In ScreenItems
If "HMIBar" = objScreenItem.Type Then
'
'=== Property "Layer00Value" only available for 3D bar
objScreenItem.Layer00Value = objScreenItem.Layer00Value * 2
If 0 <> Err.Number Then
HMIRuntime.Trace objScreenItem.Name & ": no 3D bar" & vbCrLf
'
'Delete error message
Err.Clear
End If
End If
Next
On Error Goto 0 'Deactivation of errorhandling
End Sub
See also
Type Property (Page 686)
Layer08Color Property (Page 480)
Application Window
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "Application Window"
Usage
In the following example, the object with the name "ApplicationWindow1" is moved 10 pixels to
the right:
'VBS33
Dim objAppWindow
Set objAppWindow = ScreenItems("ApplicationWindow1")
objAppWindow.Left = objAppWindow.Left + 10
See also
Properties (Page 301)
Activate Method (Page 731)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
WindowBorder Property (Page 719)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
Template Property (Page 615)
Parent Property (Page 543)
OnTop Property (Page 531)
Bar
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Usage
In the following example, the object with the name "Bar1" is moved 10 pixels to the right:
'VBS34
Dim objBar
Set objBar = ScreenItems("Bar1")
objBar.Left = objBar.Left + 10
The instruction causes the VBScript engine to initiate the follow-on command in the case of a
Runtime error.
The error code can subsequently be checked using the Err object. In order to deactivate the
handling of Runtime errors in scripts, use the following command:
On Error Goto 0
Handling errors always relates to the procedure layer. If a script in a procedure causes an
error, VBScript checks whether an error handling measure is implemented in this layer. If not,
control is transferred one layer up (to the calling procedure). If there is no error handling
measure here either, the control is transferred yet another layer up. This continues until
either the top module level is reached or the code for Runtime error handling is located. If
the activation of the Runtime error handling fails, the control is transferred to the top level
on the internal VBScript Runtime error handing. This opens an error dialog and stops the
script.
The "On Error Resume Next" command can be installed on all layers (i.e. also in procedures).
When the error handling measure is use, it can basically be determined whether the user is
actually using the required implementation type.
In addition, it can be ensured that there is no termination of execution due to a faulty access
to the object.
'VBS147
Sub OnClick(ByVal Item)
Dim objScreenItem
'
'Activation of errorhandling:
On Error Resume Next
For Each objScreenItem In ScreenItems
If "HMIBar" = objScreenItem.Type Then
'
'=== Property "LimitHigh4" only available for bar
objScreenItem.LimitHigh4 = objScreenItem.LimitHigh4 * 2
If 0 <> Err.Number Then
HMIRuntime.Trace objScreenItem.Name & ": no bar" & vbCrLf
'
'Delete error message
Err.Clear
End If
End If
Next
On Error Goto 0 'Deactivation of errorhandling
End Sub
See also
ToolTipText Property (Page 660)
Layer Object (Page 121)
ColorChangeType Property (Page 379)
Average Property (Page 321)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
ZeroPointValue Property (Page 729)
ZeroPoint Property (Page 729)
Width Property (Page 718)
WarningLow Property (Page 718)
WarningHigh Property (Page 717)
Visible Property (Page 716)
TypeWarningLow Property (Page 690)
TypeWarningHigh Property (Page 690)
TypeToleranceLow Property (Page 689)
TypeToleranceHigh Property (Page 689)
Picture Window
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "Picture Window"
Usage
In the following example, the object with the name "ScreenWindow1" is moved 10 pixels to the
right:
'VBS35
Dim objScrWindow
Set objScrWindow = ScreenItems("ScreenWindow1")
objScrWindow.Left = objScrWindow.Left + 10
See also
ServerPrefix Property (Page 587)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Zoom Property (Page 729)
WindowBorder Property (Page 719)
Width Property (Page 718)
Visible Property (Page 716)
UpdateCycle Property (Page 692)
Type Property (Page 686)
Top Property (Page 662)
TagPrefix Property (Page 613)
ScrollPositionY Property (Page 578)
ScrollPositionX Property (Page 577)
ScrollBars Property (Page 577)
ScreenName Property (Page 576)
Screens Property (Page 576)
Parent Property (Page 543)
OnTop Property (Page 531)
OffsetTop Property (Page 529)
OffsetLeft Property (Page 529)
ObjectName Property (Page 526)
Moveable Property (Page 522)
MaximizeButton Property (Page 502)
Left Property (Page 489)
Control
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Usage
In the following example, the object with the name "Control1" is moved 10 pixels to the right:
'VBS36
Dim objControl
Set objControl = ScreenItems("Control1")
objControl.Left = objControl.Left + 10
Special feature
The controls provided by WinCC return a special ID as the type. It can be found under the topic
"Type Identification in VBS" in the individual descriptions of the WinCC Controls.
Note
Since not every Control has a version-dependent ProgID, an error handling measure should be
integrated to query the version-dependent ProgID or UserFriendlyName. If no error handling is
used, the code is terminated immediately without any result when no ProgID is found.
'VBS37
Dim objControl
Dim strCurrentVersion
Set objControl = ScreenItems("Control1")
strCurrentVersion = CreateObject("WScript.Shell").RegRead("HKCR\" & objControl.Type &
"\CurVer\")
MsgBox strCurrentVersion
Note
In order that example above works, a multimedia control should be inserted in the picture.
'VBS38
Dim objControl
Dim strFriendlyName
Set objControl = ScreenItems("Control1")
strFriendlyName = CreateObject("WScript.Shell").RegRead("HKCR\" & objControl.Type & "\")
MsgBox strFriendlyName
Note
In order that example above works, a multimedia control should be inserted in the picture.
If a non-WinCC control is used, it is possible that the properties provided by the control
have the same names as the general ScreenItem properties. In such cases, the ScreenItem
properties have priority. The "hidden" properties of an external control supplier can be
accessed using the additional "object" property. Address the properties of an external control
supplier as follows:
Control.object.type
The properties of the ScreenItem object are used in the case of identical names, if you use
the following form:
Control.type
See also
Object Property (Page 526)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
Parent Property (Page 543)
I/O Field
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "I/O Field"
Usage
In the following example, the object with the name "IOField1" is moved 10 pixels to the right:
'VBS39
Dim objIOField
Set objIOField = ScreenItems("IOField1")
objIOField.Left = objIOField.Left + 10
See also
OperationMessage Property (Page 531)
EditAtOnce Property (Page 416)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Faceplate Instance
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the "faceplate instance" graphic object.
Usage
In the following example, the object with the name "FaceplateInstance1" is moved 10 pixels to
the right:
'VBS309
Dim objFaceplateObject
Set objFaceplateObject = ScreenItems("FaceplateInstance1")
objFaceplateObject.Left = objFaceplateObject.Left + 10
Graphic Object
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "Graphic Object"
Usage
In the following example, the object with the name "GraphicObject1" is moved 10 pixels to the
right:
'VBS40
Dim objGraphicView
Set objGraphicView= ScreenItems("GraphicObject1")
objGraphicView.Left = objGraphicView.Left + 10
See also
Parent Property (Page 543)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
Combobox
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Usage
In the following example, the object with the name "ComboBox1" is moved 10 pixels to the right:
'VBS21
Dim objComboBox
Set objComboBox = ScreenItems("ComboBox1")
objComboBox.Left = objComboBox.Left + 10
See also
Text list property (Page 616)
List Box
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the "List Box" graphic object.
Usage
In the following example, the object with the name "ListBox1" is moved 10 pixels to the right:
'VBS21
Dim objListBox
Set objListBox = ScreenItems("ListBox1")
objListBox.Left = objListBox.Left + 10
See also
Text list property (Page 616)
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the "Multiline Text" graphic object.
Usage
In the following example, the object with the name "MultiLineEdit1" is moved 10 pixels to the
right:
'VBS21
Dim objMultiLineEdit
Set objMultiLineEdit = ScreenItems("MultiLineEdit1")
objMultiLineEdit.Left = objMultiLineEdit.Left + 10
OLE object
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "OLE Element". The return
value is a STRING type.
Usage
In the following example, the object with the name "OLEElement1" is moved 10 pixels to the
right:
'VBS41
Dim objOLEElement
Set objOLEElement = ScreenItems("OLEElement1")
objOLEElement.Left = objOLEElement.Left + 10
Special feature
In the case of OLE Elements, the version-independent ProgID is returned as the type.
It is possible to determine the version-dependent ProgID or "User friendly Name" from the
ProgID: In the following example, "OLEObject1" is a control embedded in the picture which
already returns the version-independent ProgID as a result of the Type property.
Note
Since not every Control has a version-dependent ProgID, an error handling measure should be
integrated to query the version-dependent ProgID or UserFriendlyName. If no error handling is
used, the code is terminated immediately without any result when no ProgID is found.
'VBS42
Dim objControl
Dim strCurrentVersion
Set objControl = ScreenItems("OLEElement1")
strCurrentVersion = CreateObject("WScript.Shell").RegRead("HKCR\" & objControl.Type &
"\CurVer\")
MsgBox strCurrentVersion
Note
In order that the example above works, a Word document should be embedded in the picture as
an OLE Element.
'VBS43
Dim objControl
Dim strFriendlyName
Set objControl = ScreenItems("OLEElement1")
strFriendlyName = CreateObject("WScript.Shell").RegRead("HKCR\" & objControl.Type & "\")
MsgBox strFriendlyName
Note
In order that the example above works, a Word document should be embedded in the picture as
an OLE Element.
OLEObjekt.object.type
OLEObjekt.type
In the case of identical names, the properties of the ScreenItem object are used.
See also
Height Property (Page 456)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
ToolTipText Property (Page 660)
Parent Property (Page 543)
Object Property (Page 526)
ObjectName Property (Page 526)
Left Property (Page 489)
Layer Property (Page 474)
Enabled Property (Page 416)
Group Display
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "Group Display"
Usage
In the following example, the object with the name "GroupDisplay1" is moved 10 pixels to the
right:
'VBS44
Dim objGroupDisplay
Set objGroupDisplay = ScreenItems("GroupDisplay1")
objGroupDisplay.Left = objGroupDisplay.Left + 10
See also
Activate Method (Page 731)
MCKQBackColorOn Property (Page 506)
FontBold Property (Page 443)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
UserValue4 Property (Page 698)
UserValue3 Property (Page 698)
UserValue2-Eigenschaft (Page 697)
UserValue1 Property (Page 697)
Type Property (Page 686)
Top Property (Page 662)
ToolTipText Property (Page 660)
SignificantMask Property (Page 594)
SameSize Property (Page 573)
Relevant Property (Page 565)
PasswordLevel Property (Page 545)
Parent Property (Page 543)
ObjectName Property (Page 526)
MessageClass Property (Page 517)
MCText Property (Page 508)
MCKQTextFlash Property (Page 507)
MCKQTextColorOn Property (Page 507)
MCKQTextColorOff Property (Page 507)
SVG object
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object type of ScreenItem object. Represents the graphic object "SVG object".
Use
In the following example, the object with the name "SVGObject1" is moved 10 pixels to the right:
'VBS383
Dim objSVGObject
Set objSVGObject = ScreenItems("SVGObject1")
objSVGObject.Left = objSVGObject.Left + 10
See also
ArrowsPosition property (Page 315)
BasicBorderColor property (Page 345)
BasicColor property (Page 345)
ColorState1Good property (Page 381)
ColorState2Maintenance property (Page 381)
ColorState3Error property (Page 381)
ColorStateXUncertain property (Page 381)
ContrastColor property (Page 388)
ConveyorBasicColor property (Page 390)
ConveyorContrastColor property (Page 390)
Cutaway property (Page 404)
DisplayFillLevel property (Page 413)
Text list
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "Text List"
Usage
In the following example, the object with the name "TextList1" is moved 10 pixels to the right:
'VBS45
Dim objSymIO
Set objSymIO = ScreenItems("TextList1")
objSymIO.Left = objSymIO.Left + 10
See also
Type Property (Page 686)
FontUnderline Property (Page 446)
BackFlashColorOff Property (Page 325)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
UnselTextColor Property (Page 692)
UnselBGColor Property (Page 692)
Top Property (Page 662)
Status display
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "Status Display"
Usage
In the following example, the object with the name "StatusDisplay1" is moved 10 pixels to the
right:
'VBS46
Dim objGraphicIO
Set objGraphicIO= ScreenItems("StatusDisplay1")
objGraphicIO.Left = objGraphicIO.Left + 10
See also
Layer Object (Page 121)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
ToolTipText Property (Page 660)
PasswordLevel Property (Page 545)
Parent Property (Page 543)
ObjectName Property (Page 526)
Left Property (Page 489)
Index Property (Page 465)
Height Property (Page 456)
FlashRateFlashPic Property (Page 439)
FlashRateBorderColor Property (Page 438)
FlashPicUseTransColor Property (Page 437)
FlashPicture Property (Page 437)
FlashPicTransColor Property (Page 436)
FlashPicReferenced Property (Page 436)
FlashFlashPicture Property (Page 435)
FlashBorderColor Property (Page 435)
Enabled Property (Page 416)
BorderWidth Property (Page 359)
Button
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Usage
In the following example, the object with the name "Button1" is moved 10 pixels to the right:
'VBS47
Dim cmdButton
Set cmdButton = ScreenItems("Button1")
cmdButton.Left = cmdButton.Left + 10
The instruction causes the VBScript engine to initiate the follow-on command in the case of a
Runtime error.
The error code can subsequently be checked using the Err object. In order to deactivate the
handling of Runtime errors in scripts, use the following command:
On Error Goto 0
Handling errors always relates to the procedure layer. If a script in a procedure causes an
error, VBScript checks whether an error handling measure is implemented in this layer. If not,
control is transferred one layer up (to the calling procedure). If there is no error handling
measure here either, the control is transferred yet another layer up. This continues until
either the top module level is reached or the code for Runtime error handling is located. If
the activation of the Runtime error handling fails, the control is transferred to the top level
on the internal VBScript Runtime error handing. This opens an error dialog and stops the
script.
The "On Error Resume Next" command can be installed on all layers (i.e. also in procedures).
When the error handling measure is use, it can basically be determined whether the user is
actually using the required implementation type.
In addition, it can be ensured that there is no termination of execution due to a faulty access
to the object.
See also
Top Property (Page 662)
FlashBorderColor Property (Page 435)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
WindowsStyle Property (Page 720)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
ToolTipText Property (Page 660)
Text list (Page 199)
PictureUp Property (Page 554)
PictureDown Property (Page 552)
PasswordLevel Property (Page 545)
Parent Property (Page 543)
Orientation Property (Page 540)
ObjectName Property (Page 526)
Left Property (Page 489)
Layer Object (Page 121)
Check box
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "Check Box"
Usage
In the following example, the object with the name "CheckBox1" is moved 10 pixels to the right:
'VBS49
Dim chkCheckBox
Set chkCheckBox = ScreenItems("CheckBox1")
chkCheckBox.Left = chkCheckBox.Left + 10
See also
FontSize Property (Page 445)
BackColor Property (Page 323)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
ToolTipText Property (Page 660)
Text list (Page 199)
Radio box
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "Radio Box"
Usage
In the following example, the object with the name "RadioBox1" is moved 10 pixels to the right:
'VBS50
Dim objOptionGroup
Set objOptionGroup = ScreenItems("RadioBox1")
objOptionGroup.Left = objOptionGroup.Left + 10
See also
ForeColor Property (Page 446)
BackFlashColorOn Property (Page 325)
Activate Method (Page 731)
Properties (Page 301)
Round Button
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "Round Button"
Usage
In the following example, the object with the name "RoundButton1" is moved 10 pixels to the
right:
'VBS51
Dim objSwitch
Set objSwitch= ScreenItems("RoundButton1")
objSwitch.Left = objSwitch.Left + 10
See also
PicDownUseTransColor Property (Page 550)
BorderColorTop Property (Page 358)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Slider
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Usage
In the following example, the object with the name "Slider1" is moved 10 pixels to the right:
'VBS53
Dim sldSlider
Set sldSlider = ScreenItems("Slider1")
sldSlider.Left = sldSlider.Left + 10
The instruction causes the VBScript engine to initiate the follow-on command in the case of a
Runtime error.
The error code can subsequently be checked using the Err object. In order to deactivate the
handling of Runtime errors in scripts, use the following command:
On Error Goto 0
Handling errors always relates to the procedure layer. If a script in a procedure causes an
error, VBScript checks whether an error handling measure is implemented in this layer. If not,
control is transferred one layer up (to the calling procedure). If there is no error handling
measure here either, the control is transferred yet another layer up. This continues until
either the top module level is reached or the code for Runtime error handling is located. If
the activation of the Runtime error handling fails, the control is transferred to the top level
on the internal VBScript Runtime error handing. This opens an error dialog and stops the
script.
The "On Error Resume Next" command can be installed on all layers (i.e. also in procedures).
When the error handling measure is use, it can basically be determined whether the user is
actually using the required implementation type.
In addition, it can be ensured that there is no termination of execution due to a faulty access
to the object.
See also
Height Property (Page 456)
BackColorBottom Property (Page 324)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
WindowsStyle Property (Page 720)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
ToolTipText Property (Page 660)
SmallChange Property (Page 596)
Process Property (Page 559)
PasswordLevel Property (Page 545)
Parent Property (Page 543)
OperationReport Property (Page 539)
OperationMessage Property (Page 531)
ObjectName Property (Page 526)
Min Property (Page 520)
Max Property (Page 502)
Left Property (Page 489)
Layer Object (Page 121)
FlashRateBorderColor Property (Page 438)
FlashRateBackColor Property (Page 438)
FlashBorderColor Property (Page 435)
FlashBackColor Property (Page 435)
FillStyle Property (Page 430)
FillingIndex Property (Page 429)
Filling Property (Page 428)
FillColor Property (Page 428)
ExtendedOperation Property (Page 425)
Enabled Property (Page 416)
Direction Property (Page 413)
Polygon Tube
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the "Polygon Tube" graphic object.
Usage
In the following example, the object with the name "TubePolyline1" is moved 10 pixels to the
right:
'VBS24
Dim objTubePolyline
Set objTubePolyline = ScreenItems("TubePolyline1")
objTubePolyline.Left = objTubePolyline.Left + 10
T-piece
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Usage
In the following example, the object with the name "TubeTeeObject1" is moved 10 pixels to the
right:
'VBS21
Dim objTubeTeeObject
Set objTubeTeeObject = ScreenItems("TubeTeeObject1")
objTubeTeeObject.Left = objTubeTeeObject.Left + 10
Double T-piece
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the "Double T-piece" graphic object.
Usage
In the following example, the object with the name "TubeDoubleTeeObject1" is moved 10 pixels
to the right:
'VBS21
Dim objTubeDoubleTeeObject
Set objTubeDoubleTeeObject = ScreenItems("TubeDoubleTeeObject1")
objTubeDoubleTeeObject.Left = objTubeDoubleTeeObject.Left + 10
Tube Bend
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the "Tube Arc" graphic object.
Usage
In the following example, the object with the name "TubeArcObject1" is moved 10 pixels to the
right:
'VBS24
Dim objTubeArcObject
Set objTubeArcObject = ScreenItems("TubeArcObject1")
objTubeArcObject.Left = objTubeArcObject.Left + 10
1.15.3.6 Controls
Controls
Note
Since not every Control has a version-dependent ProgID, an error handling measure should be
integrated to query the version-dependent ProgID or UserFriendlyName. If no error handling is
used, the code is terminated immediately without any result when no ProgID is found.
'VBS153
Dim objControl
Dim strCurrentVersion
Set objControl = ScreenItems("Control1")
strCurrentVersion = CreateObject("WScript.Shell").RegRead("HKCR\" & objControl.Type &
"\CurVer\")
MsgBox strCurrentVersion
Note
In order that example above works, a multimedia control should be inserted in the picture.
'VBS154
Dim objControl
Dim strFriendlyName
Set objControl = ScreenItems("Control1")
strFriendlyName = CreateObject("WScript.Shell").RegRead("HKCR\" & objControl.Type & "\")
MsgBox strFriendlyName
Note
In order that example above works, a multimedia control should be inserted in the picture.
Methods
The "ByRef" declaration may only be implemented as a "Variant" (ByRef xxx as Variant)
The "ByVal" declaration may only be implemented with tag types (ByVal xxx as Long)
Properties
The "ByRef" declaration may only be implemented as a "Variant" (ByRef xxx as Variant)
The "ByVal" declaration may only be implemented with tag types (ByVal xxx as Long)
Events
The "ByRef" declaration is not permitted.
The "ByVal" declaration may only be implemented as a "Variant" (ByVal xxx as Variant)
Arrays
If arrays are used, they must be declared with (ByRef xxx As Variant).
In order that arrays can be transferred in variants, variant tag must also be inserted as an
intermediate tag according to the following scheme:
'VBS151
Dim arrayPoints(200)
Dim vArrayCoercion 'Variant for array Coercion
' Make the VBS Array compatibile with the OLE Automation
vArrayCoercion = (arrayPoints)
objTrendControl.DataXY = vArrayCoercion ' this array will occur in the control
Control.object.type
If you use the following form, the properties of the ScreenItem object are used in the case of
identical names:
Control.type
Double parameter
When using a Control which is not an internal WinCC control, it is possible that the event
prototypes contain a parameter with the name "Item". In this case, the name of the
parameter is renamed according to "ObjectItem" in the VBS prototype submitted. If this name
already exists, the name is differentiated by numbers being appended.
See also
HMI Symbol Library (Page 240)
WinCC Slider Control (Page 274)
WinCC Push Button Control (up to WinCC V7.3) (Page 295)
WinCC Online Trend Control (before WinCC V7) (Page 292)
WinCC Online Table Control (before WinCC V7) (Page 289)
WinCC Gauge Control (Page 255)
WinCC Function Trend Control (before WinCC V7) (Page 285)
WinCC Digital/Analog Clock (Page 247)
WinCC Alarm Control (before WinCC V7) (Page 283)
WinCC UserArchiveControl (Page 278)
WinCC RulerControl (Page 270)
WinCC OnlineTrendControl (Page 263)
WinCC OnlineTableControl (Page 258)
WinCC FunctionTrendControl (Page 249)
WinCC AlarmControl (Page 242)
List of controls
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "Column" listing object to configure the properties of the columns in the WinCC
UserArchiveControl.
ColumnAlias (Page 390) ColumnFlagUnique ColumnPosition (Page 395) ColumnSort (Page 398)
(Page 393)
ColumnAlign (Page 391) ColumnHideText (Page 393) ColumnPrecisions (Page 395) ColumnSortIndex (Page 399)
See also
GetColumn method (Page 740)
GetColumnCollection method (Page 741)
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "HitlistColumn" listing object to configure the message blocks used in the hitlist of
WinCC AlarmControl.
See also
GetHitlistColumn method (Page 742)
GetHistlistColumnCollection method (Page 743)
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "MessageBlock" listing object to configure the message blocks in WinCC
AlarmControl.
See also
GetMessageBlock method (Page 744)
GetMessageBlockCollection method (Page 745)
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "MessageColumn" listing object to configure the message blocks used in the message
lists of WinCC AlarmControl.
See also
GetMessageColumn method (Page 746)
GetMessageColumnCollection method (Page 747)
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "OperatorMessage" listing object to configure the operator messages displayed in
WinCC AlarmControl.
See also
GetOperatorMessage method (Page 748)
GetOperatorMessageCollection method (Page 749)
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "Row" listing object to access the rows of the table-based controls. The Row object
refers to the runtime data in the tables.
Example
'VBS371
Dim mycontrol
Set mycontrol = ScreenItems.Item("Control1")
Dim rowobj
Set rowobj = mycontrol.GetRowCollection
'Reading the properties CellText, CellCount an RowNumber for the items of the collection
For lIndex = 1 To rowobj.Count
'In this example the CellText of the third column is returned
HMIRuntime.Trace "RowCellText: " & lIndex & ": " & rowobj.item(lIndex).CellText(3) &
vbNewline
HMIRuntime.Trace "RowCellCount: " & lIndex & ": " & rowobj.item(lIndex).CellCount &
vbNewline
HMIRuntime.Trace "RowNumber: " & rowobj.item(lIndex).RowNumber & vbNewline
Next
See also
GetRow method (Page 750)
GetRowCollection method (Page 751)
GetSelectedRow method (Page 758)
GetSelectedRows method (Page 759)
CellCount property (Page 368)
CellText property (Page 370)
RowNumber property (Page 569)
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "Block" listing object to configure the blocks of WinCC RulerControl.
See also
GetRulerBlock method (Page 753)
GetRulerBlockCollection method (Page 754)
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "Column" listing object to configure the columns of the ruler window in WinCC
RulerControl.
Note that properties are available for WinCC controls that can have the effect of methods.
These properties are characterized by the respective names, e.g. "Add", "Remove" or
"Rename".
See also
GetRulerColumn method (Page 755)
GetRulerColumnCollection method (Page 756)
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "Column" listing object to configure the columns of the statistic area window in
WinCC RulerControl.
See also
GetStatisticAreaColumn method (Page 760)
GetStatisticAreaColumnCollection method (Page 761)
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "Column" listing object to configure the columns of the statistic window in WinCC
RulerControl.
See also
GetStatisticResultColumn method (Page 762)
GetStatisticResultColumnCollection method (Page 763)
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "StatusbarElement" listing object to configure the properties of the statusbar of the
controls.
WinCC AlarmControl (Page 242) WinCC FunctionTrendControl (Page 249) WinCC OnlineTableControl (Page 258)
WinCC OnlineTrendControl (Page 263) WinCC RulerControl (Page 270) WinCC UserArchiveControl (Page 278)
See also
GetStatusbarElement method (Page 764)
GetStatusbarElementCollection method (Page 765)
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "TimeAxis" listing object to configure the properties of the time axis in columns in the
WinCC OnlineTrendControl.
See also
GetTimeAxis method (Page 766)
GetTimeAxisCollection method (Page 767)
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "TimeColumn" listing object to configure the properties of the time column in WinCC
OnlineTrendControl.
See also
GetTimeColumn method (Page 769)
GetTimeColumnCollection method (Page 770)
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "ToolbarButton" listing object to configure the properties of the toolbar of the
controls.
WinCC AlarmControl (Page 242) WinCC FunctionTrendControl (Page 249) WinCC OnlineTableControl (Page 258)
WinCC OnlineTrendControl (Page 263) WinCC RulerControl (Page 270) WinCC UserArchiveControl (Page 278)
See also
GetToolbarButton method (Page 771)
GetToolbarButtonCollection method (Page 772)
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "Trend" listing object to configure the properties of the trends. The "InsertData"
and "RemoveData" methods are used to fill the trend with data or to delete the trend. The
"GetRulerData" method is used to access the data at a particular point of the trend.
See also
GetTrend method (Page 773)
GetTrendCollection method (Page 774)
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "TrendWindow" listing object to configure the properties of the trend window.
See also
GetTrendWindow method (Page 776)
GetTrendWindowCollection method (Page 777)
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "ValueAxis" listing object to configure the properties of the value axis in WinCC
OnlineTrendControl.
See also
GetValueAxis method (Page 778)
GetValueAxisCollection method (Page 779)
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "ValueColumn" listing object to configure the properties of the value column in
WinCC OnlineTrendControl.
See also
GetValueColumn method (Page 780)
GetValueColumnCollection method (Page 781)
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "Xaxis" listing object to configure the properties of the X axis in WinCC
FunctionTrendControl.
See also
GetXAxis method (Page 783)
GetXAxisCollection method (Page 784)
Description
The listing of controls is a data container that can save a number of objects of the same type
(users can change the number).
Use the "Yaxis" listing object to configure the properties of the Y axis in WinCC
FunctionTrendControl.
See also
GetYAxis method (Page 785)
GetYAxisCollection method (Page 786)
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "HMI Symbol Library"
Usage
In the following example, the object with the name "Control1" is moved 20 pixels to the right:
'VBS64
Dim objControl
Set objControl = ScreenItems("Control1")
objControl.Left = objControl.Left +20
Properties
This object type has the following properties:
See also
Left Property (Page 489)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Controls (Page 220)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
Stretch Property (Page 610)
Picture Property (Page 551)
Parent Property (Page 543)
ObjectName Property (Page 526)
Object Property (Page 526)
Layer Object (Page 121)
Height Property (Page 456)
ForeColor Property (Page 446)
Flip Property (Page 440)
Enabled Property (Page 416)
Cursor Property (Page 402)
BlinkColor Property (Page 349)
BackStyle Property (Page 327)
BackColor Property (Page 323)
WinCC AlarmControl
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "WinCC AlarmControl" as of
WinCC V7.0.
CopyRows
DeactivateDynamic DetachDB
Export
HideAlarm LockAlarm
LoopInAlarm
UnhideAlarm UnlockAlarm
Font
GridLineColor GridLineWidth
IconSpace
VerticalGridLines
Example
A selection of messages is defined in an existing WinCC AlarmControl. The column properties are
configured in the script.
Requirement
• A "WinCC AlarmControl" with the name "Control1" has already been inserted in a process
picture in Graphics Designer. The picture "C_015_Native_Alarms_Sel.pdl" from the demo
project was used for this example.
• A button is inserted in the Graphics Designer. You have configured the event "mouse click"
with a VBS action and the following script for the button.
• You have already configured messages in your project. Or you are using the demo project
from which we have taken the messages used for the example.
• Messages have already been triggered in Runtime. The buttons "incoming" and "outgoing"
were clicked in the demo project.
'VBS366
Sub OnClick(ByVal Item)
Dim objControl
Dim objMessColumn
Dim objMessBlock
Note
More examples for use of properties and methods are available in the descriptions of the Get
methods of the controls and under "Examples for VBScript/Examples in WinCC/Dynamizing
controls".
See also
Controls (Page 220)
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "WinCC Digital/Analog Clock"
Usage
In the following example, the object with the name "Control1" is moved 11 pixels to the right:
'VBS55
Dim objControl
Set objControl = ScreenItems("Control1")
objControl.Left = objControl.Left +11
See also
Parent Property (Page 543)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Controls (Page 220)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
Ticks Property (Page 620)
TicksColor Property (Page 620)
SquareExtent Property (Page 602)
SecondNeedleWidth Property (Page 578)
SecondNeedleHeight Property (Page 578)
Picture Property (Page 551)
ObjectName Property (Page 526)
Object Property (Page 526)
MinuteNeedleWidth Property (Page 521)
MinuteNeedleHeight Property (Page 521)
LocaleID Property (Page 496)
Left Property (Page 489)
Layer Object (Page 121)
HourNeedleWidth Property (Page 464)
HourNeedleHeight Property (Page 463)
Height Property (Page 456)
Handtype Property (Page 456)
WinCC FunctionTrendControl
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
DeactivateDynamic DetachDB
Export
MoveAxis
NextTrend
OneToOneView
PreviousTrend Print
Font
GraphDirection
Moveable
Online
PrintJobName
UseTrendNameAsLabel
Examples
A trend is displayed in a WinCC FunctionTrendControl that is linked with a user archive. Different
properties are configured for the trend in the script. The "StartID" of the user archive and the
number of measurement points is changed regarding data connection.
Requirement
• A "WinCC FunctionTrendControl" with the name "Control1" is inserted in a process picture in
Graphics Designer.
• A button is inserted in the Graphics Designer. You have configured the event "mouse click"
with a VBS action and the following script for the button.
• You have already configured a user archive in your project. Or you are using the demo project
from which we have taken the user archive for the example.
'VBS363
Sub OnClick(ByVal Item)
Dim objFXControl
Dim objTrendWindow
Dim objTrend
Dim objXAxis
Dim objYAxis
Dim startID
Dim FXServerDataX(3)
Dim FXServerDataY(3)
' create reference to FXControl
Set objFXControl = ScreenItems("Control1")
' create reference to new window, x and y axis
Set objTrendWindow = objFXControl.GetTrendWindowCollection.AddItem("myWindow")
Set objXAxis = objFXControl.GetXAxisCollection.AddItem("myXAxis")
Set objYAxis = objFXControl.GetYAxisCollection.AddItem("myYAxis")
' assign x and y axis to the window
objXAxis.TrendWindow = objTrendWindow.Name
objYAxis.TrendWindow = objTrendWindow.Name
' add new trend
Set objTrend = objFXControl.GetTrendCollection.AddItem("myTrend1")
' configure trend data connection (UserArchive)
objTrend.Provider = 3
startID = CLng(4)
FXServerDataX(0) = "Setpoint"
FXServerDataX(1) = "ParabelX"
FXServerDataX(3) = startID
FXServerDataY(0) = "Setpoint"
FXServerDataY(1) = "ParabelY"
FXServerDataY(3) = startID
objTrend.MeasurePoints = 50
objTrend.SetTagName "Setpoint\ParabelX", "Setpoint\ParabelY", FXServerDataX, FXServerDataY
' assign trend properties
objTrend.Color = RGB(255,0,0)
objTrend.PointStyle = 1
objTrend.TrendWindow = objTrendWindow.Name
objTrend.XAxis = objXAxis.Name
objTrend.YAxis = objYAxis.Name
End Sub
Note
More examples for use of properties and methods are available in the descriptions of the Get
methods of the controls and under "Examples for VBScript/Examples in WinCC/Dynamizing
controls".
See also
Controls (Page 220)
ServerDataX (Page 584)
ServerDataY (Page 585)
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "WinCC Gauge Control"
Usage
In the following example, the object with the name "Control1" is moved 14 pixels to the right:
'VBS58
Dim objControl
Set objControl = ScreenItems("Control1")
objControl.Left = objControl.Left +14
See also
WarningColor Property (Page 717)
Object Property (Page 526)
BackColor Property (Page 323)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Object types of the ScreenItem object (Page 144)
Width Property (Page 718)
Warning Property (Page 717)
Visible Property (Page 716)
ValueMin Property (Page 715)
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the "WinCC Media Control" graphic object as of
WinCC V7.0.
Object Type of ScreenItem Object. Represents the "WinCC Media Control" graphic object as of
WinCC V7.0.
Usage
In the following example, the object with the name "Control1" is moved 16 pixels to the right:
'VBS60
Dim objControl
Set objControl = ScreenItems("Control1")
objControl.Left = objControl.Left 16
WinCC OnlineTableControl
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "WinCC OnlineTableControl"
as of WinCC V7.0.
CalculateStatistic CopyRows
DeactivateDynamic DetachDB
Edit Export
NextColumn
PreviousColumn Print
Font
GridLineColor GridLineWidth
HorizontalGridLines
IconSpace
Moveable
Online
PrintJobName
Example
An additional column is added in an existing WinCC OnlineTableControl that is linked with an
archive tag. Different properties are configured for the control and the column in the script.
Requirement
• A "WinCC OnlineTableControl" with the name "Control1" has already been inserted in a
process picture in Graphics Designer. The control consists of a time column and three value
columns. The picture "B_025_V7_Arch_TableControl.PDL" from the demo project was used
for this example.
• A button is inserted in the Graphics Designer. You have configured the event "mouse click"
with a VBS action and the following script for the button.
• You have already configured archives and archive tags in your project. Or you are using the
demo project from which we have taken the archive for the example.
‘VBS362
Sub OnClick(ByVal Item)
Dim objControl
Dim objTimeColumn
Dim objValueColumn
Set objControl = ScreenItems("Control1")
' Control wide specification
objControl.ColumnResize = False
objControl.TimeBase = 1
objControl.TimeColumnTimeFormat = "HH:mm:ss tt"
objControl.TimeColumnLength = 20
' properties for Time column
Set objTimeColumn = objControl.GetTimeColumn("Time column 1")
objTimeColumn.DateFormat = "dd/MM/yy"
' properties for a new 4th value column with connection to archive tag "Trend_4"
Set objValueColumn = objControl.GetValueColumnCollection.AddItem("Trend 4")
objValueColumn.Caption = "Trend 4"
objValueColumn.Length = 10
objValueColumn.Align = 1
objValueColumn.Provider = 1
objValueColumn.TagName = "G_Archive\Trend_4"
objValueColumn.TimeColumn = "Time column 1"
End Sub
Note
More examples for use of properties and methods are available in the descriptions of the Get
methods of the controls and under "Examples for VBScript/Examples in WinCC/Dynamizing
controls".
See also
Controls (Page 220)
WinCC OnlineTrendControl
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "WinCC OnlineTrendControl"
as of WinCC V7.0.
CalculateStatistic
DeactivateDynamic DetachDB
Export
NextTrend
OneToOneView
PreviousTrend Print
Font
GraphDirection
Moveable
Online
UseTrendNameAsLabel
Example
Three trends are displayed in a WinCC OnlineTrendControl that are linked with archive tags.
Different properties are configured for the trends in the script.
Requirement
• A "WinCC OnlineTrendControl" with the name "Control1" is inserted in a process picture in
Graphics Designer.
• A button is inserted in the Graphics Designer. You have configured the event "mouse click"
with a VBS action and the following script for the button.
• You have already configured archives and archive tags in your project. Or you are using the
demo project from which we have taken the archives for the example.
'VBS361
Sub OnClick(ByVal Item)
Dim objTrendControl
Dim objTrendWindow
Dim objTimeAxis
Dim objValueAxis
Dim objTrend
'create reference to TrendControl
Set objTrendControl = ScreenItems("Control1")
'create reference to new window, time and value axis
Set objTrendWindow = objTrendControl.GetTrendWindowCollection.AddItem("myWindow")
Set objTimeAxis = objTrendControl.GetTimeAxisCollection.AddItem("myTimeAxis")
Set objValueAxis = objTrendControl.GetValueAxisCollection.AddItem("myValueAxis")
'assign time and value axis to the window
objTimeAxis.TrendWindow = objTrendWindow.Name
objValueAxis.TrendWindow = objTrendWindow.Name
' assign properties to trendwindow
objTrendWindow.HorizontalGrid = False
' add new trend and assign properties
Set objTrend = objTrendControl.GetTrendCollection.AddItem("myTrend1")
objTrend.Provider = 1
objTrend.TagName = "G_Archive\Trend_1"
objTrend.TrendWindow = objTrendWindow.Name
objTrend.TimeAxis = objTimeAxis.Name
objTrend.ValueAxis = objValueAxis.Name
objTrend.Color = RGB(255,0,0)
objTrend.PointStyle = 0
'add new trend and assign properties
Set objTrend = objTrendControl.GetTrendCollection.AddItem("myTrend2")
objTrend.Provider = 1
objTrend.TagName = "G_Archive\Trend_2"
objTrend.TrendWindow = objTrendWindow.Name
objTrend.TimeAxis = objTimeAxis.Name
objTrend.ValueAxis = objValueAxis.Name
objTrend.Color = RGB(0,255,0)
objTrend.LineWidth = 3
'add new trend and assign properties
Set objTrend = objTrendControl.GetTrendCollection.AddItem("myTrend3")
objTrend.Provider = 1
objTrend.TagName = "G_Archive\Trend_3"
objTrend.TrendWindow = objTrendWindow.Name
objTrend.TimeAxis = objTimeAxis.Name
objTrend.ValueAxis = objValueAxis.Name
objTrend.Color = RGB(0,0,255)
objTrend.LineType = 2
End Sub
Note
More examples for use of properties and methods are available in the descriptions of the Get
methods of the controls and under "Examples for VBScript/Examples in WinCC/Dynamizing
controls".
See also
Controls (Page 220)
WinCC RulerControl
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "WinCC RulerControl" as of
WinCC V7.0.
Activate ActivateDynamic
DeactivateDynamic
Export
ShowHelp ShowPropertyDialog
Font
GridLineColor GridLineWidth
HorizontalGridLines
IconSpace
LineColor LineWidth
Moveable
PrintJobName
VerticalGridLines
Example
A WinCC Ruler Control is inserted in a picture with an existing WinCC OnlineTableControl. The
RulerControl contains a statistics window that displays the "Minimum", "Maximum" and
"Average" columns. The static values are then displayed for the selected rows of the
OnlineTableControl.
Requirement
• A "WinCC OnlineTableControl" with the name "Control1" has already been inserted in a
process picture in Graphics Designer. The control is linked with archive tags or process tags.
The picture "B_025_V7_Arch_TableControl.PDL" from the demo project was used for this
example.
• You have added an additional "WinCC RulerControl" with the name "Control2" in the picture.
• A button is inserted in the Graphics Designer. You have configured the event "mouse click"
with a VBS action and the following script for the button.
• You have selected some rows in OnlineTableControl.
'VBS364
Sub OnClick(ByVal Item)
Dim objRulerControl
Dim objTableControl
Dim objstatColumn
Dim rows
Note
More examples for use of properties and methods are available in the descriptions of the Get
methods of the controls and under "Examples for VBScript/Examples in WinCC/Dynamizing
controls".
See also
Controls (Page 220)
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "WinCC Slider Control"
Usage
In the following example, the object with the name "Control1" is moved 19 pixels to the right:
'VBS63
Dim objControl
Set objControl = ScreenItems("Control1")
objControl.Left = objControl.Left +19
The instruction causes the VBScript engine to initiate the follow-on command in the case of a
Runtime error.
The error code can subsequently be checked using the Err object. In order to deactivate the
handling of Runtime errors in scripts, use the following command:
On Error Goto 0
Handling errors always relates to the procedure layer. If a script in a procedure causes an
error, VBScript checks whether an error handling measure is implemented in this layer. If not,
control is transferred one layer up (to the calling procedure). If there is no error handling
measure here either, the control is transferred yet another layer up. This continues until
either the top module level is reached or the code for Runtime error handling is located. If
the activation of the Runtime error handling fails, the control is transferred to the top level
on the internal VBScript Runtime error handing. This opens an error dialog and stops the
script.
The "On Error Resume Next" command can be installed on all layers (i.e. also in procedures).
When the error handling measure is use, it can basically be determined whether the user is
actually using the required implementation type.
In addition, it can be ensured that there is no termination of execution due to a faulty access
to the object.
See also
PictureThumb Property (Page 553)
BarFillColor Property (Page 330)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Controls (Page 220)
WithLabels Property (Page 721)
WithAxes Property (Page 721)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
TickStyle Property (Page 620)
ThumbBackColor Property (Page 617)
ShowThumb Property (Page 592)
WinCC UserArchiveControl
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "WinCC UserArchiveControl"
as of WinCC V7.0.
Activate ActivateDynamic
CopyRows CutRows
DeactivateDynamic
Export
PasteRows Print
ReadTags
WriteTags
FilterSQL Font
GridLineColor GridLineWidth
HorizontalGridLines
IconSpace
LineColor LineWidth
Moveable
PrintJobName
UseSelectedTitleColor UseTableColor2
VerticalGridLines
Example
A user archive is displayed in a WinCC UserArchiveControl.
The following actions are initiated via script:
• Selecting data
• Exporting data
• Printing a table
Requirement
• A "WinCC UserArchiveControl" with the name "Control1" is inserted in a process picture in
Graphics Designer.
• A button is inserted in the Graphics Designer. You have configured the event "mouse click"
with a VBS action and the following script for the button.
• You have already configured a user archive in your project. Or you are using the demo project
from which you can use a user archive.
VBS365
Sub OnClick(ByVal Item)
Dim objUAControl
Dim objColumn
Dim coll
Dim field
' create reference to UserArchivControl
Set objUAControl = ScreenItems("Control1")
' Select user archive and general column properties
objUAControl.SelectArchiveName = True
objUAControl.ColumnResize = False
objUAControl.ColumnTitleAlign = 1
' properties for ID column
Set objColumn = objUAControl.GetColumn("ID")
objColumn.Length = 2
objColumn.Align = 0
' Select data
objUAControl.FilterSQL = "ID >=3"
'export the content as a CSV-file in the "ua" directory of the project folder
objUAControl.ServerExport
' print the control
objUAControl.PrintJobName = "UserArchiveControl - Table"
objUAControl.Print
End Sub
Note
More examples for use of properties and methods are available in the descriptions of the Get
methods of the controls and under "Examples for VBScript/Examples in WinCC/Dynamizing
controls".
See also
Controls (Page 220)
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "WinCC Alarm Control"
Usage
In the following example, the object with the name "Control1" is moved 10 pixels to the right:
'VBS54
Dim objControl
Set objControl = ScreenItems("Control1")
objControl.Left = objControl.Left + 10
See also
ProjectPath Property (Page 560)
BackColor Property (Page 323)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Controls (Page 220)
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "WinCC Function Trend
Control"
Usage
In the following example, the object with the name "Control1" is moved 13 pixels to the right:
'VBS57
Dim objControl
Set objControl = ScreenItems("Control1")
objControl.Left = objControl.Left +13
See also
Top Property (Page 662)
ScalingTypeY Property (Page 575)
Layer Object (Page 121)
DesiredCurveSourceUAArchive Property (Page 411)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Controls (Page 220)
Width Property (Page 718)
Visible Property (Page 716)
UpperLimitValue Property (Page 694)
UpperLimit Property (Page 693)
UpperLimitColor Property (Page 693)
Type Property (Page 686)
ToolbarHotKeys Property (Page 659)
ToolbarButtons Property (Page 658)
ToolbarAlignment property (before WinCC V7) (Page 648)
Titleline Property (Page 645)
TimeZone Property (Page 643)
TimeAxisX Property (Page 628)
TagProviderClsid Property (Page 614)
SourceUAColumnY Property (Page 602)
SourceUAColumnX Property (Page 601)
SourceUAArchiveStartID Property (Page 601)
SourceUAArchive Property (Page 601)
SourceTimeRange Property (Page 600)
SourceTagProviderDataY Property (Page 600)
SourceTagProviderDataX Property (Page 599)
SourceTagNameY Property (Page 599)
SourceTagNameX Property (Page 599)
SourceNumberOfValues Property (Page 598)
SourceNumberOfUAValues Property (Page 598)
SourceEndTime Property (Page 598)
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "WinCC Online Table Control"
Usage
In the following example, the object with the name "Control1" is moved 15 pixels to the right:
'VBS59
Dim objControl
Set objControl = ScreenItems("Control1")
objControl.Left = objControl.Left +15
See also
TimeOverlap Property (Page 639)
ItemVisible Property (Page 470)
PrintBackgroundColor Property (Page 558)
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Controls (Page 220)
Width Property (Page 718)
Visible Property (Page 716)
Variable Property (Page 715)
ValueColumnAlignment Property (Page 708)
UpperLimitValue Property (Page 694)
UpperLimit Property (Page 693)
UpperLimitColor Property (Page 693)
Type Property (Page 686)
Top Property (Page 662)
ToolbarHotKeys Property (Page 659)
Toolbar Property (Page 647)
ToolbarButtons Property (Page 658)
ToolbarAlignment property (before WinCC V7) (Page 648)
Titleline Property (Page 645)
TimeZone Property (Page 643)
TimeRangeFactor Property (Page 641)
TimeRange Property (Page 640)
TimeRangeBase Property (Page 640)
TimeOverlapColor Property (Page 640)
TimeJump Property (Page 638)
TimeJumpColor Property (Page 639)
TimeFormat Property (Page 638)
TimeColumnAlignment Property (Page 630)
Statusbar Property (Page 604)
PrintJob Property (Page 559)
Precisions Property (Page 557)
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "WinCC Online Trend
Control"
Usage
In the following example, the object with the name "Control1" is moved 16 pixels to the right:
'VBS60
Dim objControl
Set objControl = ScreenItems("Control1")
objControl.Left = objControl.Left +16
See also
Properties (Page 301)
TimeAxis Property (Page 621)
LowerLimitColor Property (Page 500)
Caption Property (Page 366)
Activate Method (Page 731)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Controls (Page 220)
Width Property (Page 718)
Visible Property (Page 716)
UpperLimitValue Property (Page 694)
UpperLimit Property (Page 693)
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "WinCC Push Button Control"
As of WinCC V7, the control was replaced by the Windows object "Button" and "Round
Button". Up to WinCC V7.3, the "WinCC Push Button Control" is still available in the "Controls"
selection window. You can still use the control in migrated projects.
Usage
In the following example, the object with the name "Control1" is moved 17 pixels to the right:
'VBS61
Dim objControl
Set objControl = ScreenItems("Control1")
objControl.Left = objControl.Left + 17
Note
The events KeyDown, KeyUp and KeyPress cannot be addressed by VBS. If it is required to make
controls dynamic with the help of VBS, no parameter must be declared with ByRef.
The instruction causes the VBScript engine to initiate the follow-on command in the case of a
Runtime error.
The error code can subsequently be checked using the Err object. In order to deactivate the
handling of Runtime errors in scripts, use the following command:
On Error Goto 0
Handling errors always relates to the procedure layer. If a script in a procedure causes an
error, VBScript checks whether an error handling measure is implemented in this layer. If not,
control is transferred one layer up (to the calling procedure). If there is no error handling
measure here either, the control is transferred yet another layer up. This continues until
either the top module level is reached or the code for Runtime error handling is located. If
the activation of the Runtime error handling fails, the control is transferred to the top level
on the internal VBScript Runtime error handing. This opens an error dialog and stops the
script.
The "On Error Resume Next" command can be installed on all layers (i.e. also in procedures).
When the error handling measure is use, it can basically be determined whether the user is
actually using the required implementation type.
In addition, it can be ensured that there is no termination of execution due to a faulty access
to the object.
'VBS62
Dim objScreenItem
On Error Resume Next 'Activation of error handling
For Each objScreenItem In ScreenItems
If objScreenItem.Type = "HMIButton" Then
'
'=== Property "Text" available only for Standard-Button
objScreenItem.Text = "Windows"
If 0 <> Err.Number Then
HMIRuntime.Trace objScreenItem.ObjectName & ": no Windows-Button" & vbCrLf
Err.Clear 'Delete error message
End If
'
'=== Property "Caption" available only for PushButton
objScreenItem.Caption = "Push"
If 0 <> Err.Number Then
HMIRuntime.Trace objScreenItem.ObjectName & ": no Control" & vbCrLf
Err.Clear
End If
End If
Next
On Error Goto 0 'Deactivation of errorhandling
See also
Properties (Page 301)
FontName Property (Page 444)
Activate Method (Page 731)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Controls (Page 220)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Transparent Property (Page 663)
Top Property (Page 662)
PictureUnselected Property (Page 553)
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Object Type of ScreenItem Object. Represents the graphic object "Customized Object".
Usage
You access customized properties in a customized object via the attribute name in VBS.
Intellisense is only applicable to the customized object as a whole.
You will locate the attribute name under Properties of the properties placed outside (right-
click Property) and can be modified there.
In the following example, the object with the name "CustomizedObject1" is moved 10 pixels
to the right:
'VBS65
Dim objCustomObject
Set objCustomObject = ScreenItems("CustomizedObject1")
objCustomObject.Left = objCustomObject.Left + 10
See also
Activate Method (Page 731)
Properties (Page 301)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Object types of the ScreenItem object (Page 144)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
ToolTipText Property (Page 660)
Parent Property (Page 543)
ObjectName Property (Page 526)
Left Property (Page 489)
Layer Object (Page 121)
Height Property (Page 456)
Enabled Property (Page 416)
1.15.3.8 Group
Description
6FUHHQV
6FUHHQ
6FUHHQ,WHPV
6FUHHQ,WHP
Usage
In the following example, the object with the name "Group1" is moved 10 pixels to the right:
'VBS66
Dim objGroup
Set objGroup = ScreenItems("Group1")
objGroup.Left = objGroup.Left + 10
See also
Properties (Page 301)
Activate Method (Page 731)
ScreenItems Object (List) (Page 129)
ScreenItem Object (Page 126)
Object types of the ScreenItem object (Page 144)
Width Property (Page 718)
Visible Property (Page 716)
Type Property (Page 686)
Top Property (Page 662)
ToolTipText Property (Page 660)
Parent Property (Page 543)
ObjectName Property (Page 526)
1.15.4 Properties
1.15.4.1 Properties
Overview
The properties of the individual objects can be used to modify specific graphic objects and tags
in Runtime , e.g. activating an operating element per mouse click or triggering a color change
by modifying a tag value.
Properties on graphic objects can be addressed via the following syntax:
'VBS191
Dim obj
Set obj = ScreenItems("object1")
obj.property = Value
In the following example, the object with the name "Control1" is moved 10 pixels to the right:
'VBS192
Dim obj
Set obj = ScreenItems("control1")
obj.Left = obj.Left + 10
1.15.4.2 A
Aa - Ad
AccessPath Property
Description
Displays the storage path (with hierarchy information) of a screen object (picture). The property
corresponds to the full access code on the Screens Collections.
STRING (read only)
Example:
In the following example, the path of the picture "ScreenWindow1" is issued:
'VBS67
Dim objScreen
Set objScreen = HMIRuntime.Screens("ScreenWindow1")
MsgBox objScreen.AccessPath
See also
ScreenItem Object (Page 126)
Screens Object (List) (Page 135)
Description
The data to be displayed is only requested from the archive server when this attribute is set. In
order to reduce the picture opening times, this attribute should not be set and the value only
dynamically changed when necessary.
Write/Read access
To differentiate between the "Activate" property form the "Activate" method, the property is
accessed via "Object".
Example:
Dim ctrl
Set ctrl = ScreenItems("Control")
ctrl.Object.activate = true
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
WinCC Online Table Control (before WinCC V7) (Page 289)
WinCC Alarm Control (before WinCC V7) (Page 283)
ScreenItem Object (Page 126)
Activate property
Activate
The data to be displayed in the message window are only requested from the message server
if you set this attribute. Instead of setting this attribute, it is advisable to change the value
dynamically in order to reduce picture activation times.
To differentiate the "Activate" property from the "Activate" method, the property is addressed
via "Object".
Example
Dim ctrlSet
ctrl = ScreenItems("Control")
ctrl.Object.activate = true
The attribute can be assigned dynamic properties by means of the name Activate . The data
type is BOOLEAN.
ActiveProject Property
Description
Returns an object of type "Project".
See also
Path Property (Page 545)
Name Property (Page 523)
Ellipse segment (Page 148)
HMIRuntime Object (Page 119)
ActiveScreen Property
Description
Supplies a reference to the picture which contains the object with the current focus.
Use
"ActiveScreen" is used in runtime to address the properties of the picture which contains the
currently focussed object.
Picture window
If the current focus is on a picture window, the process picture in the picture window is
addressed.
To address the process picture in which the picture window is called, use the following call:
• HMIRuntime.ActiveScreen.Parent.ObjectName
Example
The following example assigns the name of the current picture to the tag "strScrName" and
outputs it in a message:
'VBS68
Dim strScrName
strScrName = HMIRuntime.ActiveScreen.Objectname
MsgBox strScrName
See also
Screen Object (Page 132)
HMIRuntime Object (Page 119)
ActiveScreenItem Property
Description
Supplies a reference to the object currently in focus.
Usage
"ActiveScreenItem" is used in Runtime in order to address the properties of the object currently
in focus.
Example:
The following example displays the name of the object in the "ScreenWindow1" picture which
has the focus:
'VBS69
Dim objScreen
Set objScreen = HMIRuntime.Screens("ScreenWindow1")
MsgBox objScreen.ActiveScreenItem.ObjectName
See also
ScreenItem Object (Page 126)
HMIRuntime Object (Page 119)
Actualize Property
Description
The "Index" property references a column pair or a trend. "Actualize" defines whether a static or
dynamic representation should be used for this column pair/trend.
• 0: Static display
• -1: Dynamic display
See also
WinCC Online Table Control (before WinCC V7) (Page 289)
WinCC Online Trend Control (before WinCC V7) (Page 292)
ScreenItem Object (Page 126)
ActualPointLeft Property
Description
Defines or returns the x-coordinate of the current corner point in relation to the original picture
(top left). Each corner point is identified by an index which is derived from the number
("PointCount") of corner point available.
A change of the value can affect the properties "Width" (object width) and "Left" (x-
coordinate of the object position).
See also
Polyline (Page 159)
Polygon (Page 157)
ScreenItem Object (Page 126)
ActualPointTop Property
Description
Defines or returns the y-coordinate of the current corner point in relation to the original picture
(top left). Each corner point is identified by an index which is derived from the number
("PointCount") of corner point available.
A change of the value can affect the properties "Height" (object height) and "Top" (y-
coordinate of the position).
See also
Polyline (Page 159)
Polygon (Page 157)
ScreenItem Object (Page 126)
AdaptBorder Property
Description
TRUE, when the border should be dynamically adjusted to the size of the text. BOOLEAN write-
read access.
For text list and I/O field: Read only access.
See also
Button (Page 203)
Static text (Page 166)
Text list (Page 199)
Radio box (Page 209)
Check box (Page 207)
I/O Field (Page 185)
ScreenItem Object (Page 126)
AdaptPicture Property
Description
Defines whether the picture displayed in a picture window should be adapted to the size of the
picture window in Runtime or not. Read only access.
TRUE, when the picture adapts to the picture window size.
FALSE, when the picture does not adapt to the picture window size.
See also
Picture Window (Page 180)
ScreenItem Object (Page 126)
AdaptSize Property
Description
Defines whether the picture window should adapt to the size of the picture displayed in it during
Runtime or not. Read only access.
TRUE, when the picture window adapts to the picture size.
FALSE, when the picture window does not adapt to the picture size.
See also
Picture Window (Page 180)
ScreenItem Object (Page 126)
AdjustRuler Property
Description
Specifies if the ruler window should be adjusted to the trend window upon each appearance.
TRUE, if you move the ruler window and make it appear and disappear again, it will be
displayed in its original position and its original size.
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
ScreenItem Object (Page 126)
Al - Ap
AlarmID property
Description
Returns the AlarmID of the Alarm object. The AlarmID is unique, and is assigned by the system.
AlarmID (readonly)
See also
Alarms object (list) (Page 111)
AlarmHigh Property
Description
Defines the top limit value at which an alarm should be triggered or returned.
The type of the evaluation (in percent or absolute) is defined in the "TypeAlarmHigh" property.
The "CheckAlarmHigh" property determines whether the monitoring for this limit value is
activated.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
AlarmLogs Property
Description
Returns an object of type "AlarmLogs".
AlarmLogs (read-only)
See also
HMIRuntime Object (Page 119)
AlarmLow Property
Description
Defines the bottom limit value at which an alarm should be triggered or returned.
The type of the evaluation (in percent or absolute) is defined in the "TypeAlarmLow" property.
The "CheckAlarmLow" property determines whether the monitoring for this limit value is
activated.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
Alignment Property
Description
Defines or returns the representation of the scale (left/right or top/bottom) according to the
position of the bar graph object. The "Scaling" property must be set to TRUE for the scale to be
displayed.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
AlignmentLeft Property
Description
Defines or returns the horizontal alignment of the text. Value range from 0 to 2.
0 = left
1 = centered
2 = right
See also
Group Display (Page 194)
Static text (Page 166)
Text list (Page 199)
Radio box (Page 209)
Check box (Page 207)
Button (Page 203)
I/O Field (Page 185)
ScreenItem Object (Page 126)
AlignmentTop Property
Description
Defines or returns the vertical alignment of the text. Value range from 0 to 2.
0 = top
1 = centered
2 = bottom
See also
Group Display (Page 194)
Static text (Page 166)
Text list (Page 199)
Radio box (Page 209)
Check box (Page 207)
Button (Page 203)
I/O Field (Page 185)
ScreenItem Object (Page 126)
AllowDrag property
Allow Drag in Runtime
If the object property is activated, you can drag the tag in Runtime with which the I/O field is
dynamized via Drag&Drop:
• Into a WinCC OnlineTrendControl.
Requirement: The object property "Allow Drop in Runtime" is activated at WinCC control.
The tag of the I/O field is displayed as a new trend.
• Into the WinCC TAG Simulator.
Requirement: The tag type is supported by the tag simulator.
The attribute can be dynamized with the name "AllowDrag".
AllowDrag property
Allow Drop in Runtime
If the object property is activated, you can have the tags from the I/O field displayed as a new
trend in WinCC OnlineTrendControl by using the Drag&Drop of the I/O field in Runtime.
Requirements:
• The object property "Allow Drag in Runtime" is enabled at the I/O field.
• The I/O field is dynamized with a tag.
The attribute can be dynamized with the name "AllowDrop".
Description
TRUE, when settings regarding persistence are possible. BOOLEAN write-read access.
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
WinCC Online Table Control (before WinCC V7) (Page 289)
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
AllowXAxisColor - Property
Description
TRUE if the defined color of the common X-axis is displayed in runtime. BOOLEAN write-read
access.
Description
Defines that the data to be displayed in the message window is required by all servers
participating in a distributed system on which Alarm Logging is activated. Write/Read access.
See also
WinCC Alarm Control (before WinCC V7) (Page 283)
ScreenItem Object (Page 126)
AllServer property
Value Explanation
TRUE All servers are activated.
FALSE Activates only the servers entered in "Server selection".
The attribute can be assigned dynamic properties by means of the name AllServer. The data
type is BOOLEAN.
Analog Property
Description
TRUE, when the clock is to be displayed as an analog clock. BOOLEAN write-read access.
See also
WinCC Digital/Analog Clock (Page 247)
ScreenItem Object (Page 126)
AnchorRuler Property
Description
TRUE if the ruler window is firmly linked to the curve window. BOOLEAN write-read access.
AngleAlpha Property
Description
Defines or returns depth angle a for the 3D-effect of the "3DBarGraph" object. Value range in
degrees from 0 to 90.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
AngleBeta Property
Description
Defines or returns depth angle b for the 3D-effect of the "3DBarGraph" object. Value range in
degrees from 0 to 90.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
AngleMax Property
Description
Defines or returns the angle on the scale at which the scale graduation ends. LONG write-read
access.
The start and end of the scale graduation are described by the attributes "AngleMin" and
"AngleMax" in angular degrees. AngleMin < AngleMax applies.
Angle 0 degrees is at the right side of the horizontal diameter of the graduated scale disk.
Positive angle values are counted in a counterclockwise direction.
See also
WinCC Gauge Control (Page 255)
ScreenItem Object (Page 126)
AngleMin Property
Description
Defines or returns the angle on the scale at which the scale graduation begins. LONG write-read
access.
See also
WinCC Gauge Control (Page 255)
ScreenItem Object (Page 126)
Appearance property
Appearance
Specifies the appearance of the table in WinCC UserAdminControl.
Value Explanation
0 The table is displayed normally.
1 The table is displayed in button style.
The attribute can be assigned dynamic properties using the name Appearance. The data
type is SHORT.
Application Property
Description
Returns the Graphics Designer application when the application property is used without an
object identifier. If the application property is used with object identifier, it returns an application
object which displays the application with which the defined object was created. Read only
access.
See also
Application Window (Page 174)
ScreenItem Object (Page 126)
ApplyProjectSettings property
Value Explanation
TRUE The "Apply project settings" check box is selected. The message blocks configured in "Alarm Logging" and
their properties are activated in AlarmControl. The message blocks are displayed with these properties in
the message window.
FALSE The "Apply project settings" check box is deactivated. You can add or remove message blocks, or edit their
properties.
Ar - Ax
Archive Property
Description
The "Index" property references a pair of columns. "Archive" defines process archive values linked
to the column pair. The name of the process value archive is specified in the following form:
Server name::Archive name
See also
WinCC Online Table Control (before WinCC V7) (Page 289)
ScreenItem Object (Page 126)
ArchiveName property
Name - ArchiveName
Specifies the user archive or view to be displayed. Open the "Package Browser" dialog for
configuring an archive or a view by clicking the button.
The attribute can be assigned dynamic properties by means of the name ArchiveName. The
data type is STRING.
ArchiveType property
Type - ArchiveType
Specifies whether the selected user archive is an archive or a view. The field cannot be edited.
The attribute can be assigned dynamic properties by means of the name ArchiveType. The
data type is LONG.
ArrowsPosition property
Description
Specifies the position of the rotating arrows.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
AspectRatio property
AspectRatio
Specifies if the aspect ratio is kept in movies.
The attribute can be assigned dynamic properties by means of the name AspectRatio. The
data type is BOOLEAN.
Assignments Property
Description
A list which contains the assignments between the output values and the actual output texts to
be output.
The assignments depend on the set list type. The list type is defined with the ListType property.
Read only access.
See also
Text list (Page 199)
ScreenItem Object (Page 126)
AssumeOnExit Property
Description
TRUE, if the entered text is assumed upon exiting the entry field (e.g., with the key or mouse
click). BOOLEAN write-read access.
See also
I/O Field (Page 185)
Text list (Page 199)
ScreenItem Object (Page 126)
AssumeOnFull Property
Description
TRUE, when the content of the input field is full (specified number of characters have been
entered) and should be exited automatically and the input accepted. BOOLEAN write-read
access.
See also
I/O Field (Page 185)
ScreenItem Object (Page 126)
AuthorizedGroups property
See also
ElectronicSignature property (Page 416)
AutoCompleteColumns property
Value Explanation
TRUE Enables the display of empty columns.
FALSE Disables the display of empty columns.
AutoCompleteRows property
Value Explanation
TRUE Enables the display of empty rows.
FALSE Disables the display of empty rows.
AutoPosition property
Value Explanation
TRUE The RulerControl is positioned exactly below the source control.
FALSE The RulerControl is displayed in accordance with your configuration of the control position.
The attribute can be assigned dynamic properties by means of the name AutoPosition. The
data type is BOOLEAN.
Autorange Property
Description
TRUE, when the value range of the Y-axis is determined automatically or defined by using the
"BeginValue" and "EndValue"attributes. BOOLEAN write-read access.
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
ScreenItem Object (Page 126)
AutorangeX Property
Description
TRUE, when the value range of the X-axis is determined automatically. FALSE, when it is
determined by means of the "BeginX" and "EndX" attributes. BOOLEAN write-read access.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
AutorangeY Property
Description
TRUE, when the value range of the Y-axis is determined automatically. FALSE, when it is
determined by means of the "BeginY" and "EndY" attributes. BOOLEAN write-read access.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
Description
Defines the behavior of the message window when a new message is received. BOOLEAN write-
read access.
TRUE : A newly received message is appended to the list displayed in the message window
and is automatically selected. The visible range of the message window is moved, if
necessary.
FALSE : A newly received message is not selected. The visible range of the message window
is not changed.
The targeted selection of messages is only possible when "AutoScroll" is not active.
The "AutoScroll" property is deactivated when the attribute "MsgCtrlFlag" = "-1" is set. This
means that the most recent message is displayed at the top of the list in the message
window.
See also
WinCC Alarm Control (before WinCC V7) (Page 283)
ScreenItem Object (Page 126)
AutoScroll Property
Value Explanation
TRUE If "AutoScroll" is activated, a new activated message is appended to the list displayed in the
message window and selected automatically. The visible area of the message window is
shifted as required.
FALSE New message events are not selected if "Autoscroll" is disabled. The visible area of the mes‐
sage window is not changed.
The attribute can be assigned dynamic properties by means of the name AutoScroll. The
data type is BOOLEAN.
AutoSelectionColors property
Value Explanation
TRUE The system colors are in use.
FALSE The custom colors are used.
AutoSelectionRectColor property
Value Explanation
TRUE The system color is in use.
FALSE The custom color is used.
AutoShow property
The RulerControl is hidden again if you are no longer using the ruler, statistics range and
statistics functions.
Value Explanation
TRUE The RulerControl is displayed automatically.
FALSE The RulerControl is not displayed automatically.
The attribute can be assigned dynamic properties by means of the name AutoShow. The
data type is BOOLEAN.
AutoSize Property
Description
Defines or returns the size adaptation of the object. The following values can be set:
• 0: No size adaptation.
• 1: The picture ("PictureSelected", "PictureUnselected" properties) is adapted to the button.
• 2: The button is adapted to the picture ("PictureSelected", "PictureUnselected" properties).
See also
WinCC Push Button Control (up to WinCC V7.3) (Page 295)
ScreenItem Object (Page 126)
Autostart property
Autostart
Specifies if movies are started automatically.
The attribute can be assigned dynamic properties by means of the name Autostart. The data
type is BOOLEAN.
Average Property
Average
TRUE, if the mean value is calculated based on the last 10 values. A value change is conditional
for calculation of a new mean value. The mean value is reset when you change a picture. If only
one value is available when you change the picture, the following mean value is calculated:
(5+0+0+0+0+0+0+0+0+0)/10=0,5.
BOOLEAN write-read access.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
Axe Property
Description
Defines or returns the position of the 3D bar in the coordinate system. Value range from 0 to 2.
0: The 3D-bar is displayed on the X-axis.
1: The 3D-bar is displayed on the Y-axis.
2: The 3D-bar is displayed on the Z-axis.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
AxisSection Property
Description
Defines or returns the distance between two long axis sections. The information on the distance
is given in scale units and is dependent on the minimum and maximum values configured.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
1.15.4.3 B
Ba
BackBorderWidth Property
Description
Defines or returns the width of the 3D border in pixels. The value for the width is dependent on
the size of the object.
See also
ScreenItem Object (Page 126)
Button (Page 203)
Round Button (Page 211)
Slider (Page 214)
Group Display (Page 194)
BackColor property
Background - BackColor
Specifies the background color of the control. The button opens the "Color selection" dialog.
The attribute can be assigned dynamic properties by means of the name BackColor. The data
type is LONG.
BackColor property
BackColor Property
Function
Defines or returns the background color for the object.
For objects with a fill pattern, the background color is not displayed if "transparent" is defined
as the fill style.
Example:
The following example defines the background of the "ScreenWindow1" picture to red:
'VBS70
Dim objScreen
Set objScreen = HMIRuntime.Screens("ScreenWindow1")
objScreen.BackColor = RGB(255, 0, 0)
See also
FillStyle Property (Page 430)
FillColor Property (Page 428)
ScreenItem Object (Page 126)
BackColor2 Property
Description
Defines or returns the bar color for the display of the current value. LONG write-read access.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
BackColor3 Property
Description
Defines or returns the color of the bar background. LONG write-read access.
See also
ScreenItem Object (Page 126)
Bar (Page 175)
BackColorBottom Property
Description
Defines or returns the color for the bottom/right part of the slider. LONG write-read access.
See also
Slider (Page 214)
ScreenItem Object (Page 126)
BackColorTop Property
Description
Defines or returns the color for the top/left part of the slider. LONG write-read access.
See also
Slider (Page 214)
ScreenItem Object (Page 126)
BackFlashColorOff Property
Description
Defines or returns the color of the object background for the flash status "Off". LONG write-read
access.
See also
ScreenItem Object (Page 126)
BackFlashColorOn Property
Description
Defines or returns the color of the object background for the flash status "On". LONG write-read
access.
See also
ScreenItem Object (Page 126)
Background Property
Description
TRUE, when the background of the 3D-bar graph object should be visible. BOOLEAN write-read
access.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
BackgroundPicture Property
Description
Returns the picture name of the background picture for the graduated scale disk. Read only
access
See also
WinCC Gauge Control (Page 255)
ScreenItem Object (Page 126)
BackPictureAlignment property
Description
Defines or returns the mode of representation of the background image in the process picture.
LONG write-read access.
BackPictureName property
Description
Defines the path and file name of the background image in the process picture or returns it. LONG
write-read access.
BackStyle Property
Description
See also
HMI Symbol Library (Page 240)
WinCC Slider Control (Page 274)
WinCC Gauge Control (Page 255)
WinCC Digital/Analog Clock (Page 247)
ScreenItem Object (Page 126)
Bar
BarAdd property
New - BarAdd
Creates a new diagram.
The attribute can be assigned dynamic properties using the name BarAdd. The data type is
STRING.
BarBackColor Property
Description
Defines the background color in the area of the slider. The area stretches form "RangeMin" to
"RangeMax".
See also
WinCC Slider Control (Page 274)
ScreenItem Object (Page 126)
BarBarGradientColor property
BarBarGradientPattern property
BarBarWindow property
BarChartType property
The attribute can be assigned dynamic properties using the name BarChartType. The data
type is LONG.
BarColor property
BarCount property
BarCount
Specifies the number of configured diagrams.
The attribute can be assigned dynamic properties using the name BarCount. The data type is
LONG.
BarDepth Property
Description
Defines or returns the depth of the bar in pixels.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
BarFillColor property
BarFillColor Property
Description
Defines the fill color in the area of the slider. The area stretches from "RangeMin" to the position
of the slider.
See also
WinCC Slider Control (Page 274)
ScreenItem Object (Page 126)
BarHeight Property
Description
Defines or returns the height of the bar in pixels.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
BarIndex property
BarIndex
References a configured diagram. Using this attribute, you can assign the values of other
attributes to a specific diagram. The index must always be set before you change the properties
of a diagram in Runtime.
Valid values for "BarIndex" are between 0 and "BarCount" minus 1. The "BarCount" attribute
specifies the number of configured diagrams.
The "BarIndex" attribute can be assigned dynamic properties using the attribute BarRepos.
The data type is LONG.
BarLabel property
Label - BarLabel
Specifies the label of the selected diagram. The label is displayed in Runtime when the
"UseBarNameAsLabel" attribute has the value "FALSE".
The attribute can be assigned dynamic properties using the name BarLabel. The data type is
STRING.
BarLineStyle property
The attribute can be assigned dynamic properties using the name BarLineStyle. The data
type is LONG.
BarLineWidth property
The attribute can be assigned dynamic properties using the name BarLineWidth. The data
type is LONG.
BarLowerLimit property
BarLowerLimit
Specifies the low limit of a tag. If the tag value is less than "BarLowerLimit", the values are
designated with the color set in "BarLowerLimitColor". This setting is enabled when the
"BarLowerLimitColoring" attribute has the value "TRUE".
The attribute can be assigned dynamic properties using the name BarLowerLimit. The data
type is DOUBLE.
BarLowerLimitColor property
BarLowerLimitColor
Specifies the color for designating tag values below the value at "BarLowerLimit". The setting is
enabled when the "BarLowerLimitColoring" attribute has the value "TRUE".
The attribute can be assigned dynamic properties using the name BarLowerLimitColor. The
data type is LONG.
BarLowerLimitColoring property
BarLowerLimitColoring
Specifies whether the "BarLowerLimitColor" attribute is used for designating tag values that are
lower than the value at "BarLowerLimit".
Value Explanation
TRUE The "BarLowerLimitColor" attribute is enabled.
FALSE The "BarLowerLimitColor" attribute is disabled.
The attribute can be assigned dynamic properties using the name BarLowerLimitColoring.
The data type is BOOLEAN.
BarName property
BarProvider property
The attribute can be assigned dynamic properties using the name BarProvider.
BarProviderCLSID property
BarProviderCLSID
Displays the data source of the selected diagram.
Value Explanation
No data source configured to create a connection in Runtime by means of a script.
{416A09D2-8B5A-11D2- Data source with archive tags of a process value archive.
8B81-006097A45D48}
The attribute can be assigned dynamic properties using the name BarProviderCLSID. The
data type is STRING.
BarRemove property
Remove - BarRemove
Removes the selected diagram from the list.
The attribute can be assigned dynamic properties using the name BarRemove. The data type
is STRING.
BarRename property
BarRename
Renames the diagram that is referenced using the "BarIndex" attribute.
The attribute can be assigned dynamic properties using the name BarRename. You can use
"BarRename" to also assign dynamic properties to the "BarName" attribute. The data type is
STRING.
BarRepos property
Up/down - BarRepos
Changes the order of the selected diagrams in the diagram window. "Up" and "Down" move the
selected diagrams up and down in the list. As a result, the diagram is displayed further in the
foreground or background in runtime.
The attribute can be assigned dynamic properties using the name BarRepos. The data type is
LONG.
BarSelectTagName property
BarSelectTagName
Opens a dialog for selecting the tag name for the data source of the diagram. Programmers can
set this attribute to allow users to select a tag name using a button, for example.
The attribute can be assigned dynamic properties using the name BarSelectTagName. The
data type is BOOLEAN.
BarTagName property
BarTimeAxis property
BarUncertainColor property
BarUncertainColor
Values have an uncertain status if the initial value is unknown when Runtime starts or if a
substitute value is used. You can use the "BarUncertainColor" attribute to specify the color used
for identifying these values. The "BarUncertainColoring" attribute determines whether or not
this setting is evaluated.
The attribute can be assigned dynamic properties using the name BarUncertainColor. The
data type is LONG.
BarUncertainColoring property
BarUncertainColoring
Values have an uncertain status if the initial value is unknown when Runtime starts or if a
substitute value is used. You can use the "BarUncertainColoring" attribute to enable
identification of such values based on the color set in "BarUncertainColor".
Value Explanation
TRUE The setting for the "BarUncertainColor" attribute is enabled.
FALSE The setting for the " BarUncertainColor " attribute is disabled.
The attribute can be assigned dynamic properties using the name BarUncertainColoring.
The data type is BOOLEAN.
BarUpperLimitColoring property
BarUpperLimitColoring
Specifies whether the "BarUpperLimitColor" attribute is used for designating tag values that are
higher than the value at "BarUpperLimit".
Value Explanation
TRUE The setting for the "BarUpperLimitColor" attribute is enabled.
FALSE The setting for the "BarUpperLimitColor" attribute is disabled.
The attribute can be assigned dynamic properties using the name BarUpperLimitColoring.
The data type is BOOLEAN.
BarUpperLimitColor property
BarUpperLimitColor
Specifies the color for designating tag values above the value at "BarUpperLimit". The setting is
enabled when the "BarUpperLimitColoring" attribute has the value "TRUE" hat.
The attribute can be assigned dynamic properties using the name BarUpperLimitColor. The
data type is LONG.
BarUpperLimit property
BarUpperLimit
Specifies the high limit of a tag. If the tag value is higher than "BarUpperLimit", the values are
designated with the color set in "BarUpperLimitColor". This setting is enabled when the
"BarUpperLimitColoring" attribute has the value "TRUE".
The attribute can be assigned dynamic properties using the name BarUpperLimit. The data
type is DOUBLE.
BarValueAlignment property
Alignment - BarValueAlignment
Specifies the alignment of the displayed values for the "Bars with value" diagram type.
The following settings are available depending on the write direction of the bars:
• The write direction of bars is "From the right" or "From the left"
• The write direction of bars is "From the top" or "From the bottom"
The attribute can be assigned dynamic properties using the name BarValueAlignment. The
data type is LONG.
BarValueAxis property
BarValueUnit property
Unit - BarValueUnit
Specifies a unit of the values that will be appended to the value to be displayed for the "Bars with
value" diagram type. e.g. "%" or "°C"
The attribute can be assigned dynamic properties using the name BarValueUnit. The data
type is STRING.
BarVisible property
Diagram - BarVisible
The list shows the diagrams you have created.
Select the diagrams in the list that you want to display in the diagram windows.
Click on a diagram in the list to adapt the properties and to assign axes and diagram windows
to the diagram.
The attribute can be assigned dynamic properties using the name BarVisible. The data type
is BOOLEAN.
BarWindowAdd property
New - BarWindowAdd
Creates a new diagram window.
The attribute can be assigned dynamic properties using the name BarWindowAdd. The data
type is STRING.
BarWindowCoarseGrid property
Value Explanation
TRUE Enables the display of grid lines for the main scale.
FALSE Disables the display of grid lines for the main scale.
The attribute can be assigned dynamic properties using the name BarWindowCoarseGrid.
The data type is BOOLEAN.
BarWindowCoarseGridColor property
BarWindowCount property
BarWindowCount
Specifies the number of configured diagrams.
The attribute can be assigned dynamic properties using the name BarWindowCount. The
data type is LONG.
BarWindowFineGrid property
Value Explanation
TRUE Enables the display of grid lines for the secondary scale.
FALSE Disables the display of grid lines for the secondary scale.
The attribute can be assigned dynamic properties using the name BarWindowFineGrid. The
data type is BOOLEAN.
BarWindowFineGridColor property
BarWindowForegroundBarGrid property
Value Explanation
TRUE The grid lines for the foreground diagram are displayed in the diagram window.
FALSE The grid lines for all diagrams are displayed in the diagram window.
BarWindowGapWidth property
BarWindowGridInBarColor property
Value Explanation
TRUE The grid lines are displayed in the color of the bars.
FALSE The grid lines are displayed with the color set in the "Color" field.
BarWindowHorizontalGrid property
Value Explanation
TRUE Display of horizontal grids for value axes is enabled.
FALSE Display of horizontal grid lines for value axes is disabled.
BarWindowIndex property
BarWindowIndex
References a configured diagram. Using this attribute, you can assign the values of other
attributes to a specific diagram.
Valid values for "BarWindowIndex" are between 0 and "BarWindowCount" minus 1. The
"BarWindowCount" attribute specifies the number of configured diagrams.
The "BarWindowIndex" attribute can be assigned dynamic properties using the attribute
BarWindowRepos. The data type is LONG.
BarWindowName property
BarWindowRemove property
Remove - BarWindowRemove
Removes the selected diagram window from the list.
The attribute can be assigned dynamic properties using the name BarWindowRemove. The
data type is STRING.
BarWindowRename property
BarWindowRename
Renames the diagram window, which is referenced using the "BarWindowIndex" attribute.
The attribute can be assigned dynamic properties using the name BarWindowRename. You
can use "BarWindowRename" to also assign dynamic properties to the "BarWindowName"
attribute. The data type is STRING.
BarWindowRepos property
Up/down - BarWindowRepos
Changes the order of the diagram windows. "Up" and "Down" move the selected diagram
windows up and down in the list.
The order in the list determines the position in the Control. The first diagram window is
displayed at the bottommost position, the last diagram window is displayed at the topmost
position.
The attribute can be assigned dynamic properties using the name BarWindowRepos. The
data type is LONG.
BarWindowSeriesOverlap property
Overlap - BarWindowBarOverlap
Specifies the overlap of various bars of a time instant in % of the bar width.
The attribute can be assigned dynamic properties using the name BarWindowBarOverlap.
The data type is LONG.
BarWindowSpacePortion property
BarWindowVerticalGrid property
Value Explanation
TRUE Display of vertical grid lines for time axes is enabled.
FALSE Display of vertical grid lines for time axes is disabled.
The attribute can be assigned dynamic properties using the name BarWindowVerticalGrid.
BarWindowVisible property
BarWidth Property
Description
Defines or returns the width of the bar in pixels.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
BarChartAlignment property
Alignment - BarChartAlignment
Specifies the alignment of the bar in the diagram.
The following settings are available depending on the write direction of the bars:
• The write direction of bars is "From the right" or "From the left"
• The write direction of bars is "From the top" or "From the bottom"
The attribute can be dynamized with the BarChartAlignment name. The data type is LONG.
BasePicReferenced Property
Description
TRUE, when the picture assigned in the object status display should be saved. Otherwise, only
the associated object reference is saved. Read only access.
See also
Status display (Page 201)
ScreenItem Object (Page 126)
BasePicTransColor Property
Description
Defines or returns which color of the assigned bitmap object (.bmp, .dib) should be set to
"transparent". LONG Write/Read Access.
The color is only set to "Transparent" if the value of the "BasePicUseTransColor" property is "True".
See also
Status display (Page 201)
ScreenItem Object (Page 126)
BasePicture Property
Description
Returns the basic picture for the object status display. Read-only access.
The picture (*.BMP or *.DIB) must be located in the "GraCS" directory of the current project so
that it can be integrated.
In this context, the "BasePicReferenced" property defines whether the basic picture should be
saved together with the object status display or referenced.
See also
Status display (Page 201)
ScreenItem Object (Page 126)
BasePicUseTransColor Property
Description
TRUE, when the configured color ("BasePicTransColor" property) of the bitmap objects should be
set to "transparent". BOOLEAN write-read access.
See also
Status display (Page 201)
ScreenItem Object (Page 126)
BaseScreenName Property
Function
Defines or returns the current basic picture.
STRING (write-read access)
A picture change is executed using the
command.
When reading out the "BaseScreenName" property, only the picture name without server
prefix is returned.
Note
Always enter picture names without the extension "PDL" for reasons of compatibility with future
versions.
Example:
The following example executes a picture change to "bild1.pdl":
HMIRuntime.BaseScreenName = "bild1"
See also
ScreenItem Object (Page 126)
HMIRuntime Object (Page 119)
BaseY Property
Description
Defines or returns the vertical distance of the bottom bar edge to the top edge of the objet field.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
BaseX Property
Description
Defines or returns the horizontal distance of the right bar edge to the left edge of the object
field in pixels.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
BasicBorderColor property
Description
Specifies the border color.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
BasicColor property
Description
Specifies the color of the object.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
Be - Bl
BeginTime Property
Description
See also
WinCC Online Table Control (before WinCC V7) (Page 289)
WinCC Online Trend Control (before WinCC V7) (Page 292)
ScreenItem Object (Page 126)
BeginValue Property
Description
The "Index" property references a trend. "BeginValue" defines the lower limit of the value range
to be displayed for the trend. Whether the information is evaluated is dependent on the
"Autorange" and "CommonY" properties.
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
ScreenItem Object (Page 126)
BeginX Property
Description
Defines or returns the lower limit of the X-axis of a trend referenced with the "Index" property.
Whether the information is evaluated is dependent on the "AutorangeX" and "CommonX"
properties.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
BeginY Property
Description
Defines or returns the lower limit of the Y-axis of a trend referenced with the "Index" property.
Whether the information is evaluated is dependent on the "AutorangeY" and "CommonY"
properties.
See also
ScreenItem Object (Page 126)
WinCC Function Trend Control (before WinCC V7) (Page 285)
BevelColorDown Property
Description
Defines the color of the following border sections in the case of 3D representation of the borders:
• with depressed bevel ("BevelStyle" = 1): top and left bevel section
• with raised bevel ("BevelStyle" = 2): bottom and right bevel section
See also
WinCC Slider Control (Page 274)
ScreenItem Object (Page 126)
BevelColorUp Property
Description
Defines the color of the following border sections in the case of 3D representation of the borders:
• with depressed bevel ("BevelStyle" = 1): bottom and right bevel section
• with raised bevel ("BevelStyle" = 2): top and left bevel section
See also
WinCC Slider Control (Page 274)
ScreenItem Object (Page 126)
BevelInner Property
Description
Defines or returns the appearance of the inner part of the object bevel. Write/Read access.
• 0: inner part not available
• 1: "depressed" appearance
• 2: "raised" appearance
• 3: uniform gray border
• 4 or higher: uniformly colored order, border color = background color
See also
WinCC Gauge Control (Page 255)
ScreenItem Object (Page 126)
BevelOuter Property
Description
Defines or returns the appearance of the outer part of the object bevel. Write/Read access.
• 0: inner part not available
• 1: "depressed" appearance
• 2: "raised" appearance
• 3: uniform gray border
• 4 or higher: uniformly colored order, border color = background color
See also
WinCC Gauge Control (Page 255)
ScreenItem Object (Page 126)
BevelWidth Property
Description
Defines or returns the border width for the inner part of the border (inner bevel) and for the outer
border part (outer bevel) in pixels. Write/Read access.
See also
WinCC Gauge Control (Page 255)
ScreenItem Object (Page 126)
BitNumber Property
Description
Defines or returns the bit whose status must change in order to trigger a change of value. The
tag used must be of the type BYTE, WORD or DWORD.
See also
Text list (Page 199)
ScreenItem Object (Page 126)
BlinkColor Property
Description
Defines the color of the icon in the flash picture. LONG write-read access.
See also
HMI Symbol Library (Page 240)
ScreenItem Object (Page 126)
BlinkMode property
The attribute can be assigned dynamic properties by means of the name BlinkMode. The
data type is LONG.
BlinkSpeed property
The attribute can be assigned dynamic properties by means of the name BlinkSpeed. You
can also use other values. The data type is LONG.
BlockAlign property
The attribute can be assigned dynamic properties by means of the name BlockAlign. The
data type is LONG.
BlockAutoPrecisions property
Value Explanation
TRUE The decimal precision is defined automatically. The value in the "Decimal places" field is disabled.
FALSE The value in the "Decimal places" field is enabled.
BlockCaption property
Caption - BlockCaption
Defines the caption of the column header in the control for the selected message block.
The caption is active in all Runtime languages.
The attribute can be assigned dynamic properties by means of the name BlockCaption. The
data type is STRING.
BlockCount property
BlockCount
Specifies the number of blocks to be made available as columns for the control.
The attribute can be assigned dynamic properties by means of the name BlockCount. The
data type is LONG.
BlockDateFormat property
BlockDurationTimeFormat property
BlockDurationTimeFormat
Defines which duration format will be used for the display in the block.
To change the setting, the option “Take from source" must be deactivated or
"BlockUseSourceFormat" must be set to "FALSE".
The following time duration formats are available:
Value Explanation
Automatic The time duration format is determined automatically.
d H:mm:ss Day Hours:Minutes:Seconds
Example: 1 2:03:55
H:mm:ss. Hours:Minutes:Seconds
Example: 26:03:55
m:ss Minutes:Seconds
Example: 1563:55
s Seconds
Example: 93835
d H:mm:ss. Day Hours:Minutes:Seconds.Milliseconds
ms Example: 1 2:03:55.150
H:mm:ss.m Hours:Minutes:Seconds.Milliseconds
s Example: 26:03:55.150
m:ss.ms Minutes:Seconds.Milliseconds
Example: 1563:55.150
s.ms Seconds.Milliseconds
Example: 2.150
BlockExponentialFormat property
Value Explanation
TRUE The values are displayed with exponential notation.
FALSE The values are displayed with decimal notation.
BlockHideText property
Value Explanation
TRUE The content is not displayed in text format. The option is disabled.
FALSE The content is displayed in text format. The option is enabled.
The attribute can be assigned dynamic properties by means of the name BlockHideText. The
data type is BOOLEAN.
BlockHideTitleText property
Value Explanation
TRUE The header is not displayed in text format. The option is disabled.
FALSE The header is displayed in text format. The option is enabled.
The attribute can be assigned dynamic properties by means of the name BlockHideTitleText.
The data type is BOOLEAN.
BlockId property
BlockId
Default assignment of the ID number and of the block in WinCC RulerControl:
Value Description
0 No block
1 Name
2 Index
3 Label
4 Show
5 Tag name Y
6 Tag name X
7 Y value
8 X value/time stamp
9 Y value (LL)
Value Description
10 Time stamp (LL)
11 Y value (UL)
12 Time stamp (UL)
13 Minimum
14 Minimum - Time stamp
15 Maximum
16 Maximum - Time stamp
17 Average
18 Standard deviation
19 Integral
20 Weighted average value
21 Duration
22 Number of values
23 Area name
24 Area name (LL)
25 Area name (HL)
26 Label X
27 Label Y
28 Last Y value
The tag values are also updated while the update via "Autoscroll" or "Stop" is disabled in the connected WinCC
Control.
The update cycle from the interconnected control is used.
29 Last X value / time stamp
The tag values are also updated while the update via "Autoscroll" or "Stop" is disabled in the connected WinCC
Control.
The update cycle from the interconnected control is used.
The attribute can be assigned dynamic properties by means of the name BlockID. The data
type is LONG.
BlockIndex property
BlockIndex
References a block. Using this attribute you can assign the values of other attributes to a specific
block.
Values between 0 and "BlockCount" minus 1 are valid for "BlockIndex". Attribute "BlockCount"
defines the number of available blocks.
The attribute can be assigned dynamic properties by means of the name BlockIndex. The
data type is LONG.
BlockLength property
BlockName property
BlockPrecisions property
BlockShowDate property
Value Explanation
TRUE The date and time are displayed. The date format is defined in the "Date format" field.
FALSE The time is displayed.
The attribute can be assigned dynamic properties by means of the name BlockShowDate.
The data type is BOOLEAN.
BlockShowIcon property
Content as icon - BlockShowIcon
Enables the display of the content of a selected block as icon. This function is only available
in WinCC Alarm Control.
Value Explanation
TRUE The content is visualized as icon.
FALSE The content is not visualized as icon.
The attribute can be assigned dynamic properties by means of the name BlockShowIcon.
The data type is BOOLEAN.
BlockShowTitleIcon property
Title as icon - BlockShowTitleIcon
Enables the display of the header of a selected block as icon. This function is only available in
WinCC Alarm Control.
Value Explanation
TRUE The header is displayed as icon.
FALSE The header is not displayed as icon.
BlockTimeFormat property
Value Explanation
Automatic The time format is set automatically.
HH:mm:ss.ms Hours:Minutes:Seconds, e.g. 15:35:44.240.
hh:mm:ss tt Hours:Minutes:Seconds AM/PM, e.g. 03:35:44 PM.
hh:mm:ss.ms tt Hours:Minutes:Seconds.Milliseconds AM/PM, e.g. 03:35:44.240 PM.
The attribute can be assigned dynamic properties by means of the name BlockTimeFormat.
The data type is STRING.
BlockUseSourceFormat property
Use source format - BlockUseSourceFormat
Specifies that the format is inherited from the interconnected control. Here the size of the
control, the zoom factor and the value range are taken into consideration to display the
optimal number of decimal places.
Value Explanation
TRUE The formats are derived from the interconnected control.
FALSE The formats configured in Ruler Control are used, for example, the display of a precisely specified number of
decimal places.
Bo - Bu
BorderBackColor Property
Description
Defines or returns the background color of the line for the object. LONG write-read access. The
background color is only visible with the property setting "BorderWidth" > 0.
See also
ScreenItem Object (Page 126)
BorderColor Property
Description
Defines or returns the line color for the object. LONG write-read access.
See also
ScreenItem Object (Page 126)
BorderColor property
BorderColorBottom Property
Description
Defines or returns the border color for the bottom/right part of the object. LONG write-read
access.
See also
ScreenItem Object (Page 126)
Button (Page 203)
Round Button (Page 211)
BorderColorTop Property
Description
Defines or returns the border color for the top/left part of the object. LONG write-read access.
See also
Button (Page 203)
Round Button (Page 211)
ScreenItem Object (Page 126)
BorderEndStyle Property
Description
Defines or returns the line end style of the object. LONG write-read access.
See also
Polyline (Page 159)
Line (Page 155)
ScreenItem Object (Page 126)
BorderFlashColorOff Property
Description
Defines or returns the color of the object lines for the flashing status "Off". LONG write-read
access.
See also
ScreenItem Object (Page 126)
BorderFlashColorOn Property
Description
Defines or returns the color of the object lines for the flashing status "On". LONG write-read
access.
See also
ScreenItem Object (Page 126)
BorderStyle Property
Description
Defines or returns the line style for the object. Value range from 0 to 4.
0 = solid line
1 = dashed line
2 = dotted line
3 = dash-dotted line
4 = dash-dot-dot line
See also
ScreenItem Object (Page 126)
BorderWidth Property
Description
Defines or returns the line weight (in pixels) for the object.
See also
ScreenItem Object (Page 126)
BorderWidth property
BottomConnectedConnectionPointIndex Property
Description
Specifies or sets the index number of the bottom connecting point.
LONG write-read access.
See also
Connector (Page 168)
ScreenItem Object (Page 126)
BottomConnectedObjectName Property
Description
Specifies or sets the object name of the object which is docked on at the bottom connecting
point.
LONG write-read access.
See also
Connector (Page 168)
ScreenItem Object (Page 126)
BoxAlignment Property
Description
TRUE, when the fields are arranged aligned to the right. BOOLEAN write-read access.
See also
Radio box (Page 209)
Check box (Page 207)
ScreenItem Object (Page 126)
BoxCount Property
Description
Defines or returns the number of fields. Value range from 0 to 63.
See also
Radio box (Page 209)
Check box (Page 207)
ScreenItem Object (Page 126)
BoxType Property
Description
Defines or returns the field type. Value range from 0 to 2:
• 0: Edition
• 1: Input
• 2: I/O field
See also
Text list (Page 199)
I/O Field (Page 185)
ScreenItem Object (Page 126)
ButtonColor Property
Description
Defines or returns the color of the slider. LONG write-read access.
See also
Slider (Page 214)
ScreenItem Object (Page 126)
ButtonCommand Property
Description
Upon changing a value of "ButtonCommand", a message is issued to the WinCC Alarm Control
in order to adapt the display in the message window.
Value (hex); value (dec); Retrieved Function:
• 0x00000001; 1; Message list
• 0x00000002; 2; Short-term archive list
• 0x00000004; 4; Long-term archive list
• 0x00200000; 2097152; Lock list
• 0x00000008; 8; Acknowledge central signaling device
• 0x00000010; 16; Single Acknowledgment
• 0x00000020; 32; Group Acknowledge
• 0x00000040; 64; Autoscroll
• 0x00000080; 128; Selection Dialog
• 0x00000100; 256; Lock Dialog
• 0x00000200; 512; Print Message Log
• 0x00000800; 2048; Emergency Acknowledgment
• 0x00001000; 4096; First Message
• 0x00002000; 8192; Last Message
• 0x00004000; 16384; Next Message
• 0x00008000; 32768; Previous Message
• 0x00010000; 65536; Infotext Dialog
• 0x00020000; 131072; Comments Dialog
• 0x00040000; 262144; Loop in Alarm
• 0x00100000; 1048576; Print current view
• 0x00400000; 4194304; Lock/unlock message
• 0x00800000; 8388608; Sorting Dialog
• 0x01000000; 16777216; Time base dialog
• 0x02000000; 33554432; Hit list
• 0x04000000; 67108864; List of messages to be hidden
See also
WinCC Alarm Control (before WinCC V7) (Page 283)
ScreenItem Object (Page 126)
Button1MessageClasses property
Message Types for Button 1 (Button1MessageClasses)
Define one or more message events for displaying the first button in the group display. This
is done by entering the numbers of the bits in the collect value. The display of the message
events is configured in the "Message Types" property group.
If you want to assign several message events, separate the numbers with a comma. The
sequence of the assignment defines the priority. If there are more than one selected event for
one button, the event that has been entered first is displayed.
One event can be displayed simultaneously in more than one button.
The "Message Types for Button 1" attribute can be assigned dynamic properties with the
name "Button1MessageClasses".
Button2MessageClasses property
Message Types for Button 2 (Button2MessageClasses)
For displaying both buttons, define one or more message events in the group display. This
is done by entering the number of the bit in the collect value. The display of the message
events is configured in the "Message Types" property group.
If you want to assign several message events, separate the numbers with a comma. The
sequence of the assignment defines the priority. If there are more than one selected event for
one button, the event that has been entered first is displayed.
The same event can be visualized simultaneously in several buttons.
The "Message Types for Button 2" attribute can be assigned dynamic properties with the
name "Button2MessageClasses".
Button3MessageClasses property
Message Types for Button 3 (Button3MessageClasses)
For displaying the third button, define one or more message events in the group display. This
is done by entering the number of the bit in the collect value. The display of the message
events is configured in the "Message Types" property group.
If you want to assign several message events, separate the numbers with a comma. The
sequence of the assignment defines the priority. If there are more than one selected event for
one button, the event that has been entered first is displayed.
The same event can be visualized simultaneously in several buttons.
The "Message Types for Button 3" attribute can be assigned dynamic properties with the
name "Button3MessageClasses".
Button4MessageClasses property
Message Types for Button 4 (Button4MessageClasses)
For displaying the fourth button, define one or more message events in the group display.
This is done by entering the number of the bit in the collect value. The display of the
message events is configured in the "Message Types" property group.
If you want to assign several message events, separate the numbers with a comma. The
sequence of the assignment defines the priority. If there are more than one selected event for
one button, the event that has been entered first is displayed.
The same event can be visualized simultaneously in several buttons.
The "Message Types for Button 4" attribute can be assigned dynamic properties with the
name "Button4MessageClasses".
Button5MessageClasses property
Message Types for Button 5 (Button5MessageClasses)
For displaying the fifth button, define one or more message events in the group display. This
is done by entering the number of the bit in the collect value. The display of the message
events is configured in the "Message Types" property group.
If you want to assign several message events, separate the numbers with a comma. The
sequence of the assignment defines the priority. If there are more than one selected event for
one button, the event that has been entered first is displayed.
The same event can be visualized simultaneously in several buttons.
The "Message Types for Button 5" attribute can be assigned dynamic properties with the
name "Button5MessageClasses".
Button6MessageClasses property
Message Types for Button 6 (Button6MessageClasses)
For displaying the sixth button, define one or more message events in the group display. This
is done by entering the number of the bit in the collect value. The display of the message
events is configured in the "Message Types" property group.
If you want to assign several message events, delimit the numbers with a comma. The order
of assignment defines the priority. If there are more than one selected event for one button,
the event that has been entered first is displayed.
The same event can be visualized simultaneously in several buttons.
The "Message Types for Button 6" attribute can be assigned dynamic properties with the
name "Button6MessageClasses".
Button7MessageClasses property
Message Types for Button 7 (Button7MessageClasses)
For displaying the seventh button, define one or more message events in the group display.
This is done by entering the number of the bit in the collect value. The display of the
message events is configured in the "Message Types" property group.
If you want to assign several message events, delimit the numbers with a comma. The order
of assignment defines the priority. If there are more than one selected event for one button,
the event that has been entered first is displayed.
The same event can be visualized simultaneously in several buttons.
The "Message Types for Button 7" attribute can be assigned dynamic properties with the
name "Button7MessageClasses".
Button8MessageClasses property
Message Types for Button 8 (Button8MessageClasses)
For displaying the eighth button, define one or more message events in the group display.
This is done by entering the number of the bit in the collect value. The display of the
message events is configured in the "Message Types" property group.
If you want to assign several message events, delimit the numbers with a comma. The order
of assignment defines the priority. If there are more than one selected event for one button,
the event that has been entered first is displayed.
The same event can be visualized simultaneously in several buttons.
The "Message Types for Button 8" attribute can be assigned dynamic properties with the
name "Button8MessageClasses".
Button1Width Property
Description
Defines or returns the width of the Button 1 in pixels.
When the SameSize property is set to TRUE, all the buttons are specified the same width.
See also
Group Display (Page 194)
ScreenItem Object (Page 126)
Button2Width Property
Description
Defines or returns the width of the Button 2 in pixels.
When the SameSize property is set to TRUE, all the buttons are specified the same width.
See also
Group Display (Page 194)
ScreenItem Object (Page 126)
Button3Width Property
Description
Defines or returns the width of the Button 3 in pixels.
When the SameSize property is set to TRUE, all the buttons are specified the same width.
See also
ScreenItem Object (Page 126)
Group Display (Page 194)
Button4Width Property
Description
Defines or returns the width of the Button 4 in pixels.
When the SameSize property is set to TRUE, all the buttons are specified the same width.
See also
Group Display (Page 194)
ScreenItem Object (Page 126)
1.15.4.4 C
Ca - Cl
Caption Property
Description
See also
Controls (Page 220)
Picture Window (Page 180)
Application Window (Page 174)
ScreenItem Object (Page 126)
Caption property
Text - Caption
Defines the text of the window caption.
The attribute can be assigned dynamic properties by means of the name Caption. The data
type is STRING.
CaptionColor Property
Description
Defines or returns the color of the element labeling. LONG write-read access.
See also
ScreenItem Object (Page 126)
WinCC Gauge Control (Page 255)
CaptionFont Property
Description
Returns the values for font, font style and font size as well as the "Underline" and "Strikethrough"
effects for the element labeling. Read only access.
See also
WinCC Gauge Control (Page 255)
ScreenItem Object (Page 126)
CaptionOffset Property
Description
Defines or returns the distance of the element labeling in relation to the top edge of the object.
The element labeling can only be positioned along the vertical diameter of the graduated scale
disk. The value of the attribute is related to the height of the object and is measured from the top
edge of the object to the base of the text. Write/Read access.
The value range is 0 to 1:
0: The base of the text is at the top limit of the object. The text is no longer visible because it
is outside the object.
1: The base of the text is at the bottom limit of the object.
See also
WinCC Gauge Control (Page 255)
ScreenItem Object (Page 126)
CaptionText property
Description
Defines the window title that is displayed in Runtime or returns it. The window title is displayed
as "Header" object property.
The Caption property must be set to TRUE.
See also
Picture Window (Page 180)
ScreenItem Object (Page 126)
CellCount property
CellCount
Specifies the number of cells of the Row object of a Table Control. The number of cells
corresponds to the number of columns.
Description
TRUE, when the content of the cells in a message line should be cut if the column width is too
small. BOOLEAN write-read access.
See also
WinCC Alarm Control (before WinCC V7) (Page 283)
ScreenItem Object (Page 126)
CellCut property
Value Explanation
TRUE Enables shortening of cell contents.
FALSE Disables shortening of cell contents.
The attribute can be assigned dynamic properties by means of the name CellCut. The data
type is BOOLEAN.
CellSpaceBottom property
CellSpaceBottom
Defines the bottom margin of the table cells.
The attribute can be assigned dynamic properties by means of the name CellSpaceBottom.
The data type is LONG.
CellSpaceLeft property
CellSpaceLeft
Defines the left indent of the table cells.
The attribute can be assigned dynamic properties by means of the name CellSpaceLeft . The
data type is LONG.
CellSpaceRight property
CellSpaceRight
Defines the right indent of the table cells.
The attribute can be assigned dynamic properties by means of the name CellSpaceRight .
The data type is LONG.
CellSpaceTop property
CellSpaceTop
Defines the top margin of the table cells.
The attribute can be assigned dynamic properties by means of the name CellSpaceTop . The
data type is LONG.
CellText property
CellText
Returns the contents of a cell as a string. The cell is determined from the column number of the
row object, e.g. CellText(3) for the third column. Numbering runs from "1" to "CellCount".
CenterColor Property
Description
Defines or returns the color of the circular center of the scale (cover of the pointer axis). LONG
write-read access.
See also
WinCC Gauge Control (Page 255)
ScreenItem Object (Page 126)
CenterScale Property
Description
Defines or returns the diameter of the circular center of the scale (cover of the pointer axis) in
relation to the smaller value of the geometric width and height attributes. Write/Read access.
The value range is 0.03 to 1:
1: The diameter corresponds to the smaller value of the "Width" or "Height" geometric values.
See also
WinCC Gauge Control (Page 255)
ScreenItem Object (Page 126)
CheckAlarmHigh Property
Description
TRUE, when the "AlarmHigh" limit value is to be monitored. BOOLEAN write/read access.
The limit value, the display on reaching the limit value and the type of evaluation are defined by
means of the "AlarmHigh", "ColorAlarmHigh" and "TypeAlarmHigh" properties.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
CheckAlarmLow Property
Description
TRUE, when the "AlarmLow" limit value is to be monitored. BOOLEAN write/read access.
The limit value, the display on reaching the limit value and the type of evaluation are defined by
means of the "AlarmLow", "ColorAlarmLow" and "TypeAlarmLow" properties.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
CheckLimitHigh4 Property
Description
TRUE, when the "Reserve 4" upper limit value should be monitored. BOOLEAN write/read access.
The limit value, the display on reaching the limit value and the type of evaluation are defined by
means of the "LimitHigh4", "ColorLimitHigh4" and "TypeLimitHigh4" properties.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
CheckLimitHigh5 Property
Description
TRUE, when the "Reserve 5" upper limit value should be monitored. BOOLEAN write/read access.
The limit value, the display on reaching the limit value and the type of evaluation are defined by
means of the "LimitHigh5", "ColorLimitHigh5" and "TypeLimitHigh5" properties.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
CheckLimitLow4 Property
Description
TRUE, when the "Reserve 4" lower limit value should be monitored. BOOLEAN write/read access.
The limit value, the display on reaching the limit value and the type of evaluation are defined by
means of the "LimitLow4", "ColorLimitLow4" and "TypeLimitLow4" properties.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
CheckLimitLow5 Property
Description
TRUE, when the "Reserve 5" lower limit value should be monitored. BOOLEAN write/read access.
The limit value, the display on reaching the limit value and the type of evaluation are defined by
means of the "LimitLow5", "ColorLimitLow5" and "TypeLimitLow5" properties.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
CheckToleranceHigh Property
Description
TRUE, when the "ToleranceHigh" limit value is to be monitored. BOOLEAN write/read access.
The limit value, the display on reaching the limit value and the type of evaluation are defined by
means of the "ToleranceHigh", "ColorToleranceHigh" and "TypeToleranceHigh" properties.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
CheckToleranceLow Property
Description
TRUE, when the "ToleranceLow" limit value is to be monitored. BOOLEAN write/read access.
The limit value, the display on reaching the limit value and the type of evaluation are defined by
means of the "ToleranceLow", "ColorToleranceLow" and "TypeToleranceLow" properties.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
CheckWarningHigh Property
Description
TRUE, when the "WarningHigh" limit value is to be monitored. BOOLEAN write/read access.
The limit value, the display on reaching the limit value and the type of evaluation are defined by
means of the "WarningHigh", "ColorWarningHigh" and "TypeWarningHigh" properties.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
CheckWarningLow Property
Description
TRUE, when the "WarningLow" limit value is to be monitored. BOOLEAN write/read access.
The limit value, the display on reaching the limit value and the type of evaluation are defined by
means of the "WarningLow", "ColorWarningLow" and "TypeWarningLow" properties.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
ClearOnError Property
Description
TRUE, when the field entry is automatically deleted in the case of invalid input. BOOLEAN write-
read access.
See also
I/O Field (Page 185)
ScreenItem Object (Page 126)
ClearOnNew Property
Description
TRUE, when the field entry is deleted as soon as the I/O field has the focus. BOOLEAN write-read
access.
See also
I/O Field (Page 185)
ScreenItem Object (Page 126)
Description
TRUE, when the window can be closed in Runtime. BOOLEAN write-read access.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
WinCC Online Trend Control (before WinCC V7) (Page 292)
WinCC Online Table Control (before WinCC V7) (Page 289)
ScreenItem Object (Page 126)
Closeable property
Closeable
Defines whether the control can be closed in Runtime.
Value Explanation
TRUE The control can be closed in Runtime.
FALSE The control cannot be closed in Runtime.
The attribute can be assigned dynamic properties by means of the name Closeable. The data
type is BOOLEAN.
CloseButton Property
Description
TRUE, when the window is provided with a "Close" button. Read only access.
See also
Picture Window (Page 180)
Application Window (Page 174)
ScreenItem Object (Page 126)
Co
CoarseGrid Property
Description
TRUE if the value axis is scaled with long distances between the marks. The spacing between two
long tick marks can be changed using the "CoarseGridValue" property.
BOOLEAN write-read access.
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
ScreenItem Object (Page 126)
CoarseGridX Property
Description
TRUE, when the X-axis graduation is scaled by long tick marks. The distance between two long
tick marks can be changed using the "CoarseGridValueX" property. BOOLEAN write-read access.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
CoarseGridY Property
Description
TRUE, when the Y-axis graduation is scaled by long tick marks. The distance between two long
tick marks can be changed using the "CoarseGridValueY" property. BOOLEAN write-read access.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
CoarseGridValue Property
Description
Defines the distance between two long tick marks in the scale. Whether the information is
evaluated is dependent on the value of the "CoarseGrid" property.
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
ScreenItem Object (Page 126)
CoarseGridValueX Property
Description
Defines or returns the distance between two long tick marks on the graduation scale of the X-
axis. Whether the information is evaluated is dependent on the value of the "CoarseGridX"
property.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
CoarseGridValueY Property
Description
Defines or returns the distance between two long tick marks on the graduation scale of the Y-
axis. Whether the information is evaluated is dependent on the value of the "CoarseGridY"
property.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
CollectValue Property
Description
Contains the respective status of the active message class in Runtime as the start value. LONG
write/read access.
The value can be determined from the group display of hierarchically subordinate pictures by
making it dynamic using a tag.
See also
Group Display (Page 194)
ScreenItem Object (Page 126)
ColMove Property
Description
TRUE, when the arrangement of columns can be changed. BOOLEAN write-read access.
See also
WinCC Alarm Control (before WinCC V7) (Page 283)
ScreenItem Object (Page 126)
Color Property
Description
The "Index" property references a column pair or a trend. "Color" defines the color of the font in
the column or the trend. LONG write-read access. The color is defined as an RGB value.
See also
WinCC Online Table Control (before WinCC V7) (Page 289)
WinCC Online Trend Control (before WinCC V7) (Page 292)
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
ColorAlarmHigh Property
Description
Defines or returns the bar color for the "AlarmHigh" limit value. LONG write/read access.
The "CheckAlarmHigh" property must have been set to TRUE if the bar color should change on
reaching the limit value.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
ColorAlarmLow Property
Description
Defines or returns the bar color for the "AlarmLow" limit value. LONG write/read access.
The "CheckAlarmLow" property must have been set to TRUE if the bar color should change on
reaching the limit value.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
ColorBottom Property
Description
Defines or returns the color for the bottom/right stop of the slider object. LONG write-read access.
See also
Slider (Page 214)
ScreenItem Object (Page 126)
ColorChangeType Property
Description
TRUE, if the change of color should occur segment by segment in the case of a color change (e.g.
on reaching a limit value). If set to FALSE, it defines the change of color for the entire bar.
BOOLEAN write-read access.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
ColorLimitHigh4 Property
Description
Defines or returns the color for the "Reserve 4" upper limit value. LONG write/read access.
The "CheckLimitHigh4" property must have been set to TRUE if the bar color should change on
reaching the limit value.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
ColorLimitHigh5 Property
Description
Defines or returns the color for the "Reserve 5" upper limit value. LONG write/read access.
The "CheckLimitHigh5" property must have been set to TRUE if the bar color should change on
reaching the limit value.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
ColorLimitLow4 Property
Description
Defines or returns the color for the "Reserve 4" lower limit value. LONG write/read access.
The "CheckLimitLow4" property must have been set to TRUE if the bar color should change on
reaching the limit value.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
ColorLimitLow5 Property
Description
Defines or returns the color for the "Reserve 5" lower limit value. LONG write/read access.
The "CheckLimitLow5" property must have been set to TRUE if the bar color should change on
reaching the limit value.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
ColorState1Good property
Description
Specifies the color of the status "Good" of diagnostic objects.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
ColorState2Maintenance property
Description
Specifies the color of the status "Maintenance" of diagnostic objects.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
ColorState3Error property
Description
Specifies the color of the status "Error" of diagnostic objects.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
ColorStateXUncertain property
Description
Specifies the color of the status "Uncertain" of diagnostic objects.
The property can be dynamized for some SVG graphics of the SVG library.
See also
SVG object (Page 197)
ColorToleranceHigh Property
Description
Defines or returns the color for the "ToleranceHigh" upper limit value. LONG write/read access.
The "CheckToleranceHigh" property must have been set to TRUE if the bar color should change
on reaching the limit value.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
ColorToleranceLow Property
Description
Defines or returns the color for the "ToleranceLow" lower limit value. LONG write/read access.
The "CheckToleranceLow" property must have been set to TRUE if the bar color should change
on reaching the limit value.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
ColorTop Property
Description
Defines or returns the color for the top/left stop of the slider object. LONG write-read access.
See also
Slider (Page 214)
ScreenItem Object (Page 126)
ColorWarningHigh Property
Description
Defines or returns the color for the "WarningHigh" upper limit value. LONG write/read access.
The "CheckWarningHigh" property must have been set to TRUE if the bar color should change on
reaching the limit value.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
ColorWarningLow Property
Description
Defines or returns the color for the "WarningLow" lower limit value. LONG write/read access.
The "CheckWarningLow" property must have been set to TRUE if the bar color should change on
reaching the limit value.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
ColTitle Property
Description
TRUE, when the columns in the message window should have a title bar. BOOLEAN write-read
access.
See also
WinCC Alarm Control (before WinCC V7) (Page 283)
ScreenItem Object (Page 126)
ColWidth Property
Description
TRUE, when it should be possible to change the widths of the columns in the message window.
The width of the columns can only be changed, however, when the "AutoScroll" property is not
active. BOOLEAN write-read access.
See also
WinCC Alarm Control (before WinCC V7) (Page 283)
ScreenItem Object (Page 126)
Command Property
Description
TRUE, when updating of the values displayed in the control should be forced.
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
WinCC Online Table Control (before WinCC V7) (Page 289)
ScreenItem Object (Page 126)
Description
Reads or sets the Alarm object comment.
See also
Alarms object (list) (Page 111)
Description
Reads the tag comment.
The comment text is language neutral.
STRING (read only)
Example
The example shows how the comment for the "Tag1" tag is output.
'VBS376
Dim objTag
Set objTag = HMIRuntime.Tags("Tag1")
MsgBox objTag.Comment
The following example adds two tags to the TagSet list and outputs the comment of each tag
as trace.
'VBS377
Dim group
Set group = HMIRuntime.Tags.CreateTagSet
group.Add "Motor1"
group.Add "Motor2"
HMIRuntime.Trace "Comment of Motor1: " & group(“Motor1”).Comment & vbNewLine
HMIRuntime.Trace "Comment of Motor2: " & group(“Motor2”).Comment & vbNewLine
See also
Tag Object (Page 138)
CommonTime Property
Description
TRUE, when a common time column is to be used in the table window. BOOLEAN write-read
access.
See also
WinCC Online Table Control (before WinCC V7) (Page 289)
ScreenItem Object (Page 126)
CommonX Property
Description
TRUE, when the trends in the trend window should be displayed with a common X-axis.
BOOLEAN write-read access.
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
CommonY Property
Description
TRUE, when the trends in the trend window should be displayed with a common Y-axis.
BOOLEAN write-read access.
See also
ScreenItem Object (Page 126)
WinCC Online Trend Control (before WinCC V7) (Page 292)
WinCC Function Trend Control (before WinCC V7) (Page 285)
ComputerName property
Description
Returns the name of the computer on which the alarm object was triggered.
ComputerName (readonly)
See also
Alarms object (list) (Page 111)
ConnectBarWindows property
Value Description
TRUE All configured diagram windows are connected.
FALSE The diagram windows are displayed separately.
The attribute can be assigned dynamic properties using the name ConnectBarWindows. The
data type is BOOLEAN.
ConnectTrendWindows property
Value Description
TRUE All trend windows configured are connected.
FALSE The trend windows are displayed separately.
Context property
Description
Reads or sets the alarm object server prefix.
See also
Alarms object (list) (Page 111)
ContinuousChange property
Description
The attribute determines how the value set with the slider is transferred in runtime:
The "Update continuously" object property is used with the following objects and values:
• Slider object: Value of "Process driver connection" property
• WinCC Slider Control: Value of "Position" property
See also
WinCC Slider Control (Page 274)
ScreenItem Object (Page 126)
ContrastColor property
Description
ContrastColor and ContrastColor2 specify the contrasting colors of the object.
The properties can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
CornerRadiusMode property
Description
Defines or returns the corner radius mode of the RoundRectangle object.
See also
RoundCornerHeight Property (Page 568)
RoundCornerWidth Property (Page 568)
Rounded rectangle (Page 163)
Description
Supplies the number of elements in a list.
INTEGER (read-only access).
Example:
The example shows how the number of objects in a DataSet list is output.
'VBS165
HMIRuntime.Trace "Count: " & HMIRuntime.DataSet.Count & vbNewLine
The following example adds two tags to the TagSet list and outputs the count properties as
Trace.
'VBS177
Dim group
Set group = HMIRuntime.Tags.CreateTagSet
group.Add "Motor1"
group.Add "Motor2"
HMIRuntime.Trace "Count: " & group.Count & vbNewLine
See also
CreateTagSet Method (Page 737)
TagSet Object (List) (Page 142)
ScreenItems Object (List) (Page 129)
Screens Object (List) (Page 135)
Layers Object (Listing) (Page 122)
DataSet Object (List) (Page 116)
ProcessValues Object (List) (Page 125)
Count property
Count
Specifies the number of rows of the row listing object of a table control.
ConveyorBasicColor property
Description
Specifies the color of the conveyor belt.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
ConveyorContrastColor property
Description
Specifies the contrast color of the conveyor belt.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
Column
ColumnAdd property
Apply - ColumnAdd
Copies the selected column from the list of existing columns to the list of selected columns.
The attribute can be assigned dynamic properties by means of the name ColumnAdd. The
data type is STRING.
ColumnAlias property
ColumnAlias
Defines the alias specified in the user archive for the column name.
The attribute can be assigned dynamic properties by means of the name ColumnAlias. The
data type is STRING.
ColumnAlign property
Alignment - ColumnAlign
Specifies the mode of alignment of a selected column.
The following settings are available:
The attribute can be assigned dynamic properties by means of the name ColumnAlign. The
data type is LONG.
ColumnAutoPrecisions property
Value Explanation
TRUE The decimal precision is defined automatically. The value in the "Decimal places" field is disabled.
FALSE The value in the "Decimal places" field is enabled.
ColumnCaption property
Caption - ColumnCaption
Sets the caption for a selected column.
The attribute can be assigned dynamic properties by means of the name ColumnCaption.
The data type is STRING.
ColumnCount property
ColumnCount
Defines the number of columns configured.
The attribute can be assigned dynamic properties by means of the name ColumnCount. The
data type is LONG.
ColumnDateFormat property
ColumnDMVarName property
ColumnDMVarName
Defines the name of the tag you assigned to the column in the user archive.
The attribute can be assigned dynamic properties by means of the name
ColumnDMVarName. The data type is STRING.
ColumnExponentialFormat property
Value Explanation
TRUE The values are displayed with exponential notation.
FALSE The values are displayed with decimal notation.
ColumnFlagNotNull property
ColumnFlagNotNull
Specifies whether the user archive field assigned to the column must have a value.
Value Explanation
Yes The column must have a value.
No The column can have a value.
ColumnFlagUnique property
ColumnFlagUnique
Specifies whether the user archive field assigned to the column must have a unique value.
Values in this column must not be redundant.
Value Explanation
TRUE The column must have a unique value.
FALSE The column must not have a unique value.
ColumnHideText property
Value Explanation
TRUE The content is not displayed in text format. The option is disabled.
FALSE The content is displayed in text format. The option is enabled.
The attribute can be assigned dynamic properties by means of the name ColumnHideText.
The data type is BOOLEAN.
ColumnHideTitleText property
Value Explanation
TRUE The header is not displayed in text format. The option is disabled.
FALSE The header is displayed in text format. The option is enabled.
ColumnId property
ColumnId
Default assignment of the ID number and column in the WinCC control:
The attribute can be assigned dynamic properties by means of the name ColumnId . The
data type is LONG.
ColumnIndex property
ColumnIndex
References a control column. Using this attribute you can assign the values of other properties
to a specific column.
Values between 0 and "ColumnCount" minus 1 are valid for "ColumnIndex"; the attribute
"ColumnCount" defines the number of available columns.
The "ColumnIndex" attribute can be assigned dynamic properties by means of attribute
ColumnIndex. The data type is LONG.
ColumnInInspectorView property
ColumnInInspectorView
Specifies whether the diagnostic data in the detail view are displayed in columns instead of rows.
The attribute can be assigned dynamic properties using the name ColumnInInspectorView.
The data type is BOOLEAN.
ColumnLeadingZeros property
ColumnLength property
The attribute can be assigned dynamic properties by means of the name ColumnLength.
The data type is LONG.
ColumnMaxValue property
ColumnMaxValue
Defines the maximum column value specified in the user archive.
The attribute can be assigned dynamic properties by means of the name ColumnMaxValue.
The data type is STRING.
ColumnMinValue property
ColumnMinValue
Defines the minimum column value specified in the user archive.
The attribute can be assigned dynamic properties by means of the name ColumnMinValue.
The data type is STRING.
ColumnName property
ColumnName
Defines the name of the column which is referenced by means of "ColumnIndex" attribute.
The attribute can be assigned dynamic properties by means of the name ColumnName. The
data type is STRING.
ColumnPosition property
ColumnPosition
Displays the field position defined in the user archive.
The attribute can be assigned dynamic properties by means of the name ColumnPosition.
The data type is LONG.
ColumnPrecisions property
The attribute can be assigned dynamic properties by means of the name ColumnPrecisions.
The data type is SHORT.
ColumnReadAccess property
ColumnReadAccess
Defines authorizations for read access to the column as specified in the user archive.
The number corresponds with the number assigned to the authorization in the "User
Administrator" editor.
The attribute cannot be dynamized.
ColumnReadonly property
Value Explanation
TRUE This column is write protected.
FALSE This column is not write protected. You can edit the column values in Runtime by activating the "Change"
option in the General" tab.
The attribute can be assigned dynamic properties by means of the name ColumnReadonly.
The data type is BOOLEAN.
ColumnRemove property
Remove - ColumnRemove
Cuts selected columns from the list of selected columns and pastes these to the list of available
columns.
The attribute can be assigned dynamic properties by means of the name ColumnRemove.
The data type is STRING.
ColumnRepos property
Up/Down - ColumnRepos
Changes the order of columns. "Up" and "Down" move the column selected up or down in the
list. This moves the column towards the front or towards the back.
The attribute can be assigned dynamic properties by means of the name ColumnRepos. The
data type is LONG.
ColumnResize property
Value Explanation
TRUE You can change the width of the columns.
FALSE You cannot change the width of the columns.
The attribute can be assigned dynamic properties by means of the name ColumnResize. The
data type is BOOLEAN.
ColumnSrollbar properties
The attribute can be assigned dynamic properties by means of the name ColumnScrollbar.
The data type is LONG.
ColumnShowDate property
Value Explanation
TRUE The date and time are displayed. The date format is defined in the "Date format" field.
FALSE The time is displayed.
The attribute can be assigned dynamic properties by means of the name ColumnShowDate.
The data type is BOOLEAN.
ColumnShowIcon property
Content as icon - ColumnShowIcon
Enables the display the contents of a selected column by means of icon. This function is only
available in WinCC Alarm Control.
Value Explanation
TRUE The content is visualized as icon.
FALSE The content is not visualized as icon.
The attribute can be assigned dynamic properties by means of the name ColumnShowIcon.
The data type is BOOLEAN.
ColumnShowTitleIcon property
Header as icon - ColumnShowTitleIcon
Specifies the display of the header of a selected column by means of icon. This function is
only available in WinCC Alarm Control.
Value Explanation
TRUE The header is displayed as icon.
FALSE The header is not displayed as icon.
ColumnsMoveable property
ColumnsMoveable
Specifies whether the user can move the columns of the control in runtime.
The attribute can be assigned dynamic properties using the name ColumnsMoveable. The
data type is BOOLEAN.
ColumnSort property
ColumnSort
Defines the sorting order of the user archive column referenced in the "ColumnIndex" attribute.
The following settings are available:
The attribute can be assigned dynamic properties by means of the name ColumnSort . The
data type is LONG.
ColumnSortIndex property
ColumnSortIndex
Defines the sorting order of the column referenced in "ColumnIndex". The sorting criterion is
removed from "ColumnSort" if you set a "0" value..
The attribute can be assigned dynamic properties by means of the name ColumnSortIndex.
The data type is LONG.
ColumnStartValue property
ColumnStartValue
Defines the column start value specified in the user archive.
The attribute can be assigned dynamic properties by means of the name ColumnStartValue.
The data type is STRING.
ColumnStringLength property
ColumnStringLength
Displays the string length of the column as defined in the user archive.
The attribute can be assigned dynamic properties by means of the name
ColumnStringLength. The data type is LONG.
ColumnTimeFormat property
Value Explanation
Automatic The time format is set automatically.
HH:mm:ss.ms Hours:Minutes:Seconds, e.g. 15:35:44.240.
hh:mm:ss tt Hours:Minutes:Seconds AM/PM, e.g. 03:35:44 PM.
hh:mm:ss.ms tt Hours:Minutes:Seconds.Milliseconds AM/PM, e.g. 03:35:44.240 PM.
ColumnTitleAlign property
The attribute can be assigned dynamic properties by means of the name ColumnTitleAlign.
The data type is LONG.
ColumnTitles property
Value Explanation
TRUE The column header is displayed.
FALSE The column header is not displayed.
The attribute can be assigned dynamic properties by means of the name ColumnTitles. The
data type is BOOLEAN.
ColumnType property
Type - ColumnType
Displays the data type set in the user archive for a selected column.
The attribute can be assigned dynamic properties by means of the name ColumnType. The
data type is LONG.
ColumnType property
ColumnType
Indicates the associated view of the selected column in the SysDiagControl.
The attribute can be assigned dynamic properties using the name ColumnType. The data
type is LONG.
ColumnVisible property
ColumnVisible
Enables the display of a column referenced by means of "ColumnIndex" attribute.
Value Explanation
TRUE The column is displayed.
FALSE The column is not displayed.
The attribute can be assigned dynamic properties by means of the name ColumnVisible .
The data type is BOOLEAN.
ColumnWriteAccess property
ColumnWriteAccess
Defines authorizations for write access to the column as specified in the user archive.
The number corresponds with the number assigned to the authorization in the "User
Administrator" editor.
The attribute cannot be dynamized.
Cu
CurrentContext Property
Description
In the case of a picture window, the server from which the picture comes and contains the script
is read out.
The "CurrentContext" property can return different results: If, for example, a picture window
displaying a server picture is set in a local basic picture, distinction is made between two
cases:
• The "CurrentContext" property is used in an action of the picture window picture: The result
is the return of the symbolic computer name of the server (Package property) extended by
two colons, e.g."WinCCProject_MyComputer::“ .
• The "CurrentContext" property is used in an action of the basic picture: The result is returned
in the form of an empty character string.
See also
HMIRuntime Object (Page 119)
Cursor Property
Description
Controls the appearance of the cursor in Runtime when positioned over an icon.
• 0: The cursor appears as an arrow and does not change when positioned over the icon.
• 1: The cursor appears as a 3D arrow accompanied by a green lightening symbol. In Runtime,
this indicates that the object concerned can be operated.
See also
ScreenItem Object (Page 126)
HMI Symbol Library (Page 240)
Cursor property
Value Explanation
TRUE The mouse pointer is shown at runtime if positioned on the icon.
FALSE The mouse pointer is hidden at runtime if positioned on the icon.
The attribute can be assigned dynamic properties by means of the name Cursor. The data
type is BOOLEAN.
CursorControl Property
Description
TRUE, when Alpha Cursor mode is activated, the cursor skips to the next field in the TAB sequence
after exiting the field. BOOLEAN write-read access.
To do this, the "CursorMode" property must be set to TRUE.
See also
Text list (Page 199)
I/O Field (Page 185)
ScreenItem Object (Page 126)
CurveForm Property
Description
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
CursorMode Property
Description
When the "CursorMode" is set to "yes", you can show all messages from the short-term archive
page by page in the long-term archive list. Use the "CursorModePrefetch" property to determine
the number of messages shown per page.
The "Autoscroll" option must be unchecked in order to be able to switch between pages.
Write/Read access.
CursorModePrefetch Property
Description
Sets the number of message that you want to display page by page in the long-term archive list
out of all messages in the short-term archive.
The "CursorMode" object property must be set to "yes".
Write/Read access.
Cutaway property
Description
Specifies whether the object is displayed as open or closed, such as boiler with flame that can be
dynamized.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
1.15.4.5 D
Da
DangerColor Property
Description
Defines or returns the color of the danger zone on the scale. LONG write-read access.
See also
WinCC Gauge Control (Page 255)
ScreenItem Object (Page 126)
Danger Property
Description
Defines or returns the beginning of the "danger zone". The zone stretches from the "danger"
value to the end of the scale. Write/Read access.
See also
WinCC Gauge Control (Page 255)
ScreenItem Object (Page 126)
DataFormat Property
Description
Returns the data type of the I/O field object. Read only access.
Range of values from 0 to 5.
0: Binary
1: Decimal
2: String
3: Hexadecimal
4: Date/time
5: Date/Time (local)
See also
I/O Field (Page 185)
ScreenItem Object (Page 126)
DataIndex Property
Description
Returns the current index of the data of the current trend.
Note
The property is only supported for the controls prior to WinCC V7.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
DataLogs Property
Description
Returns an object of type "DataLogs".
DataLogs (read-only)
See also
DataLogs Object (Page 115)
HMIRuntime Object (Page 119)
DataSet Property
Description
Returns an object of type "DataSet".
DataSet (read-only)
See also
DataSet Object (List) (Page 116)
HMIRuntime Object (Page 119)
DataX Property
Description
Inserts a single data record and must be set before calling "InsertData".
Note
The property is only supported for the controls prior to WinCC V7.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
DataXY Property
Description
Inserts several data records as an array with pairs of values and must be set before calling
"InsertData".
The data in the array is assumed when "DataX" is of the VT_EMPTY type. Otherwise, the
"InsertData" attribute used the single value pair resulting from “DataX” and “DataY”.
Note
The property is only supported for the controls prior to WinCC V7.
See also
Example: Calling Methods of an ActiveX Control (Page 861)
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
DataY Property
Description
Inserts a single data record and must be set before calling "InsertData".
Note
The property is only supported for the controls prior to WinCC V7.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
De - Do
DefaultMsgFilterSQL property
DefaultMsgFilterSQL
Defines an SQL statement for a fixed selection of messages.
The SQL statements of "DefaultMsgFilterSQL" and "MsgFilterSQL" are linked logically by "AND"
operation if you define additional custom selections by means of "MsgFilterSQL" attribute.
The attribute can be assigned dynamic properties by means of the name
DefaultMsgFilterSQL. The data type is STRING.
DefaultPrecision Property
Description
This attribute defines the number of default decimal places, with which the scale value is
specified. Write/Read access.
DefaultRulerPrecision Property
Description
This attribute defines the number of decimal places as standard value with which a measured
value should be displayed when it is determined using the "Display value at this position"
function. Write/Read access.
DefaultSort property
The attribute can be assigned dynamic properties by means of the name DefaultSort. The
data type is LONG.
DefaultSort2 property
DefaultSort2
Use this function to define the sorting method in table columns if not using the default "Date/
time/number" sorting order. Instead, you defined a message block in the "DefaultSort2Column"
object property to sort the columns based on the "message block/date/time/number" order.
The following settings are available:
The attribute can be assigned dynamic properties by means of the name DefaultSort2. The
data type is LONG.
DefaultSort2Column property
DefaultSort2Column
Use this function to define the sorting method in table columns if not using the default "Date/
time/number" sorting order.
Define a message block by its object name.
The table columns are now sorted based on the "message block/date/time/number" order.
The attribute can be assigned dynamic properties by means of the name
DefaultSort2Column. The data type is STRING.
DeleteData Property
Description
Deletes data in the data buffer of the current trend.
TRUE : All trend data is deleted.
FALSE : The value pair at the "DataIndex" position are deleted.
Note
The property is only supported for the controls prior to WinCC V7.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
Delta Property
Description
Defines or returns the value difference between two main scale graduation marks. Write/Read
access.
See also
WinCC Gauge Control (Page 255)
ScreenItem Object (Page 126)
DesiredCurveColor Property
Description
Defines the color of a setpoint trend which belongs to a trend referenced by the "Index" property.
The color is defined as an RGB value. Whether the information is evaluated is dependent on the
value of the "DesiredCurveVisible" property.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
DesiredCurveCurveForm Property
Description
Defines the form of representation of a setpoint trend which belongs to a trend referenced by the
"Index" property. Whether the information is evaluated is dependent on the value of the
"DesiredCurveVisible" property.
0x00000011 Measuring points are connected by a solid line via a step curve
0x00000012 Representation of the measuring points
0x00000014 Measuring points are connected linearly with a solid line
0x00000021 The area under the linearly connected trend is filled.
0x00000022: The area under the stepped curve is filled.
0x00000031: Measuring points are connected by a dashed line via a step curve
0x00000032: Measuring points are connected linearly with a dashed line
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
DesiredCurveSourceNumberOfUAValues Property
Description
Defines the number of value pairs of a setpoint trend which belongs to a trend referenced by the
"Index" property. Whether the information is evaluated is dependent on the value of the
"DesiredCurveVisible" property.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
DesiredCurveSourceUAArchive Property
Description
Defines the name of the user archive from which the value of a setpoint trend, which belongs to
a trend referenced by "Index", is read. Whether the information is evaluated is dependent on the
value of the "DesiredCurveVisible" property.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
DesiredCurveSourceUAArchiveStartID Property
Description
Defines the starting point for the value of a setpoint trend, which belongs to a trend referenced
by "Index", from which the values should be read from the archive. Whether the information is
evaluated is dependent on the value of the "DesiredCurveVisible" property.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
DesiredCurveSourceUAColumnX Property
Description
Defines the column in the user archive from which the X-values of a setpoint trend, which
belongs to a trend referenced by "Index", should be read. Whether the information is evaluated
is dependent on the value of the "DesiredCurveVisible" property.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
DesiredCurveSourceUAColumnY Property
Description
Defines the column in the user archive from which the Y-values of a setpoint trend, which
belongs to a trend referenced by "Index", should be read. Whether the information is evaluated
is dependent on the value of the "DesiredCurveVisible" property.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
DesiredCurveVisible Property
Description
TRUE, a setpoint trend which belongs to a trend referenced by "Index" should be displayed.
BOOLEAN write-read access.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
DiagnosticsContext Property
Description
Specifies the diagnostics context.
Access in runtime: Read and write
Syntax
Object.DiagnosticsContext[=STRING]
Object
Required. A "ScreenItem" object with the following characteristics:
• AlarmControl
STRING
Optional. A value or a constant that specifies the diagnostics context.
Direction Property
Description
Defines or returns the bar direction or the position of the slider object. BOOLEAN write-read
access. Value range from 0 to 3.
0 = top
1 = bottom
2 = left
3 = right
See also
Slider (Page 214)
Bar (Page 175)
3D Bar (Page 170)
ScreenItem Object (Page 126)
DisplayFillLevel property
Description
Specifies whether the fill level is displayed.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
DisplayFillMode property
Description
Specifies the display of the fill level (object-dependent):
• 0 = Window with level bar
• 1 = Fill level in the object
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
DisplayName property
WinCC Explorer "Details" view in the data window "Display name" column
"Large Icons" view in the data window Process picture preview
WinCC Runtime "Favorites" system dialog Process picture preview
Picture Tree Container name
DisplayOptions property
Value Designation
0 All messages
1 Only displayed messages
2 Only hidden messages
The attribute can be assigned dynamic properties by means of the name DisplayOptions.
The data type is LONG.
Description
Specifies if a button is assigned to a graphic, text, or both.
0 Picture or text: If a picture exists, the button is assigned with the picture, otherwise it is
assigned with text.
1 Graphic and text
2 Text only
3 Graphic only
DoubleClickAction property
The attribute can be assigned dynamic properties by means of the name DoubleClickAction.
The data type is LONG.
1.15.4.6 E
Edit Property
Description
Activates Editing mode for a cell as long as the "Editable" property has been set to TRUE for the
corresponding column.
See also
WinCC Online Table Control (before WinCC V7) (Page 289)
ScreenItem Object (Page 126)
Editable Property
Description
The "Index" property references a pair of columns. "Editable" defines whether the column pair
should be editable. BOOLEAN write-read access.
See also
WinCC Online Table Control (before WinCC V7) (Page 289)
ScreenItem Object (Page 126)
EditAtOnce Property
Description
TRUE, if accessing the field with the <TAB> key permits input immediately and without further
action. BOOLEAN write-read access.
See also
Text list (Page 199)
I/O Field (Page 185)
ScreenItem Object (Page 126)
ElectronicSignature property
See also
AuthorizedGroups property (Page 317)
Enabled Property
Function
Enables or disables possible operation of an object or issues the corresponding value. TRUE :
Enable operation, FALSE: Operation is disabled.
BOOLEAN write-read access.
Example:
The following example disables all objects in the picture "NewPDL1":
'VBS71
Dim objScreen
Dim objScrItem
Dim lngIndex
Dim strName
lngIndex = 1
Set objScreen = HMIRuntime.Screens("NewPDL1")
For lngIndex = 1 To objScreen.ScreenItems.Count
strName = objScreen.ScreenItems.Item(lngIndex).ObjectName 'Read names of objects
Set objScrItem = objScreen.ScreenItems(strName)
objScrItem.Enabled=False 'Lock object
Next
See also
Screen Object (Page 132)
ScreenItem Object (Page 126)
EnableDelete property
Delete - EnableDelete
Enables deletion of data from the user archive in Runtime.
Value Explanation
TRUE You can delete data from the user archive in Runtime.
FALSE You cannot delete data from the user archive in Runtime.
The attribute can be assigned dynamic properties by means of the name EnableDelete. The
data type is BOOLEAN.
EnableEdit property
Modify - EnableEdit
Enables editing of the data displayed during runtime.
Value Explanation
TRUE Enables editing of data during runtime.
FALSE Disables editing of data during runtime.
The attribute can be assigned dynamic properties by means of the name EnableEdit. The
data type is BOOLEAN.
EnableInsert property
Add - EnableInsert
Enables insertion of data in the user archive in Runtime.
Value Explanation
TRUE You can add data to the user archive in Runtime.
FALSE You cannot add data to the user archive in Runtime.
The attribute can be assigned dynamic properties by means of the name EnableInsert. The
data type is BOOLEAN.
EnablePopupMenu property
EnablePopupMenu
Specifies if the pop-up menu is enabled in the control.
The attribute can be assigned dynamic properties by means of the name
EnablePopupMenu. The data type is BOOLEAN.
EnableUserAutoLogout property
If you are using the "SIMATIC Logon" option, you will only be able to use automatic logout
for the group. The setting will automatically be applied to each user in this group. Automatic
logout is deactivated if a user logs on with a chip card.
The attribute can be assigned dynamic properties using the name EnableUserAutoLogout.
The data type is BOOL.
EnableUserPermissions property
Value Explanation
FALSE "Inherit from group"
The operating authorizations are always inherited by the group. The "Authorization levels" button is disabled.
TRUE "User-specific"
When the user is created, the user authorizations of the group are transferred.
You can change the user's authorizations in the "Authorization levels" window.
The attribute can be assigned dynamic properties using the name EnableUserPermissions.
The data type is BOOL.
EnableUserWebOptions property
The attribute can be assigned dynamic properties using the name EnableUserWebOptions.
The data type is BOOL.
EndAngle Property
Description
Defines or returns the end of the object. The information is in counterclockwise direction in
degrees, beginning at the 12:00 clock position.
See also
Pie segment (Page 153)
Circular arc (Page 152)
Ellipse segment (Page 148)
EndTime Property
Description
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
WinCC Online Table Control (before WinCC V7) (Page 289)
ScreenItem Object (Page 126)
EndValue Property
Description
The "Index" property references a trend. "EndValue" defines the upper limit of the value range to
be displayed for the trend. Whether the information is evaluated is dependent on the
"Autorange" and "CommonY" properties.
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
ScreenItem Object (Page 126)
EndX Property
Description
Defines the upper limit of the X-axis of a trend referenced with "Index". Whether the information
is evaluated is dependent on the "AutorangeX" and "CommonX" properties.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
EndY Property
Description
Defines the upper limit of the Y-axis of a trend referenced with "Index". Whether the information
is evaluated is dependent on the "AutorangeY" and "CommonY" properties.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
ErrorDescription Property
Function
Error description of the "LastError" property. The error description is provided in English only.
STRING (read only)
The following error messages are defined:
Output Description
"" OK
"Operation Failed" Execution error
"Variable not found" Tag error
"Server down" Server not available.
"An error occured for one or several tags" Multi Tag Error (Error in one or several tags)
In order that ErrorDescription returns a value, a read process must be executed beforehand.
If an error occurs during read or write of several tags using the TagSet object, the error is set
to "Multi Tag Error". In order to determine at which tag the error occurred and what type of
error it was, the ErrorDescription property of each tag must be analyzed.
Example:
The following example displays the error description for "Tag1":
'VBS72
Dim objTag
Set objTag = HMIRuntime.Tags("Tag1")
objtag.Read
MsgBox objTag.ErrorDescription
The following example adds two tags to the TagSet list and outputs the ErrorDescription
property as Trace.
'VBS179
Dim group
Set group = HMIRuntime.Tags.CreateTagSet
group.Add "Motor1"
group.Add "Motor2"
HMIRuntime.Trace "ErrorDescription: " & group.ErrorDescription & vbNewLine
The ErrorDescription property of a tag contained in the list may be accessed as follows:
See also
LastError Property (Page 472)
QualityCode Property (Page 561)
TagSet Object (List) (Page 142)
Tag Object (Page 138)
Exponent Property
Description
TRUE, when the display of numbers should be with exponents (e.g."1.00e+000"). BOOLEAN
write-read access.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
ExportDirectoryChangeable property
Value Explanation
TRUE The data export directory can be changed in Runtime.
FALSE The data export directory cannot be changed in Runtime.
ExportDirectoryname property
Directory - ExportDirectoryname
Defines the directory to which the exported Runtime data is written.
You can select or create the directory using the selection button.
The attribute can be assigned dynamic properties by means of the name
ExportDirectoryname. The data type is STRING.
ExportFileExtension property
ExportFileExtension
Defines the extension of the export file.
Only the file name extension "csv" is currently supported.
The attribute can be assigned dynamic properties by means of the name
ExportFileExtension. The data type is STRING.
ExportFilename property
ExportFilenameChangeable property
Value Explanation
TRUE The export file can be renamed in Runtime.
FALSE The export file cannot be renamed in Runtime.
ExportFormatGuid property
ExportFormatGuid
Default assignment of the ID number and export provider.
The attribute can be assigned dynamic properties by means of the name ExportFormatGuid.
The data type is STRING.
ExportFormatName property
Format - ExportFormatName
Defines the export file format.
Only the "csv" file format is currently available for the export.
The attribute can be assigned dynamic properties by means of the name
ExportFormatName. The data type is STRING.
ExportParameters property
ExportParameters
Specifies the parameters of the selected format by means of the properties dialog.
The attribute can be assigned dynamic properties by means of the name ExportParameters.
The data type is VARIANT.
ExportSelection property
The attribute can be assigned dynamic properties by means of the name ExportSelection.
The data type is LONG.
ExportShowDialog property
Value Explanation
TRUE The dialog is displayed during runtime.
FALSE The dialog is not displayed during runtime.
The attribute can be assigned dynamic properties by means of the name ExportShowDialog.
The data type is BOOLEAN.
ExportXML property
ExportXML
Only used internally.
The attribute can be assigned dynamic properties by means of the name ExportXML.
ExtendedOperation Property
Description
TRUE, when the slider regulator is set at the respective end value (minimum/maximum value).
This is done by clicking the mouse in an area outside the current regulator setting. BOOLEAN
write-read access.
See also
Slider (Page 214)
ScreenItem Object (Page 126)
ExtendedZoomingEnable Property
Description
Activates/deactivates the ExtendedZooming properties of a picture.
Using ExtendedZooming, the view of a process picture in Runtime may be enlarged or
reduced by using the mouse wheel.
BOOLEAN write-read access.
Example:
Activates ExtendedZooming for picture NewPDL1.
'VBS155
Dim objScreen
Set objScreen = HMIRuntime.Screens("NewPDL1")
objScreen.ExtendedZoomingEnable = 1
See also
Screen Object (Page 132)
1.15.4.7 F
Fe - Fl
FeatureFullscreen property
FeatureFullscreen
Specifies if the "Full screen" function is available in the control.
The attribute can be assigned dynamic properties by means of the name FeatureFullscreen.
The data type is BOOLEAN.
FeaturePause property
FeaturePause
Specifies if the "Pause" function is available in the control.
The attribute can be assigned dynamic properties by means of the name FeaturePause. The
data type is BOOLEAN.
FeaturePlay property
FeaturePlay
Specifies if the "Play" function is available in the control.
The attribute can be assigned dynamic properties by means of the name FeaturePlay. The
data type is BOOLEAN.
FeatureStepBackward property
FeatureStepBackward
Specifies if the "Step backward" function is available in the control.
The attribute can be assigned dynamic properties by means of the name
FeatureStepBackward. The data type is BOOLEAN.
FeatureStepForward property
FeatureStepForward
Specifies if the "Step forward" function is available in the control.
The attribute can be assigned dynamic properties by means of the name
FeatureStepForward. The data type is BOOLEAN.
FeatureStop property
FeatureStop
Specifies if the "Stop" function is available in the control.
The attribute can be assigned dynamic properties by means of the name FeatureStop. The
data type is BOOLEAN.
FeatureVolume property
FeatureVolume
Specifies if the "Volume" function is available in the control.
The attribute can be assigned dynamic properties by means of the name FeatureVolume.
The data type is BOOLEAN.
FileName property
FileName
Specifies the file whose content you want to display or play.
The attribute can be assigned dynamic properties by means of the name FileName. The data
type is STRING.
FillColor Property
Description
Defines or returns the fill pattern color for the object.
LONG (write-read access)
Example:
The following example defines the fill color for "ScreenWindow1" to blue:
'VBS73
Dim objScreen
Set objScreen = HMIRuntime.Screens("ScreenWindow1")
objScreen.FillStyle = 131075
objScreen.FillColor = RGB(0, 0, 255)
See also
FillStyle Property (Page 430)
BackColor Property (Page 323)
ScreenItem Object (Page 126)
Filling Property
Description
TRUE, when the object can be filled by closed border lines (e.g. representing the fill level of a
tank). BOOLEAN write-read access.
The fill level of the object is set by means of the "FillingIndex" property.
See also
ScreenItem Object (Page 126)
FillingDirection properties
Filling direction (FillingDirection)
The "Filling direction" attribute specifies the filling direction for an object enclosed in a frame
line.
The attribute can be assigned dynamic properties by means of the name FillingDirection. The
data type is LONG.
FillingIndex Property
Description
Defines the %age value (related to the height of the object) to which the object with closed
border line is to be filled.
The fill level is represented by the current background color. The unfilled background is
transparent.
See also
ScreenItem Object (Page 126)
FillLevelColor property
Description
Specifies the color of the fill level.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
FillLevelValue property
Description
Specifies the fill level.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
FillStyle Property
Description
Defines or returns the fill pattern for the object.
LONG (write-read access)
Example
The following example sets the fill pattern for "ScreenWindow1" to transparent:
'VBS190
Dim obj
Set obj = ScreenItems("Rectangle1")
obj.FillStyle = 65536
See also
FillColor Property (Page 428)
BackColor Property (Page 323)
Screen Object (Page 132)
FillStyle2 Property
Description
Defines or returns the fill style of the bar.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
FillStyleAlignment property
Description
Defines the alignment of the fill pattern for the process picture.
Normal The fill pattern refers to the process picture. In runtime, no scaling is
performed when opening the picture.
Stretched (window) The fill pattern refers to the window in the Graphics Designer. In runtime,
scaling is performed when opening the picture.
FilterSQL property
FilterSQL
Defines an SQL statement for a selection of data in the user archive.
The attribute can be assigned dynamic properties by means of the name FilterSQL. The data
type is STRING.
FineGrid Property
Description
TRUE if the value axis is scaled with short distances between the marks. The distance between
two short tick marks can be changed using the "FineGridValue" property.
BOOLEAN write-read access.
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
ScreenItem Object (Page 126)
FineGridValue Property
Description
Defines the distance between two short tick marks in the scale. Whether the information is
evaluated is dependent on the value of the "FineGrid" property.
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
ScreenItem Object (Page 126)
FineGridValueX Property
Description
Defines the distance between two short tick marks on the X-axes scaling. Whether the
information is evaluated is dependent on the value of the "FineGridX" property.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
FineGridValueY Property
Description
Defines the distance between two short tick marks on the Y-axes scaling. Whether the
information is evaluated is dependent on the value of the "FineGridX" property.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
FineGridX Property
Description
TRUE, when the X-axis graduation is scaled by short tick marks. The distance between two short
tick marks can be changed using the "FineGridValueX" property.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
FineGridY Property
Description
TRUE, when the Y-axis graduation is scaled by short tick marks. The distance between two short
tick marks can be changed using the "FineGridValueY" property.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
FlameBasicColor property
Description
Specifies the color of the flame.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
FlameBorderColor property
Description
Specifies the border color of a flame.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
FlameContrastColor property
Description
Specifies the contrast color of the flame.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
FlameSize property
Description
Specifies the size of the flame.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
FlashBackColor Property
Description
TRUE, when flashing of the background is activated. BOOLEAN write-read access
See also
ScreenItem Object (Page 126)
FlashBorderColor Property
Description
TRUE, when flashing of the object lines is activated. BOOLEAN write-read access.
See also
ScreenItem Object (Page 126)
FlashFlashPicture Property
Description
TRUE, when flashing of the flash picture is activated. BOOLEAN write-read access.
See also
Status display (Page 201)
ScreenItem Object (Page 126)
FlashForeColor Property
Description
TRUE, when flashing of the text is activated. BOOLEAN write-read access.
See also
I/O Field (Page 185)
Static text (Page 166)
Text list (Page 199)
Radio box (Page 209)
Check box (Page 207)
Button (Page 203)
ScreenItem Object (Page 126)
FlashPicReferenced Property
Description
TRUE, when the assigned flash picture should be saved. Otherwise, only the associated object
reference is saved. Read only access.
See also
Status display (Page 201)
ScreenItem Object (Page 126)
FlashPicTransColor Property
Description
Defines which color of the bitmap object (.bmp, .dib) assigned to the flash picture should be set
to "transparent". LONG Write/Read Access.
The color is only set to "Transparent" if the value of the "FlashPicUseTransColor" property is "True".
See also
ScreenItem Object (Page 126)
Status display (Page 201)
FlashPicture Property
Description
Returns the flash picture. Read-only access.
The picture (*.BMP or *.DIB) must be located in the "GraCS" directory of the current project so
that it can be integrated.
In this context, the "FlashPicReferenced" property defines whether the flash picture should be
saved together with the object status display or referenced.
See also
Status display (Page 201)
ScreenItem Object (Page 126)
FlashPicUseTransColor Property
Description
TRUE, when the configured color ("FlashPicTransColor" property) of the bitmap objects assigned
to the flash picture should be set to "transparent". BOOLEAN write-read access.
See also
Status display (Page 201)
ScreenItem Object (Page 126)
FlashRate Property
Description
Defines or returns the flashing frequency for the object. Value range from 0 to 2.
Note
Because the flashing is performed by means of software engineering, the flash frequency is both
system-dependent and hardware-bound (number of objects, processor speed, RAM size, update
time, etc.).
The information in the table is therefore only for orientation purposes.
See also
Group Display (Page 194)
ScreenItem Object (Page 126)
FlashRateBackColor Property
Description
Defines or returns the flash frequency for the object background. Value range from 0 to 2.
Note
Because the flashing is performed by means of software engineering, the flash frequency is both
system-dependent and hardware-bound (number of objects, processor speed, RAM size, update
time, etc.).
The information in the table is therefore only for orientation purposes.
See also
ScreenItem Object (Page 126)
FlashRateBorderColor Property
Description
Defines or returns the flash frequency for the lines of the object. Value range from 0 to 2.
Note
Because the flashing is performed by means of software engineering, the flash frequency is both
system-dependent and hardware-bound (number of objects, processor speed, RAM size, update
time, etc.).
The information in the table is therefore only for orientation purposes.
See also
ScreenItem Object (Page 126)
FlashRateFlashPic Property
Description
Defines or returns the flash frequency for the status display. Value range from 0 to 2.
Note
Because the flashing is performed by means of software engineering, the flash frequency is both
system-dependent and hardware-bound (number of objects, processor speed, RAM size, update
time, etc.).
The information in the table is therefore only for orientation purposes.
See also
Status display (Page 201)
ScreenItem Object (Page 126)
FlashRateForeColor Property
Description
Defines or returns the flash frequency for the object label. Value range from 0 to 2.
Note
Because the flashing is performed by means of software engineering, the flash frequency is both
system-dependent and hardware-bound (number of objects, processor speed, RAM size, update
time, etc.).
The information in the table is therefore only for orientation purposes.
See also
Static text (Page 166)
Text list (Page 199)
Radio box (Page 209)
Check box (Page 207)
Button (Page 203)
I/O Field (Page 185)
ScreenItem Object (Page 126)
Flip property
Flip (Flip)
Specifies flipping of the icon at runtime.
The following settings are available:
The attribute can be assigned dynamic properties by means of the name Flip. The data type
is LONG.
Flip Property
Description
Mirrors the icon on the vertical and/or horizontal middle axis of the icon.
• Zero - 0: The icon is mot mirrored.
• Horizontal - 1: The icon is mirrored on the vertical center axis.
• Vertical - 2: The icon is mirrored on the horizontal, center axis.
• Both - 3: The icon is mirrored both on the horizontal and vertical center axes.
See also
HMI Symbol Library (Page 240)
ScreenItem Object (Page 126)
FluidColorHigh property
Description
Specifies the color of the liquid with the highest value.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
FluidColorLow property
Description
Specifies the color of the liquid with the lowest value.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
Fo - Fr
FocusColor Property
Description
If the focus is positioned on the control in Runtime, the labeling and position text are identified
by a border. FocusColor defines the color of the border.
See also
WinCC Slider Control (Page 274)
ScreenItem Object (Page 126)
FocusRect Property
Description
TRUE, when the button should be provided with a selection border, in Runtime, as soon as it
receives the focus. BOOLEAN write-read access.
See also
WinCC Push Button Control (up to WinCC V7.3) (Page 295)
WinCC Digital/Analog Clock (Page 247)
ScreenItem Object (Page 126)
FocusWidth Property
Description
If the focus is positioned on the control in Runtime, the labeling and position text are identified
by a border. FocusWidth defines the width of the border, value range of 1-10 pixels. LONG write-
read access.
See also
WinCC Slider Control (Page 274)
ScreenItem Object (Page 126)
Font Property
Name - Font
Sets the font.
The attribute cannot be dynamized.
Description
Defines or returns the font. Write/Read access.
The font object has the following sub-properties
• Size (Font Size)
• Bold (yes/no)
• Name (font name)
• Italic (yes/no)
• Underline (underline yes/no)
• StrikeThrough (yes/no)
If two font properties are directly assigned, only the default property "Name" is assumed.
Example:
'VBS74
Dim objControl1
Dim objControl2
Set objControl1 = ScreenItems("Control1")
Set objControl2 = ScreenItems("Control2")
objControl2.Font = objControl1.Font ' take over only the type of font
See also
WinCC Slider Control (Page 274)
WinCC Push Button Control (up to WinCC V7.3) (Page 295)
WinCC Online Trend Control (before WinCC V7) (Page 292)
WinCC Online Table Control (before WinCC V7) (Page 289)
WinCC Function Trend Control (before WinCC V7) (Page 285)
WinCC Digital/Analog Clock (Page 247)
WinCC Alarm Control (before WinCC V7) (Page 283)
ScreenItem Object (Page 126)
FontBold Property
Description
TRUE, when the text in the object should be assigned the "bold" attribute. BOOLEAN write-read
access.
See also
WinCC Push Button Control (up to WinCC V7.3) (Page 295)
Group Display (Page 194)
Text list (Page 199)
Radio box (Page 209)
Check box (Page 207)
Button (Page 203)
FontItalic Property
Description
TRUE, when the text in the object should be assigned the "italic" attribute. BOOLEAN write-read
access.
See also
WinCC Push Button Control (up to WinCC V7.3) (Page 295)
Group Display (Page 194)
Static text (Page 166)
Text list (Page 199)
Radio box (Page 209)
Check box (Page 207)
Button (Page 203)
I/O Field (Page 185)
ScreenItem Object (Page 126)
FontName Property
Description
Defines or returns the font name of the text in the object.
All the fonts installed in Windows are available for selection.
See also
WinCC Push Button Control (up to WinCC V7.3) (Page 295)
Group Display (Page 194)
Static text (Page 166)
Text list (Page 199)
Radio box (Page 209)
Check box (Page 207)
Button (Page 203)
I/O Field (Page 185)
FontPosition Property
Description
Returns the font name for the display of the slider position in the bottom part of the object. All
the fonts installed in Windows are available for selection. Read only access.
See also
WinCC Slider Control (Page 274)
ScreenItem Object (Page 126)
FontSize Property
Description
Defines or returns the font size of the text in the object in points.
See also
WinCC Push Button Control (up to WinCC V7.3) (Page 295)
Group Display (Page 194)
Static text (Page 166)
Text list (Page 199)
Radio box (Page 209)
Check box (Page 207)
Button (Page 203)
I/O Field (Page 185)
Bar (Page 175)
ScreenItem Object (Page 126)
FontStrikeThru Property
Description
TRUE, when the text in the object should be assigned the "strikethrough" attribute. BOOLEAN
write-read access.
See also
WinCC Push Button Control (up to WinCC V7.3) (Page 295)
ScreenItem Object (Page 126)
FontUnderline Property
Description
TRUE, when the text in the object should be assigned the "underline" attribute. BOOLEAN write-
read access.
See also
WinCC Push Button Control (up to WinCC V7.3) (Page 295)
Group Display (Page 194)
Static text (Page 166)
Text list (Page 199)
Radio box (Page 209)
Check box (Page 207)
Button (Page 203)
I/O Field (Page 185)
ScreenItem Object (Page 126)
ForeColor Property
Description
Defines or returns the color of the font for the text in the object. LONG write-read access.
See also
WinCC Slider Control (Page 274)
WinCC Push Button Control (up to WinCC V7.3) (Page 295)
WinCC Digital/Analog Clock (Page 247)
HMI Symbol Library (Page 240)
Static text (Page 166)
Text list (Page 199)
Radio box (Page 209)
Check box (Page 207)
ForeColor property
ForeColorDisabled property
ForeColorDisabledShadow property
ForeFlashColorOff Property
Description
Defines or returns the color of the text for flash status "Off". LONG write-read access.
See also
Text list (Page 199)
Static text (Page 166)
Radio box (Page 209)
Check box (Page 207)
Button (Page 203)
ForeFlashColorOn Property
Description
Defines or returns the color of the text for flash status "On". LONG write-read access.
See also
Static text (Page 166)
Text list (Page 199)
Radio box (Page 209)
Check box (Page 207)
Button (Page 203)
I/O Field (Page 185)
ScreenItem Object (Page 126)
FrameColor Property
Description
Defines or returns the color of the rectangular or square area located on the graduated scale disk.
LONG write-read access.
See also
WinCC Gauge Control (Page 255)
ScreenItem Object (Page 126)
FrameColorDown Property
Description
Defines or returns the color for the right, bottom part of the 3D frame of the button (button
pressed). LONG write-read access.
See also
WinCC Push Button Control (up to WinCC V7.3) (Page 295)
ScreenItem Object (Page 126)
FrameColorUp Property
Description
Defines or returns the color for the left, top part of the 3D frame of the button (button not
pressed). LONG write-read access.
See also
WinCC Push Button Control (up to WinCC V7.3) (Page 295)
ScreenItem Object (Page 126)
FramePicture Property
Description
Returns the picture name of the background picture for the graduated scale disk. Read only
access.
See also
WinCC Gauge Control (Page 255)
ScreenItem Object (Page 126)
FrameScale Property
Description
Defines or returns the diameter of the graduated scale disk in relation to smallest value of the
width and height geometric attributes. Write/Read access.
The value range is (scale distance - scale width) to 1.
See also
WinCC Gauge Control (Page 255)
ScreenItem Object (Page 126)
FrameWidth Property
Description
Defines or returns the border width of the button in pixels. Write/Read access.
See also
WinCC Push Button Control (up to WinCC V7.3) (Page 295)
ScreenItem Object (Page 126)
FreezeProviderConnections Property
Description
Enables modification of the data connection properties ("ProviderType", "Source"...), without the
change being effective immediately. On changing "SourceTagNameX", for example,
impermissible combinations can created with "SourceTagNameY".
Therefore, FreezeProviderConnections" must be set to TRUE before modifying a data
connection attribute. After modifying all the data connection, "FreezeProviderConnection"
is set to FALSE and the changes take effect.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
1.15.4.8 G
GlobalColorScheme property
Description
Defines whether the colors defined for the current design in the global color scheme will be used
for this object.
TRUE if the object is displayed with the colors from the global color scheme defined for this
object type.
FALSE if the object is displayed with the colors as per the settings in the object.
BOOLEAN write-read access.
GlobalShadow property
Description
Defines whether the object will be displayed with the shadowing defined in the active design.
TRUE if the object is displayed with the global shadow defined for this object type.
FALSE if no shadow is displayed.
BOOLEAN write-read access.
Description
Defines which edge of the trend window should display the current values. Write/Read access.
0: Positive values run to the right and upwards.
-1: Positive values run to the left and upwards.
-2: Positive values run to the right and upwards.
-3: Positive values run to the right and downwards.
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
GraphDirection Property
If you select the "From the top" or "From the bottom" setting for the write direction, you must
use True-Type fonts within the window. Only this setting ensures legibility of the labeling of
the vertical axis.
The attribute can be assigned dynamic properties by means of the name GraphDirection.
The data type is LONG.
Graphiclist property
GreenLightOn property
Description
Specifies whether the green signal lamp lights up.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
GridLineColor property
GridLineHorz Property
Description
TRUE, when the message window columns are separated by horizontal dividing lines. BOOLEAN
write-read access.
See also
WinCC Alarm Control (before WinCC V7) (Page 283)
ScreenItem Object (Page 126)
GridLines Property
Description
TRUE, when the trend window is displayed with grid lines parallel to the X-axis. The distance
between two grid lines can be changed using the "GridLineValue" property. BOOLEAN write-read
access.
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
ScreenItem Object (Page 126)
GridlinesValueX Property
Description
Defines or returns the distance between two grid lines on the X-axis. Whether the information
is evaluated is dependent on the value of the "GridLinesX" property.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
GridlinesValueY Property
Description
Defines or returns the distance between two grid lines on the Y-axis. Whether the information
is evaluated is dependent on the value of the "GridLinesY" property.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
GridlinesX Property
Description
TRUE, when the trend window is displayed with grid lines parallel to the X-axis. The distance
between two grid lines can be changed using the "GridLineValueX" property.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
GridlinesY Property
Description
TRUE, when the trend window is displayed with grid lines parallel to the Y-axis. The distance
between two grid lines can be changed using the "GridLineValueX" property.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
GridLineValue Property
Description
Defines the distance between two grid lines. Whether the information is evaluated is dependent
on the value of the "GridLines" property.
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
ScreenItem Object (Page 126)
GridLineVert Property
Description
TRUE, when the message window columns are separated by vertical dividing lines. BOOLEAN
write-read access.
See also
WinCC Alarm Control (before WinCC V7) (Page 283)
ScreenItem Object (Page 126)
GridLineWidth property
GridVisible property
GridVisible
Specifies whether or not the grid is visible in the table of the WinCC UserAdminControl.
The attribute can be assigned dynamic properties using the name GridVisible. The data type
is BOOLEAN.
GroupEditMode property
The attribute can be assigned dynamic properties using the name GroupEditMode. The data
type is LONG.
1.15.4.9 H
Ha - Hi
HandFillColor Property
Description
Defines or returns the fill color of all the hands in the analog clock. In order that the hands are
displayed with the fill color defined, the "Handtype" property must be set to "0" (covering). LONG
write-read access.
See also
WinCC Digital/Analog Clock (Page 247)
ScreenItem Object (Page 126)
Handtype Property
Description
Defines the representation of the hands:
• 0: The hands are filled in the hand color defined and the edges in the foreground color.
• 1: The hands fill color is transparent and the edges displayed in the foreground color.
See also
WinCC Digital/Analog Clock (Page 247)
ScreenItem Object (Page 126)
HeaderSort Property
Description
Specifies if sorting of messages by message block column header is possible.
See also
WinCC Alarm Control (before WinCC V7) (Page 283)
ScreenItem Object (Page 126)
Height Property
Description
Defines or returns the height of the object in pixels.
LONG (write-read access)
Example:
The following example halves the height of all objects in the "NewPDL1" picture whose names
begin with "Circle":
'VBS75
Dim objScreen
Dim objCircle
Dim lngIndex
Dim strName
lngIndex = 1
Set objScreen = HMIRuntime.Screens("NewPDL1")
For lngIndex = 1 To objScreen.ScreenItems.Count
'
'Searching all circles
strName = objScreen.ScreenItems.Item(lngIndex).ObjectName
If "Circle" = Left(strName, 6) Then
'
'to halve the height of the circles
Set objCircle = objScreen.ScreenItems(strName)
objCircle.Height = objCircle.Height / 2
End If
Next
See also
Width Property (Page 718)
Object types of the ScreenItem object (Page 144)
ScreenItem Object (Page 126)
HiddenInput Property
Description
TRUE, when the input value should not be displayed when being entered. Each character
entered is substituted by a *. BOOLEAN write-read access.
See also
I/O Field (Page 185)
ScreenItem Object (Page 126)
HideTagNames Property
Description
TRUE if the archive and tag name in the trend should be hidden via the right mouse button, in
the status line and in the table to display the coordinates. BOOLEAN write-read access.
HighlightToggle property
Description
Specifies whether the alternating highlighting is displayed, for example, by two consecutive
arrows.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
HitlistColumnAdd property
HitlistColumnAdd
Transfers the selected message block from the list of available message blocks to the list of
selected message blocks.
The attribute can be assigned dynamic properties by means of the name HitlistColumnAdd .
The data type is STRING.
HitlistColumnAutoAdjust property
HitlistColumnAutoAdjust
Automatically optimizes the width of the columns in the hit list in Runtime. If the configured
column is not sufficient for the displayed text, the column width is increased.
If the user changes the width of columns in Runtime, the width is only optimized again when
the picture is opened again.
The attribute can be assigned dynamic properties using the name HitlistColumnAutoAdjust.
The data type is BOOLEAN.
See also
WinCC AlarmControl (Page 242)
HitlistColumn object (list) (Page 224)
HitlistColumnCount property
HitlistColumnCount
Specifies the number of message blocks displayed in the hitlist in Runtime.
The attribute can be assigned dynamic properties by means of the name
HitlistColumnCount . The data type is LONG.
HitlistColumnIndex property
HitlistColumnIndex
References a message block selected for the hitlist. Using this attribute you can assign the values
of other attributes to a specific message block of the hitlist.
Values between 0 and "HitlistColumnCount" minus 1 are valid for "HitlistColumnIndex".
Attribute "HitlistColumnCount" defines the number of message blocks selected for the hitlist.
The "HitlistColumnIndex" attribute can be assigned dynamic properties by means of attribute
HitlistColumnRepos. The data type is LONG.
HitlistColumnName property
HitlistColumnName
Displays the name of the message block of the hitlist which is referenced with attribute
"HitlistColumnIndex". You cannot edit this name.
The attribute can be assigned dynamic properties by means of the name
HitlistColumnName . The data type is STRING.
HitlistColumnRemove property
HitlistColumnRemove
Cuts the marked message block from the list of selected message blocks and pastes it to the list
of available message blocks.
The attribute can be assigned dynamic properties by means of the name
HitlistColumnRemove. The data type is STRING.
HitlistColumnRepos
Up/Down - MessageColumnRepos/HitlistColumnRepos
Resorts the message blocks. The "Up" and "Down" commands move the selected message block
accordingly in the list. This moves the message block in Runtime Control towards the front or
towards the back.
The attribute for the hitlist can be assigned dynamic properties by means of the name
HitlistColumnRepos .
The attribute for the message list can be assigned dynamic properties by means of the name
MessageColumnRepos.
The data type is LONG.
HitlistColumnSort property
HitlistColumnSort
Defines the sorting order of the message block referenced in "HitlistColumnIndex" for the hitlist.
The following settings are available:
The attribute can be assigned dynamic properties by means of the name HitlistColumnSort .
The data type is LONG.
HitlistColumnSortIndex property
HitlistColumnSortIndex
Defines the sorting order of the message block referenced in "HitlistColumnIndex" in the hitlist.
The sorting criterion is removed from "HitlistColumnSort" if you set a "0" value..
The attribute can be assigned dynamic properties by means of the name
HitlistColumnSortIndex. The data type is LONG.
HitlistColumnVisible
The attribute for the message list can be assigned dynamic properties by means of the name
MessageColumnVisible.
The attribute for the hitlist can be assigned dynamic properties by means of the name
HitlistColumnVisible.
The data type is BOOLEAN.
HitlistDefaultSort property
HitlistDefaultSort
Defines the default sorting order in the table columns of the hitlist.
The following settings are available:
The attribute can be assigned dynamic properties by means of the name HitlistDefaultSort.
The data type is LONG.
HitListMaxSourceItems property
HitListMaxSourceItemsWarn property
Value Explanation
TRUE A warning is output after the valid maximum number of data records was reached.
FALSE A warning is not output after the valid maximum number of data records was reached.
HitListRelTime property
Value Explanation
TRUE The time range set for statistics is used if this range was not defined in the selection.
FALSE The time range is not used.
The attribute can be assigned dynamic properties by means of the name HitListRelTime. The
data type is BOOLEAN.
HitListRelTimeFactor property
HitListRelTimeFactorType property
Value Description
0 Minute
1 Hour
2 Day
3 Week
4 Month
Ho - Hy
HorizontalGridLines property
Horizontal - HorizontalGridLines
Defines whether horizontal separating lines will be displayed.
Value Explanation
TRUE Enables the display of horizontal dividers.
FALSE Disables the display of horizontal dividers.
Hotkey Property
Description
Returns the function key related to the mouse operation in respect of a button object.
Read only access.
See also
Button (Page 203)
ScreenItem Object (Page 126)
HourNeedleHeight Property
Description
Defines or returns the length of the hour hand for the analog clock. The specification of the
length is entered as a percentage value in relation to half the length of the short side of the
rectangular background. Write/Read access.
Example:
The shorter side of the rectangular background is 100 pixels long.
The hour hand length is 50.
This results in a length of the hour hand of (100 pixels / 2) * 0.5 = 25 pixels.
See also
WinCC Digital/Analog Clock (Page 247)
ScreenItem Object (Page 126)
HourNeedleWidth Property
Description
Defines or returns the width of the hour hand for the analog clock. The width is specified as a
percentage value related to double the length of the hour hand. Write/Read access.
Example:
The length of the hour hand is 25 pixels.
The hour hand width is 10.
This results in a width of the hour hand of 25 pixels * 2 * 0.1 = 5 pixels.
See also
WinCC Digital/Analog Clock (Page 247)
ScreenItem Object (Page 126)
Hysteresis Property
Description
TRUE, when the display should appear with hysteresis. BOOLEAN write-read access.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
HysteresisRange Property
Description
Defines the hysteresis in % of the displayed value or returns it.
The Hysteresis property must be set to TRUE for the hysteresis to be calculated.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
1.15.4.10 I
IconSpace property
IconSpace
Defines the spacing between the icons and text in the table cells. The value is active if and icon
and text are displayed.
The attribute can be assigned dynamic properties by means of the name IconSpace. The
data type is LONG.
ImpulsePosition property
Description
Specifies the position of the wandering pulse.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
IndependentWindow property
Description
Defines whether the display of the picture window in Runtime depends on the process picture
in which the picture window was configured.
TRUE if the size and position of the picture window are independent of the process picture
and only defined by the "Window mode" attribute.
FALSE if the size and position of the picture window change with the shift or scaling of the
process picture.
Index Property
Description
WinCC online trend control, WinCC online table control, WinCC function trend control
The "Index" property is evaluated by other properties in order to be able to assign the settings
to a specific trend or column pair. The valid values for the index move within the range from
0 to (NumItems - 1). The "NumItems" properties contains the number of the trends/column
pairs to be displayed. The index must always be set before you change the properties of a
trend / column in runtime.
Status display
Defines the status (0 to 255) or returns it. A basic picture and flash picture can be defined for
each status value.
See also
Status display (Page 201)
WinCC Online Trend Control (before WinCC V7) (Page 292)
WinCC Online Table Control (before WinCC V7) (Page 289)
WinCC Function Trend Control (before WinCC V7) (Page 285)
Polyline (Page 159)
Polygon (Page 157)
Radio box (Page 209)
Check box (Page 207)
ScreenItem Object (Page 126)
InnerBevelOffset Property
Description
Defines the distance between the inner and outer bevels.
See also
WinCC Slider Control (Page 274)
ScreenItem Object (Page 126)
InnerBevelStyle Property
Description
Defines the 3D effect for the inner bevel of the object.
• 0: No border.
• 1: The border is displayed depressed.
• 2: The border is displayed raised.
• 3: The border is displayed in one color without a 3D effect. The border color is defined by the
"BevelColorDown" property.
See also
WinCC Slider Control (Page 274)
ScreenItem Object (Page 126)
InnerBevelWidth Property
Description
Defines the width of the inner bevel in pixels.
See also
WinCC Slider Control (Page 274)
ScreenItem Object (Page 126)
InputValue property
Description
Defines the value to be entered by the user in the I/O field. The value is not displayed in the I/O
field when the property is set.
If you want the value to be displayed in the I/O field after confirmation with the <Return> key,
configure a direct connection between the properties "input value" and "output value". The
direct connection is only practical when no tag is connected to the output value, but the user
can nevertheless query the specified value, for example, through a script.
LONG write-read access.
See also
Example: Calling Methods of an ActiveX Control (Page 861)
InsertData Property
Description
Inserts data for the current trend.
TRUE : "DataIndex" is ignored and the data is appended to that in the data buffer.
FALSE : The data is inserted at the "DataIndex" position in the data buffer.
The trend window is redrawn following each operation involving "Insert Data".
Note
The property is only supported for the controls prior to WinCC V7.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
Instance property
Description
Returns an instance of the alarm object.
See also
Alarms object (list) (Page 111)
ItemBorderBackColor Property
Description
Defines or returns the background color for dividing lines in the selection list of the text list
object. LONG write-read access. The background color is only visible with the property setting
ItemBorderStyle > 0.
See also
Text list (Page 199)
ScreenItem Object (Page 126)
ItemBorderColor Property
Description
Defines or returns the color for deviding lines in the selection list of the text list object. LONG
write-read access.
See also
Text list (Page 199)
ScreenItem Object (Page 126)
ItemBorderStyle Property
Description
Defines or returns the color for the dividing line style in the selection list of the text list object.
Value range from 0 to 4.
0 = solid line
1 = dashed line
2 = dotted line
3 = dash-dotted line
4 = dash-dot-dot line
See also
Text list (Page 199)
ScreenItem Object (Page 126)
ItemBorderWidth Property
Description
Defines or returns the dividing line weight in pixels in the selection list of the text list object.
See also
Text list (Page 199)
ScreenItem Object (Page 126)
ItemProviderClsid Property
Description
"ItemProviderCIsid" shows, if the trend referenced using Index in Trend Control is connected with
an archive tag or an online tag.
Notice: If you assign a value to the "ProviderCIsid" property , you will overwrite the trend-
specific property "ItemProviderCIsid".
• {416A09D2-8B5A-11D2-8B81-006097A45D48}: The trend is connected to an archive tag.
• {A3F69593-8AB0-11D2-A440-00A0C9DBB64E}: The trend is connected to an online tag.
If the trends are being supplied with archive and online tags, the property "ProviderCIsid"
returns the value "{00000000-0000-0000-0000-000000000000}".
ItemVisible Property
Description
TRUE, when a trend or a column pair reference by the "Index" property is visible. BOOLEAN write-
read access.
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
WinCC Online Table Control (before WinCC V7) (Page 289)
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
1.15.4.11 L
Lab - Las
Label Property
Description
The "Index" property references a trend.
Depending on the value of the "TimeAxis" property, the name of the time axis or the value
axis is defined via label.
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
ScreenItem Object (Page 126)
LabelColor Property
Description
Defines the color of the scale label.
See also
WinCC Slider Control (Page 274)
ScreenItem Object (Page 126)
LabelX Property
Description
Defines or returns the label on the X-axis for a trend referenced by "Index" according to the value
of "TimeAxisX". Write/Read access.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
LabelY Property
Description
Defines or returns the label on the Y-axis for a trend referenced by "Index" according to the value
of "TimeAxisY". Write/Read access.
See also
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
LanguageSwitch Property
Description
Returns the value which defines where the language dependent assigned texts are stored. Read
only access.
TRUE, when the texts in the Text Library are managed. Translation to other language occurs
in the Text Library.
FALSE, when the texts are managed directly in the object. Translation to other language can
be carried out using Text Distributor.
See also
Text list (Page 199)
ScreenItem Object (Page 126)
Language Property
Description
Defines the current Runtime language or reads it.
You specify the Runtime language in VBS by using a country code, e.g., 1031 for German
- Default, 1033 for English - USA etc. A summary of all country codes may be found in the
Basics of VBScript under the subject header "Regional Scheme ID (LCID) Diagram".
INTEGER (write-read access)
Example:
The following example sets the data language to German:
'VBS76
HMIRuntime.Language = 1031
See also
HMIRuntime Object (Page 119)
LastError Property
Description
Returns an error code regarding the success of the last operation, e.g. information on a tag write
or read process. The "QualityCode" property can provide information on the quality of the
returned value. A description of the error can be called in using the "ErrorDescription" property.
Example:
The following example displays the error code for "Tag1":
'VBS77
Dim objTag
Set objTag = HMIRuntime.Tags("Tag1")
objTag.Read
MsgBox objTag.LastError
The following example adds two tags to the TagSet list and outputs the LastError property as
Trace.
'VBS178
Dim group
Set group = HMIRuntime.Tags.CreateTagSet
group.Add "Motor1"
group.Add "Motor2"
HMIRuntime.Trace "LastError: " & group.LastError & vbNewLine
The LastError property of a tag contained in the list may be accessed as follows:
See also
TagSet Object (List) (Page 142)
QualityCode Property (Page 561)
Layer
Layer Property
Description
Returns the layer of the picture in which the object is located. There is a total of 32 layers
available, whereby Layer "0" is the bottom layer and Layer "31" the top layer.
The configured objects are initially in the background of a layer.
LONG (read only)
Note
The layer property specifies the layer in which the object is located. The layer "0" is output as
"Layer0".
When accessed, the layers are counted up from 1 in VBS. Therefore, the layer "1" must be
addressed with "layers(2)".
Example:
The following example displays the name and layer of all the objects in the picture "NewPDL1":
'VBS78
Dim objScreen
Dim objScrItem
Dim lngAnswer
Dim lngIndex
Dim strName
lngIndex = 1
Set objScreen = HMIRuntime.Screens("NewPDL1")
For lngIndex = 1 To objScreen.ScreenItems.Count
strName = objScreen.ScreenItems.Item(lngIndex).ObjectName
Set objScrItem = objScreen.ScreenItems(strName)
lngAnswer = MsgBox(strName & " is in layer " & objScrItem.Layer,vbOKCancel)
If vbCancel = lngAnswer Then Exit For
Next
See also
ScreenItem Object (Page 126)
Layer00Checked Property
Description
TRUE, when limit 0 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer00Value and Layer00Color properties.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer01Checked Property
Description
TRUE, when limit 1 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer01Value and Layer01Color properties.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer02Checked Property
Description
TRUE, when limit 2 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer02Value and Layer02Color properties.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer03Checked Property
Description
TRUE, when limit 3 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer03Value and Layer03Color properties.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer04Checked Property
Description
TRUE, when limit 4 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer04Value and Layer04Color properties.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer05Checked Property
Description
TRUE, when limit 5 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer05Value and Layer05Color properties.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer06Checked Property
Description
TRUE, when limit 6 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer06Value and Layer06Color properties.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer07Checked Property
Description
TRUE, when limit 7 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer07Value and Layer07Color properties.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer08Checked Property
Description
TRUE, when limit 8 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer08Value and Layer08Color properties.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer09Checked Property
Description
TRUE, when limit 9 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer09Value and Layer09Color properties.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer10Checked Property
Description
TRUE, when limit 10 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer10Value and Layer10Color properties.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer00Color Property
Description
Defines or returns the color for limit 0. LONG write/read access.
When monitoring of the limit value is activated (Layer00Checked property), the bar turns to the
color defined by this attribute on reaching the limit value.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer01Color Property
Description
Defines or returns the color for limit 1. LONG write/read access.
When monitoring of the limit value is activated (Layer01Checked property), the bar turns to the
color defined by this attribute on reaching the limit value.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer02Color Property
Description
Defines or returns the color for limit 2. LONG write/read access.
When monitoring of the limit value is activated (Layer02Checked property), the bar turns to the
color defined by this attribute on reaching the limit value.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer03Color Property
Description
Defines or returns the color for limit 3. LONG write/read access.
When monitoring of the limit value is activated (Layer03Checked property), the bar turns to the
color defined by this attribute on reaching the limit value.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer04Color Property
Description
Defines or returns the color for limit 4. LONG write/read access.
When monitoring of the limit value is activated (Layer04Checked property), the bar turns to the
color defined by this attribute on reaching the limit value.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer05Color Property
Description
Defines or returns the color for limit 5. LONG write/read access.
When monitoring of the limit value is activated (Layer05Checked property), the bar turns to the
color defined by this attribute on reaching the limit value.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer06Color Property
Description
Defines or returns the color for limit 6. LONG write/read access.
When monitoring of the limit value is activated (Layer06Checked property), the bar turns to the
color defined by this attribute on reaching the limit value.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer07Color Property
Description
Defines or returns the color for limit 7. LONG write/read access.
When monitoring of the limit value is activated (Layer07Checked property), the bar turns to the
color defined by this attribute on reaching the limit value.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer08Color Property
Description
Defines or returns the color for limit 8. LONG write/read access.
When monitoring of the limit value is activated (Layer08Checked property), the bar turns to the
color defined by this attribute on reaching the limit value.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer09Color Property
Description
Defines or returns the color for limit 9. LONG write/read access.
When monitoring of the limit value is activated (Layer09Checked property), the bar turns to the
color defined by this attribute on reaching the limit value.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer10Color Property
Description
Defines or returns the color for limit 10. LONG write/read access.
When monitoring of the limit value is activated (Layer10Checked property), the bar turns to the
color defined by this attribute on reaching the limit value.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer00FillColor property
Bar fill color 0 (Layer00FillColor)
The "Layer00FillColor" attribute defines the color with which the bar is filled in relation to
"Limit 0".
The "Layer00FillColor" attribute can be made dynamic with the name "Layer00FillColor".
Layer01FillColor property
Layer01FillColor
The "Layer01FillColor" attribute defines the color with which the bar is filled in relation to
"Limit 1".
The "Layer01FillColor" attribute can be made dynamic with the name "Layer01FillColor".
Layer02FillColor property
Layer02FillColor
The "Layer02FillColor" attribute defines the color with which the bar is filled in relation to
"Limit 2".
The "Layer02FillColor" attribute can be made dynamic with the name "Layer02FillColor".
Layer03FillColor property
Layer03FillColor
The "Layer03FillColor" attribute defines the color with which the bar is filled in relation to
"Limit 3".
The "Layer03FillColor" attribute can be made dynamic with the name "Layer03FillColor".
Layer04FillColor property
Layer04FillColor
The "Layer04FillColor" attribute defines the color with which the bar is filled in relation to
"Limit 4".
The "Layer04FillColor" attribute can be made dynamic with the name "Layer04FillColor".
Layer05FillColor property
Layer05FillColor
The "Layer05FillColor" attribute defines the color with which the bar is filled in relation to
"Limit 5".
The "Layer05FillColor" attribute can be made dynamic with the name "Layer05FillColor".
Layer06FillColor property
Layer06FillColor
The "Layer06FillColor" attribute defines the color with which the bar is filled in relation to
"Limit 6".
The "Layer06FillColor" attribute can be made dynamic with the name "Layer06FillColor".
Layer07FillColor property
Layer07FillColor
The "Layer07FillColor" attribute defines the color with which the bar is filled in relation to
"Limit 7".
The "Layer07FillColor" attribute can be made dynamic with the name "Layer07FillColor".
Layer08FillColor property
Layer08FillColor
The "Layer08FillColor" attribute defines the color with which the bar is filled in relation to
"Limit 8".
The "Layer08FillColor" attribute can be made dynamic with the name "Layer08FillColor".
Layer09FillColor property
Layer09FillColor
The "Layer09FillColor" attribute defines the color with which the bar is filled in relation to
"Limit 9".
The "Layer09FillColor" attribute can be made dynamic with the name "Layer09FillColor".
Layer10FillColor property
Layer10FillColor
The "Layer10FillColor" attribute defines the color with which the bar is filled in relation to
"Limit 10".
The "Layer10FillColor" attribute can be made dynamic with the name "Layer10FillColor".
Layer00FillStyle property
Layer00FillStyle
The "Layer00FillStyle" attribute defines the style of the bar in relation to "Limit 0". For the fill
pattern to become visible, "bar fill color 0" must differ from "bar color 0".
There is a choice of 50 fill styles. The 0 "Solid" fill style fills the object with the set background
color. The 1 "Transparent" fill style means neither a background nor a fill pattern is displayed.
The "Layer00FillStyle" attribute can be made dynamic with the name "Layer00FillStyle".
Layer01FillStyle property
Layer01FillStyle
The "Layer01FillStyle" attribute defines the style of the bar in relation to "Limit 1". For the fill
pattern to become visible, "bar fill color 1" must differ from "bar color 1".
There is a choice of 50 fill styles. The 0 "Solid" fill style fills the object with the set background
color. The 1 "Transparent" fill style means neither a background nor a fill pattern is displayed.
The "Layer01FillStyle" attribute can be made dynamic with the name "Layer01FillStyle".
Layer02FillStyle property
Layer02FillStyle
The "Layer02FillStyle" attribute defines the style of the bar in relation to "Limit 2". For the fill
pattern to become visible, "bar fill color 2" must differ from "bar color 2".
There is a choice of 50 fill styles. The 0 "Solid" fill style fills the object with the set background
color. The 1 "Transparent" fill style means neither a background nor a fill pattern is displayed.
The "Layer02FillStyle" attribute can be made dynamic with the name "Layer02FillStyle".
Layer03FillStyle property
Layer03FillStyle
The "Layer03FillStyle" attribute defines the style of the bar in relation to "Limit 3". For the fill
pattern to become visible, "bar fill color 3" must differ from "bar color 3".
There is a choice of 50 fill styles. The 0 "Solid" fill style fills the object with the set background
color. The 1 "Transparent" fill style means neither a background nor a fill pattern is displayed.
The "Layer03FillStyle" attribute can be made dynamic with the name "Layer03FillStyle".
Layer04FillStyle property
Layer04FillStyle
The "Layer04FillStyle" attribute defines the style of the bar in relation to "Limit 4". For the fill
pattern to become visible, "bar fill color 4" must differ from "bar color 4".
There is a choice of 50 fill styles. The 0 "Solid" fill style fills the object with the set background
color. The 1 "Transparent" fill style means neither a background nor a fill pattern is displayed.
The "Layer04FillStyle" attribute can be made dynamic with the name "Layer04FillStyle".
Layer05FillStyle property
Layer05FillStyle
The "Layer05FillStyle" attribute defines the style of the bar in relation to "Limit 5". For the fill
pattern to become visible, "bar fill color 5" must differ from "bar color 5".
There is a choice of 50 fill styles. The 0 "Solid" fill style fills the object with the set background
color. The 1 "Transparent" fill style means neither a background nor a fill pattern is displayed.
The "Layer05FillStyle" attribute can be made dynamic with the name "Layer05FillStyle".
Layer06FillStyle property
Layer06FillStyle
The "Layer06FillStyle" attribute defines the style of the bar in relation to "Limit 6". For the fill
pattern to become visible, "bar fill color 6" must differ from "bar color 6".
There is a choice of 50 fill styles. The 0 "Solid" fill style fills the object with the set background
color. The 1 "Transparent" fill style means neither a background nor a fill pattern is displayed.
The "Layer06FillStyle" attribute can be made dynamic with the name "Layer06FillStyle".
Layer07FillStyle property
Layer07FillStyle
The "Layer07FillStyle" attribute defines the style of the bar in relation to "Limit 7". For the fill
pattern to become visible, "bar fill color 7" must differ from "bar color 7".
There is a choice of 50 fill styles. The 0 "Solid" fill style fills the object with the set background
color. The 1 "Transparent" fill style means neither a background nor a fill pattern is displayed.
The "Layer07FillStyle" attribute can be made dynamic with the name "Layer07FillStyle".
Layer08FillStyle property
Layer08FillStyle
The "Layer08FillStyle" attribute defines the style of the bar in relation to "Limit 8". For the fill
pattern to become visible, "bar fill color 8" must differ from "bar color 8".
There is a choice of 50 fill styles. The 0 "Solid" fill style fills the object with the set background
color. The 1 "Transparent" fill style means neither a background nor a fill pattern is displayed.
The "Layer08FillStyle" attribute can be made dynamic with the name "Layer08FillStyle".
Layer09FillStyle property
Layer09FillStyle
The "Layer09FillStyle" attribute defines the style of the bar in relation to "Limit 9". For the fill
pattern to become visible, "bar fill color 9" must differ from "bar color 9".
There is a choice of 50 fill styles. The 0 "Solid" fill style fills the object with the set background
color. The 1 "Transparent" fill style means neither a background nor a fill pattern is displayed.
The "Layer09FillStyle" attribute can be made dynamic with the name "Layer09FillStyle".
Layer10FillStyle property
Layer10FillStyle
The "Layer10FillStyle" attribute defines the style of the bar in relation to "Limit 10". For the fill
pattern to become visible, "bar fill color 10" must differ from "bar color 10".
There is a choice of 50 fill styles. The 0 "Solid" fill style fills the object with the set background
color. The 1 "Transparent" fill style means neither a background nor a fill pattern is displayed.
The "Layer10FillStyle" attribute can be made dynamic with the name "Layer10FillStyle".
Layer00Value Property
Description
Determines the value for "Limit 0" or returns it.
Monitoring only takes effect when the Layer00Checked property value is set to TRUE.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer01Value Property
Description
Determines the value for "Limit 1" or returns it.
Monitoring only takes effect when the Layer01Checked property value is set to TRUE.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer02Value Property
Description
Determines the value for "Limit 2" or returns it.
Monitoring only takes effect when the Layer02Checked property value is set to TRUE.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer03Value Property
Description
Determines the value for "Limit 3" or returns it.
Monitoring only takes effect when the Layer03Checked property value is set to TRUE.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer04Value Property
Description
Determines the value for "Limit 4" or returns it.
Monitoring only takes effect when the Layer04Checked property value is set to TRUE.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer05Value Property
Description
Determines the value for "Limit 5" or returns it.
Monitoring only takes effect when the Layer05Checked property value is set to TRUE.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer06Value Property
Description
Determines the value for "Limit 6" or returns it.
Monitoring only takes effect when the Layer06Checked property value is set to TRUE.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer07Value Property
Description
Determines the value for "Limit 7" or returns it.
Monitoring only takes effect when the Layer07Checked property value is set to TRUE.
See also
ScreenItem Object (Page 126)
3D Bar (Page 170)
Layer08Value Property
Description
Determines the value for "Limit 8" or returns it.
Monitoring only takes effect when the Layer08Checked property value is set to TRUE.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer09Value Property
Description
Determines the value for "Limit 9" or returns it.
Monitoring only takes effect when the Layer09Checked property value is set to TRUE.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
Layer10Value Property
Description
Determines the value for "Limit 10" or returns it.
Monitoring only takes effect when the Layer10Checked property value is set to TRUE.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
LayerDeclutteringEnable Property
Description
Returns the LayerDecluttering properties of a picture.
LayerDecluttering enables fading in and out of layers depending on the set minimum and
maximum zoom.
Example:
The example outputs the LayerDecluttering Property NewPDL1 as a trace.
'VBS156
Dim objScreen
Set objScreen = HMIRuntime.Screens("NewPDL1")
HMIRuntime.Trace "Enable: " & objScreen.LayerDeclutteringEnable & vbNewLine
See also
Screen Object (Page 132)
Layers Property
Description
Returns an object of type "Layers".
Layers (read-only)
See also
Layers Object (Listing) (Page 122)
HMIRuntime Object (Page 119)
Le - Li
Left Property
Description
Defines or returns the X-coordinate of an object (measured from the top left edge of the picture)
in pixels. The X-coordinate relates to the top left corner of the rectangle enclosing the object.
LONG (write-read access)
Example:
The following example shifts all objects in the picture "NewPDL1" 5 pixels to the left:
'VBS79
Dim objScreen
Dim objScrItem
Dim lngIndex
Dim strName
lngIndex = 1
Set objScreen = HMIRuntime.Screens("NewPDL1")
For lngIndex = 1 To objScreen.ScreenItems.Count
strName = objScreen.ScreenItems.Item(lngIndex).ObjectName
Set objScrItem = objScreen.ScreenItems(strName)
objScrItem.Left = objScrItem.Left - 5
Next
See also
Top Property (Page 662)
ScreenItem Object (Page 126)
LeftComma Property
Description
Defines or returns the number of digits to the left of the decimal point (0 to 20).
See also
Bar (Page 175)
ScreenItem Object (Page 126)
LightEffect Property
Description
TRUE, when the light effect should be activated. BOOLEAN write-read access.
See also
3D Bar (Page 170)
ScreenItem Object (Page 126)
LightOff property
Description
Specifies whether the signal lamp lights up.
The property can be dynamized for some SVG graphics of the SVG library.
Whether the attribute is displayed depends on the referenced SVG graphic.
See also
SVG object (Page 197)
LimitHigh4 Property
Description
Determines the upper limit value for "Reserve 4" or returns it.
The CheckLimitHigh4 property must be set to TRUE in order that the "Reserve 4" limit value can
be monitored.
The type of the evaluation (in percent or absolute) is defined in the TypeLimitHigh4 property.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
LimitHigh5 Property
Description
Determines the upper limit value for "Reserve 5" or returns it.
The CheckLimitHigh5 property must be set to TRUE in order that the "Reserve 5" limit value can
be monitored.
The type of the evaluation (in percent or absolute) is defined in the TypeLimitHigh5 property.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
LimitLow4 Property
Description
Determines the lower limit value for "Reserve 4" or returns it.
The CheckLimitLow4 property must be set to TRUE in order that the "Reserve 4" limit value can
be monitored.
The type of the evaluation (in percent or absolute) is defined in the TypeLimitLow4 property.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
LimitLow5 Property
Description
Determines the lower limit value for "Reserve 5" or returns it.
The CheckLimitLow5 property must be set to TRUE in order that the "Reserve 5" limit value can
be monitored.
The type of the evaluation (in percent or absolute) is defined in the TypeLimitLow5 property.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
LimitMax Property
Description
Determines the upper limit value as an absolute value depending on the data format or returns it.
If the displayed value exceeds the upper limit value, it is displayed by a sequence of *** (not
displayable).
See also
I/O Field (Page 185)
ScreenItem Object (Page 126)
LimitMin Property
Description
Determines the lower limit value as an absolute value depending on the data format or returns it.
If the displayed value exceeds the upper limit value, it is displayed by a sequence of *** (not
displayable).
See also
I/O Field (Page 185)
ScreenItem Object (Page 126)
LineColor property
LineFont Property
Description
TRUE, when the font size should be automatically adapted to the line height. BOOLEAN write-
read access.
See also
WinCC Alarm Control (before WinCC V7) (Page 283)
ScreenItem Object (Page 126)
LineHeight Property
Description
TRUE, when the line height can be modified. BOOLEAN write-read access.
The "LineHeight" property is only deactivated if both properties "LineHeight" and "LineFont"
are set to "FALSE".
See also
WinCC Alarm Control (before WinCC V7) (Page 283)
ScreenItem Object (Page 126)
LineJoinStyle property
Description
Defines the way that corners are displayed in a tube polygon.
LineTitle Property
Description
TRUE, when the message window a column with consecutive number contains queued
messages. BOOLEAN write-read access.
See also
WinCC Alarm Control (before WinCC V7) (Page 283)
ScreenItem Object (Page 126)
Description
Specifies the line width of the trend referenced by "Index". Value range from 0 to 10.
See also
WinCC Online Trend Control (before WinCC V7) (Page 292)
ScreenItem Object (Page 126)
LineWidth property
The attribute can be assigned dynamic properties by means of the name LineWidth. The
data type is LONG.
ListType property
List - ListType
Specifies which of the following lists is displayed in WinCC UserAdminControl.
The attribute can be assigned dynamic properties using the name ListType. The data type is
LONG.
ListType Property
Description
Returns the data type displayed in the case of a text list object. Read only access.
Value range from 0 to 2.
0 = decimal
1 = binary
2 = bit
See also
Text list (Page 199)
ScreenItem Object (Page 126)
Lo
LoadDataImmediately property
Value Explanation
TRUE Loads archived values on picture calls.
FALSE Loads only current values on picture calls.
Description
TRUE, when the tag values for the time range to be displayed are loaded from the archives on
opening a picture. BOOLEAN write-read access.
See also
WinCC Online Table Control (before WinCC V7) (Page 289)
WinCC Online Trend Control (before WinCC V7) (Page 292)
WinCC Function Trend Control (before WinCC V7) (Page 285)
ScreenItem Object (Page 126)
LocaleID Property
Description
Defines the language to be displayed in the control, e.g. 1031 for German. Write/Read access.
The list of language codes is available in the WinCC documentation (Index > Language Code).
See also
WinCC Slider Control (Page 274)
WinCC Gauge Control (Page 255)
WinCC Digital/Analog Clock (Page 247)
ScreenItem Object (Page 126)
LocaleSpecificSettings Property
Description
TRUE if a font can be assigned and formatted for each Runtime language. BOOLEAN write-read
access.
LockBackColor Property
Description
Defines or returns the background color of the button for a locked measuring point. LONG write/
read access.
The LockStatus property must be set to TRUE for the background color to be displayed.
See also
Group Display (Page 194)
ScreenItem Object (Page 126)
LockStatus Property
Description
TRUE, when a locked measuring point should be displayed. BOOLEAN write-read access.
See also
Group Display (Page 194)
ScreenItem Object (Page 126)
LockText Property
Description
Defines the label of a button for a locked measuring point.
The LockStatus property must be set to TRUE for the label to be displayed.
See also
Group Display (Page 194)
ScreenItem Object (Page 126)
LockTextColor Property
Description
Defines or returns the color of the button label for a locked measuring point. LONG write/read
access.
The LockStatus property must be set to TRUE for the background color to be displayed.
See also
Group Display (Page 194)
ScreenItem Object (Page 126)
Logging Property
Description
Returns an object of type "Logging".
Logging (read-only)
See also
HMIRuntime Object (Page 119)
Logging Object (Page 123)
LongStrokesBold Property
Description
TRUE, when the long sections of a scale should be displayed in bold face. BOOLEAN write-read
access.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
LongStrokesOnly Property
Description
TRUE, when only the long sections of a scale should be displayed . BOOLEAN write-read access.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
LongStrokesSize Property
Description
Defines or returns the length of the axis section in pixels.
See also
Bar (Page 175)
ScreenItem Object (Page 126)
LongStrokesTextEach Property
Description
Returns the value which defines which sections of the scale displayed should be labeled (1 =
every section, 2 = every second section, etc.). Read only access
See also
Bar (Page 175)
ScreenItem Object (Page 126)
LongTimeArchiveConsistency Property
LongTimeArchiveConsistency
If "LongTimeArchiveConsistency" is set to "No", 1000 messages are displayed in the long-term
archive list on the single-user system, server or client for each server, or for each redundant
server pair.
If the "LongTimeArchiveConsistency" is set to "yes", the most recent 1000 messages are
displayed on the client of all servers or redundant server pair in the long-term archive list.
The attribute can be assigned dynamic properties by means of the name
LongTimeArchiveConsistency . The data type is BOOLEAN.
Description
If "LongTimeArchiveConsistency" is set to "No", 1000 messages are displayed in the long-term
archive list in the single-user system, server or client for each server or for each redundant server
pair.
If the "LongTimeArchiveConsistency" is set to "yes", the most recent 1000 messages are
displayed on the client of all servers or redundant server pair in the long-term archive list.
Write/Read access.
LowerLimit Property
Description