WCC Professional V13 SP2 Prog EnUS en-US

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2270

C scripting (RT Professional) 1

Runtime API (RT


Professional) 2
VB scripting (Panels,
SIMATIC Comfort Panels, RT 3
Advanced, RT Professional)

WinCC
WinCC Professional V13 SP2 –
Programming reference

System Manual

Online help printout

03/2017
Online help printout
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.

Siemens AG Document order number: Online help printout Copyright © Siemens AG 2017.
Division Digital Factory Ⓟ 05/2017 Subject to change All rights reserved
Postfach 48 48
90026 NÜRNBERG
GERMANY
Table of contents

1 C scripting (RT Professional)......................................................................................................................23


1.1 System functions (RT Professional).......................................................................................23
1.1.1 ActivateNextScreen (RT Professional)...................................................................................23
1.1.2 ActivatePreviousScreen (RT Professional)............................................................................24
1.1.3 ActivateScreen (RT Professional)..........................................................................................25
1.1.4 ActivateScreenInScreenWindow (RT Professional)...............................................................26
1.1.5 ActivateStartScreen (RT Professional)..................................................................................27
1.1.6 ActivateStoredScreen (RT Professional)...............................................................................28
1.1.7 DecreaseTag (RT Professional).............................................................................................29
1.1.8 GetLocalScreen (RT Professional)........................................................................................31
1.1.9 GetLinkedTag (RT Professional)............................................................................................33
1.1.10 GetLanguageByLocaleID (RT Professional)..........................................................................34
1.1.11 GetParentScreen (RT Professional)......................................................................................36
1.1.12 GetParentScreenWindow (RT Professional)..........................................................................37
1.1.13 GetProp (RT Professional).....................................................................................................39
1.1.13.1 GetPropBOOL (RT Professional)..........................................................................................39
1.1.13.2 GetPropChar (RT Professional).............................................................................................40
1.1.13.3 GetPropDouble (RT Professional).........................................................................................42
1.1.13.4 GetPropLong (RT Professional).............................................................................................43
1.1.14 GetServerTagPrefix (RT Professional)..................................................................................44
1.1.15 GetTag (RT Professional)......................................................................................................47
1.1.15.1 GetTag functions (RT Professional).......................................................................................47
1.1.15.2 GetTagDateTime function (RT Professional).........................................................................48
1.1.15.3 GetTagMultiStateQCWait functions (RT Professional)..........................................................49
1.1.15.4 GetTagMultiStateWait functions (RT Professional)................................................................50
1.1.15.5 GetTagMultiWait functions (RT Professional)........................................................................52
1.1.15.6 GetTagState functions (RT Professional)..............................................................................53
1.1.15.7 GetTagStateQC functions (RT Professional).........................................................................56
1.1.15.8 GetTagStateQCWait functions (RT Professional)..................................................................58
1.1.15.9 GetTagStateWait functions (RT Professional).......................................................................61
1.1.15.10 GetTagValue functions (RT Professional)..............................................................................63
1.1.15.11 GetTagValueStateQC functions (RT Professional)................................................................65
1.1.15.12 GetTagValueStateQCWait functions (RT Professional).........................................................66
1.1.15.13 GetTagValueWait functions (RT Professional)......................................................................68
1.1.15.14 GetTagWait functions (RT Professional)................................................................................69
1.1.16 IncreaseTag (RT Professional)..............................................................................................71
1.1.17 InquireLanguage (RT Professional).......................................................................................72
1.1.18 InverseLinearScaling (RT Professional).................................................................................74
1.1.19 InvertBit (RT Professional).....................................................................................................76
1.1.20 InvertBitInTag (RT Professional)............................................................................................77
1.1.21 IsUserAuthorized (RT Professional).......................................................................................78
1.1.22 LinearScaling (RT Professional)............................................................................................79
1.1.23 ReportJob (RT Professional)..................................................................................................80
1.1.24 ResetBit (RT Professional).....................................................................................................82
1.1.25 ResetBitInTag (RT Professional)...........................................................................................82
1.1.26 SetBit (RT Professional).........................................................................................................84

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 3
Table of contents

1.1.27 SetBitInTag (RT Professional)...............................................................................................84


1.1.28 SetLanguageByLocaleID (RT Professional)..........................................................................86
1.1.29 SetProp (RT Professional).....................................................................................................87
1.1.29.1 SetPropBOOL (RT Professional)...........................................................................................87
1.1.29.2 SetPropChar (RT Professional).............................................................................................89
1.1.29.3 SetPropDouble (RT Professional)..........................................................................................90
1.1.29.4 SetPropLong (RT Professional).............................................................................................92
1.1.30 SetPropertyByConstant (RT Professional).............................................................................93
1.1.31 SetPropertyByProperty (RT Professional).............................................................................95
1.1.32 SetPropertyByTag (RT Professional).....................................................................................96
1.1.33 SetPropertyByTagIndirect (RT Professional).........................................................................98
1.1.34 SetTag (RT Professional).......................................................................................................99
1.1.34.1 SetTag functions (RT Professional).......................................................................................99
1.1.34.2 SetTagDateTime (RT Professional).....................................................................................101
1.1.34.3 SetTagMultiStateWait functions (RT Professional)..............................................................102
1.1.34.4 SetTagMultiWait functions (RT Professional)......................................................................103
1.1.34.5 SetTagState functions (RT Professional).............................................................................106
1.1.34.6 SetTagStateWait functions (RT Professional)......................................................................108
1.1.34.7 SetTagValue functions (RT Professional)............................................................................111
1.1.34.8 SetTagValueWait functions (RT Professional).....................................................................112
1.1.34.9 SetTagWait functions (RT Professional)..............................................................................114
1.1.34.10 SetTag (RT Professional).....................................................................................................116
1.1.34.11 SetTagByProperty (RT Professional)...................................................................................117
1.1.34.12 SetTagByTagIndirect (RT Professional)..............................................................................119
1.1.34.13 SetTagIndirect (RT Professional)........................................................................................120
1.1.34.14 SetTagIndirectByProperty (RT Professional).......................................................................120
1.1.34.15 SetTagIndirectByTagIndirect (RT Professional)...................................................................122
1.1.34.16 SetTagIndirectWithOperatorInputAlarm (RT Professional)..................................................123
1.1.34.17 SetTagWithOperatorEvent (RT Professional)......................................................................123
1.1.35 StartProgram (RT Professional)...........................................................................................124
1.1.36 StopRuntime (RT Professional)...........................................................................................125
1.1.37 StoreScreen (RT Professional)...........................................................................................126
1.1.38 TriggerOperatorEvent (RT Professional).............................................................................127
1.1.39 UA (Recipe) (RT Professional).............................................................................................128
1.1.39.1 uaAddArchive (RT Professional)..........................................................................................128
1.1.39.2 uaAddField (RT Professional)..............................................................................................129
1.1.39.3 uaArchiveClose (RT Professional).......................................................................................130
1.1.39.4 uaArchiveDelete (RT Professional)......................................................................................130
1.1.39.5 uaArchiveExport (RT Professional)......................................................................................131
1.1.39.6 uaArchiveGetCount (RT Professional).................................................................................132
1.1.39.7 uaArchiveGetFieldLength (RT Professional)........................................................................133
1.1.39.8 uaArchiveGetFieldName (RT Professional).........................................................................133
1.1.39.9 uaArchiveGetFields (RT Professional).................................................................................134
1.1.39.10 uaArchiveGetFieldType (RT Professional)..........................................................................135
1.1.39.11 uaArchiveGetFieldValueDate (RT Professional)..................................................................135
1.1.39.12 uaArchiveGetFieldValueDouble (RT Professional)..............................................................136
1.1.39.13 uaArchiveGetFieldValueFloat (RT Professional).................................................................137
1.1.39.14 uaArchiveGetFieldValueLong (RT Professional).................................................................138
1.1.39.15 uaArchiveGetFieldValueString (RT Professional)................................................................138
1.1.39.16 uaArchiveGetFilter (RT Professional)..................................................................................139
1.1.39.17 uaArchiveGetID (RT Professional).......................................................................................140
1.1.39.18 uaArchiveGetName (RT Professional).................................................................................140

WinCC Professional V13 SP2 – Programming reference


4 System Manual, 03/2017, Online help printout
Table of contents

1.1.39.19 uaArchiveGetSor (RT Professional).....................................................................................141


1.1.39.20 uaArchiveImport (RT Professional)......................................................................................142
1.1.39.21 uaArchiveInsert (RT Professional).......................................................................................143
1.1.39.22 uaArchiveMoveFirst (RT Professional)................................................................................143
1.1.39.23 uaArchiveMoveLast (RT Professional)................................................................................144
1.1.39.24 uaArchiveMoveNext (RT Professional)................................................................................145
1.1.39.25 uaArchiveMovePrevious (RT Professional).........................................................................145
1.1.39.26 uaArchiveOpen (RT Professional).......................................................................................146
1.1.39.27 uaArchiveReadTagValues (RT Professional)......................................................................147
1.1.39.28 uaArchiveReadTagValuesByName (RT Professional).........................................................148
1.1.39.29 uaArchiveRequery (RT Professional)...................................................................................149
1.1.39.30 uaArchiveSetFieldValueDate (RT Professional)..................................................................149
1.1.39.31 uaArchiveSetFieldValueDouble (RT Professional)..............................................................150
1.1.39.32 uaArchiveSetFieldValueFloat (RT Professional)..................................................................151
1.1.39.33 uaArchiveSetFieldValueLong (RT Professional)..................................................................152
1.1.39.34 uaArchiveSetFieldValueString (RT Professional)...............................................................153
1.1.39.35 uaArchiveSetFilter (RT Professional)...................................................................................154
1.1.39.36 uaArchiveSetSort (RT Professional)....................................................................................154
1.1.39.37 uaArchiveUpdate (RT Professional).....................................................................................155
1.1.39.38 uaArchiveWriteTagValues (RT Professional).......................................................................156
1.1.39.39 uaArchiveWriteTagValuesByName (RT Professional).........................................................157
1.1.39.40 uaConnect (RT Professional)...............................................................................................157
1.1.39.41 uaDisconnect (RT Professional)..........................................................................................158
1.1.39.42 uaGetArchive (RT Professional)..........................................................................................159
1.1.39.43 uaGetField (RT Professional)...............................................................................................159
1.1.39.44 uaGetLastError (RT Professional).......................................................................................160
1.1.39.45 uaGetLastHResult (RT Professional)..................................................................................162
1.1.39.46 uaGetNumArchives (RT Professional).................................................................................163
1.1.39.47 uaGetNumFields (RT Professional).....................................................................................163
1.1.39.48 uaQueryArchive (RT Professional).....................................................................................164
1.1.39.49 uaQueryArchiveByName (RT Professional)........................................................................165
1.1.39.50 UaQueryConfiguration (RT Professional)............................................................................166
1.1.39.51 uaReleaseArchive (RT Professional)...................................................................................166
1.1.39.52 uaReleaseConfiguration (RT Professional).........................................................................167
1.1.39.53 uaRemoveAllArchives (RT Professional)............................................................................168
1.1.39.54 uaRemoveAllFields (RT Professional).................................................................................168
1.1.39.55 uaRemoveArchive (RT Professional)...................................................................................169
1.1.39.56 uaRemoveField (RT Professional).......................................................................................170
1.1.39.57 uaSetArchive (RT Professional)...........................................................................................171
1.1.39.58 uaSetField (RT Professional)...............................................................................................171
1.2 C-bib (RT Professional)........................................................................................................172
1.2.1 ctype functions (RT Professional)........................................................................................172
1.2.2 Function group c_bib (RT Professional)...............................................................................173
1.2.3 math functions (RT Professional)........................................................................................174
1.2.4 memory functions (RT Professional)....................................................................................175
1.2.5 multibyte functions (RT Professional)..................................................................................175
1.2.6 stdio functions (RT Professional).........................................................................................176
1.2.7 stdlib functions (RT Professional)........................................................................................177
1.2.8 string functions (RT Professional)........................................................................................178
1.2.9 time functions (RT Professional).........................................................................................179
1.3 Structure definition (RT Professional)..................................................................................180

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 5
Table of contents

1.3.1 Structure definition CCAPErrorExecute (RT Professional)..................................................180


1.3.2 Structure definition CCAPTime (RT Professional)...............................................................181
1.3.3 Structure definition CMN_ERROR (RT Professional)..........................................................182
1.3.4 Structure definition DM_TYPEREF (RT Professional).........................................................183
1.3.5 Structure definition DM_VAR_UPDATE_STRUCT (RT Professional)..................................184
1.3.6 Structure definition DM_VAR_UPDATE_STRUCTEX (RT Professional).............................185
1.3.7 Structure definition DM_VARKEY (RT Professional)..........................................................186
1.3.8 Structure definition LINKINFO (RT Professional).................................................................186
1.3.9 Structure definition MSG_FILTER_STRUCT (RT Professional)..........................................188
1.3.10 Structure definition MSG_RTDATA_STRUCT (RT Professional)........................................191
2 Runtime API (RT Professional)................................................................................................................193
2.1 Runtime API (RT Professional)............................................................................................193
2.2 Data management functions (RT Professional)...................................................................194
2.2.1 Basics (RT Professional)......................................................................................................194
2.2.1.1 Overview of structures (RT Professional)............................................................................194
2.2.1.2 Overview of the functions (RT Professional)........................................................................195
2.2.1.3 Quality codes of HMI tags (RT Professional).......................................................................196
2.2.1.4 Constants (RT Professional)................................................................................................200
2.2.1.5 Error messages (RT Professional).......................................................................................204
2.2.1.6 Conversion routines (Control Center) (RT Professional).....................................................205
2.2.2 Structures (RT Professional)................................................................................................212
2.2.2.1 DM_CONNECTION_DATA (RT Professional).....................................................................212
2.2.2.2 DM_CONNKEY (RT Professional).......................................................................................213
2.2.2.3 DM_CYCLE_INFO (RT Professional)..................................................................................214
2.2.2.4 DM_DATA_SERVICE (RT Professional)..............................................................................215
2.2.2.5 DM_DIRECTORY_INFO (RT Professional).........................................................................216
2.2.2.6 DM_DLGOPTIONS (RT Professional).................................................................................217
2.2.2.7 DM_FORMAT_INFO (RT Professional)...............................................................................218
2.2.2.8 DM_MACHINE_TABLE (RT Professional)...........................................................................219
2.2.2.9 DM_PROJECT_INFO (RT Professional)..............................................................................220
2.2.2.10 DM_SEND_DATA_STRUCT (RT Professional)...................................................................221
2.2.2.11 DM_SD_TARGET_MACHINE (RT Professional).................................................................223
2.2.2.12 DM_SD_TARGET_APP (RT Professional)..........................................................................224
2.2.2.13 DM_TYPEREF (RT Professional)........................................................................................224
2.2.2.14 DM_VAR_UPDATE_STRUCT (RT Professional).................................................................226
2.2.2.15 DM_VAR_UPDATE_STRUCTEX (RT Professional)............................................................228
2.2.2.16 DM_VARFILTER (RT Professional).....................................................................................231
2.2.2.17 DM_VARGRP_DATA (RT Professional)..............................................................................233
2.2.2.18 DM_VARGRPKEY (RT Professional)..................................................................................234
2.2.2.19 DM_VARIABLE_DATA (RT Professional)............................................................................235
2.2.2.20 DM_VARIABLE_DATA4 (RT Professional)..........................................................................237
2.2.2.21 DM_VARKEY (RT Professional)..........................................................................................239
2.2.2.22 DM_VARLIMIT (RT Professional)........................................................................................242
2.2.2.23 MCP_NEWVARIABLE_DATA (RT Professional).................................................................243
2.2.2.24 MCP_NEWVARIABLE_DATA_4 (RT Professional).............................................................245
2.2.2.25 MCP_NEWVARIABLE_DATA_5 (RT Professional).............................................................247
2.2.2.26 MCP_NEWVARIABLE_DATA_EX (RT Professional)..........................................................249
2.2.2.27 MCP_NEWVARIABLE_DATA_EX4 (RT Professional)........................................................251
2.2.2.28 MCP_VARIABLE_COMMON (RT Professional)..................................................................253
2.2.2.29 MCP_VARIABLE_COMMON_EX (RT Professional)............................................................255
2.2.2.30 MCP_VARIABLE_LIMITS (RT Professional).......................................................................257

WinCC Professional V13 SP2 – Programming reference


6 System Manual, 03/2017, Online help printout
Table of contents

2.2.2.31 MCP_VARIABLE_LIMITS5 (RT Professional).....................................................................259


2.2.2.32 MCP_VARIABLE_LIMITS_EX (RT Professional).................................................................261
2.2.2.33 MCP_VARIABLE_PROTOCOL (RT Professional)...............................................................262
2.2.2.34 MCP_VARIABLE_PROTOCOL_EX (RT Professional)........................................................264
2.2.2.35 MCP_VARIABLE_SCALES (RT Professional).....................................................................265
2.2.3 General functions (RT Professional)....................................................................................266
2.2.3.1 DMActivateRTProject (RT Professional)..............................................................................266
2.2.3.2 DMAddNotify (RT Professional)...........................................................................................267
2.2.3.3 DMChangeDataLocale (RT Professional)............................................................................274
2.2.3.4 DMConnect (RT Professional).............................................................................................275
2.2.3.5 DM_NOTIFY_PROC (RT Professional)...............................................................................278
2.2.3.6 DMDeactivateRTProject (RT Professional)..........................................................................280
2.2.3.7 DMDisconnect (RT Professional).........................................................................................281
2.2.3.8 DMEnumNumberFormats (RT Professional).......................................................................283
2.2.3.9 DM_ENUM_FORMATS_PROC (RT Professional)...............................................................284
2.2.3.10 DMEnumUpdateCycles (RT Professional)...........................................................................286
2.2.3.11 DM_ENUM_CYCLES_PROC (RT Professional)..................................................................287
2.2.3.12 DMExitWinCC (RT Professional).........................................................................................289
2.2.3.13 DMExitWinCCEx (RT Professional).....................................................................................290
2.2.3.14 DMFireNotifyData (RT Professional)....................................................................................291
2.2.3.15 DMGetConnectionState (RT Professional)..........................................................................293
2.2.3.16 DMGetDataLocale (RT Professional)...................................................................................294
2.2.3.17 DMGetHotkey (RT Professional)..........................................................................................295
2.2.3.18 DMGetMachineInfo (RT Professional).................................................................................296
2.2.3.19 DMGetMachineTable (RT Professional)..............................................................................297
2.2.3.20 DMRemoveNotify (RT Professional)....................................................................................298
2.2.4 Functions for project management (RT Professional)..........................................................300
2.2.4.1 DMEnumOpenedProjects (RT Professional).......................................................................300
2.2.4.2 DM_ENUM_OPENED_PROJECTS_PROC (RT Professional)............................................302
2.2.4.3 DMGetProjectDirectory (RT Professional)...........................................................................304
2.2.4.4 DMGetProjectInformation (RT Professional)........................................................................305
2.2.4.5 DMGetRuntimeProject (RT Professional)............................................................................306
2.2.4.6 DMOpenProjectDocPlus (RT Professional).........................................................................308
2.2.4.7 DMOpenProjectPlus (RT Professional)................................................................................309
2.2.5 Data transport channels (RT Professional)..........................................................................311
2.2.5.1 DMClearBlockQueue (RT Professional)..............................................................................311
2.2.5.2 DMEnumDataServices (RT Professional)............................................................................312
2.2.5.3 DM_ENUM_DATA_SERVICE_PROC (RT Professional).....................................................313
2.2.5.4 DM_DATA_SERVICE_PROC (RT Professional).................................................................314
2.2.5.5 DMGetNumPendingBlocks (RT Professional).....................................................................316
2.2.5.6 DMInstallDataService (RT Professional)..............................................................................317
2.2.5.7 DMSendApplicationData (RT Professional).........................................................................318
2.2.5.8 DMSetBlockQueueSize (RT Professional)...........................................................................319
2.2.6 Functions for processing tags (RT Professional).................................................................320
2.2.6.1 DMEnumVarData (RT Professional)....................................................................................320
2.2.6.2 DM_ENUM_VARIABLE_PROC (RT Professional)...............................................................322
2.2.6.3 DMEnumVarData4 (RT Professional)..................................................................................324
2.2.6.4 DM_ENUM_VARIABLE_PROC4 (RT Professional).............................................................326
2.2.6.5 DMEnumVarGrpData (RT Professional)..............................................................................327
2.2.6.6 DMEnumVarGrpDataExStr (RT Professional).....................................................................329
2.2.6.7 DM_ENUM_VARGRP_PROC (RT Professional).................................................................331
2.2.6.8 DMEnumVariables (RT Professional)..................................................................................332

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 7
Table of contents

2.2.6.9 DM_ENUM_VAR_PROC (RT Professional).........................................................................334


2.2.6.10 DMGetValue (RT Professional)............................................................................................335
2.2.6.11 DMGetValueEx (RT Professional).......................................................................................337
2.2.6.12 DMGetValueExStr (RT Professional)...................................................................................339
2.2.6.13 DMGetValueWait (RT Professional)....................................................................................348
2.2.6.14 DMGetValueWaitEx (RT Professional)................................................................................350
2.2.6.15 DMGetValueWaitExStr (RT Professional)............................................................................352
2.2.6.16 DMGetVarInfo (RT Professional).........................................................................................354
2.2.6.17 DMGetVarInfoExStr (RT Professional)................................................................................356
2.2.6.18 DMGetVarLimits (RT Professional)......................................................................................366
2.2.6.19 DMGetVarLimitsExStr (RT Professional).............................................................................367
2.2.6.20 DMGetVarType (RT Professional).......................................................................................372
2.2.6.21 DMGetVarTypeExStr (RT Professional)..............................................................................374
2.2.6.22 DMSetValue (RT Professional)............................................................................................379
2.2.6.23 DMSetValueExStr (RT Professional)...................................................................................381
2.2.6.24 DMSetValueMessage (RT Professional).............................................................................384
2.2.6.25 DMSetValueMessageExStr (RT Professional).....................................................................386
2.2.6.26 DMSetValueWait (RT Professional).....................................................................................388
2.2.6.27 DMSetValueWaitExStr (RT Professional)............................................................................390
2.2.6.28 DMSetValueWaitMessage (RT Professional)......................................................................393
2.2.6.29 DMSetValueWaitMessageExStr (RT Professional).............................................................395
2.2.6.30 DM_COMPLETITION_PROC (RT Professional)..................................................................398
2.2.6.31 DMShowVarPropertiesExStr (RT Professional)...................................................................400
2.2.6.32 DMShowVarDatabase (RT Professional).............................................................................402
2.2.6.33 DMShowVarDatabaseExStr (RT Professional)....................................................................404
2.2.6.34 DMShowVarDatabaseMulti (RT Professional).....................................................................407
2.2.6.35 DMShowVarDatabaseMultiExStr (RT Professional)............................................................409
2.2.6.36 DM_NOTIFY_SELECT_VAR_PROC (RT Professional)......................................................413
2.2.6.37 GAPICreateNewVariable (RT Professional)........................................................................414
2.2.6.38 GAPICreateNewVariable4 (RT Professional)......................................................................416
2.2.6.39 GAPICreateNewVariable5 (RT Professional)......................................................................417
2.2.6.40 GAPICreateNewVariableEx4 (RT Professional)..................................................................419
2.2.7 Functions for processing structured tags (RT Professional)................................................421
2.2.7.1 GAPIEnumTypeMembers (RT Professional).......................................................................421
2.2.7.2 DM_ENUM_TYPEMEMBERS_PROC (RT Professional).....................................................422
2.2.7.3 GAPIEnumTypeMembersEx (RT Professional)...................................................................424
2.2.7.4 GAPIEnumTypeMembersExStr (RT Professional)..............................................................425
2.2.7.5 DM_ENUM_TYPEMEMBERS_PROC_EX (RT Professional)..............................................427
2.2.7.6 GAPIEnumTypeMembersEx4 (RT Professional).................................................................428
2.2.7.7 DM_ENUM_TYPEMEMBERS_PROC_EX4 (RT Professional)............................................430
2.2.7.8 GAPIEnumTypes (RT Professional)....................................................................................431
2.2.7.9 DM_ENUM_TYPES_PROC (RT Professional)....................................................................433
2.2.8 Functions for processing connections (RT Professional).....................................................434
2.2.8.1 DMEnumConnectionData (RT Professional).......................................................................434
2.2.8.2 DMEnumConnectionDataExStr (RT Professional)...............................................................436
2.2.8.3 DM_ENUM_CONNECTION_PROC (RT Professional)........................................................438
2.2.9 Functions for the work platform (RT Professional)...............................................................439
2.2.9.1 DMGetOSVersion (RT Professional)...................................................................................439
2.2.9.2 DMGetSystemLocale (RT Professional)..............................................................................440
2.2.9.3 DMSetLanguage (RT Professional).....................................................................................441
2.2.9.4 DMShowLanguageDialog (RT Professional).......................................................................442
2.2.10 Functions for updating tags (RT Professional).....................................................................443

WinCC Professional V13 SP2 – Programming reference


8 System Manual, 03/2017, Online help printout
Table of contents

2.2.10.1 DMBeginStartVarUpdate (RT Professional).........................................................................443


2.2.10.2 DMEndStartVarUpdate (RT Professional)...........................................................................445
2.2.10.3 DMResumeVarUpdate (RT Professional)............................................................................446
2.2.10.4 DMStartVarUpdate (RT Professional)..................................................................................448
2.2.10.5 DM_NOTIFY_VARIABLE_PROC (RT Professional)............................................................450
2.2.10.6 DMStartVarUpdateEx (RT Professional)..............................................................................451
2.2.10.7 DMStartVarUpdateExStr (RT Professional).........................................................................454
2.2.10.8 DM_NOTIFY_VARIABLEEX_PROC (RT Professional).......................................................461
2.2.10.9 DMStopAllUpdates (RT Professional)..................................................................................462
2.2.10.10 DMStopVarUpdate (RT Professional)..................................................................................463
2.2.10.11 DMSuspendVarUpdate (RT Professional)...........................................................................465
2.2.11 Examples (RT Professional)................................................................................................467
2.2.11.1 Connection to DM (RT Professional)...................................................................................467
2.2.11.2 Enum Data of Tags (RT Professional).................................................................................470
2.2.11.3 Enum open projects (RT Professional)................................................................................472
2.2.11.4 Enumerate all structured types (RT Professional)...............................................................474
2.2.11.5 Enumerate all connections (RT Professional)......................................................................476
2.2.11.6 Inquire project informations (RT Professional).....................................................................478
2.2.11.7 OnTestDeactivateRuntimeProject (RT Professional)...........................................................479
2.2.11.8 OnTestEnumGroupsAll (RT Professional)...........................................................................479
2.2.11.9 OnTestEnumVariables (RT Professional)............................................................................480
2.2.11.10 OnTestEnumConnectionDataAll (RT Professional).............................................................481
2.2.11.11 OnTestMachines (RT Professional).....................................................................................482
2.2.11.12 OnTestProjectInfo (RT Professional)...................................................................................482
2.2.11.13 OnTestProjectPaths (RT Professional)................................................................................484
2.2.11.14 OnTestOpenProject (RT Professional)................................................................................485
2.2.11.15 OnTestOpenProjects (RT Professional)...............................................................................486
2.2.11.16 OnTestRuntimeProject (RT Professional)............................................................................486
2.2.11.17 OnTestSystemLocale (RT Professional)..............................................................................487
2.2.11.18 OnTestUpdateCycles (RT Professional)..............................................................................487
2.2.11.19 OnTestVariablenBeginstartvarupdate (RT Professional).....................................................488
2.2.11.20 OnTestVariablenEndstartvarupdate (RT Professional)........................................................489
2.2.11.21 OnTestVariablenGetvalue (RT Professional).......................................................................490
2.2.11.22 OnTestVariablenGetvaluewait (RT Professional)................................................................493
2.2.11.23 OnTestVariablenGetVarInfo (RT Professional)....................................................................497
2.2.11.24 OnTestVariablenGetvarlimits (RT Professional)..................................................................498
2.2.11.25 OnTestVariablenGetvartype (RT Professional)....................................................................499
2.2.11.26 OnTestVariablenResumevarupdate (RT Professional)........................................................500
2.2.11.27 OnTestVariablenSetvalue (RT Professional).......................................................................501
2.2.11.28 OnTestVariablenSetvaluewait (RT Professional).................................................................502
2.2.11.29 OnTestVariablenStopallupdates (RT Professional).............................................................503
2.2.11.30 OnTestVariablenStopvarupdate (RT Professional)..............................................................503
2.2.11.31 OnTestVariablenSuspendvarupdate (RT Professional).......................................................504
2.2.11.32 OnTestWinCCShutdown (RT Professional).........................................................................504
2.2.11.33 Open project by means of dialog (RT Professional)............................................................505
2.2.11.34 Read tag (RT Professional)..................................................................................................506
2.2.11.35 Write tag (RT Professional)..................................................................................................511
2.3 Functions of the graphic system (RT Professional).............................................................513
2.3.1 Basics (RT Professional)......................................................................................................513
2.3.1.1 Overview of the functions (RT Professional)........................................................................513
2.3.1.2 Overview of structures (RT Professional)............................................................................514
2.3.1.3 Error messages (RT Professional).......................................................................................514

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 9
Table of contents

2.3.1.4 Constants (RT Professional)................................................................................................516


2.3.1.5 List of object properties (A-K) (Graphics Designer) (RT Professional)................................517
2.3.1.6 List of object properties (L-Z) (Graphics Designer) (RT Professional).................................528
2.3.1.7 API calls to OCXs (RT Professional)....................................................................................540
2.3.2 Structures (RT Professional)................................................................................................540
2.3.2.1 LINKINFO (RT Professional)................................................................................................540
2.3.2.2 MULTILINK (RT Professional).............................................................................................542
2.3.2.3 MULTILINKINFO (RT Professional).....................................................................................543
2.3.2.4 FOCUSINFO (RT Professional)...........................................................................................544
2.3.3 General functions (RT Professional)....................................................................................544
2.3.3.1 PDLRTClosePicture (RT Professional)................................................................................544
2.3.3.2 PDLRTDisableClosePicture (RT Professional)....................................................................546
2.3.3.3 PDLRTEnableClosePicture (RT Professional).....................................................................548
2.3.3.4 PDLRTGotoPicture (RT Professional).................................................................................549
2.3.3.5 PDLRTInquireFreeArea (RT Professional)..........................................................................551
2.3.3.6 PDLRTOpenPicture (RT Professional)................................................................................552
2.3.3.7 PDLRTPictureNavigation (RT Professional)........................................................................555
2.3.3.8 PDLRTShowApp (RT Professional).....................................................................................556
2.3.3.9 PDLRT_CALLBACK (RT Professional)................................................................................557
2.3.4 Functions for affecting the runtime cursor (RT Professional)...............................................559
2.3.4.1 PDLRTGetCursorKeys (RT Professional)............................................................................559
2.3.4.2 PDLRTGetFocus (RT Professional).....................................................................................561
2.3.4.3 PDLRTSetCursorKeys (RT Professional)............................................................................563
2.3.4.4 PDLRTSetFocus (RT Professional).....................................................................................565
2.3.5 Functions for processing object properties (RT Professional).............................................567
2.3.5.1 PDLRTGetDefPropEx (RT Professional).............................................................................567
2.3.5.2 PDLRTGetPropEx (RT Professional)...................................................................................569
2.3.5.3 PDLRTSetPropEx (RT Professional)...................................................................................572
2.3.6 Functions for processing dynamics (RT Professional).........................................................577
2.3.6.1 PDLRTGetLink (RT Professional)........................................................................................577
2.3.6.2 PDLRTSetLink (RT Professional)........................................................................................579
2.3.6.3 PDLRTSetMultiLink (RT Professional).................................................................................581
2.4 Scripting functions (RT Professional)...................................................................................583
2.4.1 Basics (RT Professional)......................................................................................................583
2.4.1.1 Overview of the functions (RT Professional)........................................................................583
2.4.1.2 Overview of structures (RT Professional)............................................................................583
2.4.1.3 Error messages (RT Professional).......................................................................................584
2.4.1.4 Constants (RT Professional)................................................................................................586
2.4.2 Structures (RT Professional)................................................................................................588
2.4.2.1 AP_ACT_KEY (RT Professional).........................................................................................588
2.4.2.2 AP_ACT_RESULT_STRUCT (RT Professional)..................................................................590
2.4.2.3 CREATE_USER_HEADER_FILE (RT Professional)............................................................591
2.4.2.4 GENERATE_COMPILE (RT Professional)..........................................................................592
2.4.2.5 GET_ACTION_STREAM (RT Professional).........................................................................592
2.4.3 General functions (RT Professional)....................................................................................593
2.4.3.1 APConnect (RT Professional)..............................................................................................593
2.4.3.2 APDisconnect (RT Professional)..........................................................................................595
2.4.3.3 APSetLanguage (RT Professional)......................................................................................597
2.4.3.4 AP_RT_PROC (RT Professional).........................................................................................598
2.4.4 Functions for processing Source Code (RT Professional)...................................................601
2.4.4.1 APCompile (RT Professional)..............................................................................................601
2.4.4.2 APCompileEx (RT Professional)..........................................................................................603

WinCC Professional V13 SP2 – Programming reference


10 System Manual, 03/2017, Online help printout
Table of contents

2.4.4.3 GSCGenCompile (RT Professional)....................................................................................606


2.4.4.4 GSCGenCompileUserFunctions (RT Professional).............................................................607
2.4.5 Functions for processing actions (RT Professional).............................................................609
2.4.5.1 GSCGenGetActionStream (RT Professional)......................................................................609
2.4.6 Functions of the action programming (RT Professional)......................................................610
2.4.6.1 APActive (RT Professional)..................................................................................................610
2.4.6.2 APEndAct (RT Professional)................................................................................................612
2.4.6.3 APFreeResultStruct (RT Professional)................................................................................613
2.4.6.4 APInactive (RT Professional)...............................................................................................614
2.4.6.5 APStart (RT Professional)....................................................................................................616
2.4.6.6 APTransact (RT Professional).............................................................................................619
2.4.7 Examples (RT Professional)................................................................................................620
2.4.7.1 Establish connection to script programming (RT Professional)...........................................620
2.5 Functions of the user administration (RT Professional).......................................................622
2.5.1 Basics (RT Professional)......................................................................................................622
2.5.1.1 Overview of the functions (RT Professional)........................................................................622
2.5.1.2 Overview of structures (RT Professional)............................................................................623
2.5.1.3 Error messages (RT Professional).......................................................................................624
2.5.1.4 Constants (RT Professional)................................................................................................625
2.5.2 Structures (RT Professional)................................................................................................625
2.5.2.1 PWGEN_GROUPINFO (RT Professional)...........................................................................625
2.5.2.2 PWGEN_LEVELINFO (RT Professional).............................................................................626
2.5.2.3 PWGEN_USERINFO (RT Professional)..............................................................................627
2.5.3 General functions (RT Professional)....................................................................................627
2.5.3.1 PWGENConnect (RT Professional).....................................................................................627
2.5.3.2 PWGENDisconnect (RT Professional).................................................................................629
2.5.4 Functions for processing users (RT Professional)...............................................................630
2.5.4.1 PWGENAddUser (RT Professional).....................................................................................630
2.5.4.2 PWGENAddUserEx (RT Professional)................................................................................632
2.5.4.3 PWGENChangePassword (RT Professional)......................................................................634
2.5.4.4 PWGENCheckUser (RT Professional).................................................................................635
2.5.4.5 PWGENDeleteUser (RT Professional).................................................................................637
2.5.4.6 PWGENEnumUsers (RT Professional)................................................................................638
2.5.4.7 PWGEN_ENUM_USERS_CALLBACK (RT Professional)...................................................640
2.5.5 Functions for processing user groups (RT Professional).....................................................641
2.5.5.1 PWGENAddGroup (RT Professional)..................................................................................641
2.5.5.2 PWGENEnumGroups (RT Professional).............................................................................643
2.5.5.3 PWGEN_ENUM_GROUPS_CALLBACK (RT Professional)................................................644
2.5.6 Functions for processing authorizations (RT Professional)..................................................645
2.5.6.1 PWGENAddPermLevel (RT Professional)...........................................................................645
2.5.6.2 PWGENCheckPermission (RT Professional).......................................................................647
2.5.6.3 PWGENDeletePermLevel (RT Professional).......................................................................648
2.5.6.4 PWGENEnumPermLevels (RT Professional)......................................................................649
2.5.6.5 PWGEN_ENUM_LEVELS_CALLBACK (RT Professional)..................................................651
2.5.6.6 PWGENReadUserPerm (RT Professional)..........................................................................652
2.5.6.7 PWRTCheckPermission (RT Professional)..........................................................................653
2.5.6.8 PWRTCheckPermissionOnPicture (RT Professional)..........................................................654
2.5.6.9 PWRTPermissionLevelDialog (RT Professional).................................................................655
2.5.6.10 PWRTPermissionLevelDialogEx (RT Professional).............................................................656
2.5.6.11 PWRTPermissionToString (RT Professional)......................................................................657
2.5.7 Functions for logon, logoff (RT Professional).......................................................................659
2.5.7.1 PWRTGetCurrentUser (RT Professional)............................................................................659

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 11
Table of contents

2.5.7.2 PWRTGetLoginPriority (RT Professional)............................................................................660


2.5.7.3 PWRTIsLoggedInByCard (RT Professional)........................................................................661
2.5.7.4 PWRTLogin (RT Professional).............................................................................................662
2.5.7.5 PWRTLogout (RT Professional)...........................................................................................663
2.5.7.6 PWRTLogoutEx (RT Professional)......................................................................................664
2.5.7.7 PWRTSilentLogin (RT Professional)....................................................................................665
2.5.7.8 PWRTSilentLoginEx (RT Professional)................................................................................666
2.5.8 Examples (RT Professional)................................................................................................669
2.5.8.1 PWRT check permission (RT Professional).........................................................................669
2.5.8.2 Checks admission of a certain level for a screen (RT Professional)....................................670
2.5.8.3 Gets a string associated with the permission number (RT Professional).............................671
2.5.8.4 Authorization level query through a dialog with specifying a possible error (RT
Professional)........................................................................................................................672
2.5.8.5 Return the name of the current user (RT Professional).......................................................673
2.5.8.6 Queries the current logon priority (RT Professional)............................................................674
2.5.8.7 Checks if the user has been logged on by card (RT Professional)......................................674
2.5.8.8 PWRT login - dialog provided by WinCC itself (RT Professional)........................................675
2.5.8.9 PWRT logoff (RT Professional)............................................................................................676
2.5.8.10 Silent logoff with priority level (RT Professional)..................................................................677
2.5.8.11 Logon without using a dialog (RT Professional)...................................................................678
2.5.8.12 Silent logon with priority level (RT Professional)..................................................................679
2.6 Functions of the text system (RT Professional)...................................................................680
2.6.1 Basics (RT Professional)......................................................................................................680
2.6.1.1 Overview of the functions (RT Professional)........................................................................680
2.6.1.2 Error messages (RT Professional).......................................................................................680
2.6.1.3 Language codes (RT Professional)......................................................................................682
2.6.2 General functions (RT Professional)....................................................................................683
2.6.2.1 TXTCloseProject (RT Professional).....................................................................................683
2.6.2.2 TXTGetMaxTextID (RT Professional)..................................................................................685
2.6.2.3 TXTOpenProject (RT Professional).....................................................................................686
2.6.2.4 TXTRTConnect (RT Professional)......................................................................................687
2.6.2.5 TXTRTDisconnect (RT Professional)...................................................................................688
2.6.3 Functions for processing infotext (RT Professional)............................................................690
2.6.3.1 TXTEnumInfoText (RT Professional)...................................................................................690
2.6.3.2 TXT_ENUM_INFOTEXTS_PROC (RT Professional)...........................................................692
2.6.3.3 TXTUpdateRuntime (RT Professional)................................................................................693
2.6.3.4 TXTRTGetInfoText (RT Professional)..................................................................................694
2.6.3.5 TXTRTGetInfoTextMC (RT Professional)............................................................................696
2.6.4 Functions for processing languages (RT Professional).......................................................698
2.6.4.1 TXTEnumLanguages (RT Professional)..............................................................................698
2.6.4.2 TXT_ENUM_LANGUAGES_PROC (RT Professional).........................................................699
2.6.4.3 TXTGetFont (RT Professional)............................................................................................701
2.6.4.4 TXTShowLanguagesDialog (RT Professional)....................................................................702
2.6.4.5 TXTRTGetLanguageID (RT Professional)...........................................................................704
2.6.4.6 TXTRTSetLanguage (RT Professional)...............................................................................705
2.6.5 Examples (RT Professional)................................................................................................707
2.6.5.1 Get infotext (RT Professional)..............................................................................................707
2.6.5.2 Enumerate infotexts (RT Professional)................................................................................709
2.7 Report system functions (RT Professional)..........................................................................711
2.7.1 Basics (RT Professional)......................................................................................................711
2.7.1.1 Overview of the functions (RT Professional)........................................................................711

WinCC Professional V13 SP2 – Programming reference


12 System Manual, 03/2017, Online help printout
Table of contents

2.7.1.2 Constants (RT Professional)................................................................................................712


2.7.1.3 Error messages (RT Professional).......................................................................................714
2.7.1.4 List of object properties (RT Professional)...........................................................................715
2.7.1.5 General procedure for processing print job properties (Report Designer) (RT
Professional)........................................................................................................................720
2.7.2 Functions for establishing connections (RT Professional)...................................................723
2.7.2.1 RPJAttach (RT Professional)...............................................................................................723
2.7.2.2 RPJDetach (RT Professional)..............................................................................................724
2.7.2.3 RPJMemFree (RT Professional)..........................................................................................725
2.7.3 Functions for processing project properties (RT Professional)............................................726
2.7.3.1 RPJGetNumProjectProperties (RT Professional)................................................................726
2.7.3.2 RPJGetProjectPropertyAt (RT Professional).......................................................................727
2.7.3.3 RPJGetProjectProperty (RT Professional)...........................................................................728
2.7.3.4 RPJProjectLock (RT Professional).......................................................................................729
2.7.3.5 RPJProjectUnlock (RT Professional)...................................................................................731
2.7.3.6 RPJProjectUnlockAll (RT Professional)...............................................................................732
2.7.4 Functions for processing print jobs (RT Professional).........................................................733
2.7.4.1 RPJCreateJob (RT Professional).........................................................................................733
2.7.4.2 RPJDeleteJob (RT Professional).........................................................................................734
2.7.4.3 RPJCreatePropertyHandle (RT Professional)......................................................................736
2.7.4.4 RPJDeletePropertyHandle (RT Professional)......................................................................737
2.7.4.5 RPJGetJobNameAt (RT Professional).................................................................................739
2.7.4.6 RPJGetNumJobs (RT Professional)....................................................................................740
2.7.4.7 RPJJobLock (RT Professional)............................................................................................741
2.7.4.8 RPJJobUnlock (RT Professional).........................................................................................743
2.7.4.9 RPJJobUnlockAll (RT Professional).....................................................................................744
2.7.5 Functions for processing print job methods (RT Professional)............................................746
2.7.5.1 RPJCallJobMethod (RT Professional).................................................................................746
2.7.5.2 RPJGetJobMethodAt (RT Professional)..............................................................................747
2.7.5.3 RPJGetNumJobMethods (RT Professional)........................................................................748
2.7.6 Functions for processing print job methods (RT Professional)............................................749
2.7.6.1 RPJGetJobPropertyAt (RT Professional).............................................................................749
2.7.6.2 RPJGetJobProps (RT Professional)....................................................................................751
2.7.6.3 RPJGetNumJobProperties (RT Professional)......................................................................752
2.7.6.4 RPJGetProperty (RT Professional)......................................................................................753
2.7.6.5 RPJPropertyClear (RT Professional)...................................................................................756
2.7.6.6 RPJSetProperty (RT Professional)......................................................................................757
2.7.7 Examples (RT Professional)................................................................................................761
2.7.7.1 Get print job method name (RT Professional)......................................................................761
2.7.7.2 Get print job names (RT Professional).................................................................................764
2.7.7.3 Get print job properties (RT Professional)............................................................................767
2.7.7.4 Modify print job properties (RT Professional).......................................................................770
2.7.7.5 Show print job preview (RT Professional)............................................................................775
2.8 Tag and log functions (RT Professional)..............................................................................778
2.8.1 Basics (RT Professional)......................................................................................................778
2.8.1.1 Overview of the functions (RT Professional)........................................................................778
2.8.1.2 Overview of structures (RT Professional)............................................................................779
2.8.1.3 Error messages (RT Professional).......................................................................................780
2.8.1.4 Constants (RT Professional)................................................................................................781
2.8.2 Structures (RT Professional)................................................................................................791
2.8.2.1 TLG_ARCHIV_STR (RT Professional).................................................................................791
2.8.2.2 TLG_ARCHIVDATARAW (RT Professional)........................................................................794

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 13
Table of contents

2.8.2.3 TLG_BACKUP_TABLE_INFO (RT Professional).................................................................797


2.8.2.4 TLG_CURVESCALEX (RT Professional).............................................................................799
2.8.2.5 TLG_CURVESCALEY (RT Professional).............................................................................804
2.8.2.6 TLG_GETARCHIVDATA (RT Professional).........................................................................808
2.8.2.7 TLG_IO_BACKUP_SELECT (RT Professional)...................................................................809
2.8.2.8 TLG_PROT_CURVE_INFOS (RT Professional)..................................................................810
2.8.2.9 TLG_SCAL_STR (RT Professional).....................................................................................812
2.8.2.10 TLG_TABLE_INFO (RT Professional)..................................................................................813
2.8.2.11 TLG_TABLESCALE (RT Professional)................................................................................814
2.8.2.12 TLG_TEMPLATEITEM_INFO (RT Professional).................................................................817
2.8.2.13 TLG_TIME_STR (RT Professional)......................................................................................819
2.8.2.14 TLG_TIMEDATA (RT Professional).....................................................................................820
2.8.2.15 TLG_TPLITEM_CURVE (RT Professional)..........................................................................821
2.8.2.16 TLG_TPLITEM_INFO (RT Professional)..............................................................................822
2.8.2.17 TLG_TPLITEM_TABLE (RT Professional)...........................................................................823
2.8.2.18 TLG_VAR_STR (RT Professional).......................................................................................824
2.8.2.19 TLG_VARIABLE_INFO (RT Professional)...........................................................................829
2.8.3 General functions (RT Professional)....................................................................................830
2.8.3.1 TLGCSConnect (RT Professional).......................................................................................830
2.8.3.2 TLGCSConnectEx (RT Professional)...................................................................................832
2.8.3.3 TLGCSDisConnect (RT Professional)..................................................................................833
2.8.3.4 TLGChangeLanguage (RT Professional).............................................................................834
2.8.3.5 TLGConnect (RT Professional)............................................................................................835
2.8.3.6 TLGDisconnect (RT Professional).......................................................................................837
2.8.4 Project management functions (RT Professional)................................................................838
2.8.4.1 TLGCloseProject (RT Professional).....................................................................................838
2.8.4.2 TLGOpenProject (RT Professional).....................................................................................840
2.8.4.3 TLGEnumProject (RT Professional).....................................................................................842
2.8.4.4 TLG_ENUM_PROJECT_NAME_CALLBACK (RT Professional).........................................843
2.8.5 Functions for processing tags (RT Professional).................................................................844
2.8.5.1 TLGEnumVariables (RT Professional).................................................................................844
2.8.5.2 TLG_ENUM_VARIABLE_NAME_CALLBACK (RT Professional).........................................845
2.8.5.3 TLGEnumVariablesEx (RT Professional).............................................................................846
2.8.5.4 TLG_ENUMVARIABLES (RT Professional).........................................................................848
2.8.5.5 TLGReadVariable (RT Professional)...................................................................................849
2.8.6 Functions for processing logs (RT Professional).................................................................851
2.8.6.1 TLGEnumArchives (RT Professional)..................................................................................851
2.8.6.2 TLG_ENUM_ARCHIV_CALLBACK (RT Professional).........................................................852
2.8.6.3 TLGEnumArchivs (RT Professional)....................................................................................854
2.8.6.4 TLGEnumArchivsEx (RT Professional)................................................................................856
2.8.6.5 TLGEnumArchivsSel (RT Professional)...............................................................................857
2.8.6.6 TLG_ENUMTABLES (RT Professional)...............................................................................859
2.8.6.7 TLGFreeMemory (RT Professional).....................................................................................861
2.8.6.8 TLGGetArchivData (RT Professional)..................................................................................862
2.8.6.9 TLG_GETARCHIVDATA_CALLBACK (RT Professional)....................................................864
2.8.6.10 TLGGetArchivDataEx (RT Professional)..............................................................................866
2.8.6.11 TLGGetClosestTime (RT Professional)...............................................................................868
2.8.6.12 TLGGetClosestTimeEx (RT Professional)...........................................................................870
2.8.6.13 TLGInsertArchivData (RT Professional)...............................................................................872
2.8.6.14 TLGLockArchiv (RT Professional)........................................................................................874
2.8.6.15 TLGLockVariable (RT Professional)....................................................................................876
2.8.6.16 TLGReadArchiv (RT Professional).......................................................................................877

WinCC Professional V13 SP2 – Programming reference


14 System Manual, 03/2017, Online help printout
Table of contents

2.8.7 Functions for trend and table views (RT Professional)........................................................879


2.8.7.1 TLGCloseWindow (RT Professional)...................................................................................879
2.8.7.2 TLGDrawCurvesInDC (RT Professional).............................................................................880
2.8.7.3 TLGInsertTemplateItem (RT Professional)..........................................................................881
2.8.7.4 TLGPressToolbarButton (RT Professional).........................................................................882
2.8.7.5 TLGSetRulerWindowVisible (RT Professional)....................................................................884
2.8.7.6 TLGShowWindow (RT Professional)...................................................................................885
2.8.8 Functions for processing time systems (RT Professional)...................................................887
2.8.8.1 TLGEnumTime (RT Professional)........................................................................................887
2.8.8.2 TLG_ENUM_TIME_NAME_CALLBACK (RT Professional)..................................................888
2.8.8.3 TLGEnumTimes (RT Professional)......................................................................................889
2.8.8.4 TLG_ENUMTIMES_CALLBACK (RT Professional).............................................................891
2.8.8.5 TLGReadTime (RT Professional).........................................................................................892
2.8.9 Functions for saving and restoring (RT Professional)..........................................................894
2.8.9.1 TLGEnumBackupEntries (RT Professional).........................................................................894
2.8.9.2 TLG_ENUMBACKUP_ENTRIES (RT Professional).............................................................895
2.8.9.3 TLGExport (RT Professional)...............................................................................................897
2.8.9.4 TLGGetBackupSize (RT Professional)................................................................................898
2.8.10 Examples (RT Professional)................................................................................................901
2.8.10.1 Edit curve template - Example 1 (RT Professional).............................................................901
2.8.10.2 Enum all acquisition and logging times (RT Professional)...................................................904
2.8.10.3 Enum logs (RT Professional)...............................................................................................907
2.8.10.4 Enum tags of a log (RT Professional)..................................................................................910
2.8.10.5 Enumerate logs (RT Professional).......................................................................................912
2.8.10.6 Read log (RT Professional)..................................................................................................914
2.8.10.7 Read parameters of time object (RT Professional)..............................................................918
2.9 Recipe functions (RT Professional)......................................................................................920
2.9.1 Basics (RT Professional)......................................................................................................920
2.9.1.1 Overview of the functions (RT Professional)........................................................................920
2.9.1.2 Structure of recipes (RT Professional).................................................................................922
2.9.1.3 Dependencies in call sequence of API functions (RT Professional)....................................924
2.9.1.4 Error messages (RT Professional).......................................................................................925
2.9.1.5 Constants (RT Professional)................................................................................................926
2.9.2 General functions (RT Professional)....................................................................................928
2.9.2.1 uaGetLastError (RT Professional)........................................................................................928
2.9.2.2 uaIsActive (RT Professional)................................................................................................930
2.9.2.3 uaUsers (RT Professional)...................................................................................................931
2.9.2.4 uaSetLocalEvents (RT Professional)...................................................................................931
2.9.3 Functions for generating connections (RT Professional).....................................................932
2.9.3.1 uaConnect (RT Professional)...............................................................................................932
2.9.3.2 uaDisconnect (RT Professional)..........................................................................................934
2.9.3.3 uaQueryArchive (RT Professional)......................................................................................935
2.9.3.4 uaQueryArchiveByName (RT Professional).........................................................................937
2.9.3.5 UaQueryConfiguration (RT Professional)............................................................................939
2.9.3.6 uaReleaseArchive (RT Professional)...................................................................................940
2.9.3.7 uaReleaseConfiguration (RT Professional)..........................................................................941
2.9.4 Functions for recipe processing (RT Professional)..............................................................943
2.9.4.1 uaArchiveClose (RT Professional).......................................................................................943
2.9.4.2 uaArchiveDelete (RT Professional)......................................................................................944
2.9.4.3 uaArchiveExport (RT Professional)......................................................................................945
2.9.4.4 uaArchiveGetID (RT Professional).......................................................................................946
2.9.4.5 uaArchiveGetName (RT Professional).................................................................................947

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 15
Table of contents

2.9.4.6 uaArchiveGetSort (RT Professional)....................................................................................949


2.9.4.7 uaArchiveImport (RT Professional)......................................................................................950
2.9.4.8 uaArchiveOpen (RT Professional).......................................................................................951
2.9.4.9 uaArchiveUpdate (RT Professional).....................................................................................952
2.9.4.10 uaGetArchive (RT Professional)..........................................................................................953
2.9.4.11 uaGetNumArchives (RT Professional).................................................................................955
2.9.4.12 uaOpenArchives (RT Professional)......................................................................................955
2.9.5 Functions for recipe element processing (RT Professional)................................................956
2.9.5.1 uaArchiveGetCount (RT Professional).................................................................................956
2.9.5.2 uaArchiveGetFilter (RT Professional)..................................................................................958
2.9.5.3 uaArchiveInsert (RT Professional).......................................................................................959
2.9.5.4 uaArchiveMoveFirst (RT Professional)................................................................................960
2.9.5.5 uaArchiveMoveLast (RT Professional).................................................................................961
2.9.5.6 uaArchiveMoveNext (RT Professional)................................................................................962
2.9.5.7 uaArchiveMovePrevious (RT Professional).........................................................................963
2.9.5.8 uaGetNumFields (RT Professional).....................................................................................964
2.9.6 Functions for field processing (RT Professional).................................................................965
2.9.6.1 uaArchiveGetFieldLength (RT Professional)........................................................................965
2.9.6.2 uaArchiveGetFieldName (RT Professional).........................................................................966
2.9.6.3 uaArchiveGetFields (RT Professional).................................................................................967
2.9.6.4 uaArchiveGetFieldType (RT Professional)...........................................................................968
2.9.6.5 uaArchiveGetFieldValueDate (RT Professional)..................................................................969
2.9.6.6 uaArchiveGetFieldValueDouble (RT Professional)..............................................................970
2.9.6.7 uaArchiveGetFieldValueLong (RT Professional).................................................................972
2.9.6.8 uaArchiveGetFieldValueString (RT Professional)................................................................973
2.9.6.9 uaArchiveSetFieldValueDate (RT Professional)..................................................................974
2.9.6.10 uaArchiveSetFieldValueDouble (RT Professional)..............................................................975
2.9.6.11 uaArchiveSetFieldValueLong (RT Professional)..................................................................976
2.9.6.12 uaArchiveSetFieldValueString (RT Professional)................................................................978
2.9.6.13 uaGetField (RT Professional)...............................................................................................979
2.9.7 Filter and sort functions. (RT Professional)..........................................................................980
2.9.7.1 uaArchiveRequery (RT Professional)...................................................................................980
2.9.7.2 uaArchiveSetFilter (RT Professional)...................................................................................981
2.9.7.3 uaArchiveSetSort (RT Professional)....................................................................................983
2.9.8 Functions for recipe view processing (RT Professional)......................................................984
2.9.8.1 uaOpenViews (RT Professional)..........................................................................................984
2.9.9 Functions for variables processing (RT Professional)..........................................................985
2.9.9.1 uaArchiveReadTagValues (RT Professional)......................................................................985
2.9.9.2 uaArchiveReadTagValuesByName (RT Professional).........................................................986
2.9.9.3 uaArchiveWriteTagValues (RT Professional).......................................................................987
2.9.9.4 uaArchiveWriteTagValuesByName (RT Professional).........................................................989
2.10 Alarm functions (RT Professional).......................................................................................990
2.10.1 Basics (RT Professional)......................................................................................................990
2.10.1.1 Overview of the functions (RT Professional)........................................................................990
2.10.1.2 Overview of structures (RT Professional)............................................................................991
2.10.1.3 Error messages (RT Professional).......................................................................................992
2.10.1.4 Constants (RT Professional)................................................................................................994
2.10.2 Structures (RT Professional)..............................................................................................1005
2.10.2.1 MSG_RTCREATE_STRUCT_PLUS (RT Professional).....................................................1005
2.10.2.2 MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS (RT Professional)....................1007
2.10.2.3 MSG_FILTER_STRUCT_PLUS (RT Professional)............................................................1011
2.10.2.4 MSG_RTDATA_INSTANCE_STRUCT_PLUS (RT Professional)......................................1015

WinCC Professional V13 SP2 – Programming reference


16 System Manual, 03/2017, Online help printout
Table of contents

2.10.2.5 MSG_CLASS_STRUCT_PLUS (RT Professional).............................................................1018


2.10.2.6 MSG_CSDATA_STRUCT_PLUS (RT Professional)..........................................................1020
2.10.2.7 MSG_RTGROUPENUM_STRUCT_PLUS (RT Professional)............................................1023
2.10.2.8 MSG_RTGROUPSET_STRUCT_PLUS (RT Professional)................................................1024
2.10.2.9 MSG_COMMENT_INSTANCE_STRUCT_PLUS (RT Professional)..................................1025
2.10.2.10 MSG_INFOTEXT_STRUCT_PLUS (RT Professional).......................................................1026
2.10.2.11 MSG_BACKUP_STRUCT_PLUS (RT Professional)..........................................................1027
2.10.2.12 MSG_RTLOCK_STRUCT_PLUS (RT Professional)..........................................................1029
2.10.2.13 MSG_TEXTVAL256_STRUCT_PLUS (RT Professional)...................................................1030
2.10.3 General functions (RT Professional)..................................................................................1031
2.10.3.1 MSRTEnumArchivDataPlus (RT Professional)..................................................................1031
2.10.3.2 MSRTStartMsgServicePlus (RT Professional)...................................................................1033
2.10.3.3 MSRTStopMsgServicePlus (RT Professional)...................................................................1036
2.10.3.4 MSRTQuitHornPlus (RT Professional)...............................................................................1038
2.10.3.5 MSG_SERVICE_NOTIFY_PROCPlus (RT Professional)..................................................1039
2.10.3.6 MSRTWebClientPlus (RT Professional)............................................................................1042
2.10.4 Functions for protocol processing (RT Professional)........................................................1042
2.10.4.1 MSRTActivateMProtPlus (RT Professional).......................................................................1042
2.10.4.2 MSRTEnumProtDataPlus (RT Professional).....................................................................1043
2.10.4.3 MSRTPrintMProtPlus (RT Professional)............................................................................1045
2.10.5 Functions for alarm processing (RT Professional).............................................................1046
2.10.5.1 MSRTEnumArchivInstancePlus (RT Professional)............................................................1046
2.10.5.2 MSRTCreateMsgInstanceWithCommentPlus (RT Professional).......................................1048
2.10.5.3 MSRTCreateMsgInstancePlus (RT Professional)..............................................................1049
2.10.5.4 MSRTDialogMsgLockPlus (RT Professional)....................................................................1052
2.10.5.5 MSRTCreateMsgPlus (RT Professional)...........................................................................1053
2.10.5.6 MSRTEnumLockedMsgPlus (RT Professional).................................................................1055
2.10.5.7 MSRTEnumMsgRTDataPlus (RT Professional)................................................................1056
2.10.5.8 MSRTGetClassInfoPlus (RT Professional)........................................................................1057
2.10.5.9 MSRTGetLastMsgWithCommentPlus (RT Professional)...................................................1059
2.10.5.10 MSRTGetMsgActualPlus (RT Professional)......................................................................1060
2.10.5.11 MSRTGetMsgCSDataPlus (RT Professional)....................................................................1061
2.10.5.12 MSRTGetMsgPriorityPlus (RT Professional).....................................................................1063
2.10.5.13 MSRTGetMsgQuitPlus (RT Professional)..........................................................................1065
2.10.5.14 MSRTGetMsgTextPlus (RT Professional).........................................................................1066
2.10.5.15 MSRTGetSelectedMsgPlus (RT Professional)..................................................................1068
2.10.5.16 MSRTResetMsgPlus (RT Professional).............................................................................1070
2.10.5.17 MSRTLoopInAlarmPlus (RT Professional).........................................................................1071
2.10.6 Functions for alarm group processing (RT Professional)...................................................1073
2.10.6.1 MSRTEnumGroupMsgPlus (RT Professional)...................................................................1073
2.10.6.2 MSRTLockGroupPlus (RT Professional)...........................................................................1074
2.10.6.3 MSRTQuitGroupPlus (RT Professional)............................................................................1076
2.10.7 Functions for alarm filter processing (RT Professional).....................................................1077
2.10.7.1 MSRTGetFilterDataPlus (RT Professional)........................................................................1077
2.10.7.2 MSRTCheckWinFilterPlus (RT Professional).....................................................................1079
2.10.7.3 MSRTSetMsgFilterPlus (RT Professional).........................................................................1080
2.10.7.4 MSRTSetMsgWinFilterPlus (RT Professional)...................................................................1082
2.10.8 Functions for processing alarm view (RT Professional).....................................................1083
2.10.8.1 MSRTMsgWinCommandPlus (RT Professional)...............................................................1083
2.10.9 Functions for processing comments (RT Professional).....................................................1085
2.10.9.1 MSRTGetCommentInstancePlus (RT Professional)..........................................................1085
2.10.9.2 MSRTSetCommentInstancePlus (RT Professional)..........................................................1086

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 17
Table of contents

2.10.10 Functions for info text processing (RT Professional).........................................................1088


2.10.10.1 MSRTGetInfotextPlus (RT Professional)...........................................................................1088
2.10.10.2 MSRTSetInfotextPlus (RT Professional)............................................................................1090
2.10.11 Archiving functions (RT Professional)................................................................................1091
2.10.11.1 MSRTEnumBackupListPlus (RT Professional)..................................................................1091
2.10.11.2 MSRTExportPlus (RT Professional)...................................................................................1093
2.11 Functions for displaying the PLC code (RT Professional)..................................................1094
2.11.1 Display in STEP 7 (RT Professional).................................................................................1094
2.11.1.1 Basics (RT Professional)....................................................................................................1094
2.11.1.2 OpenTIAPortalProject (RT Professional)...........................................................................1095
2.11.1.3 OpenTIAPortalIECPLByCall (RT Professional)..................................................................1097
2.11.1.4 OpenTIAPortalIECPLByAssignment (RT Professional).....................................................1099
2.11.1.5 OpenTIAPortalS7GraphByBlock (RT Professional)...........................................................1101
2.11.1.6 Example: Integration in a WinCC function (RT Professional)............................................1103
2.11.2 Display in the PLC code display (RT Professional)............................................................1104
2.11.2.1 Basics (RT Professional)....................................................................................................1104
2.11.2.2 OpenViewerS7GraphByBlock (RT Professional)...............................................................1104
2.11.2.3 OpenViewerIECPLByCall (RT Professional)......................................................................1107
2.11.2.4 OpenViewerIECPLByFCCall (RT Professional).................................................................1110
2.11.2.5 OpenViewerIECPLByAssignment (RT Professional).........................................................1113
2.11.3 Error-handling (RT Professional).......................................................................................1115
2.12 Troubleshooting (RT Professional)....................................................................................1117
2.12.1 CMN_ERROR (RT Professional).......................................................................................1117
2.12.2 CCStorageError.h (RT Professional).................................................................................1118
3 VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)................................................1129
3.1 System functions (Panels, Comfort Panels, RT Advanced)...............................................1129
3.1.1 AcknowledgeAlarm (Panels, Comfort Panels, RT Advanced)...........................................1129
3.1.2 ActivatePreviousScreen (Panels, Comfort Panels, RT Advanced)....................................1129
3.1.3 ActivateScreen (Panels, Comfort Panels, RT Advanced)..................................................1130
3.1.4 ActivateScreenByNumber (Panels, Comfort Panels, RT Advanced).................................1131
3.1.5 ActivateSystemDiagnosticsView (Panels, Comfort Panels, RT Advanced).......................1132
3.1.6 ArchiveLogFile (Panels, Comfort Panels, RT Advanced)..................................................1133
3.1.7 Back up RAM file system (Panels, Comfort Panels, RT Advanced)..................................1135
3.1.8 CalibrateTouchScreen (Panels, Comfort Panels, RT Advanced)......................................1135
3.1.9 ChangeConnection (Panels, Comfort Panels, RT Advanced)...........................................1136
3.1.10 ClearAlarmBuffer (Panels, Comfort Panels, RT Advanced)...............................................1138
3.1.11 ClearAlarmBufferProtool (Panels, Comfort Panels, RT Advanced)...................................1138
3.1.12 ClearDataRecord (Panels, Comfort Panels, RT Advanced)..............................................1139
3.1.13 ClearDataRecordMemory (Panels, Comfort Panels, RT Advanced).................................1140
3.1.14 ClearLog (Panels, Comfort Panels, RT Advanced)............................................................1142
3.1.15 CloseAllLogs (Panels, Comfort Panels, RT Advanced).....................................................1142
3.1.16 ControlSmartServer (Panels, Comfort Panels, RT Advanced)..........................................1143
3.1.17 ControlWebServer (Panels, Comfort Panels, RT Advanced).............................................1144
3.1.18 CopyLog (Panels, Comfort Panels, RT Advanced)............................................................1145
3.1.19 DecreaseTag (Panels, Comfort Panels, RT Advanced).....................................................1146
3.1.20 EditAlarm (Panels, Comfort Panels, RT Advanced)...........................................................1147
3.1.21 Encode (Panels, Comfort Panels, RT Advanced)..............................................................1147
3.1.22 EncodeEx (Panels, Comfort Panels, RT Advanced)..........................................................1148
3.1.23 EstablishPROFIsafe (Panels, Comfort Panels, RT Advanced)..........................................1149
3.1.24 ExportDataRecords (Panels, Comfort Panels, RT Advanced)...........................................1150

WinCC Professional V13 SP2 – Programming reference


18 System Manual, 03/2017, Online help printout
Table of contents

3.1.25 ExportDataRecordsWithChecksum (Panels, Comfort Panels, RT Advanced)...................1152


3.1.26 ExportImportUserAdministration (Panels, Comfort Panels, RT Advanced).......................1155
3.1.27 GetBrightness (Panels, Comfort Panels, RT Advanced)...................................................1155
3.1.28 GetDataRecordFromPLC (Panels, Comfort Panels, RT Advanced)..................................1156
3.1.29 GetDataRecordName (Panels, Comfort Panels, RT Advanced)........................................1158
3.1.30 GetDataRecordTagsFromPLC (Panels, Comfort Panels, RT Advanced)..........................1159
3.1.31 GetGroupNumber (Panels, Comfort Panels, RT Advanced)..............................................1160
3.1.32 GetPassword (Panels, Comfort Panels, RT Advanced).....................................................1161
3.1.33 GetUserName (Panels, Comfort Panels, RT Advanced)...................................................1161
3.1.34 GoToEnd (Panels, Comfort Panels, RT Advanced)...........................................................1162
3.1.35 GoToHome (Panels, Comfort Panels, RT Advanced)........................................................1162
3.1.36 ImportDataRecords (Panels, Comfort Panels, RT Advanced)...........................................1163
3.1.37 ImportDataRecordsWithChecksum (Panels, Comfort Panels, RT Advanced)..................1165
3.1.38 IncreaseTag (Panels, Comfort Panels, RT Advanced)......................................................1166
3.1.39 InverseLinearScaling (Panels, Comfort Panels, RT Advanced).........................................1167
3.1.40 InvertBit (Panels, Comfort Panels, RT Advanced).............................................................1169
3.1.41 InvertBitInTag (Panels, Comfort Panels, RT Advanced)....................................................1170
3.1.42 LinearScaling (Panels, Comfort Panels, RT Advanced)....................................................1171
3.1.43 LoadDataRecord (Panels, Comfort Panels, RT Advanced)...............................................1172
3.1.44 LogOff (Panels, Comfort Panels, RT Advanced)...............................................................1173
3.1.45 Logon (Panels, Comfort Panels, RT Advanced)................................................................1174
3.1.46 LookupText (Panels, Comfort Panels, RT Advanced).......................................................1174
3.1.47 NotifyUserAction (Panels, Comfort Panels, RT Advanced)...............................................1175
3.1.48 OpenAllLogs (Panels, Comfort Panels, RT Advanced)......................................................1177
3.1.49 OpenCommandPrompt (Panels, Comfort Panels, RT Advanced).....................................1178
3.1.50 OpenControlPanel (Panels, Comfort Panels, RT Advanced).............................................1178
3.1.51 OpenInternetExplorer (Panels, Comfort Panels, RT Advanced)........................................1179
3.1.52 OpenScreenKeyboard (Panels, Comfort Panels, RT Advanced).......................................1180
3.1.53 OpenTaskManager (Panels, Comfort Panels, RT Advanced)...........................................1180
3.1.54 PageDown (Panels, Comfort Panels, RT Advanced).........................................................1181
3.1.55 PageUp (Panels, Comfort Panels, RT Advanced).............................................................1181
3.1.56 PrintReport (Panels, Comfort Panels, RT Advanced)........................................................1182
3.1.57 PrintScreen (Panels, Comfort Panels, RT Advanced).......................................................1183
3.1.58 ResetBit (Panels, Comfort Panels, RT Advanced).............................................................1184
3.1.59 ResetBitInTag (Panels, Comfort Panels, RT Advanced)...................................................1184
3.1.60 SafelyRemoveHardware (Panels, Comfort Panels)...........................................................1186
3.1.61 SaveDataRecord (Panels, Comfort Panels, RT Advanced)...............................................1186
3.1.62 SendEMail (Panels, Comfort Panels, RT Advanced).........................................................1188
3.1.63 SetAcousticSignal (Panels, Comfort Panels, RT Advanced).............................................1189
3.1.64 SetAlarmReportMode (Panels, Comfort Panels, RT Advanced)........................................1189
3.1.65 SetAndGetBrightness (Panels, Comfort Panels, RT Advanced)........................................1190
3.1.66 SetBit (Panels, Comfort Panels, RT Advanced).................................................................1191
3.1.67 SetBitInTag (Panels, Comfort Panels, RT Advanced).......................................................1192
3.1.68 SetBrightness (Panels, Comfort Panels, RT Advanced)....................................................1193
3.1.69 SetConnectionMode (Panels, Comfort Panels, RT Advanced)..........................................1194
3.1.70 SetDataRecordTagsToPLC (Panels, Comfort Panels, RT Advanced)..............................1195
3.1.71 SetDataRecordToPLC (Panels, Comfort Panels, RT Advanced)......................................1196
3.1.72 SetDaylightSavingTime (Panels, Comfort Panels, RT Advanced).....................................1197
3.1.73 SetDeviceMode (Panels, Comfort Panels, RT Advanced).................................................1198
3.1.74 SetDisplayMode (Panels, Comfort Panels, RT Advanced)................................................1198
3.1.75 SetLanguage (Panels, Comfort Panels, RT Advanced).....................................................1199
3.1.76 SetPLCDateTime (Panels, Comfort Panels, RT Advanced)..............................................1200

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 19
Table of contents

3.1.77 SetRecipeTags (Panels, Comfort Panels, RT Advanced)..................................................1201


3.1.78 SetScreenKeyboardMode (Panels, Comfort Panels, RT Advanced).................................1202
3.1.79 SetTag (Panels, Comfort Panels, RT Advanced)...............................................................1203
3.1.80 ShiftAndMask (Panels, Comfort Panels, RT Advanced)....................................................1204
3.1.81 ShowAlarmWindow (Panels, Comfort Panels, RT Advanced)...........................................1206
3.1.82 ShowOperatorNotes (Panels, Comfort Panels, RT Advanced)..........................................1207
3.1.83 ShowPopUpScreen (Panels, Comfort Panels, RT Advanced)...........................................1208
3.1.84 ShowSlideInScreen (Panels, Comfort Panels, RT Advanced)...........................................1208
3.1.85 ShowSoftwareVersion (Panels, Comfort Panels, RT Advanced).......................................1209
3.1.86 ShowSystemAlarm (Panels, Comfort Panels, RT Advanced)............................................1210
3.1.87 ShowSystemDiagnosticsWindow (Panels, Comfort Panels)..............................................1210
3.1.88 StartLogging (Panels, Comfort Panels, RT Advanced)......................................................1211
3.1.89 StartNextLog (Panels, Comfort Panels, RT Advanced).....................................................1212
3.1.90 StartProgram (Panels, Comfort Panels, RT Advanced).....................................................1212
3.1.91 StopLogging (Panels, Comfort Panels, RT Advanced)......................................................1214
3.1.92 StopRuntime (Panels, Comfort Panels, RT Advanced).....................................................1215
3.1.93 TerminatePROFIsafe (Panels, Comfort Panels, RT Advanced)........................................1216
3.1.94 WinACMPGetVersion (Panels, Comfort Panels)...............................................................1216
3.1.95 WinACMPSetStartAtBoot (Panels, Comfort Panels)..........................................................1217
3.1.96 WinACSetStartMode (Panels, Comfort Panels)................................................................1218
3.2 System functions (RT Professional)...................................................................................1218
3.2.1 ActivateScreen (RT Professional)......................................................................................1218
3.2.2 ActivateScreenInScreenWindow (RT Professional)...........................................................1220
3.2.3 DecreaseTag (RT Professional).........................................................................................1221
3.2.4 ExportImportUserAdministration (RT Professional)...........................................................1222
3.2.5 IncreaseTag (RT Professional)..........................................................................................1223
3.2.6 InverseLinearScaling (RT Professional).............................................................................1224
3.2.7 InvertBit (RT Professional).................................................................................................1226
3.2.8 InvertBitInTag (RT Professional)........................................................................................1227
3.2.9 LinearScaling (RT Professional)........................................................................................1228
3.2.10 ResetBit (RT Professional).................................................................................................1229
3.2.11 ResetBitInTag (RT Professional).......................................................................................1230
3.2.12 SetBit (RT Professional)....................................................................................................1231
3.2.13 SetBitInTag (RT Professional)...........................................................................................1232
3.2.14 SetPropertyByConstant (RT Professional).........................................................................1234
3.2.15 SetPropertyByProperty (RT Professional).........................................................................1235
3.2.16 SetPropertyByTag (RT Professional).................................................................................1237
3.2.17 SetPropertyByTagIndirect (RT Professional).....................................................................1238
3.2.18 SetTag (RT Professional)...................................................................................................1240
3.2.19 SetTagByProperty (RT Professional).................................................................................1241
3.2.20 SetTagByTagIndirect (RT Professional)............................................................................1242
3.2.21 SetTagIndirect (RT Professional).......................................................................................1243
3.2.22 SetTagIndirectByProperty (RT Professional).....................................................................1244
3.2.23 SetTagIndirectByTagIndirect (RT Professional).................................................................1245
3.2.24 SetTagIndirectWithOperatorInputAlarm (RT Professional)................................................1246
3.2.25 SetTagWithOperatorEvent (RT Professional)....................................................................1247
3.2.26 ShowLogonDialog (RT Professional).................................................................................1248
3.2.27 StopRuntime (RT Professional).........................................................................................1248
3.3 VBScript for Windows (Panels, Comfort Panels, RT Advanced, RT Professional)............1249
3.3.1 VBScript for Windows (Panels, Comfort Panels, RT Advanced, RT Professional)............1249
3.4 VBScript for Windows CE (Panels, Comfort Panels).........................................................1250

WinCC Professional V13 SP2 – Programming reference


20 System Manual, 03/2017, Online help printout
Table of contents

3.4.1 VBScript for Windows CE (Panels, Comfort Panels).........................................................1250


3.4.1.1 Attr (Panels, Comfort Panels)............................................................................................1250
3.4.1.2 Close (Panels, Comfort Panels).........................................................................................1251
3.4.1.3 CreateObject (Panels, Comfort Panels).............................................................................1251
3.4.1.4 Dir (Panels, Comfort Panels).............................................................................................1252
3.4.1.5 EOF (Panels, Comfort Panels)...........................................................................................1253
3.4.1.6 FileCopy (Panels, Comfort Panels)....................................................................................1254
3.4.1.7 FileLen (Panels, Comfort Panels)......................................................................................1254
3.4.1.8 FileDateTime (Panels, Comfort Panels).............................................................................1255
3.4.1.9 Get (Panels, Comfort Panels)............................................................................................1256
3.4.1.10 GetAttr (Panels, Comfort Panels).......................................................................................1257
3.4.1.11 Input (Panels, Comfort Panels)..........................................................................................1258
3.4.1.12 InputFields (Panels, Comfort Panels)................................................................................1259
3.4.1.13 InputB (Panels, Comfort Panels)........................................................................................1260
3.4.1.14 Kill (Panels, Comfort Panels).............................................................................................1260
3.4.1.15 LineInputString (Panels, Comfort Panels)..........................................................................1261
3.4.1.16 LinePrint (Panels, Comfort Panels)....................................................................................1262
3.4.1.17 Loc (Panels, Comfort Panels)............................................................................................1262
3.4.1.18 LOF (Panels, Comfort Panels)...........................................................................................1263
3.4.1.19 MkDir (Panels, Comfort Panels).........................................................................................1263
3.4.1.20 MoveFile (Panels, Comfort Panels)...................................................................................1264
3.4.1.21 Open (Panels, Comfort Panels).........................................................................................1265
3.4.1.22 Put (Panels, Comfort Panels).............................................................................................1266
3.4.1.23 RmDir (Panels, Comfort Panels)........................................................................................1267
3.4.1.24 Seek (Panels, Comfort Panels)..........................................................................................1267
3.4.1.25 SetAttr (Panels, Comfort Panels).......................................................................................1268
3.4.1.26 WriteFields (Panels, Comfort Panels)................................................................................1269
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)..................1271
3.5.1 VBS object model (RT Professional)..................................................................................1271
3.5.2 Objects (Panels, Comfort Panels, RT Advanced)..............................................................1273
3.5.2.1 HMIRuntime (Panels, Comfort Panels, RT Advanced)......................................................1273
3.5.2.2 Screen object (list) (Panels, Comfort Panels, RT Advanced)............................................1274
3.5.2.3 Screen (Panels, Comfort Panels, RT Advanced)...............................................................1276
3.5.2.4 ScreenItem (Panels, Comfort Panels, RT Advanced)........................................................1277
3.5.2.5 ScreenItems (Panels, Comfort Panels, RT Advanced)......................................................1279
3.5.2.6 SmartTags (Panels, Comfort Panels, RT Advanced).........................................................1280
3.5.2.7 SmartTag (Panels, Comfort Panels, RT Advanced)..........................................................1281
3.5.3 Objects (RT Professional)..................................................................................................1283
3.5.3.1 Alarm (RT Professional).....................................................................................................1283
3.5.3.2 Alarms (list) (RT Professional)...........................................................................................1284
3.5.3.3 AlarmLogs (list) (RT Professional).....................................................................................1285
3.5.3.4 DataItem (RT Professional)................................................................................................1287
3.5.3.5 DataLogs (list) (RT Professional).......................................................................................1288
3.5.3.6 DataSet (list) (RT Professional).........................................................................................1290
3.5.3.7 HMIRuntime (RT Professional).........................................................................................1292
3.5.3.8 Item (RT Professional).......................................................................................................1293
3.5.3.9 Layer (RT Professional).....................................................................................................1294
3.5.3.10 Layers (list) (RT Professional)...........................................................................................1296
3.5.3.11 Logging (RT Professional).................................................................................................1297
3.5.3.12 Project (RT Professional)...................................................................................................1298
3.5.3.13 Screen (RT Professional)...................................................................................................1299
3.5.3.14 ScreenItem (RT Professional)............................................................................................1302

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 21
Table of contents

3.5.3.15 ScreenItems (list) (RT Professional)..................................................................................1304


3.5.3.16 Screen object (list) (RT Professional)................................................................................1306
3.5.3.17 SmartTag (RT Professional)..............................................................................................1307
3.5.3.18 SmartTags (RT Professional).............................................................................................1309
3.5.3.19 Tag (RT Professional)........................................................................................................1310
3.5.3.20 Tags (list) (RT Professional)..............................................................................................1313
3.5.3.21 TagSet (list) (RT Professional)..........................................................................................1314
3.5.4 Object types (Panels, Comfort Panels, RT Advanced, RT Professional)...........................1316
3.5.4.1 Objects A-I (Panels, Comfort Panels, RT Advanced, RT Professional).............................1316
3.5.4.2 Objects K-Z (Panels, Comfort Panels, RT Advanced, RT Professional)............................1398
3.5.5 Properties (Panels, Comfort Panels, RT Advanced, RT Professional)..............................1516
3.5.5.1 Properties A (Panels, Comfort Panels, RT Advanced, RT Professional)...........................1516
3.5.5.2 Properties B (Panels, Comfort Panels, RT Advanced, RT Professional)...........................1543
3.5.5.3 Properties C (Panels, Comfort Panels, RT Advanced, RT Professional)...........................1578
3.5.5.4 Properties D (Panels, Comfort Panels, RT Advanced, RT Professional)...........................1602
3.5.5.5 Properties E-F (Panels, Comfort Panels, RT Advanced, RT Professional).......................1612
3.5.5.6 Properties G-H (Panels, Comfort Panels, RT Advanced, RT Professional).......................1646
3.5.5.7 Properties I-J (Panels, Comfort Panels, RT Advanced, RT Professional).........................1666
3.5.5.8 Properties K-L (Panels, Comfort Panels, RT Advanced, RT Professional)........................1671
3.5.5.9 Properties M-N (Panels, Comfort Panels, RT Advanced, RT Professional)......................1696
3.5.5.10 Properties O-P (Panels, Comfort Panels, RT Advanced, RT Professional).......................1722
3.5.5.11 Properties Q-R (Panels, Comfort Panels, RT Advanced, RT Professional).......................1748
3.5.5.12 Properties S (Panels, Comfort Panels, RT Advanced, RT Professional)...........................1760
3.5.5.13 Properties T (Panels, Comfort Panels, RT Advanced, RT Professional)...........................1816
3.5.5.14 Properties U-W (Panels, Comfort Panels, RT Advanced, RT Professional)......................1913
3.5.5.15 Properties X-Z (Panels, Comfort Panels, RT Advanced, RT Professional).......................1951
3.5.6 Methods (Panels, Comfort Panels, RT Advanced, RT Professional).................................2116
3.5.6.1 Methods A-G (Panels, Comfort Panels, RT Advanced, RT Professional).........................2116
3.5.6.2 Methods H-R (Panels, Comfort Panels, RT Advanced, RT Professional).........................2181
3.5.6.3 Methods S-Z (Panels, Comfort Panels, RT Advanced, RT Professional)..........................2209
Index.......................................................................................................................................................2237

WinCC Professional V13 SP2 – Programming reference


22 System Manual, 03/2017, Online help printout
C scripting (RT Professional) 1
1.1 System functions (RT Professional)

1.1.1 ActivateNextScreen (RT Professional)

Description
WinCC saves the names of the screens opened by the user during runtime as well as the
sequence in which these screens were opened.
Can only be used in C scripting.
The maximum size of the screen buffer is specified in the "Runtime settings > Screens > Screen
buffer" editor.
The ActivateNextScreen system function now opens the screen that was opened before the
last call of ActivatePreviousScreen.

Syntax
BOOL ActivateNextScreen();

Return value

TRUE
System function completed without errors.

FALSE
An error has occurred.

Example
The ActivateNextScreen function is used in the following program code to call the next screen
and to save the return value to the b_error tag.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 23
C scripting (RT Professional)
1.1 System functions (RT Professional)

The saved return value can be processed in the following code.

{
BOOL b_error;

//Open next screen


b_error = ActivateNextScreen();

if(b_error)
{
// User defined code if
// function succeeds without error
...
}
else
{
// User defined code in case of error
...
}
...
}

1.1.2 ActivatePreviousScreen (RT Professional)

Description
WinCC saves the names of the screens opened by the user during runtime as well as the
sequence in which these screens were opened.
The system function can be used in C scripting only.
The maximum size of the screen buffer is specified in the "Runtime settings > Screens > Screen
buffer" editor.
The ActivatePreviousScreen system function now opens the screen which was open before
the currently open screen.

Syntax
BOOL ActivatePreviousScreen();

Return value

TRUE
System function completed without errors.

FALSE
An error has occurred.

WinCC Professional V13 SP2 – Programming reference


24 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The ActivatePreviousScreen function is used in the following program code to call the previous
screen and to save the return value to the b_error tag.
The saved return value can be processed in the following code.

{
BOOL b_error;

//Open previous screen


b_error = ActivatePreviousScreen();

if(b_error)
{
// User defined code if
// function succeeds without error
...
}
else
{
// User defined code in case of error
...
}
...
}

1.1.3 ActivateScreen (RT Professional)

Description
Performs a screen change to the given screen.
Use the "ActivateScreenByNumber" system function to change from the root screen to the
permanent window or vice versa.

Use in the function list


ActivateScreen (Screen name, Object number)

Use in user-defined functions


ActivateScreen (Screen_name, Object_number)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 25
C scripting (RT Professional)
1.1 System functions (RT Professional)

Parameters

Screen name
Name of the screen to which you change.

Object number
The operator control element which receives the focus in the given screen after the screen
change. The number of the operator control element is to be determined using the tabulator
sequence during configuration.
When "0" is specified:
● If the focus is in the permanent window when the system function is called up, the
permanent window maintains the focus.
● If the focus is in the root screen when the system function is called up, the first operator
control element in the given screen receives the focus.
Note
If the "Reach margin" event is assigned to the "ActivateScreen" system function, only the
value "0" is valid for the "Object number" parameter. The active object is not defined by the
object number, but rather by the X position it had prior to the screen change.

Example
The ActivateScreen function is used in the following program code to activate the "Screen_2"
screen when you click a button.

// User defined code


// i.e. when pressing a button
ActivateScreen ("Screen_2", 0);
...
}

1.1.4 ActivateScreenInScreenWindow (RT Professional)

Description
Performs a screen change to the specified screen in a specified screen window.

Use in the function list


ActivateScreenInScreenWindow (Screen name, Screen window, New screen name)

WinCC Professional V13 SP2 – Programming reference


26 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Use in user-defined functions


ActivateScreenInScreenWindow (Screen_name, Screen_window, New_screen_name)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

Parameters

Screen name
Name of the screen to be displayed in the screen window.

Screen window
Name of the screen window in which the new screen is to be displayed.

New screen name


Name of the new screen to be displayed in the screen window.

Example
The ActivateScreenInScreenWindow function is used in the following program code to activate
the "Screen_2" screen when you click a button.

{
// User defined code
// i.e. when pressing a button
ActivateScreenInScreenWindow (GetParentScreen(screenName),
GetParentScreenWindow(screenName), "Screen_2");
...
}

1.1.5 ActivateStartScreen (RT Professional)

Description
Opens the configured start screen.
Can only be used in C scripting.

Syntax
BOOL ActivateStartScreen();

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 27
C scripting (RT Professional)
1.1 System functions (RT Professional)

Return value

TRUE
System function completed without errors.

FALSE
An error has occurred.

Example
The ActivateStartScreen function is used in the following program code to call the configured
start screen and to save the return value to the b_error tag.
The saved return value can be processed in the following code.

{
BOOL b_error;

//Open start screen


b_error = ActivateStartScreen();

if(b_error)
{
// User defined code if
// function succeeds without error
...
}
else
{
// User defined code in case of error
...
}
...
}

1.1.6 ActivateStoredScreen (RT Professional)

Description
Opens the screen saved with the StoreScreen system function.
Can only be used in C scripting.

Syntax
BOOL ActivateStoredScreen();

WinCC Professional V13 SP2 – Programming reference


28 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Return value

TRUE
System function completed without errors.

FALSE
An error has occurred.

Example
The ActivateStoredScreen function is used in the following program code to call the stored
screen and to save the return value to the b_error tag.
The saved return value can be processed in the following code.

{
BOOL b_error;

//Open stored screen


b_error = ActivateStoredScreen();

if(b_error)
{
// User defined code if
// function succeeds without error
...
}
else
{
// User defined code in case of error
...
}
...
}

See also
StoreScreen (Page 126)

1.1.7 DecreaseTag (RT Professional)

Description
Subtracts the given value from the tag value.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 29
C scripting (RT Professional)
1.1 System functions (RT Professional)

X=X-a

Note
The system function uses the same tag as input and output values. When this system function
is used to convert a value, auxiliary tags must be used. You can use the "SetTag" system
function to assign the tag value to the auxiliary tags.

If you configure the system function for events of an alarm and the tag is not being used in the
current screen, it is not ensured that the actual tag value is being used in the PLC. You can
improve the situation by setting the "Cyclic continuous" acquisition mode.

Use in the function list


DecreaseTag (Tag, Value)

Use in user-defined functions


DecreaseTag (Tag, Value)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

Parameters

Tag
The tag from which the given value is subtracted.

Value
The value which is subtracted.

WinCC Professional V13 SP2 – Programming reference


30 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code decrements the value at the varX tag by the value at the value
tag. The value entered is saved to the old_value tag and output along with the new varX value.

{
BYTE varX;
BYTE value;

//user input
...
BYTE old_value = varX;

//Decrease tag
DecreaseTag(varX, value);

//print original value and function result


printf ("User input: %i\r\n, Result of function DecreaseTag: %i\r\n", old_value, varX);
...
}

1.1.8 GetLocalScreen (RT Professional)

Description
Returns a pointer to the screen name.
Can only be used in C scripting.

Syntax
char* GetLocalScreen(char* Screen name);

Parameters

Screen name
Pointer to the name of the screen.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 31
C scripting (RT Professional)
1.1 System functions (RT Professional)

Return value
Pointer to the name of the screen.

Note
The syntax of the transferred call parameter Screen name must correspond to that formed by
the graphics system for the screen paths:
<Screen_name>.<Screen_window_name>:<Screen_name>.<Screen_window_name>:<Scre
en_name>...

Principle
A "Screen_A" contains a "Screen_window_B". Another screen is called in the screen window
and visualized as minimized image, etc.

Calling screens in the screen windows


1. "Screen_window_B" displays "Screen_C".
"Screen_C" contains "Screen_window_D".
2. "Screen_window_D" displays "Screen_E".

Pointer to the screen name


returns system function GetLocalScreen(Screen name) in the next step with the following
values:
● "Screen_E", if the system function is called in "Screen_E"
● "Screen_C", if the system function is called in "Screen_C"
● "Screen_A", if the system function is called in "Screen_A"

WinCC Professional V13 SP2 – Programming reference


32 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code saves the return value of the function GetLocalScreen to the
pszScrName tag. If the return value is valid (not NULL), it is saved with maximum_MAX_PATH
characters to the szScrName tag.

{
char* pszScrName = NULL;
char szScrName[_MAX_PATH+1];

//Get the Local Screen


pszScrName = GetLocalScreen(lpszScreenName);

//Copy the string


if (pszScrName != NULL)
{
strncpy(szScrName,pszScrName,_MAX_PATH);
// print local screen name
printf ("Local screen name: %s\r\n", szScrName);
}
...
}

1.1.9 GetLinkedTag (RT Professional)

Description
Returns the name of the tag which is logically linked to the specified object property.
Can only be used in C scripting.

Syntax
char* GetLinkedTag(char* Screen Name, char* Object, char* Name of Property);

Parameters

Screen Name
Pointer to the name of the screen.

Object
Pointer to the name of the object.

Name of Property
Pointer to the name of the object property.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 33
C scripting (RT Professional)
1.1 System functions (RT Professional)

Return value
Pointer to the name of the tag which is logically linked to the specified object property.

Example
The following program code reads a tag link and fills the transferred linkinfo structure with
information from the tag link.

{
LINKINFO linkinfo;

//Get the linked Tag


GetLinkedTag(lpszScreenName,"Bar1","Process",&linkinfo);

// linkinfo.szLinkName is the tag name


// linkinfo.dwCycle is the update cycle
// linkinfo.LinkType is the type of the connection

//User defined code where the


//user can do something with the returnvalue
...
}

The saved return value can be processed in the following code.

1.1.10 GetLanguageByLocaleID (RT Professional)

Description
Determines the current Runtime language.
Can only be used in C scripting.

Syntax
DWORD GetLanguageByLocaleID ();

Return value
Language ID.
The following assignments apply (hexadecimal language code):

Symbolic name Value(hexadecimal) Abbreviation


LANG_ARABIC 0x0401
LANG_AFRIKAANS 0x0436
LANG_ALBANIAN 0x041C

WinCC Professional V13 SP2 – Programming reference


34 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Symbolic name Value(hexadecimal) Abbreviation


LANG_BASQUE 0x042D
LANG_BULGARIAN 0x0402
LANG_BYELORUSSIAN 0x0423
LANG_CATALAN 0x0403
LANG_CHINESE 0x0804
LANG_CROATIAN 0x041A
LANG_CZECH 0x0405 CSY
LANG_DANISH 0x0406 DAN
LANG_DUTCH 0x0413 NLD
LANG_ENGLISH 0x0409 ENU
LANG_ESTONIAN 0x0425
LANG_FAEROESE 0x0438
LANG_FARSI 0x0429
LANG_FINNISH 0x040B FIN
LANG_FRENCH 0x040C FRA
LANG_GERMAN 0x0407 DEU
LANG_GREEK 0x0408
LANG_HEBREW 0x040D
LANG_HUNGARIAN 0x040E HUN
LANG_ICELANDIC 0x040F ISL
LANG_INDONESIAN 0x0421
LANG_ITALIAN 0x0410 ITA
LANG_JAPANESE 0x0411
LANG_KOREAN 0x0412
LANG_LATVIAN 0x0426
LANG_LITHUANIAN 0x0427
LANG_NORWEGIAN 0x0414 NOR
LANG_POLISH 0x0415 PLK
LANG_PORTUGUESE 0x0416 PTB
LANG_ROMANIAN 0x0418
LANG_RUSSIAN 0x0419 RUS
LANG_SLOVAK 0x041B SKY
LANG_SLOVENIAN 0x0424
LANG_SORBIAN 0x042E
LANG_SPANISH 0x040A ESP
LANG_SWEDISH 0x041D SVE
LANG_THAI 0x041E
LANG_TURKISH 0x041F TRK
LANG_UKRAINIAN 0x0422

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 35
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code reads out the current Runtime language and saves the return
value in the rt_language tag.
The saved return value can be processed in the following code (in this case, with printf output).

{
DWORD rt_language;

//Get the current language


rt_language = GetLanguageByLocaleID ();

//print language code


printf ("Language code: %d\r\n", rt_language);
...
}

1.1.11 GetParentScreen (RT Professional)

Description
Returns a pointer to the screen name.
Can only be used in C scripting.

Syntax
char* GetParentScreen(char* Screen name);

Parameters

Screen name
Pointer to the name of the screen.

Return value
Name of the current screen if the system function is called in a screen.

WinCC Professional V13 SP2 – Programming reference


36 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Name path of the higher-level screen if the system function is called in a screen window.

Note
The syntax of the transferred call parameter Screen name must correspond to that formed by
the graphics system for the screen paths:
<Screen_name>.<Screen_window_name>:<Screen_name>.<Screen_window_name>:<Scre
en_name>...
The characters ":" and "." are used exclusively for the syntax. In names, only "-" and "_" should
therefore be used as separators.

Example
The following program code saves the return value of function GetParentScreen to the
pszScrName tag. If the return value is valid (not NULL), it is saved with maximum_MAX_PATH
characters to the szScrName tag.

{
char* pszScrName = NULL;
char szScrName[_MAX_PATH+1];

//Get the Parent Screen


pszScrName = GetParentScreen(lpszScreenName);

//Copy the string


if (pszScrName != NULL)
{
strncpy(szScrName,pszScrName,_MAX_PATH);
// print Screen name
printf ("Screen name: %s\r\n", szScrName);
}
...
}

1.1.12 GetParentScreenWindow (RT Professional)

Description
Provides a pointer to the name of the screen window.
Can only be used in C scripting.

Syntax
char* GetParentScreenWindow(char* Screen name);

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 37
C scripting (RT Professional)
1.1 System functions (RT Professional)

Parameters

Screen name
Pointer to the name of the screen.

Return value
Pointer to the name of the screen window if the system function is called in a screen which is
displayed in the screen window of a parent screen.
The unchanged call parameter "Screen name" if the system function is called in a screen.

Note
The syntax of the transferred call parameter Screen name must correspond to that formed by
the graphics system for the screen paths:
<Screen_name>.<Screen_window_name>:<Screen_name>.<Screen_window_name>:<Scre
en_name>...
The characters ":" and "." are used exclusively for the syntax. In names, only "-" and "_" should
therefore be used as separators.

Principle
"Screen_1" contains a "Screen_window_1". Another screen is called in the screen window and
visualized as minimized image, etc.

Calling screens in the screen windows


1. "Screen_window_1" displays "Screen_2".
"Screen_2" contains "Screen_window_2".
2. "Screen_window_2" displays "Screen_3".

Pointer to the screen window name


returns system function GetParentScreenWindow(Screen name) in the next step with
the following values:
● "Screen_2", if the system function is called in "Screen_3"
● "Screen_window_1", if the system function is called in "Screen_2"
● "Screen_1", if the system function is called in "Screen_1".

WinCC Professional V13 SP2 – Programming reference


38 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code saves the return value of the function GetParentScreenWindow
to the pszScrName tag. If the return value is valid (not NULL), it is saved with
maximum_MAX_PATH characters to the szScrName tag.

{
char* pszScrName = NULL;
char szScrName[_MAX_PATH+1];

//Get the Parent Screen Window


pszScrName = GetParentScreenWindow(lpszScreenName);

//Copy the string


if (pszScrName != NULL)
{
strncpy(szScrName,pszScrName,_MAX_PATH);
// print name of the parent screen window
printf ("Parent screen window: %s\r\n", szScrName);
}
...
}

1.1.13 GetProp (RT Professional)

1.1.13.1 GetPropBOOL (RT Professional)

Description
Returns the current status of a property of data type "BOOL".
Can only be used in C scripting.

Syntax
BOOL GetPropBOOL(LPCTSTR Screen name, LPCTSTR Object, LPCTSTR Name of the
property)

Parameters

Screen name
Screen name

Object
Object name You must set the parameter Object = NULL if the function call relates to a screen
object property.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 39
C scripting (RT Professional)
1.1 System functions (RT Professional)

Name of the Property


Name of the object property

Return value

TRUE
System function completed without errors.

FALSE
An error has occurred.

Example
The following program code reads out whether the object is visible or not. The value is saved
to the b_error tag.

{
BOOL b_error;

//Get the property Visible


b_error = GetPropBOOL("gs_graph_iofield","IOField1","Visible");

if(b_error)
{
// User defined code if the
// object is visible
...
}
else
{
// User defined code if the
// object is not visible
...
}
}

A specific code is processed, depending on the return value.

1.1.13.2 GetPropChar (RT Professional)

Description
Returns the value of a property of data type "Char".
Can only be used in C scripting.

WinCC Professional V13 SP2 – Programming reference


40 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Syntax
Char* GetPropChar(LPCTSTR Screen name, LPCTSTR Object, LPCTSTR Name of the
property)

Parameters

Screen name
Screen name

Object
Object name You must set the parameter Object = NULL if the function call relates to a screen
object property.

Name of the Property


Name of the object property

Return value
Value of the property in data type "Char".

Example
The following program code reads the tooltip text from the object using the GetPropChar
function and processes it as follows:
1. Saves the return value in the pszProp tag
2. Validation of the return value: Step 3 follows if the value is valid (not NULL).
3. The first 13 characters of the character sequence are saved in the szProp tag.

{
char* pszProp = NULL;
char szProp[14];

//Get the property Tooltiptext


pszProp = GetPropChar("lpszScreenName","IOField1","Tooltiptext");

if(pszProp != NULL)
{
//Copy the string and trim
strncpy(szProp,pszProp,13);
// print trimmed string
printf ("Short description of tooltip: %s\r\n", szProp);
}
...
}

The saved return value can be processed in the following code.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 41
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.13.3 GetPropDouble (RT Professional)

Description
Returns the value of a property of data type "Double".
Can only be used in C scripting.

Syntax
double GetPropDouble(LPCTSTR Screen name, LPCTSTR Object, LPCTSTR Name of the
property)

Parameters

Screen name
Screen name

Object
Object name You must set the parameter Object = NULL if the function call relates to a screen
object property.

Name of the Property


Name of the object property

Return value
Value of the property in data type "Double".

Example
The following program code reads the "BackColor" property (background color of the
"Button_1" object) by means of GetPropDouble function and processes the return value as
follows:
1. Saving the return value to the szprop tag
2. Validation of the return value: Step 3 follows if the value is valid (not NULL).
3. Output of the background color

WinCC Professional V13 SP2 – Programming reference


42 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

{
double szProp = NULL;

//Get the property of the IO Field 1


szprop = GetPropDouble("Screen_1","Button_1","BackColor");

if(szProp != NULL)
{
// print output value
printf ("Background color: %s\r\n", szProp);}
}
...
}

1.1.13.4 GetPropLong (RT Professional)

Description
Returns the status of a property of data type "long".
Can only be used in C scripting.

Syntax
long GetPropLong(LPCTSTR Screen name, LPCTSTR Object, LPCTSTR Name of the
property)

Parameters

Screen name
Screen name

Object
Object name You must set the parameter Object = NULL if the function call relates to a screen
object property.

Name of the Property


Name of the object property

Return value
Value of the property in data type "long".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 43
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code reads the CaptionBackColor property (background color of the
TemperatureField object) by means of GetPropLong function and processes the return value
as follows:
1. Saving the return value to the szProp tag
2. Validation of the return value: Step 3 follows if the value is valid (not NULL).
3. Output

{
long szProp = NULL;

//Get the property Tooltiptext


szProp = GetPropLong("Screen_1","TemperatureField","CaptionBackColor");

if(szProp != NULL)
{
// print caption
printf ("Caption of window: %d\r\n", szProp);
}
...
}

The saved return value can be processed in the following code.

1.1.14 GetServerTagPrefix (RT Professional)

Description
In order for a WinCC client in a distributed system to access tags of the associated server, the
tag names must be expanded to include the server prefix.

Note
This system function is not supported at present.

A pointer of type "char" to server prefix, tag prefix, and window prefix is returned in each case.
The user is not permitted to change the memory (including no strcat) or release it.
Can only be used in C scripting.

Syntax
void GetServerTagPrefix (char** ppszServerPrefix, char** ppszTagPrefix, char**
ppszWindowPrefix);

WinCC Professional V13 SP2 – Programming reference


44 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Return value

ppszServerPrefix
Pointer to a pointer that references the server prefix

ppszTagPrefix
Pointer to a pointer that references the tag prefix

ppszWindowPrefix
Pointer to a pointer that references the window prefix

Example
The following program code retrieves the server prefix, tag prefix and window prefix checks
their validity. If an error occurs, a text is output and the function is exited. If the check is
successful a tag name is created and returned. Processing is executed as follows:
1. Declaration of pointer pszServerPrefix, pszTagPrefix and pszWindowPrefix for the three
prefixes
2. Initialization of the nServerPrefixLen, nTagPrefixLen and nTagLen tags
They serve as a buffer for the string length of the prefixes to be read out.
3. Initialization of the myTagName tag
4. Reading out of server prefix, tag prefix and window prefix
5. Case distinction: Server prefix
– No server prefix returned: a text is output and the function is exited.
– Server prefix returned: Its length is determined and saved in the nServerPrefixLen tag.
6. If a tag prefix is returned, its length is determined and saved in the nTagPrefixLen tag.
7. Determines the length of the tag name and saves it in the nTagLen tag.
8. Case distinction: Permissible length for tag name
– Permissible length exceeded: a text is output and the function is exited.
– Permissible length not exceeded: The tag name required for a client environment is
compiled.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 45
C scripting (RT Professional)
1.1 System functions (RT Professional)

{
char* pszServerPrefix;
char* pszTagPrefix;
char* pszWindowPrefix;
int nServerPrefixLen = 0;
int nTagPrefixLen = 0;
int nTagLen = 0;
char myTagName[MAX_DM_VAR_NAME+1];

//Initialize the return value


memset(myTagName,0,MAX_DM_VAR_NAME + 1);

//Get the serverprefix the tagprefix and the windowprefix


GetServerTagPrefix(&pszServerPrefix, &pszTagPrefix, &pszWindowPrefix);

//If a serverprefix exists


if (pszServerPrefix)
{
//Get the length of the string
nServerPrefixLen = strlen(pszServerPrefix);
}
Else
{
printf("No server prefix was returned.");
return;
}

//If a tagprefix exists


if (pszTagPrefix)
{
//Get the length of the string
nTagPrefixLen = strlen(pszTagPrefix);
}

//Get the length of the tag


nTagLen = strlen("TagName");

//Check if the lenght of the


//ServerPrefix+TagPrefix+VarName + the double points < MAX_DM_VAR_NAME)
if (nServerPrefixLen + nTagPrefixLen + nTagLen+2 < MAX_DM_VAR_NAME)
{
sprintf(myTagName,"%s::%s%s",pszServerPrefix,pszTagPrefix,"TagName");
//User defined code where the
//user can do something with the returnvalue
...
}
Else
{
printf("The resulting string is too long.");
return;
}
}

WinCC Professional V13 SP2 – Programming reference


46 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.15 GetTag (RT Professional)

1.1.15.1 GetTag functions (RT Professional)

Description
The GetTagXXX function calculates the value of a tag of the specified data type.
Can only be used in C scripting:
The following table shows the different GetTag functions for reading the tag value:

Type Function name Parameter PLC data type HMI data


type
BOOL GetTagBit Tag Tag_Name Binary tag Bool
BYTE GetTagByte Tag Tag_Name Unsigned 8-bit USInt
char* GetTagChar Tag Tag_Name Text tag 8-bit or String or
text tag 16-bit WString

SYSTEM‐ GetTagDateTime Tag Tag_Name DTL DateTime


TIME
double GetTagDouble Tag Tag_Name Floating point 64-bit LReal
DWORD GetTagDWord Tag Tag_Name Unsigned 32-bit UDInt
float GetTagFloat Tag Tag_Name Floating point 32-bit Real
BOOL GetTagRaw Tag Tag_Name, Raw data type Raw
BYTE* pValue,
DWORD size
signed char GetTagSByte Tag Tag_Name Signed 8-bit SInt
long int GetTagSDWord Tag Tag_Name Signed 32-bit DInt
short int GetTagSWord Tag Tag_Name Signed 16-bit Int
WORD GetTagWord Tag Tag_Name Unsigned 16-bit UInt

Syntax
<Type><FunctionName><(Parameter)>;
Example: BYTE GetTagByte (Tag Tag_Name);

Parameter

Tag_Name
Tag name

pValue
Pointer to a byte field containing the value of the raw data tags.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 47
C scripting (RT Professional)
1.1 System functions (RT Professional)

size
Length of the byte field in bytes

Return value
Value of the tags in the specified type.
System function "GetTagChar" returns a pointer to a string that contains the tag value.
System function "GetTagRaw" returns TRUE or FALSE:
TRUE: System function completed without errors.
FALSE: An error has occurred.

Example
The following program code uses the GetTagByte function to read out the value of the
gs_tag_byte tag and saves it to the bvalue tag.

{
BYTE bvalue;

//Get the current value of the tag


bvalue = GetTagByte("gs_tag_byte");

// print value
printf ("Value of gs_tag_byte: %d\r\n", bvalue);
...
}

The saved return value can be processed in the following code.

1.1.15.2 GetTagDateTime function (RT Professional)

Function
Determines the value of a tag of data type "Date/Time".

Syntax
SYSTEMTIME GetTagDateTime(Tag Tag_Name);

Parameter

Tag_Name
Name of the tag

WinCC Professional V13 SP2 – Programming reference


48 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Return value
Value of the tag in the data type "Date/Time".

1.1.15.3 GetTagMultiStateQCWait functions (RT Professional)

Description
The values, status, and quality code of several tags are established and saved in the repsective
addresses in the specified format . The values are read explicitly from the AS.
Two DWORD arrays are transferred, in the member of which the status and quality codes of
the individual tags will be located after the system function has been called. The size of the
arrays must be large enough to provide sufficient storage space for the status and quality
codes.
Can only be used in C scripting.

Syntax
BOOL GetTagMultiStateQCWait (DWORD* pdwState, DWORD* pdwQualityCode, const
char* pFormat, ...);

Parameters

pdwState
Field in which the status of the individual tags is created after the system function cycle.

pdwQualityCode
Field in which the quality code of the individual tag is created after the system function cycle.

pFormat
Format description (type) for all requested tags, followed by the name and address of the value
for each tag.

Return value

TRUE
System function completed without errors.

FALSE
An error has occurred.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 49
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code uses the GetTagMultiStateQCWait function to read the value from
the "gs_tag_XXX" tag and saves these values to the Ivalue1, Ivalue2 tags, etc.
1. Preprocessor definition for "DATA_SIZE" (in this case for 5 tags)
2. Creating the DWord fields
– dwState Tag status field
– dwQc Field for quality codes
3. Tag definition for buffering
4. Execution of the function GetTagMultiStateQCWait
The value read is written to the addresses of the tags.

{
#define DATA_SIZE 5
DWORD dwState[DATA_SIZE];
DWORD dwQC[DATA_SIZE];

//define all Datas


BOOL lValue1;
long lValue2 ;
char* szValue3;
double dblValue4 ;
WORD lValue5 ;

//Set the tags


GetTagMultiStateQCWait(dwState,dwQC,"%d%d%s%f%d",
"gs_tag_bit",&lValue1,
"gs_tag_SByte",&lValue2,
"gs_tag_char",&szValue3,
"gs_tag_float",&dblValue4,
"gs_tag_word",&lValue5);

//User defined code where the


//user can do something with the returnvalue
...
}

The saved return value can be processed in the following code.

1.1.15.4 GetTagMultiStateWait functions (RT Professional)

Description
The values and status of several tags are determined and saved in the respective addresses
in the specified format. The values are read explicitly from the AS.

WinCC Professional V13 SP2 – Programming reference


50 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

The system function must be given a DWORD array, in the member of which the status of the
individual tags will be located after the system function has been called. The size of the array
must be large enough to provide sufficient storage space for the status.
Can only be used in C scripting.

Syntax
BOOL GetTagMultiStateWait(DWORD* pdwState, const char* pFormat);

Parameters

pdwState
Field in which the tag status is saved.

pFormat
Format description (type) for all requested tags, followed by the name and address of the value
for each tag.

Return value

TRUE
System function completed without errors.

FALSE
An error has occurred.

Example
The following program code uses the GetTagMultiStateWait function to read the value from
the "gs_tag_XXX" tag and saves these values to the Ivalue1, Ivalue2 tags, etc.
1. Preprocessor definition for "DATA_SIZE" (in this case for 5 tags)
2. Creating DWord field dwState for the tag status
3. Tag definition for buffering
4. Execution of the function GetTagMultiStateWait
The value read is written to the addresses of the tags.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 51
C scripting (RT Professional)
1.1 System functions (RT Professional)

{
#define DATA_SIZE 5
DWORD dwState[DATA_SIZE];

//define all Datas


BOOL lValue1;
long lValue2 ;
char* szValue3;
double dblValue4 ;
WORD lValue5 ;

//Set the tags


GetTagMultiStateWait(dwState,"%d%d%s%f%d",
"gs_tag_bit",&lValue1,
"gs_tag_SByte",&lValue2,
"gs_tag_char",&szValue3,
"gs_tag_float",&dblValue4,
"gs_tag_word",&lValue5);

//User defined code where the


//user can do something with the returnvalue
...
}

The saved return value can be processed in the following code.

1.1.15.5 GetTagMultiWait functions (RT Professional)

Description
The values of several tags are determined and saved in the respective addresses in the
specified format. The value is read explicitly from the AS. The system function uses SysMalloc
to allocate memory to the tag value.
Can only be used in C scripting.

Syntax
BOOL GetTagMultiWait(const char* pFormat,...);

Parameters

pFormat
Format description for all requested tags along with name and address of the value for each
tag.

WinCC Professional V13 SP2 – Programming reference


52 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Return value

TRUE
System function completed without errors.

FALSE
An error has occurred.

Example
The GetTagMultiWait function is used in the following program code to read several tags of
different types:
1. Declaration of three tags as memory for three different tag types
2. Declaration of the boolean tag ok for buffering the return value (TRUE/FALSE)
3. Reading the three tags and saving the values to the corresponding addresses.
The return value of the function is saved to the ok tag.
4. Output of the three tags with tag type prefix

DWORD dwVar1Value;
char* szVar2Value;
//memory for values allocated via SysMalloc

double dbVar3Value;

BOOL ok;

ok=GetTagMultiWait("%d%s%f", "Ernie_word", &dwVar1Value,


"Ernie_char", &szVar2Value,
"Ernie_double", &dbVar3Value);

printf("Word %d, String %s, Double %f\r\n",


dwVar1Value, szVar2Value, dbVar3Value);

1.1.15.6 GetTagState functions (RT Professional)

Description
The GetTagStateXXX function calculates the value of a tag of the specified data type. It also
returns the status of the tags.
Can only be used in C scripting.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 53
C scripting (RT Professional)
1.1 System functions (RT Professional)

The following table lists the different GetTagStateXXX functions for reading the tag value:

Type Function name Parameters PLC data type HMI data


type
BOOL GetTagBitState Tag Tag_Name, Binary tag Bool
PDWORD lp_dwstate
BYTE GetTagByteState Tag Tag_Name, Unsigned 8-bit Byte
PDWORD lp_dwstate
char* GetTagCharState Tag Tag_Name, Text tag 8-bit or text tag 16- String
PDWORD lp_dwstate bit
double GetTagDoubleS‐ Tag Tag_Name, Floating point 64-bit Double
tate PDWORD lp_dwstate
DWORD GetTagDWord‐ Tag Tag_Name, Unsigned 32-bit UInteger
State PDWORD lp_dwstate
float GetTagFloatState Tag Tag_Name, Floating point 32-bit Float
PDWORD lp_dwstate
BOOL GetTagRawState Tag Tag_Name, BYTE* Raw data type Raw
pValue, DWORD size,
PDWORD lp_dwstate
signed GetTagSByteState Tag Tag_Name, Signed 8-bit Byte
char PDWORD lp_dwstate
long int GetTagSDWord‐ Tag Tag_Name, Signed 32-bit Integer
State PDWORD lp_dwstate
short int GetTagSWord‐ Tag Tag_Name, Signed 16-bit Short
State PDWORD lp_dwstate
WORD GetTagWordState Tag Tag_Name, Unsigned 16-bit UShort
PDWORD lp_dwstate

Syntax
<Type><FunctionName><(Parameter)>;
Example: BOOL GetTagBitState (Tag Tag_Name, PDWORD lp_dwstate);

Parameters

Tag_Name
Tag name

lp_dwstate
Pointer to a DWORD to which the tag status is saved on completion of the system function
cycle.

pValue
Pointer to a byte field containing the value of the raw data tags.

size
Length of the byte field in bytes

WinCC Professional V13 SP2 – Programming reference


54 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Return value
Value of the tags in the specified type.
The system function "GetTagCharState" returns a pointer to a value of the tag of data type
"char".
System function "GetTagRawState" returns TRUE or FALSE:
TRUE: System function completed without errors.
FALSE: An error has occurred.

Example
The following program code uses the GetTagBitState function to read out the value of the
gs_tag_bit tag and saves it to the bValue tag.
The status is stored in the address of the dwState tag.
A specific code will be executed, depending on the return value in bValue (TRUE/FALSE).

{
DWORD dwState;
BOOL bValue;

dwState = 0xFFFFFFFF;

//Get the tag value


//dwstate is the tag state
bValue = GetTagBitState("gs_tag_bit",&dwState);

//Create a string which includes the tag value


if (bValue)
{
// User defined code if the
// value of the tag is true
...
}
else
{
// User defined code if the
// value of the tag is false
...
}
}

See also
Constants (Page 200)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 55
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.15.7 GetTagStateQC functions (RT Professional)

Description
The GetTagStateQC function calculates the value of a tag of the specified data type. It also
returns the status and quality code of the tags.
Can only be used in C scripting.
The following table shows the different GetTagStateQC functions for reading the tag value:

Type Function name Parameters PLC data type HMI data type
BOOL GetTagBitStateQC Tag Tag_Name, Binary tag Bool
PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
BYTE GetTagByteStateQC Tag Tag_Name, Unsigned 8-bit UByte
PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
char* GetTagCharSta‐ Tag Tag_Name, Text tag 8-bit or text tag 16- String
teQC PDWORD lp_dwstate, bit
PDWORD pdwQuality‐
Code
double GetTagDoubleSta‐ Tag Tag_Name, Floating point 64-bit Double
teQC PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
DWOR GetTagDWordSta‐ Tag Tag_Name, Unsigned 32-bit UInteger
D teQC PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
float GetTagFloatSta‐ Tag Tag_Name, Floating point 32-bit Float
teQC PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
BOOL GetTagRawStateQC Tag Tag_Name, BYTE Raw data type Raw
pValue[], DWORD size,
PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
signed GetTagSByteSta‐ Tag Tag_Name, Signed 8-bit Byte
char teQC PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
long int GetTagSDWordSta‐ Tag Tag_Name, Signed 32-bit Integer
teQC PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code

WinCC Professional V13 SP2 – Programming reference


56 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Type Function name Parameters PLC data type HMI data type
short GetTagSWordSta‐ Tag Tag_Name, Signed 16-bit Short
int teQC PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
WORD GetTagWordSta‐ Tag Tag_Name, Unsigned 16-bit UShort
teQC PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code

Syntax
<Type><FunctionName><(Parameter)>;
Example: BOOL GetTagBitStateQC (Tag Tag_Name, PDWORD lp_dwstate, PDWORD
pdwQualityCode);

Parameters

Tag_Name
Tag name

lp_dwstate
Pointer to a DWORD to which the tag status is saved on completion of the system function
cycle.

pdwQualityCode
Pointer on a DWORD in which the quality code of the tag is created after the system function
cycle.

pValue
Pointer to a byte field containing the value of the raw data tags.

size
Length of the byte field in bytes

Return value
Value of the tags in the specified type.
The system function "GetTagCharStateQC" returns a pointer to a value of the tag of data type
"char".
The system function "GetTagRawStateQC" returns TRUE or FALSE:
TRUE: System function completed without errors.
FALSE: An error has occurred.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 57
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code uses the GetTagBitStateQC function to read the value from the
gs_tag_bit tag and saves it to the ok tag.
The status and quality code is saved to the dwState and dwQC addresses of the tag.
The return value of the ok tag (TRUE/FALSE) determines the specific code that is executed.

{
DWORD dwState;
DWORD dwQC;
BOOL ok;

dwState = 0xFFFFFFFF;

//Get the tag value


//dwstate is the tag state
ok = GetTagBitStateQC("gs_tag_bit",&dwState,&dwQC);

//Create a string which includes the tag value


if (ok)
{
// succeeded, print tag value
printf ("Value at &dwState,&dwQC: %d\r\n", &dwState);
printf ("Value at &dwQC: %d\r\n", &dwQC);
...
}
else
{
// failed
printf ( "Error - function failed." );
}
}

1.1.15.8 GetTagStateQCWait functions (RT Professional)

Description
The GetTagStateQCWait function calculates the value of a tag of the specified data type. The
value is read explicitly from the AS. It also returns the status and quality code of the tags.
Can only be used in C scripting.

WinCC Professional V13 SP2 – Programming reference


58 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

The following table lists the different GetTagStateQCWait functions for reading the tag value:

Type Function name Parameters PLC data type HMI data


type
BOOL GetTagBitStateQCWait Tag Tag_Name, Binary tag Bool
PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
BYTE GetTagByteStateQC‐ Tag Tag_Name, Unsigned 8-bit UByte
Wait PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
char* GetTagCharStateQC‐ Tag Tag_Name, Text tag 8-bit or text tag 16- String
Wait PDWORD lp_dwstate, bit
PDWORD pdwQuality‐
Code
double GetTagDoubleStateQC‐ Tag Tag_Name, Floating point 64-bit Double
Wait PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
DWOR GetTagDWordStateQC‐ Tag Tag_Name, Unsigned 32-bit UInteger
D Wait PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
float GetTagFloatStateQC‐ Tag Tag_Name, Floating point 32-bit Float
Wait PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
BOOL GetTagRawStateQC‐ Tag Tag_Name, BYTE Raw data type Raw
Wait pValue[], DWORD size,
PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
signed GetTagSByteStateQC‐ Tag Tag_Name, Signed 8-bit Byte
char Wait PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
long int GetTagSDWordSta‐ Tag Tag_Name, Signed 32-bit Integer
teQCWait PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
short GetTagSWordStateQC‐ Tag Tag_Name, Signed 16-bit Short
int Wait PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code
WORD GetTagWordStateQC‐ Tag Tag_Name, Unsigned 16-bit UShort
Wait PDWORD lp_dwstate,
PDWORD pdwQuality‐
Code

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 59
C scripting (RT Professional)
1.1 System functions (RT Professional)

Syntax
<Type><FunctionName><(Parameter)>;
Example: BOOL GetTagBitStateQC (Tag Tag_Name, PDWORD lp_dwstate, PDWORD
pdwQualityCode);

Parameters

Tag_Name
Tag name

lp_dwstate
Pointer to a DWORD to which the tag status is saved on completion of the system function
cycle.

pdwQualityCode
Pointer on a DWORD in which the quality code of the tag is created after the system function
cycle.

pValue
Pointer to a byte field containing the value of the raw data tags.

size
Length of the byte field in bytes

Return value
Value of the tags in the specified type.
The system function "GetTagCharStateQCWait" returns a pointer to a value of the tag of data
type "char".
The system function "GetTagRawStateQCWait" returns TRUE or FALSE:
TRUE: System function completed without errors.
FALSE: An error has occurred.

Example
The following program code uses the GetTagBitStateQCWait function to read the value from
the gs_tag_bit tag and saves it to the bValue tag.
The status and quality code is saved to the dwState and dwQC addresses of the tag.

WinCC Professional V13 SP2 – Programming reference


60 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

A specific code will be executed, depending on the return value in bValue (TRUE/FALSE).

{
DWORD dwState;
DWORD dwQC;
BOOL bValue;

dwState = 0xFFFFFFFF;

//Get the tag value


//dwstate is the tag state
bValue = GetTagBitStateQCWait("gs_tag_bit",&dwState,&dwQC);

//Create a string which includes the tag value


if (bValue)
{
// User defined code if the
// value of the tag is true
...
}
else
{
// User defined code if the
// value of the tag is false
...
}
}

1.1.15.9 GetTagStateWait functions (RT Professional)

Description
The GetTagStateWait function calculates the value of a tag of the specified data type. The
value is read explicitly from the AS. It also returns the status of the tags.
Can only be used in C scripting.
The following table lists the different GetTagStateWait functions for reading the tag value:

Type Function name Parameters PLC data type HMI data


type
BOOL GetTagBitStateWait Tag Tag_Name, PDWORD Binary tag Bool
lp_dwstate
BYTE GetTagByteState‐ Tag Tag_Name, PDWORD Unsigned 8-bit UByte
Wait lp_dwstate
char* GetTagCharState‐ Tag Tag_Name, PDWORD Text tag 8-bit or String
Wait lp_dwstate text tag 16-bit
double GetTagDoubleState‐ Tag Tag_Name, PDWORD Floating point 64- Double
Wait lp_dwstate bit
DWORD GetTagDWordState‐ Tag Tag_Name, PDWORD Unsigned 32-bit UInteger
Wait lp_dwstate

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 61
C scripting (RT Professional)
1.1 System functions (RT Professional)

Type Function name Parameters PLC data type HMI data


type
float GetTagFloatState‐ Tag Tag_Name, PDWORD Floating point 32- Float
Wait lp_dwstate bit
BOOL GetTagRawState‐ Tag Tag_Name, BYTE* Raw data type Raw
Wait pValue, DWORD size,
PDWORD lp_dwstate
signed char GetTagSByteState‐ Tag Tag_Name, PDWORD Signed 8-bit Byte
Wait lp_dwstate
long int GetTagSDWordState‐ Tag Tag_Name, PDWORD Signed 32-bit Integer
Wait lp_dwstate
short int GetTagSWordState‐ Tag Tag_Name, PDWORD Signed 16-bit Short
Wait lp_dwstate
WORD GetTagWordState‐ Tag Tag_Name, PDWORD Unsigned 16-bit UShort
Wait lp_dwstate

Syntax
<Type><FunctionName><(Parameter)>
Example: BOOL GetTagBitStateWait (Tag Tag_Name, PDWORD lp_dwstate)

Parameters

Tag_Name
Tag name

lp_dwstate
Pointer to a DWORD to which the tag status is saved on completion of the system function
cycle.

pValue
Pointer to a byte field containing the value of the raw data tags.

size
Length of the byte field in bytes

Return value
Value of the tags in the specified type.
The system function "GetTagCharStateWait" returns a pointer to a value of the tag of data type
"char".
The system function "GetTagRawState" returns TRUE or FALSE:
TRUE: System function completed without errors.
FALSE: An error has occurred.

WinCC Professional V13 SP2 – Programming reference


62 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code uses the GetTagBitStateWait function to read the value from the
gs_tag_bit tag and saves it to the bValue tag.
The status is stored in the address of the dwState tag.
A specific code will be executed, depending on the return value in bValue (TRUE/FALSE).

{
DWORD dwState;
BOOL bValue;

dwState = 0xFFFFFFFF;

//Get the tag value


//dwstate is the tag state
bValue = GetTagBitStateWait("gs_tag_bit",&dwState);

//Create a string which includes the tag value


if (bValue)
{
// User defined code if the
// value of the tag is true
...
}
else
{
// User defined code if the
// value of the tag is false
...
}
}

1.1.15.10 GetTagValue functions (RT Professional)

Description
Enables the transfer of a value in the form of a variant. Determines the pointer on the results
structure that contains the value.
Can only be used in C scripting.

Syntax
BOOL GetTagValue(LPDM_VARKEY lpdmVarKey, LPDM_VAR_UPDATE_STRUCT
lpdmresult, LPCMN_ERROR lpdmError);

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 63
C scripting (RT Professional)
1.1 System functions (RT Professional)

Parameters

lpdmVarKey
Pointer to a structure of data type "DM_VARKEY"

lpdmresult
Pointer to a structure of data type "DM_VAR_UPDATE_STRUCT"

lpdmError
Pointer on the structure that contains the error description.

Return value

TRUE
System function completed without errors.

FALSE
An error has occurred.

Example
The GetTagValue function is used in the following program code to calculate the value in
varKey.
A specific code will be executed, depending on the return value in keyFound (TRUE/FALSE).

{
DM_VARKEY varKey;
DM_VAR_UPDATE_STRUCT result;
CMN_ERROR error:

BOOL keyFound;

//Get the tag value


keyFound = GetTagValue(&varKey, &result, &error);

if (keyFound)
{
// print tag value
printf ("Value of varKey: %d\r\n", &varKey);
...
}
else
{
// failed
printf ( "Error - function failed." );
...
}
}

WinCC Professional V13 SP2 – Programming reference


64 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.15.11 GetTagValueStateQC functions (RT Professional)

Description
Enables the transfer of a value in the form of a variant. Determines the pointer on the results
structure that contains the value. It also returns the status and quality code of the tags.
The system function can be used in C scripting only.

Syntax
BOOL GetTagValueStateQC (LPDM_VARKEY lpdmVarKey,
LPDM_VAR_UPDATE_STRUCTEX lpdmresult, LPCMN_ERROR lpdmError);

Parameters

lpdmVarKey
Pointer to a structure of data type "DM_VARKEY"

lpdmresult
Pointer to a structure of data type "DM_VAR_UPDATE_STRUCTEX"

lpdmError
Pointer on the structure that contains the error description.

Return value

TRUE
System function completed without errors.

FALSE
An error has occurred.

Example
The GetTagValueStateQC function is used in the following program code to calculate the value
in varKey.
The status and quality code is saved to the dwState and dwQC addresses of the tag.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 65
C scripting (RT Professional)
1.1 System functions (RT Professional)

A specific code will be executed, depending on the return value in keyFound (TRUE/FALSE).

{
DM_VARKEY varKey;
DM_VAR_UPDATE_STRUCTEX result;
CMN_ERROR error:
// to clarify (DM_VAR_UPDATE_STRUCTEX already contains QualityCode)
DWORD dwState;
DWORD dwQC;

BOOL keyFound;

//Get the tag value


keyFound = GetTagValueStateQC(&varKey, &result, &error,&dwState,&dwQC);

if (keyFound)
{
// User defined code if the
// value of the tag is true
...
}
else
{
// User defined code if the
// value of the tag is false
...
}
}

1.1.15.12 GetTagValueStateQCWait functions (RT Professional)

Description
Enables the transfer of a value in the form of a variant. Determines the pointer on the results
structure that contains the value. The value is read explicitly from the AS. It also returns the
status and quality code of the tags.
Can only be used in C scripting.

Syntax
BOOL GetTagValueStateQCWait (LPDM_VARKEY lpdmVarKey,
LPDM_VAR_UPDATE_STRUCTEX lpdmresult, LPCMN_ERROR lpdmError);

Parameters

lpdmVarKey
Pointer to a structure of data type "DM_VARKEY"

WinCC Professional V13 SP2 – Programming reference


66 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

lpdmresult
Pointer to a structure of data type "DM_VAR_UPDATE_STRUCTEX"

lpdmError
Pointer on the structure that contains the error description.

Return value

TRUE
System function completed without errors.

FALSE
An error has occurred.

Example
The following program code uses the function for reading GetTagValueStateQCWait
The status and quality code is saved to the dwState and dwQC addresses of the tag.

A specific code will be executed, depending on the return value in keyFound (TRUE/FALSE).

{
DM_VARKEY varKey;
DM_VAR_UPDATE_STRUCTEX result;
CMN_ERROR error:
// to clarify (DM_VAR_UPDATE_STRUCTEX already contains QualityCode)
DWORD dwState;
DWORD dwQC;

BOOL keyFound;

//Get the tag value


keyFound = GetTagValueStateQC(&varKey, &result, &error,&dwState,&dwQC);

if (keyFound)
{
// User defined code if the
// value of the tag is true
...
}
else
{
// User defined code if the
// value of the tag is false
...
}
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 67
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.15.13 GetTagValueWait functions (RT Professional)

Description
Enables the transfer of a value in the form of a variant. Determines the pointer on the results
structure that contains the value. The value is read directly from the AS.
Can only be used in C scripting.

Syntax
BOOL GetTagValueWait(LPDM_VARKEY lpdmVarKey, LPDM_VAR_UPDATE_STRUCT
lpdmresult, LPCMN_ERROR lpdmError);

Parameters

lpdmVarKey
Pointer to a structure of data type "DM_VARKEY"

lpdmresult
Pointer to a structure of data type "DM_VAR_UPDATE_STRUCT"

lpdmError
Pointer on the structure that contains the error description

Return value

TRUE
System function completed without errors.

FALSE
An error has occurred.

Example
The GetTagValueWait function is used in the following program code to calculate the value in
varKey.

WinCC Professional V13 SP2 – Programming reference


68 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

A specific code will be executed, depending on the return value in keyFound (TRUE/FALSE).

{
DM_VARKEY varKey;
DM_VAR_UPDATE_STRUCT result;
CMN_ERROR error:

BOOL keyFound;

//Get the tag value


keyFound = GetTagValueWait(&varKey, &result, &error);

if (keyFound)
{
// succeeded, key found
// print tag value
printf ("Value of varKey: %d\r\n", &varKey);
...
}
else
{
// failed
printf ( "Error - function failed." );
}
...
}

1.1.15.14 GetTagWait functions (RT Professional)

Description
The GetTagWaitXXX function calculates the value of a tag of the specified data type. The value
is read explicitly from the AS.
Can only be used in C scripting.
The following table shows the different GetTagWait functions for reading the tag value:

Type Function name Parameters PLC data type HMI data type
BOOL GetTagBitWait Tag Tag_Name Binary tag Bool
BYTE GetTagByteWait Tag Tag_Name Unsigned 8-bit UByte
char* GetTagCharWait Tag Tag_Name Text tag 8-bit or text tag 16- String
bit
double GetTagDoubleWait Tag Tag_Name Floating point 64-bit Double
DWORD GetTagDWordWait Tag Tag_Name Unsigned 32-bit UInteger
float GetTagFloatWait Tag Tag_Name Floating point 32-bit Float
BOOL GetTagRawWait Tag Tag_Name, Raw data type Raw
BYTE* pValue,
DWORD size
char GetTagSByteWait Tag Tag_Name Signed 8-bit Byte

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 69
C scripting (RT Professional)
1.1 System functions (RT Professional)

Type Function name Parameters PLC data type HMI data type
long int GetTagSDWord‐ Tag Tag_Name Signed 32-bit Integer
Wait
short int GetTagSWordWait Tag Tag_Name Signed 16-bit Short
WORD GetTagWordWait Tag Tag_Name Unsigned 16-bit UShort

Syntax
<Type><FunctionName><(Parameter)>;
Example: BYTE GetTagByteWait (Tag Tag_Name);

Parameters

Tag_Name
Tag name

pValue
Pointer to a byte field containing the value of the raw data tags.

Return value
Value of the tags in the specified type.
System function "GetTagCharWait" returns a pointer to a string that contains the tag value.
System function "GetTagRawWait" returns TRUE or FALSE:
TRUE: System function completed without errors.
FALSE: An error has occurred.

Example
The following program code uses the GetTagByteWait function to read the value from the
gs_tag_byte tag and saves it to the bvalue tag.

{
BYTE bvalue;

//Get the current value of the tag


bvalue = GetTagByteWait("gs_tag_byte");

// print value
printf ("Value of gs_tag_byte: %d\r\n", bvalue);
...
}

The saved return value can be processed in the following code.

WinCC Professional V13 SP2 – Programming reference


70 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.16 IncreaseTag (RT Professional)

Description
Adds the given value to the value of the tags.
X=X+a

Note
The system function uses the same tag as input and output values. When this system function
is used to convert a value, auxiliary tags must be used. You can use the "SetTag" system
function to assign the tag value to the auxiliary tags.

If you configure the system function for events of an alarm and the tag is not being used in the
current screen, it is not ensured that the actual tag value is being used in the PLC. You can
improve the situation by setting the "Cyclic continuous" acquisition mode.

Use in the function list


IncreaseTag (Tag, Value)

Use in user-defined functions


IncreaseTag (Tag, Value)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

Parameters

Tag
The tag to which the given value is added.

Value
The value that is added.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 71
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code increments the value of the varX tag by the value in the value tag.
The value entered is saved to the old_value tag and output along with the new varX value.

{
BYTE varX;
BYTE value;

//user input
...
BYTE old_value = varX;

//Increase tag
IncreaseTag(varX, value);

//print original value and function result


printf ("User input: %i\r\n, Result of function IncreaseTag: %i\r\n", old_value, varX);
...
}

1.1.17 InquireLanguage (RT Professional)

Description
Determines all languages configured in the text library for the runtime.
Use Pointer to a counter to specify the storage location for language IDs.
The system function can be used in C scripting only.

Syntax
DWORD* InquireLanguage (DWORD* Pointer to a counter);

Parameters

Pointer to a counter
Pointer to the number of language IDs found

Return value
Pointer to a field containing the established language IDs.
The following assignments apply (hexadecimal language code):

Symbolic name Value(hexadecimal) Abbreviation


LANG_ARABIC 0x0401
LANG_AFRIKAANS 0x0436

WinCC Professional V13 SP2 – Programming reference


72 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Symbolic name Value(hexadecimal) Abbreviation


LANG_ALBANIAN 0x041C
LANG_BASQUE 0x042D
LANG_BULGARIAN 0x0402
LANG_BYELORUSSIAN 0x0423
LANG_CATALAN 0x0403
LANG_CHINESE 0x0404
LANG_CROATIAN 0x041A
LANG_CZECH 0x0405 CSY
LANG_DANISH 0x0406 DAN
LANG_DUTCH 0x0413 NLD
LANG_ENGLISH 0x0409 ENU
LANG_ESTONIAN 0x0425
LANG_FAEROESE 0x0438
LANG_FARSI 0x0429
LANG_FINNISH 0x040B FIN
LANG_FRENCH 0x040C FRA
LANG_GERMAN 0x0407 DEU
LANG_GREEK 0x0408
LANG_HEBREW 0x040D
LANG_HUNGARIAN 0x040E HUN
LANG_ICELANDIC 0x040F ISL
LANG_INDONESIAN 0x0421
LANG_ITALIAN 0x0410 ITA
LANG_JAPANESE 0x0411
LANG_KOREAN 0x0412
LANG_LATVIAN 0x0426
LANG_LITHUANIAN 0x0427
LANG_NORWEGIAN 0x0414 NOR
LANG_POLISH 0x0415 PLK
LANG_PORTUGUESE 0x0416 PTB
LANG_ROMANIAN 0x0418
LANG_RUSSIAN 0x0419 RUS
LANG_SLOVAK 0x041B SKY
LANG_SLOVENIAN 0x0424
LANG_SORBIAN 0x042E
LANG_SPANISH 0x040A ESP
LANG_SWEDISH 0x041D SVE
LANG_THAI 0x041E
LANG_TURKISH 0x041F TRK
LANG_UKRAINIAN 0x0422

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 73
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code uses the InquireLanguage function to query the language
configured at runtime and processes these as follows:
1. Saving the queried language ID to the tag language
2. Saving the number of languages to the tag count
3. Formatted output of the ID and number of languages

{
DWORD count;
DWORD* language;
int i;

//Count the installed languages


language = InquireLanguage(&count);

printf("##################### INQUIRE LANGUAGE ####################");


//Print out the count of languages
printf ( "\r\nCount Languages=%d\r\n", count );

//print out which languages are installed


for (i=1;i<=count; i++)
{
printf ("\r\n%d.language=%x", i,*language++);
}
}

The saved return value can be processed in the following code.

1.1.18 InverseLinearScaling (RT Professional)

Description
Assigns a value to the tag X, which is calculated from the value of the given tag Y using the
linear function X = (Y - b) / a.
The tags X and Y must not be identical. This system function is the inverse of the
"LinearScaling" system function.

Note
The tags X and Y must not be identical. If a tag is to be converted into itself, a auxiliary tag
must be used.
The "SetTag" system function can be used to assign the value of the tags to be converted to
the auxiliary tags.

WinCC Professional V13 SP2 – Programming reference


74 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Use in the function list


InvertLinearScaling (X, Y, b, a)

Use in user-defined functions


InvertLinearScaling (X, Y, b, a)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

X
The tag which is assigned the value calculated from the linear equation.

Y
The tag that contains the value used for calculation.

b
The value which is subtracted.

a
The value through which is divided.

Example
The following program code assigns a value to the varX tag by means of the
InverseLinearScaling function.

{
BYTE varX;
BYTE Yvalue = 10;
BYTE bvalue = 3;
BYTE avalue = 4;

//Inverse linear scaling


InverseLinearScaling (varX, Yvalue, bvalue, avalue);

printf ("varX = %d\r\n, varX);


...
}

The saved return value can be processed in the following code.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 75
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.19 InvertBit (RT Professional)

Description
Inverts the value of the given tag of the "Bool" type:
● If the tag has the value of 1 (TRUE), it will be set to 0 (FALSE).
● If the tag has the value of 0 (FALSE), it will be set to 1 (TRUE).

Use in the function list


InvertBit (Tag)

Use in user-defined functions


InvertBit (Tag)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The tag whose bit is set.

Example
The following program code inverts the value of the boolean tag b_value and outputs the result
along with the original b_saved value.

{
BOOL b_value = 0;
BOOL b_saved = b_value;

//Invert variable
invertBit(b_value);

//print current and saved value


printf ("Current value: %d\r\n, Saved value: %d\r\n",b_value, b_saved);
...
}

WinCC Professional V13 SP2 – Programming reference


76 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.20 InvertBitInTag (RT Professional)

Description
Inverts a bit in the given tag:
● If the bit in the tag has the value of 1 (TRUE), it will be set to 0 (FALSE).
● If the bit in the tag has the value of 0 (FALSE), it will be set to 1 (TRUE).
After changing the given bit, the system function transfers the entire tag back to the PLC. It is
not checked whether other bits in the tags have changed in the meantime. Operator and PLC
have read-only access to the indicated tag until it is transferred back to the PLC.

Note
If the PLC supports BOOL tags, do not use this system function. Use the "InvertBit" system
function instead.

Use in the function list


InvertBitInTag (Tag, Bit)

Use in user-defined functions


InvertBitInTag (Tag, Bit)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The tag in which the given bit is set.

Bit
The number of the bit that is set.
When this system function is used in a user-defined function, the bits in a tag are counted from
right to left. The counting begins with 0.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 77
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code inverts a bit at the specified bitposition in the bvalue tag and
outputs the result along with the original bsaved value.

{
BYTE bvalue;
BYTE bsaved = bvalue;
BYTE bitposition = 2;

//Invert bit in bitposition


InvertBitInTag (bvalue, bitposition);
//print current and saved value
printf ("Current value: %d\r\n, Saved value: %d\r\n",bvalue, bsaved);
...
}

1.1.21 IsUserAuthorized (RT Professional)

Description
Authentication of users.
Can only be used in C scripting.

Syntax
BOOL IsUserAuthorized (DWORD AuthorizationNumber);

Parameters

AuthorizationNumber
Authorization (numerical) to be verified.

Return value

TRUE
The user has the specified authorization.

FALSE
The user does not have the specified authorization.

WinCC Professional V13 SP2 – Programming reference


78 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code authenticates users by means of IsUserAuthorized function and
writes the value to the boolean tag ok.

{
BOOL ok;
DWORD authnumber;

//Check authorization and return value


ok = IsUserAuthorized (authnumber);

//error handling
if(ok)
{
// user authorized
printf ( "User is authorized." );
}
else
{
// user not authorized
printf ( "Authorization failed." );
}
...
}

The return value is output.

1.1.22 LinearScaling (RT Professional)

Description
Assigns a value to the tag Y, which is calculated from the value of the given tag X using the
linear function Y= (a *X) + b.
The inverse of this function is the "InvertLinearScaling" system function.

Note
The tags X and Y must not be identical. If a tag is to be converted into itself, a auxiliary tag
must be used.
The "SetTag" system function can be used to assign the value of the tags to be converted to
the auxiliary tags.

Use in the function list


LinearScaling (Y, a, X, b)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 79
C scripting (RT Professional)
1.1 System functions (RT Professional)

Use in user-defined functions


LinearScaling (Y, a, X, b)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Y
The tag which is assigned the value calculated from the linear equation.

a
The value with which is multiplied.

X
The tag that contains the value used for calculation.

b
The value that is added.

Example
The following program code uses the LinearScaling function to assign a value to the Yvar tag.

{
BYTE Yvar;
BYTE Xvalue = 10;
BYTE bvalue = 3;
BYTE avalue = 4;

// linear scaling
LinearScaling ( Yvar, avalue, Xvalue, bvalue);

printf ("Yvar = %d\r\n, Yvar);


...
}

The saved return value can be processed in the following code.

1.1.23 ReportJob (RT Professional)

Description
A print job, or the preview for a print job is started depending on the value of the Name of
method parameter.
Can only be used in C scripting.

WinCC Professional V13 SP2 – Programming reference


80 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Syntax
void ReportJob(LPCSTR Print job name, LPCSTR Name of method)

Parameters

Print job name


Pointer to the name of the print job

Name of method
Defines whether to start the print job or a print job preview:
● PRINTJOB: Print job is started
● PREVIEW: Print job preview is started

Example
The following program code executes a preview or print job for each content of the printmethod
tag.

{
char* pszPrintjobName;
char* printmethod;

//Get the print method


printf("Input PRINTJOB for printing or PREVIEW for a quick view");
scanf ("%s",&printmethod);

//Print job or show preview


ReportJob(&PrintjobName, printmethod);

//error handling
if(printmethod=="PRINTJOB")
{
// message for printing completed
printf("printing done");
...
}
else
{
// User defined code if the
// job is a preview or failed
...
}
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 81
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.24 ResetBit (RT Professional)

Description
Sets the value of a "Bool" type tag to 0 (FALSE).

Use in the function list


ResetBit (Tag)

Use in user-defined functions


ResetBit (Tag)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The BOOL type tag which is set to 0 (FALSE).

Example
The following program code resets the value of the boolean tag b_value to 0 by means of the
ResetBit function and outputs the result along with the original b_saved value.

{
BOOL b_value = 1;
BOOL b_saved = b_value;

//Reset bit
ResetBit (b_value);

//print current and saved value


printf ("Current value: %d\r\n, Saved value: %d\r\n",b_value, b_saved);
...
}

1.1.25 ResetBitInTag (RT Professional)

Description
Sets a bit in the specified tag to 0 (FALSE).

WinCC Professional V13 SP2 – Programming reference


82 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

After changing the given bit, the system function transfers the entire tag back to the PLC. It is
not checked whether other bits in the tags have changed in the meantime. Operator and PLC
have read-only access to the indicated tag until it is transferred back to the PLC.

Note
If the PLC supports BOOL tags, do not use this system function. Use the "ResetBit" system
function instead.

Use in the function list


ResetBitInTag (Tag, Bit)

Use in user-defined functions


ResetBitInTag (Tag, Bit)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The tag in which a bit is set to 0 (FALSE).

Bit
The number of the bit that is set to 0 (FALSE).
When this system function is used in a user-defined function, the bits in the specified tag will
be counted from right to left independent of the PLC used. The counting begins with 0.

Example
The following program code sets a bit at the specified bitposition in the bvalue tag to 0 and
outputs the result along with the original bsaved value.

{
BYTE bvalue;
BYTE bsaved = bvalue;
BYTE bitposition = 2;

//Reset bit in bitposition


ResetBitInTag (bvalue, bitposition);

//print current and saved value


printf ("Current value: %d\r\n, Saved value: %d\r\n",bvalue, bsaved);
...
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 83
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.26 SetBit (RT Professional)

Description
Sets the value of a "Bool" type tag to 1 (TRUE).

Use in the function list


SetBit (Tag)

Use in user-defined functions


SetBit (Tag)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The BOOL type tag which is set to 1 (TRUE).

Example
The following program code sets the value of the boolean tag b_value to 1 by means of the
SetBit function and outputs the result along with the original b_saved value.

{
BOOL b_value = 0;
BOOL b_saved = b_value;

//Set bit
SetBit (b_value);

//print current and saved value


printf ("Current value: %d\r\n, Saved value: %d\r\n",b_value, b_saved);
...
}

1.1.27 SetBitInTag (RT Professional)

Description
Sets a bit in the given tag to 1 (TRUE).

WinCC Professional V13 SP2 – Programming reference


84 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

After changing the given bit, the system function transfers the entire tag back to the PLC. It is
not checked whether other bits in the tags have changed in the meantime. Operator and PLC
have read-only access to the indicated tag until it is transferred back to the PLC.

Note
If the PLC supports BOOL tags, do not use this system function. Use the "SetBit" system
function instead.

Use in the function list


SetBitInTag (Tag, Bit)

Use in user-defined functions


SetBitInTag(Tag, Bit)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The tag in which a bit is set to 1 (TRUE).

Bit
The number of the bit that is set to 1 (TRUE).
When this system function is used in a user-defined function, the bits in the specified tag will
be counted from right to left independent of the PLC used. The counting begins with 0.

Note
The guaranteed update of the tags used with actual process values is absolutely conditional
in terms of reliable functionality. You should therefore configure the tag in an I/O field or assign
the system function to a screen object, such as a button.
If you have configured a short event such as the activation of an alarm for the system function
you can only access the actual process values by setting the tag for continuous reading.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 85
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code sets a bit to 1 at the specified bitposition in the bvalue tag and
outputs the result along with the original bsaved value.

{
BYTE bvalue;
BYTE bsaved = bvalue;
BYTE bitposition = 2;

//Reset bit in bitposition


SetBitInTag (bvalue, bitposition);

//print current and saved value


printf ("Current value: %d\r\n, Saved value: %d\r\n",bvalue, bsaved);
...
}

1.1.28 SetLanguageByLocaleID (RT Professional)

Description
Changes the language setting in Runtime.
Can only be used in C scripting.

Syntax
BOOL SetLanguageByLocaleID (DWORD dwLocaleID);

Parameters

dwLocaleID
Language ID of the language to be set

Return value

TRUE
System function completed without errors.

FALSE
An error has occurred.

WinCC Professional V13 SP2 – Programming reference


86 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code uses the SetLanguage function to set the current runtime language
to German and saves the return value to the ok tag.

{
BOOL ok;
DWORD old_language;
DWORD new_language;

//Get the current language and save it


old_language = GetLanguageByLocaleID ();

//Set the current language to German


ok = SetLanguage(0x0407);

//Get the current language and save it


new_language = GetLanguageByLocaleID ();

//error handling
if(ok)
{
// succeeded
printf ( "RT language is now German." );
}
else
{
// failed
printf ( "RT language was not updated." );
}
//print language code
printf ("Former language code: %d\r\n", old_language);
printf ("Current language code: %d\r\n", new_language);
}

The saved return value can be processed in the following code.

See also
GetLanguageByLocaleID (Page 34)

1.1.29 SetProp (RT Professional)

1.1.29.1 SetPropBOOL (RT Professional)

Description
Sets an object property of data type "BOOL".
Can only be used in C scripting.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 87
C scripting (RT Professional)
1.1 System functions (RT Professional)

Syntax
BOOL SetPropBOOL(LPCTSTR Screen name, LPCTSTR Object, LPCTSTR Name of the
property, BOOL Value)

Parameters

Screen name
Screen name

Object
Object name You must set the parameter Object = NULL if the function call relates to a screen
object property.

Name of the Property


Name of the object property

Value
Value assigned to the object property of data type "BOOL".

Return value

TRUE
System function completed without errors.

FALSE
An error has occurred.

WinCC Professional V13 SP2 – Programming reference


88 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code uses the SetPropBool function to set the property of the
gs_graph_iofield object to "Visible". The return value is saved to the ok tag.

{
BOOL ok;

//Set the visibility TRUE


ok = SetPropBOOL("gs_graph_iofield","IOField1","Visible",TRUE);

//error handling
if(ok)
{
// succeeded
printf ( "IO field is visible." );
}
else
{
// failed
printf ( "Error - visibility not set" );
}
...
}

The saved return value can be processed in the following code.

1.1.29.2 SetPropChar (RT Professional)

Description
Sets an object property of data type "char".
Can only be used in C scripting.

Syntax
BOOL SetPropChar(LPCTSTR Screen name, LPCTSTR Object, LPCTSTR Name of the
property, char* Value)

Parameters

Screen name
Screen name

Object
Object name You must set the parameter Object = NULL if the function call relates to a screen
object property.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 89
C scripting (RT Professional)
1.1 System functions (RT Professional)

Name of the Property


Name of the object property

Value
Value assigned to the object property of data type "char".

Return value

TRUE
System function completed without errors.

FALSE
An error has occurred.

Example
The following program code uses the SetPropChar function to set the Tooltiptext property of
the gs_graph_iofield object to the "Tooltiptext 1" value. The return value is saved to the ok tag.

{
BOOL ok;

//Set the property Tooltiptext


ok = SetPropChar("Screen_1","gs_graph_iofield","ToolTipText","Tooltiptext 1");

//error handling
if(ok)
{
// succeeded
printf ( "Property of Tooltiptext is now Tooltiptext 1." );
}
else
{
// failed
printf ( "Error - property not set" );
}
...
}

The saved return value can be processed in the following code.

1.1.29.3 SetPropDouble (RT Professional)

Description
Sets an object property of data type "Double".
Can only be used in C scripting.

WinCC Professional V13 SP2 – Programming reference


90 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Syntax
BOOL SetPropDouble(LPCTSTR Screen name, LPCTSTR Object, LPCTSTR Name of the
property, double Value)

Parameters

Screen name
Screen name

Object
Object name You must set the parameter Object = NULL if the function call relates to a screen
object property.

Name of the Property


Name of the object property

Value
Value assigned to the object property of data type "double".

Return value

TRUE
System function completed without errors.

FALSE
An error has occurred.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 91
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code accesses an object property in the screenName screen. In this
example, the SetPropDouble function sets the property (radius) of "Circle_1" to the value 10.
The return value is saved to the ok tag.

{
BOOL ok;

//Set the property of circle


ok = SetPropDouble(screenName,"Circle_1","Radius",10);

//error handling
if(ok)
{
// succeeded
printf ( "Radius was set." );
}
else
{
// failed
printf ( "Error - radius not set" );
}
...
}

The saved return value can be processed in the following code.

1.1.29.4 SetPropLong (RT Professional)

Description
Sets an object property of data type "long".
Can only be used in C scripting.

Syntax
BOOL SetPropLong(LPCTSTR Screen name, LPCTSTR Object, LPCTSTR Name of the
property, long Value)

Parameters

Screen name
Screen name

Object
Object name You must set the parameter Object = NULL if the function call relates to a screen
object property.

WinCC Professional V13 SP2 – Programming reference


92 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Name of the Property


Name of the object property

Value
Value assigned to the object property of data type "long".

Return value

TRUE
System function completed without errors.

FALSE
An error has occurred.

Example
The following program code uses the SetPropLong function to change the foreground color of
an object: In "Screen_1", the "ForeColor property of the "Button1" object is set to the value
65333 (red). The return value is saved to the ok tag.

{
BOOL ok;

//Set the property Tooltiptext


ok = SetPropLong("Screen_1","Button1","ForeColor",65333);

//error handling
if(ok)
{
// succeeded
printf ( "Color was set." );
}
else
{
// failed
printf ( "Error - color not set" );
}
...
}

The saved return value can be processed in the following code.

1.1.30 SetPropertyByConstant (RT Professional)

Description
Specifies the value of an object property as a string.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 93
C scripting (RT Professional)
1.1 System functions (RT Professional)

Use in the function list


SetPropertyByConstant (Screen name, Object, Name of the property, Value)

Use in user-defined functions


SetPropertyByConstant
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".
If you want to change the property of a screen, the parameter "Object" must be empty. For this
purpose, use the following syntax, for example:
SetPropertyByConstant ("<Screen name>","","<Property name>","<Value>")

Parameters

Screen name
Name of the screen that contains the object.

Object
Name of the object whose property is changed.

Name of the property


Name of the property that will be changed.

Value
The value assigned to the property.

Example
The SetPropertyByConstant function is used in the following program code to change an object
property: In the "Trends" screen, the "ToolbarButtonClick" property of the "Control_1" object
is set to the value 26.

//Name of the picture: Trends


//Name of the f(t) trend view control: Control_1

SetPropertyByConstant ("Trends", "Control_1", "ToolbarButtonClick", "26");

// User defined code


...
}

WinCC Professional V13 SP2 – Programming reference


94 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example: Changing a screen property


The SetPropertyByConstant function is used in the following program code to change a screen
property: In the "Trends" screen, the "Backcolor" property is set to the value 255.

//Name of the picture: Trends

SetPropertyByConstant ("Trends", "Trends", "Backcolor", "255");

// User defined code


...
}

Alternatively, use the password ZERO or a space-string instead of the second parameter
(object).

1.1.31 SetPropertyByProperty (RT Professional)

Description
Specifies the value of an object property with another object property.

Use in the function list


SetPropertyByProperty (Screen name, Object, Name of the property, Destination screen
name, Destination object, Destination property name)

Use in user-defined functions


SetPropertyByProperty (Screen_name, Screen_object, Property_name,
Source_screen_name, Source_screen_object, Source_property_name)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".
If you want to specify the property of a screen with another screen property, the parameters
"Object" and "Destination object" must be empty. For this purpose, use the following syntax,
for example:
SetPropertyByProperty ("<Screen name>","","<Property name>","<Destination_Screen
name>","","<Destination_Property name>")

Parameters

Screen name
Name of the screen that contains the object.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 95
C scripting (RT Professional)
1.1 System functions (RT Professional)

Object
Name of the object whose property is transferred to the destination object.

Name of the property


Name of the property that will be transferred to the destination object.

Destination screen name


Name of the screen that contains the destination object.

Destination object
Name of the destination object to which the property is transferred.

Destination property name


Name of the property that will be changed.

Example
The following program code uses the SetPropertyByProperty function to set the property
"ToolbarButtonClick" of the object "Control_1" in the original screen Trend_1": on the
corresponding property in the destination screen "Trend_2".

//Name of source picture: Trend_1


//Name of target picture: Trend_2
//Name of the f(t) trend view control: Control_1

SetPropertyByProperty ("Trend_1", "Control_1", "ToolbarButtonClick", "Trend_2",


"Control_2", "ToolbarButtonClick");

// User defined code


...
}

1.1.32 SetPropertyByTag (RT Professional)

Description
Specifies the value of an object property with a tag value.

Use in the function list


SetPropertyByTag (Screen name, Object, Name of the property, Tag name)

WinCC Professional V13 SP2 – Programming reference


96 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Use in user-defined functions


SetPropertyByTag (Screen_name, Screen_object, Property_name, Tag_name)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".
If you want to specify the property of a screen by means of a tag value, the "Object" parameter
must be empty. For this purpose, use the following syntax, for example:
SetPropertyByTag ("<Screen name>","","<Property name>","<Tag name>")

Parameters

Screen name
Name of the screen that contains the object.

Object
Name of the object containing the property to be set with the tag value.

Name of the property


Name of the property that is set with the tag value.

Tag name
Name of the tag that contains the value of the property.

Example
The SetPropertyByTag function is used in the following program code to change an object
property: A click on the object transfers the object name and the screen containing the object.
The CaptionText in the screen window contains the value of the HMI_value_1 tag.

SetPropertyByTag (screenName, objectName, "CaptionText", "HMI_value_1");

// User defined code


...
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 97
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The SetPropertyByTag function is used in the following program code to change an object
property: In the "Trends" screen, the "ToolbarButtonClick" property of the "Control_1" object
is set to the value 26.

//Name of the picture: Trends


//Name of the f(t) trend view control: Control_1

SetPropertyByConstant ("Trends", "Control_1", "ToolbarButtonClick", "26");

// User defined code


...
}

1.1.33 SetPropertyByTagIndirect (RT Professional)

Description
Specifies the value of an object property with a tag. The tag contains the tag name that specifies
the object property.

Use in the function list


SetPropertyByTagIndirect (Screen name, Object, Name of the property, Tag name)

Use in user-defined functions


SetPropertyByTagIndirect (Screen_name, Screen_object, Property_name, Tag_name)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".
If you want to specify the property of a screen by means of a tag, the "Object" parameter must
be empty. For this purpose, use the following syntax, for example:
SetPropertyByTagIndirect ("<Screen name>","","<Property name>","<Tag name>")

Parameters

Screen name
Name of the screen that contains the object.

Object
Name of the object containing the property to be set with the tag value.

WinCC Professional V13 SP2 – Programming reference


98 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Name of the property


Name of the property that is set with the tag value.

Tag name
Name of the tag that, in turn, contains the name of the tag that specifies the object property.

Example
The SetPropertyByTagIndirect function is used in the following program code to change an
object property: .

SetPropertyByTagIndirect (GetParentScreen(screenName), GetParentScreenWindow(screenName),


"ScreenName", "HMI_value_1");

// User defined code


...
}

1.1.34 SetTag (RT Professional)

1.1.34.1 SetTag functions (RT Professional)

Description
The SetTagXXX function calculates the value of a tag of the specified data type.
Can only be used in C scripting.
The following table shows the different SetTag functions for setting the tag value:

Function name Parameter PLC data type HMI data type


SetTagBit Tag Tag_Name, Binary tag Bool
short int value
SetTagByte Tag Tag_Name, Unsigned 8-bit USInt
BYTE value
SetTagDateTime Tag Tag_Name, DTL DateTime
SYSTEMTIME val‐
ue
SetTagChar Tag Tag_Name, Text tag 8-bit or text tag 16-bit String or WString
LPSTR value
SetTagDouble Tag Tag_Name, Floating point 64-bit LReal
double value
SetTagDWord Tag Tag_Name, Unsigned 32-bit UDInt
DWORD value

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 99
C scripting (RT Professional)
1.1 System functions (RT Professional)

Function name Parameter PLC data type HMI data type


SetTagFloat Tag Tag_Name, Floating point 32-bit Real
float value
SetTagRaw Tag Tag_Name, Raw data type Raw
BYTE* pValue,
DWORD size
SetTagSByte Tag Tag_Name, Signed 8-bit SInt
char value
SetTagSDWord Tag Tag_Name, Signed 32-bit DInt
long int value
SetTagSWord Tag Tag_Name, Signed 16-bit Int
short int value
SetTagWord Tag Tag_Name, Unsigned 16-bit UInt
WORD value

Syntax
BOOL<FunctionName><(Parameter)>;
Example: BOOL SetTagBit (Tag Tag_Name, short int value);

Parameter

Tag_Name
Tag name

value
Value of the tags in the specified data type.

pValue
Pointer to a byte field containing the value of the raw data tags.

size
Length of the byte field in bytes

Return value

TRUE
System function completed without errors.
However, no check is made to verify that the tag was written without any errors.

FALSE
An error has occurred.

WinCC Professional V13 SP2 – Programming reference


100 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code uses the SetTagBit function to set the value of the gs_tag_bit tag
to TRUE and saves the return value to the ok tag.

{
BOOL ok;
BOOL bvalue;

//Set the tag to true


ok = SetTagBit("gs_tag_bit", TRUE);
//error handling
if(ok)
{
// succeeded
printf ( "Function has run through.\r\n" );
bvalue = GetTagBit("gs_tag_bit");
printf ("Value of gs_tag_bit: %d\r\n", bvalue);
}
else
{
// failed
printf ( "Error - function failed." );
}
...
}

The saved return value can be processed in the following code.

1.1.34.2 SetTagDateTime (RT Professional)

Function
Sets the value of a tag of data type "Date/Time".

Syntax
BOOL SetTagDateTime(Tag Tag_Name, SYSTEMTIME value);

Parameter

Tag_Name
Tag name

value
Value of the tag in the data type "Date/Time".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 101
C scripting (RT Professional)
1.1 System functions (RT Professional)

Return value

TRUE
The function itself has been completed without any errors.
However, no check is made to verify that the tag was written without any errors.

FALSE
An error has occurred.

1.1.34.3 SetTagMultiStateWait functions (RT Professional)

Description
Sets the values of several tags. The system function will end only after the AS has reported
the acceptance of the value.
The system function can be used in C scripting only.
The system function must be given a DWORD array, in the member of which the status of the
individual tags will be located after the system function has been called. The size of the array
must be large enough to provide sufficient storage space for the status.

Syntax
BOOL SetTagMultiStateWait(DWORD* pdwState, const char* pFormat,...);

Parameters

pdwState
Field in which the tag status is saved.

pFormat
Format description for all the requested tags along with the name and value for each tag.

Return value

TRUE
System function completed without errors.
However, no check is made to verify that the tag was written without any errors.

FALSE
An error has occurred.

WinCC Professional V13 SP2 – Programming reference


102 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code uses the SetTagMultiStateWait function to set the value of several
tags.
1. Creation of a DWord arrays of the necessary size (number of tags)
2. Creation of the tags that will contain the values to be transferred to the WinCC tags by
means of the SetTagMultiStateWait function
3. Writing the values of the recently declared tags to the WinCC tags:
– gs_tag_bit including the tag value "lValue1"
– gs_tag_SByte including the tag value in the address "&lValue2"
– etc.

{
#define DATA_SIZE 5
DWORD dwData[DATA_SIZE];

//define all tags


BOOL lValue1;
long lValue2;
char szValue3[_MAX_PATH];
float lValue4;
char lValue5;

// Fill the tags with the values


// you want to set into the WinCC tags
...

//Set the WinCC tags


SetTagMultiStateWait(dwData,"%d%d%s%f%d","gs_tag_bit",lValue1,
"gs_tag_SByte",lValue2,
"gs_tag_char",szValue3,
"gs_tag_float",lValue4,
"gs_tag_word",lValue5);
...
}

The saved return value can be processed in the following code.

1.1.34.4 SetTagMultiWait functions (RT Professional)

Description
The values of several tags are set in the specified format. The system function will end only
after the AS has reported the acceptance of the value.
Can only be used in C scripting.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 103
C scripting (RT Professional)
1.1 System functions (RT Professional)

Syntax
BOOL SetTagMultiWait(const char* pFormat,...);

Parameters

pFormat
Format description for all the requested tags along with the name and value for each tag.

Return value

TRUE
System function completed without errors.
However, no check is made to verify that the tag was written without any errors.

FALSE
An error has occurred.

WinCC Professional V13 SP2 – Programming reference


104 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code uses the SetTagMultiWait function to change the value of several
tags. The return value is saved to the ok tag.

{
BOOL ok;
//memory for values allocated via SysMalloc
DWORD dwVar1Value;
char* szVar2Value;
double dbVar3Value;

//settings
ok=SetTagMultiWait("%d%s%f", "Ernie_word", 16,
"Ernie_char", "Hallo Welt",
"Ernie_double", 55.4711);

//error handling
if(ok)
{
// succeeded
printf ( "Function has run through.\r\n" );

// Get values and print


GetTagMultiWait("%d%s%f", "Ernie_word", &dwVar1Value,
"Ernie_char", &szVar2Value,
"Ernie_double", &dbVar3Value);

printf("Word %d, String %s, Double %f\r\n",


dwVar1Value, szVar2Value, dbVar3Value);
}
else
{
// failed
printf ( "Error - function failed." );
}
...
}

Example
The GetTagMultiWait function is used in the following program code to read several tags of
different types:
1. Declaration of three tags as memory for three different tag types
2. Declaration of the boolean tag ok for buffering the return value (TRUE/FALSE)
3. Reading the three tags and saving the values to the corresponding addresses.
The return value of the function is saved to the ok tag.
4. Output of the three tags with tag type prefix

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 105
C scripting (RT Professional)
1.1 System functions (RT Professional)

DWORD dwVar1Value;
char* szVar2Value;
//Speicher für den Variablenwert wird
//durch die Funktion mit SysMalloc angelegt
double dbVar3Value;

BOOL ok;

ok=GetTagMultiWait("%d%s%f", "Ernie_word", &dwVar1Value,


"Ernie_char", &szVar2Value,
"Ernie_double", &dbVar3Value);

printf("Word %d, String %s, Double %f\r\n",


dwVar1Value, szVar2Value, dbVar3Value);

1.1.34.5 SetTagState functions (RT Professional)

Description
Sets the value of a tag of a specified data type. It also returns the status of the tags.
Can only be used in C scripting.
The following table lists the different SetTagStateXXX functions for reading the tag value:

Function name Parameters PLC data type HMI data type


SetTagBitState Tag Tag_Name, short Binary tag Bool
int value, PDWORD
lp_dwstate
SetTagByteS‐ Tag Tag_Name, BYTE Unsigned 8-bit UByte
tate value, PDWORD
lp_dwstate
SetTagChar‐ Tag Tag_Name, LPSTR Text tag 8-bit or text tag 16- String
State value, PDWORD bit
lp_dwstate
SetTagDou‐ Tag Tag_Name, double Floating point 64-bit Double
bleState value, PDWORD
lp_dwstate
SetTagDWord‐ Tag Tag_Name, Unsigned 32-bit UInteger
State DWORD value,
PDWORD lp_dwstate
SetTagFloat‐ Tag Tag_Name, float Floating point 32-bit Float
State value, PDWORD
lp_dwstate
SetTagRaw‐ Tag Tag_Name, BYTE* Raw data type Raw
State pValue, DWORD size,
PDWORD lp_dwstate
SetTagSByteS‐ Tag Tag_Name, signed Signed 8-bit Byte
tate char value, PDWORD
lp_dwstate

WinCC Professional V13 SP2 – Programming reference


106 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Function name Parameters PLC data type HMI data type


SetTagSDWord‐ Tag Tag_Name, long int Signed 32-bit Integer
State value, PDWORD
lp_dwstate
SetTagSWord‐ Tag Tag_Name, short Signed 16-bit Short
State int value, PDWORD
lp_dwstate
SetTagWord‐ Tag Tag_Name, WORD Unsigned 16-bit UShort
State value, PDWORD
lp_dwstate

Syntax
BOOL <FunctionName><(Parameter)>;
Example: BOOL SetTagBitState (Tag Tag_Name, short int value, PDWORD lp_dwstate);

Parameters

Tag_Name
Tag name

value
Value of the tags of a specified type.

lp_dwstate
Pointer to a DWORD to which the tag status is saved on completion of the system function
cycle.

pFormat
Format description for all the requested tags along with name and value for each tag.

pValue
Pointer to a byte field containing the value of the raw data tags.

size
Length of the byte field in bytes

Return value

TRUE
System function completed without errors.
However, no check is made to verify that the tag was written without any errors.

FALSE
An error has occurred.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 107
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code uses the SetTagBitState function to set the value of the gs_tag_bit
tag to TRUE and saves the return value to the ok tag. "&dwstate" is the address of the tag to
which the tag status is saved.
The saved return value can be processed in the following code.

{
DWORD dwstate;
BOOL ok;

//Load dwState with default values


dwstate = 0xFFFFFFFF;
//Set the value of the tag to TRUE
//dwstate is the tag state
ok = SetTagBitState("gs_tag_bit",TRUE,&dwstate);

//error handling
if(ok)
{
// succeeded
printf ( "Function has run through.\r\n" );
printf ("Status of gs_tag_bit: %d\r\n", dwstate);
}
else
{
// failed
printf ( "Error - function failed." );
}
...
}

1.1.34.6 SetTagStateWait functions (RT Professional)

Description
Sets the value of a tag of a specified data type. The system function will end only after the AS
has reported the acceptance of the value. It also returns the status of the tags.
Can only be used in C scripting.
The following table lists the different SetTagStateWait functions for setting the tag value:

Function name Parameters PLC data type HMI data type


SetTagBitState‐ Tag Tag_Name, short Binary tag Bool
Wait int value, PDWORD
lp_dwstate
SetTagByteState‐ Tag Tag_Name, BYTE Unsigned 8-bit UByte
Wait value, PDWORD
lp_dwstate

WinCC Professional V13 SP2 – Programming reference


108 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Function name Parameters PLC data type HMI data type


SetTagCharState‐ Tag Tag_Name, Text tag 8-bit or text tag 16- String
Wait LPSTR value, bit
PDWORD lp_dwstate
SetTagDoubleSta‐ Tag Tag_Name, double Floating point 64-bit Double
teWait value, PDWORD
lp_dwstate
SetTagDWordSta‐ Tag Tag_Name, Unsigned 32-bit UInteger
teWait DWORD value,
PDWORD lp_dwstate
SetTagFloatState‐ Tag Tag_Name, float Floating point 32-bit Float
Wait value, PDWORD
lp_dwstate
SetTagRawState‐ Tag Tag_Name, BYTE* Raw data type Raw
Wait pValue, DWORD size,
PDWORD lp_dwstate
SetTagSByteSta‐ Tag Tag_Name, char Signed 8-bit Byte
teWait value, PDWORD
lp_dwstate
SetTagSDWord‐ Tag Tag_Name, long Signed 32-bit Integer
StateWait int value, PDWORD
lp_dwstate
SetTagSWordSta‐ Tag Tag_Name, short Signed 16-bit Short
teWait int value, PDWORD
lp_dwstate
SetTagWordState‐ Tag Tag_Name, Unsigned 16-bit UShort
Wait WORD value,
PDWORD lp_dwstate

Syntax
BOOL<FunctionName><(Parameter)>;
Example: BOOL SetTagBitStateWait (Tag Tag_Name, short int value, PDWORD lp_dwstate);

Parameters

Tag_Name
Tag name

value
Value of the tags of a specified type.

lp_dwstate
Pointer to a DWORD to which the tag status is saved on completion of the system function
cycle.

pValue
Pointer to a byte field containing the value of the raw data tags.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 109
C scripting (RT Professional)
1.1 System functions (RT Professional)

size
Length of the byte field in bytes

Return value

TRUE
System function completed without errors.
However, no check is made to verify that the tag was written without any errors.

FALSE
An error has occurred.

Example
The following program code uses the SetTagBitStateWait function to set the value of the
gs_tag_bit tag to TRUE and saves the return value to the ok tag. "&dwstate" is the address of
the tag to which the tag status is saved.
The saved return value can be processed in the following code.

{
DWORD dwstate;
BOOL ok;

//Load dwState with default values


dwstate = 0xFFFFFFFF;
//Set the value of the tag to TRUE
//dwstate is the tag state
ok = SetTagBitStateWait("gs_tag_bit",TRUE,&dwstate);

//error handling
if(ok)
{
// succeeded
printf ( "Function has run through.\r\n" );
printf ("Status of gs_tag_bit: %d\r\n", dwstate);
}
else
{
// failed
printf ( "Error - function failed." );
}
...
}

WinCC Professional V13 SP2 – Programming reference


110 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.34.7 SetTagValue functions (RT Professional)

Description
Enables the transfer of a value in the form of a variant and sets the pointer to the value of data
type "Variant".
Can only be used in C scripting.

Syntax
BOOL SetTagValue (LPDM_VARKEY lpdmVarKey, LPVARIANT lpdmValue, PDWORD
dwState, LPCMN_ERROR lpdmError);

Parameters

lpdmVarKey
Pointer to a structure of data type "DM_VARKEY"

lpdmValue
Pointer to a structure of data type "Variant". Refer to relevant technical references for the
description of data type VARIANT.

lpdmError
Pointer on the structure that contains the error description.

Return value

TRUE
System function completed without errors.
However, no check is made to verify that the tag was written without any errors.

FALSE
An error has occurred.

Example
The SetTagValue function is used in the following program code to transfer the value in varKey.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 111
C scripting (RT Professional)
1.1 System functions (RT Professional)

A specific code will be executed, depending on the return value in keyFound (TRUE/FALSE).

{
// tags for setting the value
DM_VARKEY varKey;
LPVARIANT value;
LPCMN_ERROR error1:

// tags for getting the value


DM_VAR_UPDATE_STRUCT result;
CMN_ERROR error:

BOOL keyFound;

ok = SetTagValue(&varKey, &value, &error1);

if (keyFound)
{
// succeeded, get the new value
GetTagValue(&varKey, &result, &error);
// print tag value
printf ("Value of varKey: %d\r\n", &varKey);
...
}
else
{
// failed
printf ( "Error - function failed." );
...
}
}

1.1.34.8 SetTagValueWait functions (RT Professional)

Description
Enables the transfer of a value in the form of a variant and sets the pointer to the value of data
type "Variant". The system function will end only after the AS has reported the acceptance of
the value.
Can only be used in C scripting.

Syntax
BOOL SetTagValueWait(LPDM_VARKEY lpdmVarKey, LPVARIANT lpdmValue, PDWORD
dwState, LPCMN_ERROR lpdmError);

WinCC Professional V13 SP2 – Programming reference


112 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Parameters

lpdmVarKey
Pointer to a structure of data type "DM_VARKEY"

lpdmValue
Pointer to a structure of data type "Variant". Refer to relevant technical references for the
description of data type VARIANT.

dwState
Status of the tags that is returned after the system function cycle.

lpdmError
Pointer on the structure that contains the error description.

Return value

TRUE
System function completed without errors.
There is no check to see if the tag was written without any errors.

FALSE
An error has occurred.

Example
The SetTagValueWait function is used in the following program code to transfer the value in
varKey.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 113
C scripting (RT Professional)
1.1 System functions (RT Professional)

A specific code will be executed, depending on the return value in keyFound (TRUE/FALSE).

{
// tags for setting the value
DM_VARKEY varKey;
LPVARIANT value;
LPCMN_ERROR error1:

// tags for getting the value


DM_VAR_UPDATE_STRUCT result;
CMN_ERROR error:

BOOL keyFound;

ok = SetTagValueWait(&varKey, &value, &error1);

if (keyFound)
{
// succeeded, get the new value
GetTagValueWait(&varKey, &result, &error);
// print tag value
printf ("Value of varKey: %d\r\n", &varKey);
...
}
else
{
// failed
printf ( "Error - function failed." );
...
}
}

1.1.34.9 SetTagWait functions (RT Professional)

Description
Sets the value of a tag of a specified data type. The system function will end only after the AS
has reported the acceptance of the value.
Can only be used in C scripting.
The following table lists the different SetTagWait functions for setting the tag value:

Function name Parameters PLC data type HMI data type


SetTagBitWait Tag Tag_Name, short Binary tag Bool
int value
SetTagByte‐ Tag Tag_Name, BYTE Unsigned 8-bit UByte
Wait value
SetTagChar‐ Tag Tag_Name, char* Text tag 8-bit or text tag 16- String
Wait value bit
SetTagDouble‐ Tag Tag_Name, double Floating point 64-bit Double
Wait value

WinCC Professional V13 SP2 – Programming reference


114 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Function name Parameters PLC data type HMI data type


SetTagDWord‐ Tag Tag_Name, Unsigned 32-bit UInteger
Wait DWORD value
SetTagFloat‐ Tag Tag_Name, float Floating point 32-bit Float
Wait value
SetTagRaw‐ Tag Tag_Name, BYTE* Raw data type Raw
Wait pValue, DWORD size
SetTagSByte‐ Tag Tag_Name, char Signed 8-bit Byte
Wait value
SetTagSDWord‐ Tag Tag_Name, long int Signed 32-bit Integer
Wait value
SetTagSWord‐ Tag Tag_Name, short Signed 16-bit Short
Wait int value
SetTagWord‐ Tag Tag_Name, WORD Unsigned 16-bit UShort
Wait value

Syntax
BOOL <FunctionName><(Parameter)>;
Example: BOOL SetTagBitWait (Tag Tag_Name, short int value);

Parameters

Tag_Name
Tag name

value
Value of the tags of a specified type.

pValue
Pointer to a byte field containing the value of the raw data tags.

size
Length of the byte field in bytes

Return value

TRUE
System function completed without errors.
However, no check is made to verify that the tag was written without any errors.

FALSE
An error has occurred.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 115
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code uses the SetTagBitWait function to set the value of the gs_tag_bit
tag to TRUE and saves the return value to the ok tag.

{
BOOL ok;
BOOL bvalue;

//Set the tag to true


ok = SetTagBitWait("gs_tag_bit", TRUE);
//error handling
if(ok)
{
// succeeded
printf ( "Function has run through.\r\n" );
bvalue = GetTagBitWait("gs_tag_bit");
printf ("Value of gs_tag_bit: %d\r\n", bvalue);
}
else
{
// failed
printf ( "Error - function failed." );
}
...
}

The saved return value can be processed in the following code.

1.1.34.10 SetTag (RT Professional)

Description
Assigns a new value to the given tag.

Note
This system function can be used to assign strings and numbers, depending on the type of
tag.

Use in the function list


SetTag (Tag, Value)

Use in user-defined functions


SetTag (Tag, Value)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

WinCC Professional V13 SP2 – Programming reference


116 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Parameters

Tag
The tag to which the given value is assigned.

Value
The value which the given tag is assigned.

Note
The "SetTag" system function is only executed after a connection has been established.

Example
The following program code uses the SetTag function to set the value of the gs_tag_bit tag to
TRUE and saves the return value to the ok tag.

{
BOOL ok;
BOOL bvalue;

//Set the tag to true


ok = SetTag("gs_tag_bit", TRUE);
//error handling
if(ok)
{
// succeeded
printf ( "Function has run through.\r\n" );
bvalue = GetTagBit("gs_tag_bit");
printf ("Value of gs_tag_bit: %d\r\n", bvalue);
}
else
{
// failed
printf ( "Error - function failed." );
}
...
}

The saved return value can be processed in the following code.

1.1.34.11 SetTagByProperty (RT Professional)

Description
Specifies a tag value with the value of an object property. The change is also logged in the
alarm system.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 117
C scripting (RT Professional)
1.1 System functions (RT Professional)

Use in the function list


SetTagByProperty (Tag name, Screen name, Object, Name of the property, With or without
operator event)

Use in user-defined functions


SetTagByProperty (Tag_name, Screen_name, Screen_object, Property_name,
With_or_without_operator_event)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

Parameters

Tag name
Name of the tag whose value is specified by the object property.

Screen name
Name of the screen that contains the object.

Object
Name of the object whose property supplies the tag value.

Name of the property


Name of the property that supplies the tag value.

With or without operator event


0 (hmiWithoutOperatorEvent) = Without operator event
1 (hmiWithOperatorEvent) = With operator event

Example
The following program code returns the value of the selected text when you click in a combo
box.

{
char* rt_value;

SetTagByProperty (rt_value, screenName, objectName, "SelectedText",


hmiWithoutOperatorEvent);

...
}

WinCC Professional V13 SP2 – Programming reference


118 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.34.12 SetTagByTagIndirect (RT Professional)

Description
Sets the tag value to the value of an indirect tag. The change is also logged in the alarm
system.

Use in the function list


SetTagByTagIndirect (Tag name, Tag name, With or without operator event)

Use in user-defined functions


SetTagByTagIndirect (Tag_name, Source_tag_name, With_or_without_operator_event)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

Parameters

Tag name
Name of the tag whose value is specified by an indirect tag.

Tag name
Name of the indirect tag that returns the tag value.

With or without operator event


0 (hmiWithoutOperatorEvent) = Without operator event
1 (hmiWithOperatorEvent) = With operator event

Example
The following program code returns the value of the "@LocalMachineName" tag when you
click the corresponding button.

{
char* rt_value;

SetTagByTagIndirect (rt_value, "@LocalMachineName", hmiWithoutOperatorEvent);

...
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 119
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.34.13 SetTagIndirect (RT Professional)

Description
Specifies the indirect name for a tag.

Use in the function list


SetTagIndirect (Tag name (output), LpValue)

Use in user-defined functions


SetTagIndirect (Tag_name, Value, With_or_without_operator_event)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

Parameters

Tag name (output)


Name of the tag to which the tag name is written.

LpValue
Name of the tag written to the tag.

Example
The following program code transfers the value from the "value" tag to the "result" tag when
you click the corresponding button.

{
BYTE result;
BYTE value;

SetTagIndirect ("result", "value", hmiWithoutOperatorEvent);


...
}

1.1.34.14 SetTagIndirectByProperty (RT Professional)

Description
Specifies a tag name with the value of an object property. The change is also logged in the
alarm system.

WinCC Professional V13 SP2 – Programming reference


120 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Use in the function list


SetTagIndirectByProperty (Tag name, Screen name, Screen object, Name of the property,
With or without operator event)

Use in user-defined functions


SetTagIndirectByProperty (Tag_name, Screen_name, Screen_object, Property_name,
With_or_without_operator_event)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

Parameters

Tag name
Name of the tag whose tag name is specified by the object property.

Screen name
Name of the screen that contains the object.

Screen object
Name of the object whose property returns the tag name.

Name of the property


Name of the property that returns the tag name.

With or without operator event


0 (hmiWithoutOperatorEvent) = Without operator event
1 (hmiWithOperatorEvent) = With operator event

Example
When you click the objectName button, the following program code sets the value of the
"rt_value_property" tag to the value of the "FlashingEnabled" property.

{
Int rt_value_property;
SetTagIndirectByProperty ("rt_value_property", screenName, objectName, "FlashingEnabled",
hmiWithoutOperatorEvent);
...
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 121
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.34.15 SetTagIndirectByTagIndirect (RT Professional)

Description
Sets the tag value to the value of an indirect tag. The change is also logged in the alarm
system.

Use in the function list


SetTagIndirectByTagIndirect (Tag name, Tag name, With or without operator event)

Use in user-defined functions


SetTagIndirectByTagIndirect (Tag_name, Source_tag_name,
With_or_without_operator_event)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

Parameters

Tag name
Name of the indirect tag whose value is specified by an indirect tag.

Tag name
Name of the indirect tag that returns the tag value.

With or without operator event


0 (hmiWithoutOperatorEvent) = Without operator event
1 (hmiWithOperatorEvent) = With operator event

Example
When you click the objectName button, the following program code sets the "rt_value" tag to
the value of the "value" tag.

{
Int rt_value;
Int value;

SetTagIndirectByTagIndirect ("rt_value", "value", hmiWithoutOperatorEvent);


...
}

WinCC Professional V13 SP2 – Programming reference


122 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.34.16 SetTagIndirectWithOperatorInputAlarm (RT Professional)

Description
Specifies the indirect name for a tag. The change is also logged in the alarm system.

Use in the function list


SetTagIndirectWithOperatorInputAlarm (Tag name (output), LpValue)

Use in user-defined functions


SetTagIndirectWithOperatorEvent
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

Parameters

Tag name (output)


Name of the tag to which the tag name is written.

LpValue
Name of the tag written to the tag.

1.1.34.17 SetTagWithOperatorEvent (RT Professional)

Description
Specifies the value for a tag. The change is also logged in the alarm system.

Use in the function list


SetTagWithOperatorInputAlarm (Tag name (output), LpValue)

Use in user-defined functions


SetTagWithOperatorEvent (Tag_name, Value)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

Parameters

Tag name (output)


Name of the tag whose value is to be set.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 123
C scripting (RT Professional)
1.1 System functions (RT Professional)

LpValue
Value written to the tag.

Example
The following program code transfers the value from the "value" tag to the "result" tag when
you click the corresponding button.

{
BYTE result;
BYTE value;

SetTagWithOperatorEvent ("result", "value");


...
}

1.1.35 StartProgram (RT Professional)

Description
Starts the specified program with the specified parameters.
The system function can be used in C scripting only

Syntax
void StartProgram(Program_name,Program_parameter,Display_mode,
Wait_for_program_end);

Parameters

Program_name
Path and name of the program to be started.

Program_parameters
Parameters to be used for start-up. Information on the possible parameters can be found in
the description of the program to be started.

Display_mode
Defines the display mode in which the program is started:
0 (hmiShowNormal) = Display in window
1 (hmiShowMinimized) = Display in minimized window
2 (hmiShowMaximized) = Display in maximized window

WinCC Professional V13 SP2 – Programming reference


124 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

3 (hmiShowMinimizedAndInaktive) = Display in inactive and minimized window

Wait_for_program_end
The parameter is not evaluated by WinCC Runtime Professional.

Example
The following program code starts the calc.exe program in the minimized window.

{
BOOL Wait_for_program_end;
float number;

//start the program calc.exe


StartProgram("C:\\Winnt\\system32\\calc.exe",number,hmiShowMinimized,
Wait_for_program_end);
...
}

1.1.36 StopRuntime (RT Professional)

Description
Exits the runtime software and thereby the project running on the HMI device.

Use in the function list


StopRuntime (Mode)

Use in user-defined functions


StopRuntime (Mode)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Mode
Determines whether the operating system is shut down after exiting runtime.
0 (hmiStopRuntime) = Runtime: Operating system is not shut down
1 (hmiStopRuntimeAndOperatingSystem) = Runtime and operating system: The operating
system is shut down (not possible with WinCE)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 125
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code shuts down Runtime and the operating system.

//Stop runtime and shutdown


StopRuntime (hmiStopRuntimeAndOperationSystem);

The saved return value can be processed in the following code.

1.1.37 StoreScreen (RT Professional)

Description
Saves the current screen. This screen can be opened with the ActivateStoredScreen system
function.
Can only be used in C scripting.

Syntax
BOOL StoreScreen();

Return value

TRUE
System function completed without errors.

FALSE
An error has occurred.

WinCC Professional V13 SP2 – Programming reference


126 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Example
The following program code writes the return value of the StoreScreen function to the
screen_stored tag and calls the stored screen, provided that this was saved without errors.

{
BOOL screen_stored;
screen_stored = StoreScreen();
//user defined code
...
//error handling
if(screen_stored)
{
// succeeded
ActivateStoredScreen();
printf ( "Stored screen is now activated.\r\n" );
}
else
{
// failed
printf ( "Error - no screen stored." );
}
...
}

See also
ActivateStoredScreen (Page 28)

1.1.38 TriggerOperatorEvent (RT Professional)

Description
The TriggerOperatorEvent system function triggers an operator input alarm.

Syntax
int TriggerOperatorEvent( DWORD dwFlags, DWORD dwMsgNum, char* lpszObjectName,
DWORD dwMyTextID, double doValueOld, double doValueNew, char* pszComment );

Parameter

dwFlags

FLAG_COMMENT_PARAMETER (0x001): Specifies that the comment is input by means of


the parameter.
FLAG_COMMENT_DIALOG (0x003): Specifies that the comment is input by means of a dialog.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 127
C scripting (RT Professional)
1.1 System functions (RT Professional)

FLAG_TEXTID_PARAMETER (0x100): Specifies that the comment is specified by means of


a Text ID.

dwMsgNum
Number of the operator input alarm that is triggered.

lpszObjectName
Pointer to the name of the tag with the old value and the new value.

dwMyTextID
ID of the text to be used as comment.

doValueOld
Old value.

doValueNew
New value.

pszComment
Pointer to the text to be used as comment.

Return value

TRUE
The system function has been completed without any errors.

FALSE
An error has occurred.

1.1.39 UA (Recipe) (RT Professional)

1.1.39.1 uaAddArchive (RT Professional)

Description
Adds a new recipe. This corresponds to the configuration of a new recipe using the "Recipes"
editor.
Can only be used in C scripting.

Syntax
LONG uaAddArchive (
UAHCONFIG hConfig,

WinCC Professional V13 SP2 – Programming reference


128 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

UACONFIGARCHIVE* pArchive )

Parameters

UAHCONFIG hConfig
Configuration handle for the recipe. This handle is generated using uaQueryConfiguration.

UACONFIGARCHIVE* pArchive
Pointer to buffer for the recipe configuration memory

Return value
Index of the new recipe. An error corresponds to "-1".

See also
UaQueryConfiguration (Page 166)

1.1.39.2 uaAddField (RT Professional)

Description
Adds a new data field.
Can only be used in C scripting.

Syntax
LONG uaAddField (
UAHCONFIG hConfig,
long lArchive,
UACONFIGFIELD* pField )

Parameters

UAHCONFIG hConfig,
Configuration handle of the recipe. This handle is generated using uaQueryConfiguration .

long lArchive,
Archive index (0 to (uaGetNumArchives()-1))

UACONFIGFIELD* pArchive
Pointer to buffer of the field configuration.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 129
C scripting (RT Professional)
1.1 System functions (RT Professional)

Return value
Index of the new field. A value of "-1" indicates an error.

1.1.39.3 uaArchiveClose (RT Professional)

Description
Terminates the connection to the current recipe.
Can only be used in C scripting.

Syntax
BOOL uaArchiveClose (
UAHARCHIVE hArchive )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

Return value

TRUE
Successful closing of the recipe

FALSE
Error

1.1.39.4 uaArchiveDelete (RT Professional)

Description
Deletes the data from a recipe. The configured recipe, however, is retained.
Can only be used in C scripting.

Syntax
BOOL uaArchiveDelete (
UAHARCHIVE hArchive,
LPCSTR pszWhere )

WinCC Professional V13 SP2 – Programming reference


130 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LPCSTR pszWhere
This string contains the SQL selection expression. It defines which data records are to be
deleted. The expression is equivalent to the SQL instruction "DELETE FROM <archive>
WHERE pszWhere".
Warning! If this string is empty, the entire recipe will be deleted.

Return value
TRUE
Successful deletion of the recipe
FALSE
Error

1.1.39.5 uaArchiveExport (RT Professional)

Description:
Exports the current recipe to a log in CSV format.
Can only be used in C scripting.

Syntax
BOOL uaArchiveExport (
UAHARCHIVE hArchive,
LPCSTR pszDestination,
LONG lType,
LONG lOptions )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using UaQueryArchive or
UaQueryArchiveByName.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 131
C scripting (RT Professional)
1.1 System functions (RT Professional)

LPCSTR pszDestination
File name of the target archive.

LONG lType
Data format of the target archive. Two formats are available:
● UA_FILETYPE_DEFAULT = 0: Default file format = CSV
● UA_FILETYPE_CSV = 1: CSV file format

LONG lOptions
Reserved for future expansions. Must be 0.

Return value
TRUE
Successful export of the recipe
FALSE
Error

1.1.39.6 uaArchiveGetCount (RT Professional)

Description
Reads the number of data records.
Can only be used in C scripting.

Syntax
LONG uaArchiveGetCount(
UAHARCHIVE hArchive,
LONG * plCount )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName .

LONG plCount
Pointer to a tag in which the number of data records should be stored.

WinCC Professional V13 SP2 – Programming reference


132 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Return value
Number of data records.
0 = Log is empty or error has occurred. Must be queried by means of uaGetLastError() .

1.1.39.7 uaArchiveGetFieldLength (RT Professional)

Description
Reads the length of a field in the current data record.
Can only be used in C scripting.

Syntax
LONG uaArchiveGetFieldLength(
UAHARCHIVE hArchive,
LONG lField )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LONG lField
Field number, with lField = 1 addressing the first field.

Return value
Length of the current field.

1.1.39.8 uaArchiveGetFieldName (RT Professional)

Description
Reads the name of a field in the current data record.
Can only be used in C scripting.

Syntax
VOID uaArchiveGetFieldName (
UAHARCHIVE hArchive,
LONG lField,

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 133
C scripting (RT Professional)
1.1 System functions (RT Professional)

LPCSTR pszName,
LONG cMaxLen )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LONG lField
Field number, with lField = 1 addressing the first field.

LPCSTR pszName
Field Name

LONG cMaxLen
Maximum length

1.1.39.9 uaArchiveGetFields (RT Professional)

Description
Reads the number of configured data fields, which also includes the "ID", "Last User", and
"Last Access" fields. In the Runtime calls, the indexes of the configured fields are indicated 1
to N. The field ID has the index 0. The fields "Last User" and "Last Access" are appended to
the end of the configured fields.
Can only be used in C scripting.

Syntax
LONG uaArchiveGetFields (
UAHARCHIVE hArchive )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

Return value
Number of configured fields.

WinCC Professional V13 SP2 – Programming reference


134 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.39.10 uaArchiveGetFieldType (RT Professional)

Description
Reads the type of a field in the current data record.
Can only be used in C scripting.

Syntax
LONG uaArchiveGetFieldType (
UAHARCHIVE hArchive,
LONG lField )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LONG lField
Field number, with lField = 1 addressing the first field.

Return value
Type of the current field.
The symbolic definitions of the field types are:
UA_FIELDTYPE_INTEGER
UA_FIELDTYPE_DOUBLE
UA_FIELDTYPE_STRING
UA_FIELDTYPE_DATETIME

1.1.39.11 uaArchiveGetFieldValueDate (RT Professional)

Description
Reads the date and time of a field in the current data record.
Can only be used in C scripting.

Syntax
BOOL uaArchiveGetFieldValueDate (
UAHARCHIVE hArchive,

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 135
C scripting (RT Professional)
1.1 System functions (RT Professional)

LONG lField,
LPSYSTEMTIME pstDateTime )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName .

LONG lField
Field number, with lField = 1 addressing the first field.

LPSYSTEMTIME pstDateTime
Pointer to a tag of the type SYSTEMTIME

Return value
TRUE
Successful reading of date and time
FALSE
Error

1.1.39.12 uaArchiveGetFieldValueDouble (RT Professional)

Description
Reads the Double value of a field in the current data record.
The system function can be used in C scripting only.
BOOL uaArchiveGetFieldValueDouble (
UAHARCHIVE hArchive,
LONG lField,
double* pdValue )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LONG lField
Field number, with lField = 1 addressing the first field.

WinCC Professional V13 SP2 – Programming reference


136 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

double* pdValue
Pointer to tag for the current field content.

Return value
TRUE
Successful reading of field value
FALSE
Error

1.1.39.13 uaArchiveGetFieldValueFloat (RT Professional)

Description
Reads Float value of a field in the current data record.
Can only be used in C scripting.

Syntax
BOOL uaArchiveGetFieldValueFloat (
UAHARCHIVE hArchive,
LONG lField,
FLOAT* pfValue )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LONG lField
Field number, with lField = 1 addressing the first field.

FLOAT* pfValue
Pointer to Float tag for the current field content.

Return value
TRUE
Successful reading of field value
FALSE
Error

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 137
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.39.14 uaArchiveGetFieldValueLong (RT Professional)

Description
Reads the Long Integer value of a field in the current data record.
Can only be used in C scripting.

Syntax
BOOL uaArchiveGetFieldValueLong (
UAHARCHIVE hArchive,
LONG lField,
LONG* pdValue )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LONG lField
Field number, with lField = 1 addressing the first field.

LONG* pdValue
Pointer to Long tag for the current field content.

Return value
TRUE
Successful reading of field value
FALSE
Error

1.1.39.15 uaArchiveGetFieldValueString (RT Professional)

Description
Reads the string of a field in the current data record.
Can only be used in C scripting.

WinCC Professional V13 SP2 – Programming reference


138 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Syntax
BOOL uaArchiveGetFieldValueString (
UAHARCHIVE hArchive,
LONG lField,
LPSTR pszString,
LONG cMaxLen )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LONG lField
Field number, with lField = 1 addressing the first field.

LPCSTR pszString
Field value as string.

LONG cMaxLen
Maximum length of the string.

Return value
TRUE
Successful reading of field value
FALSE
Error

1.1.39.16 uaArchiveGetFilter (RT Professional)

Description
Reads the filter of the current data record. Additional information can be found in the appendix
under "SQL Statements".
Can only be used in C scripting.

Syntax
VOID uaArchiveGetFilter (
UAHARCHIVE hArchive,
LPSTR pszFilter,

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 139
C scripting (RT Professional)
1.1 System functions (RT Professional)

LONG cMaxLen )
The system function can be used in C scripting only.

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LPSTR pszFilter
Read filter.

LONG cMaxLen
Maximum length

1.1.39.17 uaArchiveGetID (RT Professional)

Description
uaArchiveGetID reads the ID of the recipe.
The recipe ID serves internal purposes and may differ from the number given in the recipe.
Can only be used in C scripting.

Syntax
LONG uaArchiveGetID (
UAHARCHIVE hArchive )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

Return value
ID of the recipe.

1.1.39.18 uaArchiveGetName (RT Professional)

Description
Reads the name of the recipe.

WinCC Professional V13 SP2 – Programming reference


140 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Can only be used in C scripting.

Syntax
VOID uaArchiveGetName (
UAHARCHIVE hArchive,
LPSTR pszName,
LONG cMaxLen )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LPSTR pszName
Pointer to buffer for recipe name.

LONG cMaxLen
Maximum length

Example
char Filling [40];
uaArchiveGetName( hArchive, bottling, 39 );

1.1.39.19 uaArchiveGetSor (RT Professional)

Description
uaArchiveGetSort reads the sorting of the recipe.
Can only be used in C scripting.

Syntax
VOID uaArchiveGetSort (
UAHARCHIVE hArchive,
LPSTR pszSort,
LONG cMaxLen )

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 141
C scripting (RT Professional)
1.1 System functions (RT Professional)

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LPCSTR pszSort
Sorting

LONG cMaxLen
Maximum length

1.1.39.20 uaArchiveImport (RT Professional)

Description
uaArchivImport imports a recipe with CSV data format. The structure of the destination recipe
must be identical to that of the imported recipe.

Syntax
BOOL uaArchiveImport (
UAHARCHIVE hArchive,
LPCSTR pszSource,
LONG lType,
LONG lOptions )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LPCSTR pszSource
File name of the source archive.

LONG lType
Data format of the source archive. Two formats are available:
UA_FILETYPE_DEFAULT = 0: Default file format = CSV
UA_FILETYPE_CSV = 1: CSV file format

LONG lOptions
Reserved for future expansions. Must be 0.

WinCC Professional V13 SP2 – Programming reference


142 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Return value
TRUE
Successful import of the recipe.
FALSE
Error

1.1.39.21 uaArchiveInsert (RT Professional)

Description
Inserts the local data record buffer into the current database. Before you call uaArchiveInsert,
use the "uaArchiveSetFieldValue..." system functions to enter the data in the fields of the local
data buffer so that the new data record contains useful data.
Use system function "uaArchiveSetFieldValueLong" to enter the internal column "ID" in the
current data record. Can only be used in C scripting.

Syntax
BOOL uaArchiveInsert (
UAHARCHIVE hArchive )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

Return value
TRUE
Successful insertion of the data record.

1.1.39.22 uaArchiveMoveFirst (RT Professional)

Description
Goes to the first data record.
Can only be used in C scripting.

Syntax
BOOL uaArchiveMoveFirst (

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 143
C scripting (RT Professional)
1.1 System functions (RT Professional)

UAHARCHIVE hArchive )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

Return value
TRUE
Successful jumping in the recipe
FALSE
Error

1.1.39.23 uaArchiveMoveLast (RT Professional)

Description
Goes to the last data record.
Can only be used in C scripting.

Syntax
BOOL uaArchiveMoveLast (
UAHARCHIVE hArchive )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName .

Return value
TRUE
Successful jumping in the recipe
FALSE
Error

WinCC Professional V13 SP2 – Programming reference


144 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.39.24 uaArchiveMoveNext (RT Professional)

Description
Goes to the next data record.
Can only be used in C scripting.

Syntax
BOOL uaArchiveMoveNext (
UAHARCHIVE hArchive )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

Return value
TRUE
Successful jumping in the recipe
FALSE
Error

1.1.39.25 uaArchiveMovePrevious (RT Professional)

Description
Goes to the previous data record.
Can only be used in C scripting.

Syntax
BOOL uaArchiveMovePrevious (
UAHARCHIVE hArchive )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 145
C scripting (RT Professional)
1.1 System functions (RT Professional)

Return value
TRUE
Successful jumping in the recipe
FALSE
Error

1.1.39.26 uaArchiveOpen (RT Professional)

Description
uaArchiveOpen must be called before all RT functions (e.g. uaArchiveMoveFirst,
uaArchiveMoveLast, uaArchiveMoveNext, uaArchiveMovePrevious, uaArchiveDelete,
uaArchiveUpdate, uaArchiveInsert, uaArchiveGetID, uaArchiveGetFields,
uaArchiveGetFieldType, uaArchiveGetFieldValueDate, uaArchiveGetFieldValueDouble,
uaArchiveGetFieldValueFloat, uaArchiveGetFieldValueLong, uaArchiveGetFieldValueString,
uaArchiveSetFieldValueDate, uaArchiveSetFieldValueDouble, uaArchiveSetFieldValueFloat,
uaArchiveSetFieldValueLong and uaArchiveSetFieldValueString).

Note
Sort and filter recipes
You may apply the "uaArchiveSetSort" and "uaArchiveSetFilter" system functions to a recipe
without having to open this recipe by means of "uaArchiveOpen".

Can only be used in C scripting.

Syntax
BOOL uaArchiveOpen (
UAHARCHIVE hArchive )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

Return value
TRUE
Successful opening of the recipe
FALSE
Error

WinCC Professional V13 SP2 – Programming reference


146 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.39.27 uaArchiveReadTagValues (RT Professional)

Description
Reads the current value from the field tag.
Can only be used in C scripting.

Syntax
BOOL uaArchiveReadTagValues (
UAHARCHIVE hArchive,
LONG* pnFields,
LONG cFields,
LONG lOptions )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LONG* pnFields
Reserved for future applications (NULL)

LONG cFields
Number of field indices transferred (size of array pnFields).
Reserved for future applications (0)

LONG lOptions
Reserved for future applications (0)
In the case of all other values of lOptions, the data is inserted at the position of the pointer.

Return value
TRUE
Successful reading in the recipe
FALSE
Error

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 147
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.39.28 uaArchiveReadTagValuesByName (RT Professional)

Description
Reads the tag values in the current data.
Can only be used in C scripting.

Syntax
BOOL uaArchiveReadTagValuesByName (
UAHARCHIVE hArchive,
LPCSTR pszFields,
LONG lOptions )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LPCSTR pszFields
Reserved for future applications (NULL)

LONG lOptions
Reserved for future applications (0)

Return value
TRUE
Successful reading in the recipe
FALSE
Error

WinCC Professional V13 SP2 – Programming reference


148 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.39.29 uaArchiveRequery (RT Professional)

Description
On completion of the call of uaArchiveSetFilter and uaArchiveSetSort, reload the recipe by
means of uaArchiveRequery.

Note
Sort and filter recipes
You may apply the "uaArchiveSetSort" and "uaArchiveSetFilter" system functions to a recipe
without having to open this recipe by means of "uaArchiveOpen". In this case you do no have
to call the system function "uaArchiveRequery".

Call uaArchiveRequery in the following situations as well:


● If you have made inputs in the recipe view.
● If you have made inputs in the "Recipes" editor that are to be transferred to the table cell.

Syntax
BOOL uaArchiveRequery(
UAHARCHIVE hArchive )
Can only be used in C scripting.

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

Return value
TRUE
Successful requery
FALSE
Error

1.1.39.30 uaArchiveSetFieldValueDate (RT Professional)

Description
Writes the date and time into a field of the current data record.
Can only be used in C scripting.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 149
C scripting (RT Professional)
1.1 System functions (RT Professional)

Syntax
BOOL uaArchiveSetFieldValueDate (
UAHARCHIVE hArchive,
LONG lField,
LPSYSTEMTIME pstDateTime )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LONG lField
Field number, with lField = 1 addressing the first configured field. The ID field is addressed
with lField = 0.

LPSYSTEMTIME pstDateTime
Date and Time

Return value
TRUE
Successful writing of date and time
FALSE
Error

1.1.39.31 uaArchiveSetFieldValueDouble (RT Professional)

Description
Writes a Double value into a field of the current data record.
Can only be used in C scripting.

Syntax
BOOL uaArchiveSetFieldValueDouble (
UAHARCHIVE hArchive,
LONG lField,
double dValue )

WinCC Professional V13 SP2 – Programming reference


150 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LONG lField
The field number, where lField = 1 is addressing the first configured field. The ID field is
addressed with lField = 0.

double dValue
Field value

Return value
TRUE
Successful writing of field value
FALSE
Error

1.1.39.32 uaArchiveSetFieldValueFloat (RT Professional)

Description:
Writes a Float value into a field of the current data record.
Can only be used in C scripting.

Syntax
BOOL uaArchiveSetFieldValueFloat (
UAHARCHIVE hArchive,
LONG lField,
float fValue )

Parameters:

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LONG lField
Field number, with lField = 1 addressing the first configured field. The ID field is addressed
with lField = 0.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 151
C scripting (RT Professional)
1.1 System functions (RT Professional)

float fValue
Field value

Return value:
TRUE
Successful writing of field value
FALSE
Error

1.1.39.33 uaArchiveSetFieldValueLong (RT Professional)

Description
Writes a Long Integer value into a field of the current data record.
Can only be used in C scripting.

Syntax
BOOL uaArchiveSetFieldValueLong (
UAHARCHIVE hArchive,
LONG lField,
LONG dValue )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LONG lField
The field number, where lField = 1 is addressing the first configured field. The ID field is
addressed with lField = 0.

LONG dValue
Field value

Return value
TRUE
Successful writing of field value
FALSE

WinCC Professional V13 SP2 – Programming reference


152 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Error

1.1.39.34 uaArchiveSetFieldValueString (RT Professional)

Description
Writes a String into a field of the current data record.
Can only be used in C scripting.

Syntax
BOOL uaArchiveSetFieldValueString (
UAHARCHIVE hArchive,
LONG lField,
LPCSTR pszString )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LONG lField
The field number, where lField = 1 is addressing the first configured field. The ID field is
addressed with lField = 0 .

LPCSTR pszString
Field value

Return value
TRUE
Successful writing of field value
FALSE
Error

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 153
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.39.35 uaArchiveSetFilter (RT Professional)

Description
Sets the filter. You can call the system function without having opened the recipe with
"uaArchiveOpen".

Note
If you have opened the recipe with "uaArchiveOpen", reload the recipe after filtering by means
of "uaArchiveRequery".

Can only be used in C scripting.

Syntax
VOID uaArchiveSetFilter (
UAHARCHIVE hArchive,
LPSTR pszFilter )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LPSTR pszFilter
Filter to be set.

1.1.39.36 uaArchiveSetSort (RT Professional)

Description
Sets the sorting of the recipe. You can call the system function without having opened the
recipe with "uaArchiveOpen".

Note
If you have opened the recipe with "uaArchiveOpen", reload the recipe after sorting by means
of "uaArchiveRequery".

Can only be used in C scripting.

Syntax
BOOL uaArchiveSetSort (

WinCC Professional V13 SP2 – Programming reference


154 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

UAHARCHIVE hArchive,
LPSTR pszSort )
The system function can be used in C scripting only.

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LPCSTR pszSort
Sorting

Return value
TRUE
Successful setting of the sorting
FALSE
Error

1.1.39.37 uaArchiveUpdate (RT Professional)

Description
Updates the open recipe. All data changes of a recipe are transferred to the database. The
configuration of the recipe remains unchanged.
Can only be used in C scripting.

Syntax
BOOL uaArchiveUpdate (
UAHARCHIVE hArchive )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

Return value
TRUE

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 155
C scripting (RT Professional)
1.1 System functions (RT Professional)

Successful update of the recipe


FALSE
"Update_failed" error = 106
This error occurs when there is a consistency violation. Example: The "Field requires a value"
flag is set in a field, but no value has been entered there.

1.1.39.38 uaArchiveWriteTagValues (RT Professional)

Description
Writes the values of the current data record into the tags.
Can only be used in C scripting.

Syntax
BOOL uaArchiveWriteTagValues (
UAHARCHIVE hArchive,
LONG* pnFields,
LONG cFields,
LONG lOptions )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LONG* pnFields
Reserved for future applications (NULL)

LONG cFields
Reserved for future applications (0)

LONG lOptions
Reserved for future applications (0)

Return value
TRUE
Successful reading in the recipe
FALSE
Error

WinCC Professional V13 SP2 – Programming reference


156 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.39.39 uaArchiveWriteTagValuesByName (RT Professional)

Description
Writes the values of the current data record into the tags. The access is based on the names
of the recipe and field.
Can only be used in C scripting.

Syntax
BOOL uaArchiveWriteTagValuesByName (
UAHARCHIVE hArchive,
LPCSTR pszFields,
LONG lOptions )

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

LPCSTR pszFields
Reserved for future applications (NULL)

LONG lOptions
Reserved for future applications (0)

Return value
TRUE
Successful reading in the recipe
FALSE
Error

1.1.39.40 uaConnect (RT Professional)

Description
Establishes connection to recipes (Runtime).
Can only be used in C scripting.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 157
C scripting (RT Professional)
1.1 System functions (RT Professional)

Syntax
BOOL uaConnect (
UAHCONNECT* phConnect )

Parameters

UAHCONNECT* phConnect
Pointer to handle for newly connected recipe.

Return value
TRUE
Successful connection of a recipe
FALSE
Error

1.1.39.41 uaDisconnect (RT Professional)

Description
If a connection to recipes (Runtime) exists, it will be disconnected.
Can only be used in C scripting.

Syntax
BOOL uaDisconnect (
UAHCONNECT hConnect )

Parameters

UAHCONNECT hConnect
Handle for the connected recipe (Runtime). The handle is generated using uaConnect.

Return value
TRUE
Successful disconnection of a recipe
FALSE
Error

WinCC Professional V13 SP2 – Programming reference


158 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.39.42 uaGetArchive (RT Professional)

Description
Reads the recipe configuration.
Can only be used in C scripting.

Syntax
BOOL uaGetArchive (
UAHCONFIG hConfig,
long lArchive,
UACONFIGARCHIVE* pArchive )

Parameters

UAHCONFIG hConfig,
Configuration handle of the recipe. This handle is generated using uaQueryConfiguration.

long lArchive,
Archive index (0 to (uaGetNumArchives()-1))

UACONFIGARCHIVE* pArchive
Pointer to buffer for receiving the recipe configuration

Return value
TRUE
Successful access to the recipe
FALSE
Error

1.1.39.43 uaGetField (RT Professional)

Description:
Reads the field configuration.
Can only be used in C scripting.

Syntax
BOOL uaGetField (

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 159
C scripting (RT Professional)
1.1 System functions (RT Professional)

UAHCONFIG hConfig,
long lArchive,
long lField,
UACONFIGFIELD* pField )

Parameters:

UAHCONFIG hConfig,
Configuration handle of the recipe. This handle is generated using uaQueryConfiguration.

long lArchive,
Archive index (0 to (uaGetNumArchives()-1))

long lField,
The field number; if lField = 0 the first field is addressed.

UACONFIGFIELD* pArchive
Pointer to buffer for receiving the field configuration.

Return value
TRUE
Successful access to the recipe
FALSE
Error

1.1.39.44 uaGetLastError (RT Professional)

Description
The system functions of the WinCC script language return a BOOL value; TRUE corresponds
to error-free processing. If FALSE is returned, you can use "uaGetLastError()" and
"uaGetLastHResult()" to read the error of the last system function.
Can only be used in C scripting.
If you do not call uaGetLastError() until several system functions have been processed,
uaGetLastError() will return the most recent error. You should call a "uaGetLastError()" and
"uaGetLastHResult()" system function whenever FALSE is returned to identify the system
function that triggered the error.
Example:
if ( uaArchiveGetFieldValueLong ( hArchive, Index, &IntValue ) ==
TRUE )
printf( "Field Value = %u\n", IntValue );

WinCC Professional V13 SP2 – Programming reference


160 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

else
printf("Error calling uaArchiveGetFieldValueLong: %d / %08lx\n",
uaGetLastError(), uaGetLastHResult());
You should always query system functions that do not return a value (VOID) by calling
uaGetLastError() .
Example:
uaArchiveGetFilter(hArchive, pszFilter, cMaxLen);
INT nUAError = uaGetLastError ( );
if ( UA_ERROR_SUCCESS != nUAError)
{
printf( "Filter = [%s]\n", pszFilter );
}
else
{
printf("Error calling uaArchiveGetFilter: %d, hr=0x%08lX\n",
nUAError, uaGetLastHResult());
}

INT uaGetLastError()

Return value
Error status of the last system function executed. uaGetLastError() can return the following
errors:
UA_ERROR_SUCCESS
UA_ERROR_GENERIC
UA_ERROR_CONNECT_FAILED
UA_ERROR_OPEN_FAILED
UA_ERROR_CLOSE_FAILED
UA_ERROR_REQUERY_FAILED
UA_ERROR_MOVE_FAILED
UA_ERROR_INSERT_FAILED
UA_ERROR_UPDATE_FAILED
UA_ERROR_DELETE_FAILED
UA_ERROR_IMPORT_FAILED
UA_ERROR_EXPORT_FAILED
UA_ERROR_READ_FAILED

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 161
C scripting (RT Professional)
1.1 System functions (RT Professional)

UA_ERROR_WRITE_FAILED
UA_ERROR_GET_FAILED
UA_ERROR_SET_FAILED
UA_ERROR_INVALID_NAME
UA_ERROR_INVALID_TYPE
UA_ERROR_INVALID_NUMRECS
UA_ERROR_INVALID_COMMTYPE
UA_ERROR_INVALID_LENGTH
UA_ERROR_INVALID_PRECISION
UA_ERROR_NULL_POINTER
UA_ERROR_INVALID_POINTER
UA_ERROR_INVALID_HANDLE
UA_ERROR_INVALID_INDEX
UA_ERROR_SERVER_UNKNOWN
These error constants as well as the predefines of the user archive routines are located in
CCUACAPI.H.

1.1.39.45 uaGetLastHResult (RT Professional)

Description
Reads the last occurred COM error. This system function is used primarily to analyze
incompatibility in the COM implementation or to identify registry errors and communication
errors.
This system function must always be called in addition to UAGetLastError if one of the user
archive system functions (e.g uaConnect) returns the value "FALSE" to signal an error.
Can only be used in C scripting.

Syntax
LONG uaGetLastHResult()

Return value
Last occurred COM error

WinCC Professional V13 SP2 – Programming reference


162 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.39.46 uaGetNumArchives (RT Professional)

Description
Reads the number of recipes currently configured.
Can only be used in C scripting.

Syntax
LONG uaGetNumArchives (
UAHCONFIG hConfig )

Parameters

UAHCONFIG hConfig
Configuration handle of the recipe. This handle is generated using uaQueryConfiguration.

Return value
Number of recipes currently configured. In case of an error, -1 will be returned.

1.1.39.47 uaGetNumFields (RT Professional)

Description
Supplies the number of the configured fields. The "ID", "Last User" and "Last Access" fields
are not included. Indexes are specified from 0 to uaGetNumFields() -1 in the configuration
calls.
Can only be used in C scripting.

Syntax
LONG uaGetNumFields (
UAHCONFIG hConfig,
long lArchive )

Parameters

UAHCONFIG hConfig,
Configuration handle of the recipe. This handle is generated using uaQueryConfiguration.

long lArchive,
Archive index (0 to (uaGetNumArchives()-1))

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 163
C scripting (RT Professional)
1.1 System functions (RT Professional)

Return value
Number of configured fields. In case of an error, -1 will be returned.

1.1.39.48 uaQueryArchive (RT Professional)

Description
Establishes a connection to the recipe for Runtime operation. UaQueryArchive creates the
handle UAHARCHIVE.
Can only be used in C scripting.

Syntax
BOOL uaQueryArchive (
UAHCONNECT hConnect,
LONG lArchive,
UAHARCHIVE* phArchive )

Parameters

UAHCONNECT hConnect
Handle of the connected recipe (Runtime). The handle is generated using uaConnect.

LONG lArchive
ID of the archive to be connected (0... uaGetNumArchives() -1)

UAHARCHIVE* phArchive
Pointer to handle of the recipe

Return value
TRUE
Successful generation of the handle to the recipe.
FALSE
Error

Comment
If you use User Archives functions in a client project that works with redundant server pairs,
the user archives connection cannot be switched automatically to the new master when
switching masters. In this case, all user archives calls return the LastError
UA_ERROR_SERVER_UNKNOWN = 1004, which means that the user programs must
execute a new uaQueryArchive() or uaQueryArchiveByName() and uaArchiveOpen().

WinCC Professional V13 SP2 – Programming reference


164 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.39.49 uaQueryArchiveByName (RT Professional)

Description
Establishes a connection to the recipe for Runtime operation using the recipe name.
UaQueryArchiveByName creates the UAHARCHIVE handle for the recipe.
Can only be used in C scripting.

Syntax
BOOL uaQueryArchiveByName (
UAHCONNECT hConnect,
LPCSTR pszName,
UAHARCHIVE* phArchive )

Parameters

UAHCONNECT hConnect
Handle of the connected recipe (Runtime). The handle is generated using uaConnect.

LPCSTR pszName
Name of the recipe. With a client project, you can add a server prefix with ‘::‘ to the recipe
name as a separator, if a server other than the default server is used.

UAHARCHIVE* phArchive
Pointer to handle of the recipe

Return value
TRUE
Successful generation of the handle to the recipe.
FALSE
Error

Comment
If you use User Archives functions in a client project that works with redundant server pairs,
the user archives connection cannot be switched automatically to the new master when
switching masters. In this case, all user archives calls return the LastError
UA_ERROR_SERVER_UNKNOWN = 1004, which means that the user programs must
execute a new uaQueryArchive() or uaQueryArchiveByName() and uaArchiveOpen().

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 165
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.39.50 UaQueryConfiguration (RT Professional)

Description
Establishes a connection to the recipe for the configuration.
Can only be used in C scripting.

Syntax
BOOL uaQueryConfiguration (
UAHCONFIG* phConfig )

Parameters

UAHCONFIG* phConfig,
Pointer to handle of the recipe.

Return value
TRUE
Successful access to recipe
FALSE
Error

See also
uaAddArchive (Page 128)

1.1.39.51 uaReleaseArchive (RT Professional)

Description
Releases the connection to the current recipe.
Can only be used in C scripting.

Syntax
BOOL uaReleaseArchive (
UAHARCHIVE hArchive )

WinCC Professional V13 SP2 – Programming reference


166 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Parameters

UAHARCHIVE hArchive
Handle of the recipe. This handle is generated using uaQueryArchive or
uaQueryArchiveByName.

Return value
TRUE
Successful release of connection to the recipe.
FALSE
Error

Comment
The "hArchive" handle must be set to "NULL" on successful release to make absolutely sure
that the "UA_ERROR_INVALID_HANDLE" error is triggered on further use of the invalid handle
and without the respective function dwelling at the COM interface for a longer period of time.

1.1.39.52 uaReleaseConfiguration (RT Professional)

Description
Releases connection to recipes (configuration).
Can only be used in C scripting.

Syntax
BOOL uaReleaseConfiguration (
UAHCONFIG hConfig,
BOOL bSave )

Parameters

UAHCONFIG hConfig
Configuration handle of the recipe. This handle is generated using uaQueryConfiguration.

BOOL bSave
Saves changes made to the configuration before releasing the connection to recipes for the
configuration.
TRUE = Save Changes, FALSE = Discard Changes
Warning: Save changes (bSave = TRUE) may only be used when Runtime
is not active! You can check whether Runtime is active by requesting uaIsActive().

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 167
C scripting (RT Professional)
1.1 System functions (RT Professional)

Return value
TRUE
Successful connection release
FALSE
Error

1.1.39.53 uaRemoveAllArchives (RT Professional)

Description
Deletes all recipes that are not used in views.
Can only be used in C scripting.

Syntax
BOOL uaRemoveAllArchives
( UAHCONFIG hConfig )

Parameters

UAHCONFIG hConfig
Configuration handle of the recipe. This handle is generated using uaQueryConfiguration.

Return value
TRUE
Successful deletion
FALSE
Error

Comment
On completion, you can query "uaGetNumArchives()" to verify deletion of all recipes.

1.1.39.54 uaRemoveAllFields (RT Professional)

Description
Removes all fields.
Can only be used in C scripting.

WinCC Professional V13 SP2 – Programming reference


168 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

Syntax
BOOL uaRemoveAllFields (
UAHCONFIG hConfig,
long lArchive )

Parameters

UAHCONFIG hConfig,
Configuration handle of the recipe. This handle is generated using uaQueryConfiguration.

long lArchive,
Archive index (0 to (uaGetNumArchives()-1))

Return value
TRUE
Successful deletion of fields
FALSE
Error

1.1.39.55 uaRemoveArchive (RT Professional)

Description
uaRemoveArchive deletes the entire configured recipe.
Can only be used in C scripting.

Syntax
BOOL uaRemoveArchive (
UAHCONFIG hConfig,
long lArchive )

Parameters

UAHCONFIG hConfig,
Configuration handle of the recipe. This handle is generated using uaQueryConfiguration.

long lArchive,
Archive index (0 to (uaGetNumArchives()-1))

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 169
C scripting (RT Professional)
1.1 System functions (RT Professional)

Return value
TRUE
Successful deletion of the recipe.
FALSE
Error

1.1.39.56 uaRemoveField (RT Professional)

Description
Removes a field.
Can only be used in C scripting.

Syntax
BOOL uaRemoveField (
UAHCONFIG hConfig,
long lArchive,
long lField )

Parameters

UAHCONFIG hConfig,
Configuration handle for the recipe. This handle is generated using uaQueryConfiguration.

long lArchive,
Archive index (0 to (uaGetNumArchives()-1))

long lField,
Field number, with lField = 0 addressing the first field.

Return value

TRUE
Successful deletion of field

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


170 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.1 System functions (RT Professional)

1.1.39.57 uaSetArchive (RT Professional)

Description:
Sets the configuration of a recipe.
Can only be used in C scripting.

Syntax
BOOL uaSetArchive (
UAHCONFIG hConfig,
long lArchive,
UACONFIGARCHIVE* pArchive
)

Parameters

UAHCONFIG hConfig,
Configuration handle for the recipe. This handle is generated using uaQueryConfiguration.

long lArchive,
Archive index (0 to (uaGetNumArchives()-1))

UACONFIGARCHIVE* pArchive
Pointer to pArchive buffer with the recipe configuration.

Return value

TRUE
Successful access to recipe.

FALSE
An error has occurred.

1.1.39.58 uaSetField (RT Professional)

Description
Sets the field configuration.
Can only be used in C scripting.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 171
C scripting (RT Professional)
1.2 C-bib (RT Professional)

Syntax
BOOL uaSetField (
UAHCONFIG hConfig,
long lArchive,
long lField,
UACONFIGFIELD* pField )

Parameters

UAHCONFIG hConfig,
Configuration handle for the recipe. This handle is generated using uaQueryConfiguration.

long lArchive,
Archive index (0 to (uaGetNumArchives()-1))

long lField,
Field number, with lField = 0 addressing the first field.

UACONFIGFIELD* pField
Pointer to buffer of the field configuration.

Return value
TRUE
Successful access to recipe.
FALSE
Error

1.2 C-bib (RT Professional)

1.2.1 ctype functions (RT Professional)

Function overview
The following ctype functions are available:
● long int isalnum (long int x);
● long int isalpha (long int x);
● long int isdigit (long int x);

WinCC Professional V13 SP2 – Programming reference


172 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.2 C-bib (RT Professional)

● long int isgraph (long int x);


● long int islower (long int x);
● long int isprint (long int x);
● long int ispunct (long int x);
● long int isspace (long int x);
● long int isupper (long int x);
● long int isxdigit (long int x);
● long int tolower (long int x);
● long int toupper (long int x);
For a description of the ctype functions see the specialist literature on programming language
C.
The functions can be used in C scripts only.

1.2.2 Function group c_bib (RT Professional)

Introduction
The c_bib function group contains C functions from the C library and is divided into:
● ctype
● math
● memory
● stdio
● stdlib
● string
● time
stdio itself is again divided into:
● char_io
● directio
● error
● file
● file_pos
● output
For a description of these functions see the relevant specialist literature.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 173
C scripting (RT Professional)
1.2 C-bib (RT Professional)

Specific features of WinCC functions


The localtime function behaves as follows when the date is issued:
● The counting of the months begins with 0.
● The years are counted as of 1990, starting with 0.
Only 360 characters of the functions of the C library printf(), sprintf(), fprintf() can be edited in
WinCC.

1.2.3 math functions (RT Professional)

Function overview
The following math functions are available:
● double acos (double x);
● double asin (double x);
● double atan (double x);
● double atan2 (double x, double y);
● double ceil (double x);
● double cos (double x);
● double cosh (double x);
● double exp (double x);
● double fabs (double x);
● double floor (double x);
● double fmod (double x, double y);
● double frexp (double x, long int* y);
● double ldexp (double x, long int y);
● double log (double x);
● double log10 (double x);
● double modf (double x, double* y);
● double pow (double x, double y);
● double sin (double x);
● double sinh (double x);
● double sqrt (double x);
● double tan (double x);
● double tanh (double x);
For a description of the math functions see the specialist literature on programming language
C.

WinCC Professional V13 SP2 – Programming reference


174 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.2 C-bib (RT Professional)

The functions can be used in C scripts only.

1.2.4 memory functions (RT Professional)

Function overview
The following memory functions are available:
● long int memcmp (const void* cs, const void* ct, size_t n);
● void* memchr (const void* cs, long int c, size_t n);
● void* memcpy (void* s, const void* ct, size_t n);
● void* memmove (void* s, const void* ct, size_t n);
● void* memset (void* s, long int c, size_t n);
For a description of the memory functions see the specialist literature on programming
language C.
The functions can be used in C scripts only.

1.2.5 multibyte functions (RT Professional)

Function overview
The following multibyte functions are available:
● int _ismbcalnum( unsigned int c )
● int _ismbcalpha( unsigned int c )
● int _ismbcdigit( unsigned int c )
● int _ismbcgraph( unsigned int c )
● int _ismbclower( unsigned int c )
● int _ismbcprint( unsigned int c )
● int _ismbcpunct( unsigned int c )
● int _ismbcspace( unsigned int c )
● int _ismbcupper( unsigned int c )
● int _mbscmp(const unsigned char *string1, const unsigned char *string2 )
● int _mbsncmp( const unsigned char *string1, const unsigned char *string2, size_t count )
● int _mbsrchr( const unsigned char *string, unsigned int c )
● size_t _mbscspn( const unsigned char *string, const unsigned char *strCharSet )
● size_t _mbsspn( const unsigned char *string, const unsigned char *strCharSet )

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 175
C scripting (RT Professional)
1.2 C-bib (RT Professional)

● size_t _mbstrlen( const char *string )


● size_t _mbslen( const unsigned char *string )
● unsigned char *_mbscat( unsigned char *strDestination, const unsigned char *strSource)
● unsigned char *_mbschr( const unsigned char *string, unsigned int c )
● unsigned char *_mbscpy( unsigned char *strDestination, const unsigned char *strSource )
● unsigned char *_mbsdec( const unsigned char *start, const unsigned char *current )
● unsigned char *_mbsinc( const unsigned char *current ) size_t _mbclen( const unsigned
char *c );
● unsigned char *_mbsncat( unsigned char *strDest, const unsigned char *strSource, size_t
count)
● unsigned char *_mbsncpy( unsigned char *strDest, const unsigned char *strSource, size_t
count)
● unsigned char *_mbspbrk( const unsigned char*string, const unsigned char *strCharSet )
● unsigned char *_mbsstr( const unsigned char *string, const unsigned char *strCharSet )
● unsigned char *_mbstok( unsigned char*strToken, const unsigned char *strDelimit )
A description of the multibyte functions can be found in the specialist literature on programming
language C.
The functions can be used in C scripts only.

1.2.6 stdio functions (RT Professional)

Function overview
The following stdio functions are available:
● char* fgets (char* s, long int n, FILE* stream);
● char* tmpnam (char* s);
● FILE* fopen (const char* name, const char* mode);
● FILE* freopen (const char* filename, const char* mode, FILE* stream);
● FILE* tmpfile ();
● fprintf();
● long int fclose (FILE* stream);
● long int feof (FILE* stream);
● long int ferror (FILE* stream);
● long int fflush (FILE* stream);
● long int fgetc (FILE* stream);
● long int fgetpos (FILE* stream, fpos_t* ptr);

WinCC Professional V13 SP2 – Programming reference


176 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.2 C-bib (RT Professional)

● long int fputc (long int c, FILE* stream);


● long int fputs (const char* s, FILE* stream);
● long int fseek (FILE* stream, long int offset, long int origin);
● long int fsetpos (FILE* stream, const fpos_t* ptr);
● long int ftell (FILE* stream);
● long int getc (FILE* stream);
● long int putc (long int c, FILE* stream);
● long int remove (const char* filename);
● long int rename (const char* oldname, const char* newname);
● long int setvbuf (FILE* stream, char* buf, long int mode, size_t size);
● long int ungetc (long int c, FILE* stream);
● long int vfprintf (FILE* stream, const char* format, va_list arg);
● long int vsprintf (char* s, const char* format, va_list arg);
● printf();
● size_t fread (void* ptr, size_t size, size_t nobj, FILE* stream);
● size_t fwrite (void* ptr, size_t size, size_t nobj, FILE* stream);
● void clearerr (FILE* stream);
● void rewind (FILE* stream);
● void setbuf (FILE* stream, char* buf);
For a description of the studio functions see the specialist literature on programming language
C.
The functions can be used in C scripts only.

1.2.7 stdlib functions (RT Professional)

Function overview
The following stdlib functions are available:
● char* getenv (const char* name);
● div_t div (long int num, long int denom);
● double atof (const char* s);
● double strtod (const char* s, char** endp);
● ldiv_t ldiv (long int num, long int denom);
● long int abs (long int n);
● long int atoi (const char* s);

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 177
C scripting (RT Professional)
1.2 C-bib (RT Professional)

● long int atol (const char* s);


● long int labs (long int n);
● long int rand ();
● long int srand (unsigned long int seed);
● long int strtol (const char* s, char** endp, long int base);
● long int system (const char* s);
● unsigned long int strtoul (const char* s, char** endp, long int base);
● void abort ();
● void* bsearch (const void* key, const void* base, size_t n, size_t size, long int(* cmp) (const
● void* calloc (size_t nobj, size_t size);
● void exit (long int status);
● void free (void* p);
● void* keyval, const void* datum));
● void* malloc (size_t size);
● void qsort (void* base, size_t n, size_t size, long int* cmp, const void* , const void* );
● void* realloc (void* p, size_t size);
For a description of the stdlib functions see the specialist literature on programming language
C.
The functions can be used in C scripts only.

1.2.8 string functions (RT Professional)

Function overview
The following string functions are available:
● char* strcat (char* s, const char* ct);
● char* strchr (const char* cs, long int c);
● char* strcpy (char* s, const char* ct);
● char* strerror (size_t n);
● char* strncat (char* s, const char* ct, size_t n);
● char* strncpy (char* s, const char* ct, size_t n);
● char* strpbrk (const char* cs, const char* ct);
● char* strrchr (const char* cs, long int c);
● char* strstr (const char* cs, const char* ct);
● char* strtok (char* s, const char* ct);

WinCC Professional V13 SP2 – Programming reference


178 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.2 C-bib (RT Professional)

● long int strcmp (const char* cs, const char* ct);


● long int strncmp (const char* cs, const char* ct, size_t n);
● size_t strcspn (const char* cs, const char* ct);
● size_t strlen (const char* cs);
● size_t strspn (const char* cs, const char* ct);
For a description of the string functions see the specialist literature on programming language
C.
The functions can be used in C scripts only.

1.2.9 time functions (RT Professional)

Function overview
The following time functions are available:
● char* asctime (const struct tm* tp);
● char* ctime (const time_t* tp);
● clock_t clock ();
● double difftime (time_t time2, time_t time1);
● size_t strftime (char* s, size_t smax, const char* fmt, const struct tm* tp);
● struct tm* gmtime (const time_t* tp);
● struct tm* localtime (const time_t* tp);
● time_t mktime (struct tm* tp);
● time_t time (time_t* tp);
For a description of the time functions see the specialist literature on programming language
C.
The functions can be used in C scripts only.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 179
C scripting (RT Professional)
1.3 Structure definition (RT Professional)

1.3 Structure definition (RT Professional)

1.3.1 Structure definition CCAPErrorExecute (RT Professional)

typedef struct {
DWORD dwCurrentThreadID; Thread ID of the current thread
DWORD dwErrorCode1; Error code 1
DWORD dwErrorCode2; Error code 2
BOOL bCycle; cycle/acycle
char* szApplicationName; Name of the application
char* szFunctionName; Name of the function
char* szTagName; Name of the tag
LPVOID lpParam; Pointer to the action stack
DWORD dwParamSize; Size of the action stack
DWORD dwCycle; Cycle of the tag
CMN_ERROR* pError; Pointer to CMN_ERROR
} CCAPErrorExecute;

Members
The meaning of the individual error IDs and the structure elements depending on them are
specified in the following table:

100700 0 x x x x x Action requires exception


1
100700 1 x x x x x Exception when access‐
1 ing the return result
100700 4097 x x x x x Stack overflow while exe‐
1 cuting the action
100700 4098 x x x x x The action contains a di‐
1 vision by 0
100700 4099 x x x x x The action contains an ac‐
1 cess to a non-existing
symbol
100700 4100 x x x x x The action contains an ac‐
1 cess violation
100700 0 x x x Function is not known
4
100700 1 x x Action does not include a
5 P code.
100700 2 x x Incorrect function name
5
100700 4 x x x x x Return value type is inva‐
5 lid
100700 32768f x x x x x Ciss Compiler error when
5 f loading the action

WinCC Professional V13 SP2 – Programming reference


180 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.3 Structure definition (RT Professional)

100700 0 x x x x x x x Tag is not defined


6
100700 1 x x x x x x x Tag timeout
6
100700 2 x x x x x x x x Tag cannot be returned in
6 the desired format
100700 3 x x x x x x x x Tag returns status viola‐
6 tion, status present in
CMN_ERROR.dwError1
100700 1 x x x x x x Error with PDLRTGetProp
7
100700 2 x x x x x x Error with PDLRTSetProp
7
100700 3 x x x x x x Error with DM call
7

Error structure
The OnErrorExecute function uses the error structure to evaluate or to output error messages,
if marked by an "x" in the pError column.

1.3.2 Structure definition CCAPTime (RT Professional)

typedef struct {
DWORD dwCurrentThreadID; ThreadID of the current Thread
DWORD dwCode; Code
BOOL bCycle; cycle/acycle
char* szApplicationName; Name of the Application
char* szFunctionName; Name of the Function
LPVOID lpParam; Pointer to the Action-Stack
DWORD dwParamSize; size of the Action-Stack
double dblTime;
DWORD dwFlags; flags
} CCAPTime;

Members

dwCode
The structure element dwCode provides information on calling of OnTime:

dwCode = 113 Call with time definition for each action


dwCode = 114 Call with time monitoring for each action

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 181
C scripting (RT Professional)
1.3 Structure definition (RT Professional)

dwFlags
The structure element dwFlags provides information on the output type:

dwFlags = TRUE The results are output to a file


dwFlags = FALSE The results are output to the diagnostics window

1.3.3 Structure definition CMN_ERROR (RT Professional)

struct CMNERRORSTRUCT {
DWORD dwError1,
DWORD dwError2,
DWORD dwError3,
DWORD dwError4,
DWORD dwError5;
TCHAR szErrorText[MAX_ERROR_LEN];
}
CMN_ERROR

Description
The extended error structure contains the error code and an error text for the error that has
occurred. Each application can use the error structure to evaluate or to output error messages.

Members

dwError1 .. dwError5
These entries can be used in any way by the API functions.
The API descriptions inform about the values the respective entries contain in case of an error.
If not specified otherwise, the error codes are present in dwError1.

szErrorText
Buffer for the text description of the error cause
The content is determined from the resources and therefore language-dependent.

WinCC Professional V13 SP2 – Programming reference


182 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.3 Structure definition (RT Professional)

1.3.4 Structure definition DM_TYPEREF (RT Professional)

typedef struct {
DWORD dwType;
DWORD dwSize;
char szTypeName[MAX_DM_TYPE_NAME + 1];
}
DM_TYPEREF;

Members

dwType
Specifies the tag type

dwType PLC data type HMI data type


DM_VARTYPE_BIT Binary tag Bool
DM_VARTYPE_SBYTE Signed 8-bit value Byte
DM_VARTYPE_BYTE Unsigned 8-bit value UByte
DM_VARTYPE_SWORD Signed 16-bit value Short
DM_VARTYPE_WORD Unsigned 16-bit value UShort
DM_VARTYPE_SDWORD Signed 32-bit value Integer
DM_VARTYPE_DWORD Unsigned 32-bit value UInteger
DM_VARTYPE_FLOAT Floating-point number 32-bit IEEE 754 Float
DM_VARTYPE_DOUBLE Floating-point number 64-bit IEEE 754 Double
DM_VARTYPE_TEXT_8 Text tag, 8-bit character set Char
DM_VARTYPE_TEXT_16 Text tag, 16-bit character set String
DM_VARTYPE_RAW Raw data type Raw
DM_VARTYPE_STRUCT Structure tag Struct
DM_VARTYPE_TEXTREF Text reference tag String

dwSize
Specifies the length of the data type in bytes.

szTypeName
In the case of structure tags, contains the name of the structure type

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 183
C scripting (RT Professional)
1.3 Structure definition (RT Professional)

1.3.5 Structure definition DM_VAR_UPDATE_STRUCT (RT Professional)

typedef struct {
DM_TYPEREF dmTypeRef;
DM_VARKEY dmVarKey;
VARIANT dmValue;
DWORD dwState;
}
DM_VAR_UPDATE_STRUCT;

Members

dmTypeRef
Contains information on the data type. For performance reasons, nothing is entered into this
structure in case of cyclic requests.

dmVarKey
Specifies the tags to be edited.

dmValue
Tag value
Upon access to the value of the VARIANT a ".u." has to be inserted between the name of the
VARIANT and the name of the member.

Example
// Supply variant
myVariant.vt = VT_I4;
myVariant.u.lVal = 233;
A description of the data type VARIANT can be found in the associated documentation. The
VARIANT dmValue must be initialized with VariantInit() before first use and enabled again with
VariantClear(&dmValue) after use. For this reason, the structure
DM_VAR_UPDATE_STRUCT must not be deleted with ZeroMemory() or memset().

dwState
Identifies the tag status.

WinCC Professional V13 SP2 – Programming reference


184 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.3 Structure definition (RT Professional)

1.3.6 Structure definition DM_VAR_UPDATE_STRUCTEX (RT Professional)

typedef struct {
DM_TYPEREF dmTypeRef;
DM_VARKEY dmVarKey;
VARIANT dmValue;
DWORD dwState;
DWORD dwQualityCode;
}
DM_VAR_UPDATE_STRUCTEX;

Members

dmTypeRef
Contains information on the data type. For performance reasons, nothing is entered into this
structure in case of cyclic requests.

dmVarKey
Specifies the tags to be edited.

dmValue
Tag value
Upon access to the value of the VARIANT a ".u." has to be inserted between the name of the
VARIANT and the name of the member.

Example
// Supply variant
myVariant.vt = VT_I4;
myVariant.u.lVal = 233;
A description of the data type VARIANT can be found in the associated documentation. The
VARIANT dmValue must be initialized with VariantInit() before first use and enabled again with
VariantClear(&dmValue) after use. For this reason, the structure
DM_VAR_UPDATE_STRUCTEX must not be deleted with ZeroMemory() or memset().

dwState
Identifies the tag status.

dwQualityCode
Identifies the QualityCode tag.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 185
C scripting (RT Professional)
1.3 Structure definition (RT Professional)

1.3.7 Structure definition DM_VARKEY (RT Professional)

typedef struct {
DWORD dwKeyType;
DWORD dwID;
char szName[ MAX_DM_VAR_NAME + 1 ];
LPVOID lpvUserData;
}
DM_VARKEY;

Members

dwKeyType
Defines whether the tag is to be addressed by a key ID or by its name.
DM_VARKEY_ID Specification via key ID
DM_VARKEY_NAME Specification via tag name

dwID
Contains the key ID of the tags if dwKey type is set accordingly.

szName
Contains the name of the tag if dwKey type is set accordingly.

lpvUserData
Pointer to application-specific data

1.3.8 Structure definition LINKINFO (RT Professional)

typedef struct {
LINKTYPE LinkType;
DWORD dwCycle;
TCHAR szLinkName[256];
}
LINKINFO;

WinCC Professional V13 SP2 – Programming reference


186 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.3 Structure definition (RT Professional)

Members

LinkType
LinkType are enumeration constants defined in the "Trigger.h" file. They are to be integrated
into your script with the "#include "Trigger.h" command and the corresponding enumeration
constants.

BUBRT_LT_NOLINK 0 no shortcut
BUBRT_LT_VARIABLE_DIRECT 1 direct tag
BUBRT_LT_VARIABLE_INDIRECT 2 indirect tag
BUBRT_LT_ACTION 3 C action
BUBRT_LT_ACTION_WIZARD 4 Dynamic Dialog
BUB_LT_DIRECT_CONNECTION 5 Direct connection
BUBRT_LT_ACTION_WIZARD_INPROC 6 Dynamic Dialog

For the SetLink function, only the enumeration constants BUBRT_LT_VARIABLE_DIREKT


and BUBRT_LT_VARIABLE_INDIRECT may be used. The GetLink function allows to return
all listed enumeration constants.

dwCycle
Update cycle time

255 Picture cycle


235 Window Cycle
0 Upon change
1 250ms
2 500 ms
3 1s
4 2s
5 5s
6 10s
7 1min
8 5min
9 10min
10 1h
11-1 User cycle 1-5
5

szLinkName
Tag name

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 187
C scripting (RT Professional)
1.3 Structure definition (RT Professional)

1.3.9 Structure definition MSG_FILTER_STRUCT (RT Professional)

typedef struct {
CHAR szFilterName[MSG_MAX_TEXTLEN+1];
WORD dwFilter;
SYSTEMTIME st[2];
DWORD dwMsgNr[2];
DWORD dwMsgClass;
DWORD dwMsgType[MSG_MAX_CLASS];
DWORD dwMsgState;
WORD wAGNr[2];
WORD wAGSubNr[2];
DWORD dwArchivMode;
char szTB[MSG_MAX_TB][
MSG_MAX_TB_CONTENT+1]
DWORD dwTB;
Double dPValue[MSG_MAX_PVALUE][2];
DWORD dwPValue[2];
DWORD dwMsgCounter[2];
DWORD dwQuickSelect;
}
MSG_FILTER_STRUCT;

Description
In this structure the criteria are specified.

Members

dwFilter
The filter conditions are defined by means of the following constants from the file "m_global.h":

MSG_FILTER_DATE_FROM Date from


MSG_FILTER_DATE_TO Date to
MSG_FILTER_TIME_FROM Time from
MSG_FILTER_TIME_TO Time to
MSG_FILTER_NR_FROM Message number from
MSG_FILTER_NR_TO Message number to
MSG_FILTER_CLASS Message classes
MSG_FILTER_STATE Message status
MSG_FILTER_AG_FROM AS number from
MSG_FILTER_AG_TO AS number to
MSG_FILTER_AGSUB_FROM AG subnumber from
MSG_FILTER_AGSUB_TO AG subnumber to
MSG_FILTER_TEXT Message texts
MSG_FILTER_PVALUE Process values

WinCC Professional V13 SP2 – Programming reference


188 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.3 Structure definition (RT Professional)

MSG_FILTER_COUNTER_FROM Internal message counter from


MSG_FILTER_COUNTER_TO Internal message counter to
MSG_FILTER_PROCESSMSG Process messages
MSG_FILTER_SYSMSG System messages
MSG_FILTER_BEDMSG Operator messages
MSG_FILTER_DATE Date from to
MSG_FILTER_TIME Time from to
MSG_FILTER_NR Message number from to
MSG_FILTER_VISIBLEONLY Display visible messages
MSG_FILTER_HIDDENONLY Display hidden messages

st
Date/time from - to
Where st[0] is the start time (from), st[1] the end time (to)
Assign these fields for the criteria: MSG_FILTER_DATE, MSG_FILTER_DATE_FROM,
MSG_FILTER_DATE_TO, MSG_FILTER_TIME, MSG_FILTER_TIME_FROM, bzw.
MSG_FILTER_TIME_TO
If the current time is needed to pass a SYSTEMTIME- parameter, use the GetLocalTime
function and not GetSystemTime.. There is usually a considerable difference between these
two functions.

dwMsgNr
Message number from - to
Where dwMsgNr[0] is start no. (from), dwMsgNr[1] the end no. (to)
Assign these fields for the criteria: MSG_FILTER_NR, MSG_FILTER_NR_FROM bzw.
MSG_FILTER_NR_TO

dwMsgClass
Message classes bit-coded.
Assign this field for the criterion: MSG_FILTER_CLASS

dwMsgType
Message type per alarm class, bit-coded
Assign this field for the criterion: MSG_FILTER_CLASS

dwMsgState
Message status bit-coded.
Assign this field for the criterion: MSG_FILTER_STATE

wAGNr
AGNr from - to
Assign these fields for the criteria: MSG_FILTER_AG_FROM or MSG_FILTER_AG_TO

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 189
C scripting (RT Professional)
1.3 Structure definition (RT Professional)

wAGSubNr
AGSubNr from - to
Assign this field for the criteria: MSG_FILTER_AGSUB_FROM or MSG_FILTER_AGSUB_TO

dwArchivMode
Logging / reporting
Must be assigned 0.

szTB
Texts of the text blocks
Assign these fields for the criterion: MSG_FILTER_TEXT

dwTB
Active text blocks (from - to, bit-coded)
Assign this field for the criterion: MSG_FILTER_TEXT

dPValue
Process values from - to
Assign these fields for the criterion: MSG_FILTER_PVALUE

dwPValue
Active process values (from - to, bit-coded)
Assign this field for the criterion: MSG_FILTER_PVALUE

dwMsgCounter
Internal message counter from - to
Assign these fields for the criteria: MSG_FILTER_COUNTER_FROM,
MSG_FILTER_COUNTER_TO

dwQuickSelect
Quick selection for hour, day, month
The parameter is reserved for future upgrades and must be preset to 0.
Assign this field for the criterion: MSG_FILTER_QUICKSELECT
LOWORD Type:

MSG_FILTER_QUICK_MONTH Quick selection last n months


MSG_FILTER_QUICK_DAYS Quick selection last n days
MSG_FILTER_QUICK_HOUR Quick selection last n hours

HIWORD Number: 1...n


The end time of the quick selection refers to the current system time of the local computer.
The start time is calculated back n * ( months, days, hours ).

WinCC Professional V13 SP2 – Programming reference


190 System Manual, 03/2017, Online help printout
C scripting (RT Professional)
1.3 Structure definition (RT Professional)

1.3.10 Structure definition MSG_RTDATA_STRUCT (RT Professional)

typedef struct {
DWORD dwMsgState;
DWORD dwMsgNr;
SYSTEMTIME stMsgTime;
DWORD dwTimeDiff;
DWORD dwCounter;
DWORD dwFlags;
WORD wPValueUsed;
WORD wTextValueUsed;
double dPValue[MSG_MAX_PVALUE];
MSG_TEXTVAL_STRUCT mtTextValue[MSG_MAX_PVALUE];
}
MSG_RTDATA_STRUCT;

Members
dwMsgState
Message status

MSG_STATE_COME 0x00000001 Message came in


MSG_STATE_GO 0x00000002 Message went out
MSG_STATE_QUIT 0x00000003 Message acknowledged
MSG_STATE_LOCK 0x00000004 Message locked
MSG_STATE_UNLOCK 0x00000005 Alarm locked
MSG_STATE_QUIT_SYSTEM 0x00000010 Message acknowledged by system
MSG_STATE_QUIT_EMERGENCY 0x00000011 Emergency acknowledgement
MSG_STATE_QUIT_HORN 0x00000012 Alarm alert acknowledgment
MSG_STATE_COMEGO 0x00000013 Message came in and went out, only displayed in the "Current
messages" display
MSG_STATE_UPDATE 0x00010000 Bit for message update
MSG_STATE_RESET 0x00020000 Bit for message reset
MSG_STATE_SUMTIME 0x00040000 Bit active for daylight savings time
MSG_STATE_INSTANCE 0x00080000 Bit for instance message (n messages of a no.)

dwMsgNr
Message number
stMsgTime
Date/Time: Telegram time depending on the calling function

dwTimeDiff
Duration coming/Telegram time in seconds
dwCounter
Internal message counter

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 191
C scripting (RT Professional)
1.3 Structure definition (RT Professional)

dwFlags
Message flags in the database

MSG_FLAG_SUMTIME 0x00000001 Daylight savings time active


MSG_FLAG_COMMENT 0x00000002 Message has comments
MSG_FLAG_ARCHIV 0x00000004 Archiving
MSG_FLAG_PROTOCOL 0x00000008 Logging
MSG_FLAG_TEXTVALUES 0x00000010 Message has values accompanying the text
MSG_FLAG_TIMEINVALID 0x00000020 Bit for invalid date/time stamp
MSG_FLAG_INSTANCE 0x00000040 Instance message identification (185269)

wPValueUsed
Process values used, bit-coded. Every bit may only be set in one of the two structure elements
"wPValueUsed" or "wTextValueUsed". An accompanying value may either be a number or a
text.
wTextValueUsed
text values used, bit-coded. Every bit may only be set in one of the two structure elements
"wPValueUsed" or "wTextValueUsed". An accompanying value may either be a number or a
text.

WinCC Professional V13 SP2 – Programming reference


192 System Manual, 03/2017, Online help printout
Runtime API (RT Professional) 2
2.1 Runtime API (RT Professional)

Introduction
Runtime API describes the open programming interface of WinCC. By means of the API
functions, you make use of the internal functions of WinCC in separate applications and access
data of HMI tags or archive data.

Note
Siemens assumes no liability and makes no warranty that data and information transported
via API interfaces are compatible with software of third parties.
We expressly point out that improper use of the API interface can result in data loss or
production outage.

Examples:
● MSRTCreateMsgPlus(): Creating reports
● DMGetValue(): Determining tag values.

Requirement
● Programming environment is installed, e.g., MS Visual Studio
● WinCC Runtime Professional is installed.

Use
You use the API functions in the following places:
● Within WinCC: In user-defined C-functions and local C-scripts.
● Outside of WinCC: In Windows applications that are created in the C/C++ programming
language. To use Runtime API in the programming languages C# or VB.net, you must
program a corresponding conversion.

Scope of delivery
Runtime API consists of the following components:
● Documentation of API functions
● Examples in C and C++
● Include files and Lib files

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 193
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Examples in C and C++


Examples can be found in the "%ProgramFiles%\SIEMENS\Automation\SCADA-
RT_V11\WINCC\samples" directory

Include files and Lib files


In order to generate executable codes, you require the Include files and Lib files. You can find
these files in the directory:
● %ProgramFiles%\SIEMENS\Automation\SCADA-RT_V11\WinCC\include
● %ProgramFiles%\SIEMENS\Automation\SCADA-RT_V11\WinCC\lib

2.2 Data management functions (RT Professional)

2.2.1 Basics (RT Professional)

2.2.1.1 Overview of structures (RT Professional)

Overview

DM_CONNECTION_DATA (Page 212) Connection data


DM_CONNKEY (Page 213) List connection data (filter structure)
DM_CYCLE_INFO (Page 214) Update cycles
DM_DATA_SERVICE (Page 215) Data transport channel
DM_DIRECTORY_INFO (Page 216) Path and file names of the configuration data
DM_DLGOPTIONS (Page 217) Dialog specifications
DM_MACHINE_TABLE (Page 219) Format conversion
DM_PROJECT_INFO (Page 220) Project information
DM_SD_TARGET_APP (Page 224) Specification of applications
DM_SD_TARGET_MACHINE (Page 223) Computer information
DM_SEND_DATA_STRUCT (Page 221) Specification of partners for data exchange
DM_TYPEREF (Page 224) Tag type preference
DM_VAR_UPDATE_STRUCTEX (Page 228) Get tag values
DM_VAR_UPDATE_STRUCT (Page 226) Get tag values
DM_VARFILTER (Page 231) Selection of tags
DM_VARGRP_DATA (Page 233) Information about a tag group
DM_VARGRPKEY (Page 234) Specification of a tag group
DM_VARIABLE_DATA4 (Page 237) Including information about a tag group
DM_VARIABLE_DATA (Page 235) Including information about a tag group
DM_FORMAT_INFO (Page 218) Format conversion
DM_VARKEY (Page 239) Specification of a tag

WinCC Professional V13 SP2 – Programming reference


194 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

DM_VARLIMIT (Page 242) Tag limits


MCP_NEWVARIABLE_DATA_4 (Page 245) Tag definition
MCP_NEWVARIABLE_DATA_5 (Page 247) Tag definition
MCP_NEWVARIABLE_DATA_EX4 (Page 251) Tag definition
MCP_NEWVARIABLE_DATA_EX (Page 249) Tag definition
MCP_NEWVARIABLE_DATA (Page 243) Tag definition
MCP_VARIABLE_COMMON_EX (Page 255) Tag description
MCP_VARIABLE_COMMON (Page 253) Tag description
MCP_VARIABLE_LIMITS_EX (Page 261) Tag limits
MCP_VARIABLE_LIMITS5 (Page 259) Tag limits
MCP_VARIABLE_LIMITS (Page 257) Tag limits
MCP_VARIABLE_PROTOCOL_EX (Page 264) Tag limit handling
MCP_VARIABLE_PROTOCOL (Page 262) Tag limit handling
MCP_VARIABLE_SCALES (Page 265) Tag scaling

2.2.1.2 Overview of the functions (RT Professional)

Overview

DM_ENUM_CYCLES_PROC (Page 287) List update cycles (callback)


DM_ENUM_FORMATS_PROC (Page 284) List format conversions (callback)
DM_NOTIFY_PROC (Page 278) Notification function
DMActivateRTProject (Page 266) Activate project
DMChangeDataLocale (Page 274) Language switch (notify applications)
DMConnect (Page 275) Make connection to the Data Manager
DMDeactivateRTProject (Page 280) Deactivate runtime project
DMDisconnect (Page 281) Terminate connection to the Data Manager
DMEnumNumberFormats (Page 283) List format conversions
DMEnumUpdateCycles (Page 286) List update cycles
DMExitWinCCEx (Page 290) Exit WinCC with defaults
DMExitWinCC (Page 289) Exit WinCC
DMGetConnectionState (Page 293) Query connection to the Data Manager
DMGetHotkey (Page 295) Get hotkey ID
DMGetMachineInfo (Page 296) Query startup parameters of an application
DMGetMachineTable (Page 297) Query computer list

See also
DMGetDataLocale (Page 294)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 195
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.1.3 Quality codes of HMI tags (RT Professional)

Introduction
The "Quality Code" is required to evaluate the status and quality of a tag. The quality of the
entire value transfer and value processing of the respective HMI tag is summarized in the
indicated Quality Code. For example, it is possible to determine from the Quality Code whether
the current value is a start value or substitute value.
The quality codes are prioritized. If several codes occur at the same time, the Quality Code
reflecting the lowest quality is displayed.

Evaluation of Quality Codes


You can evaluate the Quality Code in a number of different ways:
● Evaluation with VB functions
● Evaluation with C functions
● Evaluation using the "Quality Code changed" event of an I/O field.
Note
In order to include the entire value transfer and value processing in the Quality Code for a
process tag, the connected automation system must support the Quality Code. When
configuring the PLC tags in the automation system, make sure there is enough memory
space for the Quality Code. In an S7 automation system, for example, the Quality Code
requires an additional byte, which is appended to the process value. To prevent errors, this
byte must be taken into account when configuring a tag, for instance at the end of a data
block.

Structure
The Quality Code has the following binary structure:

QQSSSSLL
Q: Quality
S: Substatus of the quality
L: Limits. This value is optional.

Note
The Quality Code shown in the "Quality" table are base values for the quality stages. Making
use of the substatus and limit elements gives rise to intermediate values over and above the
quality stage concerned.

WinCC Professional V13 SP2 – Programming reference


196 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Quality
The first two digits specify the quality of the tag.

Q Q S S S S L L
2 2 2 2 2 2 2 2
7 6 5 4 3 2 1 0

Bad - The value is not useful 0 0 - - - - - -


Uncertain - The quality of the value is less than normal, but the value may still 0 1 - - - - - -
be useful.
Good (Non-Cascade) - The quality of the value is good. Possible alarm condi‐ 1 0 - - - - - -
tions may be indicated by the sub-status.
Good (Cascade) - The value may be used in control. 1 1 - - - - - -

Substatus
The quality alone is not enough. Individual qualities are divided into substatuses. The Quality
Code is binary-coded. The value must be converted to hexadecimal format for analysis of the
Quality Code.

Quality Codes of Tags


Possible Quality Code are listed in the following table. At the top of the table, you find the
Quality Code reflecting the lowest quality, while the Quality Code reflecting the highest quality
is shown at the bottom of the table. The Quality Code representing the highest quality is
assigned the lowest priority, while the Quality Code representing the lowest quality is assigned
the highest priority. If several statuses occur for one tag in the process, the poorest code is
passed on.

Code Quality Q Q SSSSL L


(Hex)
0x23 Bad Device passivated - Diagnostic alerts inhibited 0 0 1 0 0 0 1 1
0x3F Bad Function check - Local override 0 0 1 1 1 1 1 1
0x1C Bad Out of Service - The value is not reliable because the block is 0 0 0 1 1 1 - -
not being evaluated, and may be under construction by a con‐
figurer. Set if the block mode is O/S.
0x73 Uncertain Simulated value - Start 0 1 1 1 0 0 1 1
0x74 Uncertain Simulated value - End 0 1 1 1 0 1 - -
0x84 Good Active Update event - Set if the value is good and the block 1 0 0 0 0 1 - -
(Non- has an active Update event.
Cascade)
0x24 Bad Maintenance alarm - More diagnostics available. 0 0 1 0 0 1 - -
0x18 Bad No Communication, with no usable value - Set if there has 0 0 0 1 1 0 - -
never been any communication with this value since it was
last "Out of Service".
0x14 Bad No Communication, with last usable value - Set if this value 0 0 0 1 0 1 - -
had been set by communication, which has now failed.
0x0C Bad Device Failure - Set if the source of the value is affected by a 0 0 0 0 1 1 - -
device failure.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 197
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Code Quality Q Q SSSSL L


(Hex)
0x10 Bad Sensor failure 0 0 0 1 0 0 - -
0x08 Bad Not Connected - Set if this input is required to be connected 0 0 0 0 1 0 - -
and is not connected.
0x04 Bad Configuration Error - Set if the value is not useful because 0 0 0 0 0 1 - -
there is some inconsistency regarding the parameterization
or configuration, depending on what a specific manufacturer
can detect.
0x00 Bad non-specific - There is no specific reason why the value is bad. 0 0 0 0 0 0 - -
Used for propagation.
0x28 Bad Process related - Substitute value 0 0 1 0 1 0 - -
0x2B Bad Process related - No maintenance 0 0 1 0 1 0 1 1
0x68 Uncertain Maintenance demanded 0 1 1 0 1 0 - -
0x60 Uncertain Simulated value - Set when the process value is written by the 0 1 1 0 0 0 - -
operator while the block is in manual mode.
0x64 Uncertain Sensor calibration 0 1 1 0 0 1 - -
0x5C Uncertain Configuration error 0 1 0 1 1 1 - -
0x58 Uncertain Sub-normal 0 1 0 1 1 0 - -
0x54 Uncertain Engineering Unit Range Violation - Set if the value lies outside 0 1 0 1 0 1 - -
of the set of values defined for this parameter. The Limits de‐
fine which direction has been exceeded.
0x50 Uncertain Sensor conversion not accurate 0 1 0 1 0 0 - -
0x4B Uncertain Substitute (constant) 0 1 0 0 1 0 1 1
0x78 Uncertain Process related - No maintenance 0 1 1 1 1 0 - -
0x4C Uncertain Initial Value - Value of volatile parameters during and after 0 1 0 0 1 1 - -
reset of the device or of a parameter.
0x48 Uncertain Substitute value - Predefined value is used instead of the cal‐ 0 1 0 0 1 0 - -
culated one. This is used for fail safe handling.
0x44 Uncertain Last Usable Value - Whatever was writing this value has stop‐ 0 1 0 0 0 1 - -
ped doing so. This is used for fail safe handling.
0x40 Uncertain Non-specific - There is no specific reason why the value is 0 1 0 0 0 0 - -
uncertain. Used for propagation.
0xE0 Good Initiate Fail Safe (IFS) - The value is from a block that wants 1 1 1 0 0 0 - -
(Cas‐ its downstream output block (e.g. AO) to go to Fail Safe.
cade)
0xD8 Good Local Override (LO) - The value is from a block that has been 1 1 0 1 1 0 - -
(Cas‐ locked out by a local key switch or is a Complex AO/DO with
cade) interlock logic active. The failure of normal control must be
propagated to a function running in a host system for alarm
and display purposes. This also implies "Not Invited".
0xD4 Good Do Not Select (DNS) - The value is from a block which should 1 1 0 1 0 1 - -
(Cas‐ not be selected, due to conditions in or above the block.
cade)
0xCC Good Not Invited (NI) - The value is from a block which does not 1 1 0 0 1 1 - -
(Cas‐ have a target mode that would use this input.
cade)

WinCC Professional V13 SP2 – Programming reference


198 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Code Quality Q Q SSSSL L


(Hex)
0xC8 Good Initialization Request (IR) - The value is an initialization value 1 1 0 0 1 0 - -
(Cas‐ for a source (back calculation input parameter), because the
cade) lower loop is broken or the mode is wrong.
0xC4 Good Initialization Acknowledge (IA) - The value is an initialized val‐ 1 1 0 0 0 1 - -
(Cas‐ ue from a source (cascade input, remote-cascade in, and re‐
cade) mote-output in parameters).
0xC0 Good OK - No error or special condition is associated with this value. 1 1 0 0 0 0 - -
(Cas‐
cade)
0xA0 Good Initiate fail safe 1 0 1 0 0 0 - -
(Non-
Cascade)
0x98 Good Unacknowledged Critical Alarm - Set if the value is good and 1 0 0 1 1 0 - -
(Non- the block has an unacknowledged Alarm with a priority greater
Cascade) than or equal to 8.
0x94 Good Unacknowledged Advisory Alarm - Set if the value is good and 1 0 0 1 0 1 - -
(Non- the block has an unacknowledged Alarm with a priority less
Cascade) than 8.
0x90 Good Unacknowledged Update event - Set if the value is good and 1 0 0 1 0 0 - -
(Non- the block has an unacknowledged Update event.
Cascade)
0x8C Good Active Critical Alarm - Set if the value is good and the block 1 0 0 0 1 1 - -
(Non- has an active Alarm with a priority greater than or equal to 8.
Cascade)
0x88 Good Active Advisory Alarm - Set if the value is good and the block 1 0 0 0 1 0 - -
(Non- has an active Alarm with a priority less than 8.
Cascade)
0xA8 Good Maintenance demanded 1 0 1 0 1 0 - -
(Non-
Cascade)
0xA4 Good Maintenance required 1 0 1 0 0 1 - -
(Non-
Cascade)
0xBC Good Function check - Local override 1 0 1 1 1 1 - -
(Non-
Cascade)
0x80 Good OK - No error or special condition is associated with this value. 1 0 0 0 0 0 - -
(Non-
Cascade)

Limit
The Quality Codes can be further subdivided by limits. Limits are optional.

Q Q S S S S L L
O.K. - The value is free to move. - - - - - - 0 0
Low limited - The value has acceded its low limits. - - - - - - 0 1

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 199
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

High limited - The value has acceded its high limits. - - - - - - 1 0


Constant (high and low limited) - The value cannot move, no matter what the - - - - - - 1 1
process does.

Quality Codes in Communication with OPC


For communication via "OPC", the Quality Codes that the OPC does not support are converted.

Quality Code in WinCC Quality Code in OPC


0x48 0x40
0x4C 0x40
0x5C 0x40
0x60 0x40
0x80...0xD4 0xC0
0xD8 0xC0

2.2.1.4 Constants (RT Professional)

General definitions

MAX_DM_OHIO_MACHINES 64 Maximum number of PCs in a project


MAX_DM_OHIO_APPLICATIONS 32 Maximum number of local client applications
MAX_DM_UPDATE_CYCLES 15 Maximum number of update cycles
MAX_DM_SYSTEM_CYCLES 10 Of total update cycles, 10 are system cycles
MAX_DM_USER_CYCLES 5 and 5 are user cycles
MAX_DM_VAR_NAME 128 Maximum length of a tag name
MAX_DM_TYPE_NAME 128 Maximum length of a data type name
MAX_DM_GROUP_NAME 64 Maximum length of a tag group name
MAX_DM_CYCLE_NAME 64 Maximum length of a cycle time text
MAX_DM_FORMAT_NAME 64 Maximum length of a format specification
MAX_DM_SCALE_NAME 64 Maximum length of a scaling specification
MAX_DM_SCALE_PARAM_NAME 64 Maximum length of a scaling parameter description
MAX_DM_MEMBER_NAME 32 Maximum length for members of combined types
MAX_DM_INFOTEXT_LEN 255 Maximum length of an info text
MAX_DM_SHIFT_NAME_LEN 32 Maximum length of a shift name
MAX_DM_SHIFTS 16 Maximum number of shifts per day
MAX_DM_SHIFT_HOLYDAYS 30 Maximum number of holidays in shift schedule
MAX_DM_SHIFT_HOLYNAME 64 Maximum length of the name of a holiday
MAX_DM_SERVICE_NAME 32 Maximum length of a service name
MAX_DM_APP_NAME 32 Maximum length of a logical application name
MAX_DM_DSN_NAME 32 Maximum length of data source name of the database
MAX_DM_UNIT_NAME 65 Maximum length of a unit
MAX_DM_CONNECTION_NAME 32 Maximum length of a connection

WinCC Professional V13 SP2 – Programming reference


200 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

MAX_DM_VAR_SPECIFIC 25 Maximum length of the specific part of a tag in GAPI


MAX_DM_CON_SPECIFIC 128 Maximum length of the specific part of a connection
in GAPI
MAX_DM_CON_COMMON 128 Maximum length of the specific part of a connection
in GAPI
MAX_DM_VARTYPE_TEXT_LEN 255 Maximum length of a text tag

Tag types

DM_VARTYPE_BIT 1 Binary tag


DM_VARTYPE_SBYTE 2 Signed 8-bit value
DM_VARTYPE_BYTE 3 Unsigned 8-bit value
DM_VARTYPE_SWORD 4 Signed 16-bit value
DM_VARTYPE_WORD 5 Unsigned 16-bit value
DM_VARTYPE_SDWORD 6 Signed 32-bit value
DM_VARTYPE_DWORD 7 Unsigned 32-bit value
DM_VARTYPE_FLOAT 8 Floating-point number 32-bit IEEE 754
DM_VARTYPE_DOUBLE 9 Floating-point number 64-bit IEEE 754
DM_VARTYPE_TEXT_8 10 Text tag, 8-bit character set
DM_VARTYPE_TEXT_16 11 Text tag, 16-bit character set
DM_VARTYPE_RAW 12 Raw data type
DM_VARTYPE_STRUCT 14 Structure tag
DM_VARTYPE_TEXTREF 18 Text reference from text lib

Property flags

DM_SIMULATION_MODE 0x00000001 Tag is being simulated (no write access to


the process)
DM_INTERNAL_VAR 0x00000002 Internal tag
DM_EXTERNAL_VAR 0x00000004 External tag
DM_HAS_MIN_LIMIT 0x00000008 Tag has a fixed low limit
DM_HAS_MAX_LIMIT 0x00000010 Tag has a fixed high limit
DM_HAS_DEFAULT_VALUE 0x00000020 Tag has a substitute value
DM_HAS_STARTUP_VALUE 0x00000040 Tag has an initial value
DM_USE_DEFAULT_ON_STARTUP 0x00000080 Enter substitute value at system start
DM_USE_DEFAULT_ON_MAX 0x00000100 Enter substitute value when high limit is vio‐
lated
DM_USE_DEFAULT_ON_MIN 0x00000200 Enter substitute value when low limit is vio‐
lated
DM_USE_DEFAULT_ON_COMM_ER‐ 0x00000400 Substitute value on connection error
ROR
DM_WRITE_ACCESS_APPLICATION 0x00000800 Applications may write the tag
DM_WRITE_ACCESS_PROCESS 0x00001000 Tag may be written by the process
DM_INTERNAL_VAR_LOKAL 0x00002000 Internal tag, update 1 = Local computer / 0
= Project-wide

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 201
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

DM_INVISIBLE 0x00004000 Do not display tag on the interface in Control


Center
DM_EXTERNAL_LOCK 0x00008000 Tag generated externally and can only be
deleted externally

Logging flags

DM_NOTIFY_MAX_LIMIT 0x00000001 Log entry on reaching the high limit


DM_NOTIFY_MIN_LIMIT 0x00000002 Log entry on reaching the low limit
DM_NOTIFY_FORMAT_ERROR 0x00000004 Log entry on conversion error
DM_NOTIFY_ACCESS_FAULT 0x00000008 Log entry on prohibited write access
DM_NOTIFY_APPLICATION_WRITE 0x00000010 Log entry on write access by application
DM_NOTIFY_PROCESS_WRITE 0x00000020 Log entry on write access by process

Status flags
You can monitor the tag status of individual WinCC tags in Runtime. The tag status also
includes violations of the configured measuring range limits as well as the status of the
connection between WinCC and the automation system.
The quality code includes information about the quality of a tag, regardless of where this code
was formed. It takes into consideration the status of the entire value transfer and value
processing.
If a violation occurs at the low limit of the measuring range in the system, for example, the
quality code "0x55" is always reported. This measuring range violation can occur in the WinCC
data manager as well as in the field device. You can use the tag status to determine whether
this measuring range violation occurred in WinCC or before the value was transferred to
WinCC.
If the tag status reports a limit violation with the code 0x0010, for example, the low range limit
configured in WinCC has been violated. If the tag status does not report a limit violation, the
quality code transferred to WinCC already contained the limit violation.

0x0000 No error
DM_VARSTATE_NOT_ESTABLISHED 0x0001 Connection to partner not established
DM_VARSTATE_HANDSHAKE_ERROR 0x0002 Protocol error
DM_VARSTATE_HARDWARE_ERROR 0x0004 Network module defective
DM_VARSTATE_MAX_LIMIT 0x0008 Configured high limit violated
DM_VARSTATE_MIN_LIMIT 0x0010 Configured low limit violated
DM_VARSTATE_MAX_RANGE 0x0020 Format limit exceeded
DM_VARSTATE_MIN_RANGE 0x0040 Format limit fallen below
DM_VARSTATE_CONVERSION_ERROR 0x0080 Display conversion error (in conjunction with
DM_VARSTATE_..._RANGE))
DM_VARSTATE_STARTUP_VALUE 0x0100 Initial value of tag
DM_VARSTATE_DEFAULT_VALUE 0x0200 Substitute value of tag
DM_VARSTATE_ADDRESS_ERROR 0x0400 Addressing error in channel
DM_VARSTATE_INVALID_KEY 0x0800 Tag not found/not available

WinCC Professional V13 SP2 – Programming reference


202 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

DM_VARSTATE_ACCESS_FAULT 0x1000 Access to tag denied


DM_VARSTATE_TIMEOUT 0x2000 Timeout/no feedback from channel
DM_VARSTATE_SERVERDOWN 0x4000 Server is down

Notification classes

DM_NOTIFY_CLASS_ERROR 0x00000001 Notification code contains error ID


DM_NOTIFY_CLASS_WARNING 0x00000002 Notification code contains warning
DM_NOTIFY_CLASS_DATA 0x00000003 Notification code contains data type

Notification codes

DM_NOTIFY_SHUTDOWN 0x00000001 Class Error : Data Manager is shutting


down
DM_NOTIFY_PROCESSNET_ERROR 0x00000002 Class Error : Error on process bus
DM_NOTIFY_SYSNET_ERROR 0x00000003 Class Error : Error on system bus
DM_NOTIFY_QUEUE_50_PERCENT 0x00000001 Class Warning : Fill level of application
queue 50%
DM_NOTIFY_QUEUE_60_PERCENT 0x00000002 Class Warning : Fill level of application
queue 60%
DM_NOTIFY_QUEUE_70_PERCENT 0x00000003 Class Warning : Fill level of application
queue 70%
DM_NOTIFY_QUEUE_80_PERCENT 0x00000004 Class Warning : Fill level of application
queue 80%
DM_NOTIFY_QUEUE_90_PERCENT 0x00000005 Class Warning : Fill level of application
queue 90%
DM_NOTIFY_QUEUE_OVERFLOW 0x00000006 Class Warning : Application queue over‐
flow
DM_NOTIFY_CYCLES_CHANGED 0x00000010 Class Warning => Read in cycles again
DM_NOTIFY_MACHINES_CHANGED 0x00000011 Class Warning : Computer list
DM_NOTIFY_PROJECT_OPENED 0x00000012 Class Warning: Project is being loaded
DM_NOTIFY_PROJECT_CLOSED 0x00000013 Class Warning: Project is being closed
DM_NOTIFY_SYSTEM_LOCALE 0x00000014 Switch language (resources)
DM_NOTIFY_DATA_LOCALE 0x00000015 Switch language (configuration data)
DM_NOTIFY_PROJECT_RUNTIME 0x00000016 Project activated in runtime mode
DM_NOTIFY_PROJECT_EDIT 0x00000017 Runtime mode for project deactivated
DM_NOTIFY_HOTKEY_CHANGE 0x00000018 The hotkeys have changed
DM_NOTIFY_APPLICATION_DATA 0x00000001 Class Data : Data sent by application
DM_NOTIFY_VARIABLE_DATA 0x00000002 Class Data : Tag data
DM_NOTIFY_SERVERDOWN 0x00000022
DM_NOTIFY_SERVERUP 0x00000023

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 203
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Computer type

Computer type 0 Server


1 Client

Registered messages
DM_OHIOLANGUAGE "WM_OHIOLANGUAGE"

Internal system tag


DM_VAR_CURRENT_LANGUAGE "OHIOCurrentLanguage"

2.2.1.5 Error messages (RT Professional)

Overview
The following error messages can be returned by the API functions in the CMN_ERROR error
structure:

DM_E_SYS_ERROR 0x10000000 If this bit is set in dwError1 of error


structure CMN_ERROR, then dwEr‐
ror2 contains the system error code.
DM_E_OK 0x00000000 No error
DM_E_CANCEL 0x00000001 User has selected "Cancel" in a dia‐
log
DM_E_FILE 0x00000002 Error during file operation
DM_E_UPDATE 0x00000003 Updating project
DM_E_NO_RT_PRJ 0x00000004 No project in runtime mode
DM_E_NOT_SUPPORTED 0x00000005 Requested service unavailable
DM_E_ALREADY_CONNECTED 0x00000006 Connection to the Data Manager al‐
ready established
DM_E_NOT_CONNECTED 0x00000007 No connection to the Data Manager
DM_E_INVALID_TAID 0x00000008 Invalid transaction ID
DM_E_INVALID_KEY 0x00000009 Tag not found
DM_E_INVALID_TYPE 0x0000000A Invalid tag type
DM_E_MAX_LIMIT 0x0000000B High limit of the tag violated
DM_E_MIN_LIMIT 0x0000000C Low limit of the tag violated
DM_E_MAX_RANGE 0x0000000D High limit of the format conversion
violated
DM_E_MIN_RANGE 0x0000000E Low limit of the format conversion
violated
DM_E_ACCESS_FAULT 0x0000000F Prohibited write access to a tag
DM_E_TIMEOUT 0x00000010 Timeout error
DM_E_ALREADY_EXIST 0x00000011 Object to be created already exists
DM_E_PARAM 0x00000012 Invalid parameter

WinCC Professional V13 SP2 – Programming reference


204 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

DM_E_INV_PRJ 0x00000013 Cannot find/load specified project


DM_E_UNKNOWN 0x00000014 Unknown error
DM_E_OOM 0x00000015 Out of memory
DM_E_NOT_CREATED 0x00000016 Project could not be created
DM_E_MACHINE_NOT_FOUND 0x00000017 Computer not found
DM_E_NO_INFO_FOUND 0x00000018 Cannot find startup information
DM_E_INTERNAL 0x00000019 Internal processing error
DM_E_INVALID_LOCALE 0x0000001A Incorrect local ID
DM_E_COMMUNICATION 0x0000001B Incorrect local ID
DM_E_DONT_EXIST 0x0000001C Object does not exist
e.g.: attempt was made to create a
tag, and specified connection does
not exist
DM_E_ALREADY_ACTIVATED 0x0000001D Project is in runtime mode
e.g.: attempt is made to activate a
project that is already in runtime
mode.
DM_E_NO_OPEN_PROJECT 0x0000001E No project is open.
DM_E_ALREADY_DEACTIVATED 0x0000001F Project is not in runtime mode
DM_E_NO_RIGHTS 0x00000020 Wrong CreatorID transferred
DM_E_NOT_DELETED 0x00000021 Object could not be deleted
DM_E_LICENSE 0x00000022 Software protection: No license
DM_E_LICENSE_LIMIT 0x00000023 Software protection: Limit reached/
exceeded
DM_E_INVALID_OBJECTTYPE 0x00000024 Invalid object type
DM_E_OP_REQUIERES_PRJEDITMODE 0x00000025 Project is in runtime mode
e.g.: operation requires that the
project is not activated.
DM_E_INTERFACE 0x00000026 Internal error while accessing interfa‐
ces
DM_E_UNIT_NOT_FOUND 0x00000027 Unit not found
DM_E_CONNECTION_NOT_FOUND 0x00000028 Connection not found

See also
CMN_ERROR (Page 1117)

2.2.1.6 Conversion routines (Control Center) (RT Professional)

Overview

No. Conversion routines for the "Signed 8-bit value" data type
0 CharToSignedByte
1 CharToUnsignedByte
2 CharToUnsignedWord

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 205
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

3 CharToUnsignedDword
4 CharToSignedWord
5 CharToSignedDword
6 CharToMSBByte
7 CharToMSBWord
8 CharToMSBDword
9 CharToBCDByte
10 CharToBCDWord
11 CharToBCDDword
12 CharToSignedBCDByte
13 CharToSignedBCDWord
14 CharToSignedBCDDword
15 CharToExtSignedBCDByte
16 CharToExtSignedBCDWord
17 CharToExtSignedBCDDword
18 CharToAikenByte
19 CharToAikenWord
20 CharToAikenDword
21 CharToSignedAikenByte
22 CharToSignedAikenWord
23 CharToSignedAikenDword
24 CharToExcessByte
25 CharToExcessWord
26 CharToExcessDword
27 CharToSignedExcessByte
28 CharToSignedExcessWord
29 CharToSignedExcessDword
> 29 (CharToSignedByte)

No. Conversion routines for the "Unsigned 8-bit value" data type
0 ByteToUnsignedByte
1 ByteToUnsignedWord
2 ByteToUnsignedDword
3 ByteToSignedByte
4 ByteToSignedWord
5 ByteToSignedDword
6 ByteToBCDByte
7 ByteToBCDWord
8 ByteToBCDDword
9 ByteToAikenByte
10 ByteToAikenWord
11 ByteToAikenDword
12 ByteToExcessByte

WinCC Professional V13 SP2 – Programming reference


206 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

13 ByteToExcessWord
14 ByteToExcessDword
> 14 (ByteToUnsignedByte)

No. Conversion routines for the "Signed 16-bit value"


data type
0 ShortToSignedWord
1 ShortToUnsignedByte
2 ShortToUnsignedWord
3 ShortToUnsignedDword
4 ShortToSignedByte
5 ShortToSignedDword
6 ShortToMSBByte
7 ShortToMSBWord
8 ShortToMSBDword
9 ShortToBCDByte
10 ShortToBCDWord
11 ShortToBCDDword
12 ShortToSignedBCDByte
13 ShortToSignedBCDWord
14 ShortToSignedBCDDword
15 ShortToExtSignedBCDByte
16 ShortToExtSignedBCDWord
17 ShortToExtSignedBCDDword
18 ShortToAikenByte
19 ShortToAikenWord
20 ShortToAikenDword
21 ShortToSignedAikenByte
22 ShortToSignedAikenWord
23 ShortToSignedAikenDword
24 ShortToExcessByte
25 ShortToExcessWord
26 ShortToExcessDword
27 ShortToSignedExcessByte
28 ShortToSignedExcessWord
29 ShortToSignedExcessDword
> 29 (ShortToSignedWord)

No. Conversion routines for the "Unsigned 16-bit val‐


ue" data type
0 WordToUnsignedWord
1 WordToUnsignedByte
2 WordToUnsignedDword

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 207
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

3 WordToSignedByte
4 WordToSignedWord
5 WordToSignedDword
6 WordToBCDByte
7 WordToBCDWord
8 WordToBCDDword
9 WordToAikenByte
10 WordToAikenWord
11 WordToAikenDword
12 WordToExcessByte
13 WordToExcessWord
14 WordToExcessDword
15 WordToSimaticBCDCounter
16 WordToSimaticCounter
> 16 (WordToUnsignedWord)

No. Conversion routines for the "Signed 32-bit value"


data type
0 LongToSignedDword
1 LongToUnsignedByte
2 LongToUnsignedWord
3 LongToUnsignedDword
4 LongToSignedByte
5 LongToSignedWord
6 LongToMSBByte
7 LongToMSBWord
8 LongToMSBDword
9 LongToBCDByte
10 LongToBCDWord
11 LongToBCDDword
12 LongToSignedBCDByte
13 LongToSignedBCDWord
14 LongToSignedBCDDword
15 LongToExtSignedBCDByte
16 LongToExtSignedBCDWord
17 LongToExtSignedBCDDword
18 LongToAikenByte
19 LongToAikenWord
20 LongToAikenDword
21 LongToSignedAikenByte
22 LongToSignedAikenWord
23 LongToSignedAikenDword
24 LongToExcessByte

WinCC Professional V13 SP2 – Programming reference


208 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

25 LongToExcessWord
26 LongToExcessDword
27 LongToSignedExcessByte
28 LongToSignedExcessWord
29 LongToSignedExcessDword
30 LongToSimaticBCDTimer
31 (LongToSignedDword)
32 (LongToSignedDword)
33 (LongToSignedDword)
34 LongToSimaticTimer
> 34 (LongToSignedDword)

No. Conversion routines for the "Unsigned 32-bit val‐


ue" data type
0 DwordToUnsignedDword
1 DwordToUnsignedByte
2 DwordToUnsignedWord
3 DwordToSignedByte
4 DwordToSignedWord
5 DwordToSignedDword
6 DwordToBCDByte
7 DwordToBCDWord
8 DwordToBCDDword
9 DwordToAikenByte
10 DwordToAikenWord
11 DwordToAikenDword
12 DwordToExcessByte
13 DwordToExcessWord
14 DwordToExcessDword
15 DwordToSimaticBCDTimer
16 (DwordToUnsignedDword)
17 (DwordToUnsignedDword)
18 (DwordToUnsignedDword)
19 DwordToSimaticTimer
> 19 (DwordToUnsignedDword)

No. Conversion routines for the "Floating-point num‐


ber 32-bit IEEE 754" data type
0 FloatToFloat
1 FloatToUnsignedByte
2 FloatToUnsignedWord
3 FloatToUnsignedDword

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 209
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

4 FloatToSignedByte
5 FloatToSignedWord
6 FloatToSignedDword
7 FloatToDouble
8 FloatToMSBByte
9 FloatToMSBWord
10 FloatToMSBDword
11 FloatToBCDByte
12 FloatToBCDWord
13 FloatToBCDDword
14 FloatToSignedBCDByte
15 FloatToSignedBCDWord
16 FloatToSignedBCDDword
17 FloatToExtSignedBCDByte
18 FloatToExtSignedBCDWord
19 FloatToExtSignedBCDDword
20 FloatToAikenByte
21 FloatToAikenWord
22 FloatToAikenDword
23 FloatToSignedAikenByte
24 FloatToSignedAikenWord
25 FloatToSignedAikenDword
26 FloatToExcessByte
27 FloatToExcessWord
28 FloatToExcessDword
29 FloatToSignedExcessByte
30 FloatToSignedExcessWord
31 FloatToSignedExcessDword
32 FloatToSimaticBCDTimer
33 (FloatToFloat)
34 (FloatToFloat)
35 (FloatToFloat)
36 FloatToS5Float
37 FloatToSimaticTimer
> 37 (FloatToFloat)

No. Conversion routines for the "Floating-point num‐


ber 64-bit IEEE 754" data type
0 DoubleToDouble
1 DoubleToUnsignedByte
2 DoubleToUnsignedWord
3 DoubleToUnsignedDword
4 DoubleToSignedByte

WinCC Professional V13 SP2 – Programming reference


210 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

5 DoubleToSignedWord
6 DoubleToSignedDword
7 DoubleToFloat
8 DoubleToMSBByte
9 DoubleToMSBWord
10 DoubleToMSBDword
11 DoubleToBCDByte
12 DoubleToBCDWord
13 DoubleToBCDDword
14 DoubleToSignedBCDByte
15 DoubleToSignedBCDWord
16 DoubleToSignedBCDDword
17 DoubleToExtSignedBCDByte
18 DoubleToExtSignedBCDWord
19 DoubleToExtSignedBCDDword
20 DoubleToAikenByte
21 DoubleToAikenWord
22 DoubleToAikenDword
23 DoubleToSignedAikenByte
24 DoubleToSignedAikenWord
25 DoubleToSignedAikenDword
26 DoubleToExcessByte
27 DoubleToExcessWord
28 DoubleToExcessDword
29 DoubleToSignedExcessByte
30 DoubleToSignedExcessWord
31 DoubleToSignedExcessDword
32 DoubleToSimaticBCDTimer
33 (DoubleToDouble)
34 (DoubleToDouble)
35 (DoubleToDouble)
36 DoubleToS5Float
37 DoubleToSimaticTimer
> 37 (DoubleToDouble)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 211
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.2 Structures (RT Professional)

2.2.2.1 DM_CONNECTION_DATA (RT Professional)

Declaration

typedef struct {
CHAR szConnection[
MAX_DM_CONNECTION_NAME +3];
CHAR szUnitName[MAX_DM_UNIT_NAME +1];
CHAR szCommon[MAX_DM_CON_COMMON +1];
CHAR szSpecific[MAX_DM_CON_SPECIFIC +1];
DWORD dwVarNum;
}
DM_CONNECTION_DATA;

Members

szConnection
Name of the logical connection

szUnitName
Names of the channel unit

szCommon
The parameter is reserved for future development.

szSpecific
szSpecific contains the address parameters of the connection, for example, the Ethernet
address, slot number, etc. Refer to the communication manual for PLC-specific details.
This is the same value that appears in the properties of a tag in WinCC in the Parameter column.

dwVarNum
Number of assigned tags

Required files
dmclient.h

API functions

DM_ENUM_CONNECTION_PROC (Page 438) List connection data (callback)

WinCC Professional V13 SP2 – Programming reference


212 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
DM_ENUM_CONNECTION_PROC (Page 438)

2.2.2.2 DM_CONNKEY (RT Professional)

Declaration

typedef struct {
CHAR szName[ MAX_DM_CONNECTION_NAME + 1 ];
LPVOID lpvUserData;
}
DM_CONNKEY;

Members

szName
Name of the logical connection

lpvUserData
Pointer to application-specific data

Required files
dmclient.h

API functions

DMEnumConnectionData (Page 434) List connection data

See also
DMEnumConnectionData (Page 434)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 213
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.2.3 DM_CYCLE_INFO (RT Professional)

Declaration

typedef struct {
DWORD dwCycleTime;
DWORD dwCycleIndex;
char szDescription[ MAX_DM_CYCLE_NAME + 1 ];
}
DM_CYCLE_INFO;

Members

dwCycleTime
Time base of the update cycle

dwCycleIndex
identifies the order within the list of update cycles.

"On change" Index: 0


"250ms" Index: 1
: :
"User cycle 5" Index: 15

szDescription
Description of the update cycle.

Required files
dmclient.h

API functions

DM_ENUM_CYCLES_PROC (Page 287) List update cycles (callback)

See also
DM_ENUM_CYCLES_PROC (Page 287)

WinCC Professional V13 SP2 – Programming reference


214 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.2.4 DM_DATA_SERVICE (RT Professional)

Declaration

typedef struct {
DWORD dwTeleType;
char szService[MAX_DM_SERVICE_NAME + 1];
char szSendingApp[MAX_DM_APP_NAME + 1];
DWORD dwSendingMachine;
DWORD dwDataSize;
BYTE byData[1];
}
DM_DATA_SERVICE;

Members

dwTeleType
The parameter is reserved for future development and must be preset to 0.

szService
Name of the data transport channel. This name corresponds to the one assigned during the
installation of the service (DMInstallDataService).

szSendingApp
logical name of the sender. This name corresponds to the application name specified for
DMConnect.

dwSendingMachine
Index of the computer from which the packet was sent (0 - .63). All computers registered in
the computer list can be accessed by their index for the API functions. The first entry in the
computer list has the index "0".

dwDataSize
Size of the data packet in bytes: Data[0] ... byData[dwDataSize - 1]

byData
Pointer to the data

Required files
dmclient.h

API functions

DM_DATA_SERVICE_PROC (Page 314) List data transport channels (callback), install data
transport channel (callback)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 215
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
DM_DATA_SERVICE_PROC (Page 314)

2.2.2.5 DM_DIRECTORY_INFO (RT Professional)

Declaration

typedef struct {
char szProjectDir[_MAX_PATH + 1 ];
char szProjectAppDir[_MAX_PATH + 1 ];
char szGlobalLibDir[_MAX_PATH + 1 ];
char szProjectLibDir[_MAX_PATH + 1 ];
char szLokalProjectAppDir[_MAX_PATH + 1 ];
}
DM_DIRECTORY_INFO;

Members

szProjectDir
Full path of the project directory, e.g. D:\WinCC\Projekt1

szProjectAppDir
Full path of the subdirectory of the application in the project directory, e.g.: D:\WinCC
\Projekt1\GraCS

szGlobalLibDir
Full path of the cross-project library directory, e.g. D:\WinCC\aplib

szProjectLibDir
Full path of the project-based library directory, e.g. D:\WinCC\Projekt1\Library

szLokalProjectAppDir
Full path of the subdirectory of the application in the project directory on the local computer.

Required files
dmclient.h

API functions

DMGetProjectDirectory (Page 304) Get path and file names of the configuration data

WinCC Professional V13 SP2 – Programming reference


216 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
DMGetProjectDirectory (Page 304)

2.2.2.6 DM_DLGOPTIONS (RT Professional)

Declaration

typedef struct {
DWORD dwFlags;
LPRECT lprcPreference;
DM_TEST_DROP_TARGET_PROC lpfnTestDropTarget;
DM_DROP_TARGET_PROC lpfnDropTarget;
LPVOID lpvUser;
}
DM_DLGOPTIONS;

Members

dwFlags
dwFlags is used to specify the reaction of the dialog or dialog box:

DM_DLG_NOT_MODAL The tag dialog is not modal.


DM_DLG_NOT_MOVEABLE The dialog box is not movable.
DM_DLG_DRAGDROP Objects in the dialog box can be edited with drag-
and-drop.

lprcPreference
Pointer to a RECT type structure with information about the size of the dialog box. If
lprcPreference == NULL, the dialog appears centered and with a predefined size.

lpfnTestDropTarget
The parameter is reserved for future upgrades and must be preset to NULL.

lpfnDropTarget
The parameter is reserved for future upgrades and must be preset to NULL.

lpvUser
Pointer to application-specific data.

Required files
dmclient.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 217
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

API functions

DMShowVarDatabase (Page 402) Open tag selection dialog


DMShowVarDatabaseMulti (Page 407) Open tag selection dialog

See also
DMShowVarDatabase (Page 402)
DMShowVarDatabaseMulti (Page 407)

2.2.2.7 DM_FORMAT_INFO (RT Professional)

Declaration

typedef struct {
DWORD dwID;
char szName[MAX_DM_FORMAT_NAME + 1];
}
DM_FORMAT_INFO;

Members

dwID
Number of the conversion routine to be used. You can find more detailed information in the
"Conversion routines" section.

szName
Name of the conversion routine to be used. You can find more detailed information in the
"Conversion routines" section.

Required files
dmclient.h

API functions

DM_ENUM_FORMATS_PROC (Page 284) List format conversions (callback)

See also
DM_ENUM_FORMATS_PROC (Page 284)

WinCC Professional V13 SP2 – Programming reference


218 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.2.8 DM_MACHINE_TABLE (RT Professional)

Declaration

typedef struct {
LONG nNumMachines;
LONG nLocalMachine;
DM_SD_TARGET_MACHINE tm[MAX_DM_OHIO_MACHINES];
}
DM_MACHINE_TABLE;

Members

nNumMachines
Number of computers in the project (the max. number MAX_DM_OHIO_MACHINES may not
be exceeded).

nLocalMachine
Index of the entry of the local computer in the computer list.
All computers registered in the computer list can be accessed by their index for the API
functions. The first entry in the computer list has the index "0".

tm
Full DM_SD_TARGET_MACHINE (Page 223) type array with information about the computers
involved in the project. Only nNumMachines of these structures are passed here, however
(therefore max. usable index = (nMumMachines - 1) ).

Required files
dmclient.h

API functions

DMGetMachineTable (Page 297) Query computer list

See also
DM_SD_TARGET_MACHINE (Page 223)
DMGetMachineTable (Page 297)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 219
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.2.9 DM_PROJECT_INFO (RT Professional)

Declaration

typedef struct {
char szProjectFile[ _MAX_PATH + 1 ];
char szDSNName[ MAX_DM_DSN_NAME + 1 ];
DWORD dwDataLocale;
}
DM_PROJECT_INFO;

Members

szProjectFile
File name of the project, including path and extension.

szDSNName
Data source name of the database

dwDataLocale
Code of the language that is used during configuration.

Required files
dmclient.h

API functions

DM_ENUM_OPENED_PROJECTS_PROC List projects (open) (callback)


(Page 302)
DMEnumOpenedProjects (Page 300) Get project information

See also
DM_ENUM_OPENED_PROJECTS_PROC (Page 302)
DMEnumOpenedProjects (Page 300)
DMGetProjectInformation (Page 305)

WinCC Professional V13 SP2 – Programming reference


220 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.2.10 DM_SEND_DATA_STRUCT (RT Professional)

Declaration

typedef struct {
BOOL fHighPriority;
char szService[MAX_DM_SERVICE_NAME + 1];
DWORD dwTargetMachineFlags;
DWORD dwTargetMachines;
DM_SD_TARGET_MACHINE dmTargetMachine[
MAX_DM_OHIO_MACHINES];
DWORD dwTargetApps;
DM_SD_TARGET_APP dmTargetApp[
MAX_DM_OHIO_APPLICATIONS];
DWORD dwDataSize;
BYTE byData[1];
}
DM_SEND_DATA_STRUCT;

Members

fHighPriority
fHighPriority indicates the priority for the data communication:

1 High priority
0 Normal priority

szService
Name of the service to be used. In order for an application to receive data, not only do the
conditions of dwTargetMachineFlags have to be met, but also the corresponding service has
to be installed through DMInstallDataService.

dwTargetMachineFlags
dwTargetMachineFlags indicate the applications to which data should be set with the
DMSendApplicationData function.

DM_SD_LOCAL Only to local applications (excludes all other flags!)


All other flags are currently not allowed and are reserved for
future development!
DM_SD_ALL_MACHINES To all computers in the project.
(The parameter is reserved for future development)
DM_SD_ALL_SERVERS To all servers in the project.
(The parameter is reserved for future development)
DM_SD_ALL_CLIENTS To all clients in the project.
(The parameter is reserved for future development)
DM_SD_RELATED_MACHINES To all clients that belong to the same server as the local host
(The parameter is reserved for future development)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 221
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

DM_SD_FIRST_SERVER (The parameter is reserved for future development)


DM_SD_PRIMARY_SERVER (The parameter is reserved for future development)
DM_SD_EXCEPT_LOCAL To all computers, except local ones, that meet the address de‐
scription.
(The parameter is reserved for future development)

dwTargetMachines
Number of completed structures dmTargetMachine.
Reserved for future development, must be filled with 0.

dmTargetMachine
Pointer to the DM_SD_TARGET_MACHINE (Page 223) structure for specifying the computer
to which the data to be sent. Only the szMachineName parameter is relevant here.
Reserved for future development, should be fully initialized with 0L.

dwTargetApps
Number of completed structures dmTargetApp.

dmTargetApp
DM_SD_TARGET_APP (Page 224) type structures contain the names of the applications to
which the data to be sent.

dwDataSize
Amount of data to be sent in bytes

byData
Array containing the data to be sent

Comments
The DMSendApplicationData function is only implemented locally.
The members present in this structure for remote access are reserved for future development.
dwTargetMachineFlags can only be filled with DM_SD_LOCAL, any other specification results
in errors, and dwTargetMachines must be 0L.

Required files
dmclient.h

API functions

DMSendApplicationData (Page 318) Data communication with applications

WinCC Professional V13 SP2 – Programming reference


222 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
DMSendApplicationData (Page 318)
DM_SD_TARGET_MACHINE (Page 223)
DM_SD_TARGET_APP (Page 224)

2.2.2.11 DM_SD_TARGET_MACHINE (RT Professional)

Declaration

typedef struct {
BOOL fServer;
BOOL fLocal;
char szMachineName[
MAX_COMPUTERNAME_LENGTH + 1];
}
DM_SD_TARGET_MACHINE

Members

fServer
Indicates whether the computer at hand is a server or a client.
The parameter is not relevant for the purposes of data communication
(DM_SEND_DATA_STRUCT).

fLocal
Indicates whether the querying application is running on the local computer or another
computer configured in the network.
The parameter is not relevant for the purposes of data communication
(DM_SEND_DATA_STRUCT).

szMachineName
Computer Name

Comments
DM_SD_TARGET_MACHINE is part of the DM_MACHINE_TABLE (Page 219) and
DM_SEND_DATA_STRUCT (Page 221) structures.

Required files
dmclient.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 223
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
DM_MACHINE_TABLE (Page 219)
DM_SEND_DATA_STRUCT (Page 221)

2.2.2.12 DM_SD_TARGET_APP (RT Professional)

Declaration

typedef struct {
char szAppName[MAX_DM_APP_NAME + 1];
}
DM_SD_TARGET_APP;

Members

szAppName
For szAppName, use the name of the application used for calling DMConnect.

Comments
DM_SD_TARGET_APP is part of the DM_SEND_DATA_STRUCT (Page 221) structure.

Required files
dmclient.h

See also
DM_SEND_DATA_STRUCT (Page 221)

2.2.2.13 DM_TYPEREF (RT Professional)

Declaration

typedef struct {
DWORD dwType;
DWORD dwSize;
char szTypeName[MAX_DM_TYPE_NAME + 1];
}
DM_TYPEREF;

WinCC Professional V13 SP2 – Programming reference


224 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Members

dwType
The type of tag is specified in dwType:

DM_VARTYPE_BIT Binary tag


DM_VARTYPE_SBYTE Signed 8-bit value
DM_VARTYPE_BYTE Unsigned 8-bit value
DM_VARTYPE_SWORD Signed 16-bit value
DM_VARTYPE_WORD Unsigned 16-bit value
DM_VARTYPE_SDWORD Signed 32-bit value
DM_VARTYPE_DWORD Unsigned 32-bit value
DM_VARTYPE_FLOAT Floating-point number 32-bit IEEE 754
DM_VARTYPE_DOUBLE Floating-point number 64-bit IEEE 754
DM_VARTYPE_TEXT_8 Text tag, 8-bit character set
DM_VARTYPE_TEXT_16 Text tag, 16-bit character set
DM_VARTYPE_RAW Raw data type
DM_VARTYPE_STRUCT Structure tag
DM_VARTYPE_TEXTREF Text reference from text lib
Values >=1024 User-defined structure types
This type ID is needed in some calls, for example, for filters to
identify a specific structure type.

dwSize
dwSize specifies the length of the data type (in bytes) on the OS.

szTypeName
The name of the structure type for structure tags is in szTypeName.

Comments
DM_TYPEREF is used in the DM_VAR_UPDATE_STRUCT (Page 226) and
DM_VARIABLE_DATA (Page 235) structures.

Required files
dmclient.h

API functions

DMGetVarType (Page 372) Get data type of a tag

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 225
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
DM_VAR_UPDATE_STRUCT (Page 226)
DMGetVarType (Page 372)
DM_VARIABLE_DATA (Page 235)
DM_VAR_UPDATE_STRUCTEX (Page 228)
DM_VARIABLE_DATA4 (Page 237)

2.2.2.14 DM_VAR_UPDATE_STRUCT (RT Professional)

Declaration

typedef struct {
DM_TYPEREF dmTypeRef;
DM_VARKEY dmVarKey;
VARIANT dmValue;
DWORD dwState;
}
DM_VAR_UPDATE_STRUCT;

Members

dmTypeRef
The DM_TYPEREF (Page 224) structure contains information on the tag type.
Exception: For performance reasons, nothing is entered into this structure in case of cyclic
requests.

dmVarKey
The tag to be processed is specified through the DM_VARKEY (Page 239) structure.

WinCC Professional V13 SP2 – Programming reference


226 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

dmValue
Tag value.

Note
The dmValue VARIANT must be initialized with VariantInit(&dmValue) before its first use and
then released with VariantClear(&dmValue) after its use.
Only an array of several DM_VAR_UPDATE_STRUCT can be pre-initialized before its first use
with ZeroMemory() or memset(). This affects the VARIANT dmValue contained here like a
VariantInit(&dmValue), since 0 corresponds to a VT_EMPTY.
The DM_VAR_UPDATE_STRUCT structure may not be cleared with ZeroMemory() or
memset() once it has been used. VARIANT then contains data that may be of the VT_BSTR
type.
If the tag type is VT_BSTR, problems can occur in memory management (memory leak), if no
VariantClear(&dmValue) is made before allocated DM_VAR_UPDATE_STRUCT structures
are deleted with delete[].

(0x0000) No error
DM_VARSTATE_NOT_ESTABLISHED (0x0001) Connection to partner not establish‐
ed
DM_VARSTATE_HANDSHAKE_ERROR (0x0002) Protocol error
DM_VARSTATE_HARDWARE_ERROR (0x0004) Network adapter defective
DM_VARSTATE_MAX_LIMIT (0x0008) Configured high limit violated
DM_VARSTATE_MIN_LIMIT (0x0010) Configured low limit violated
DM_VARSTATE_MAX_RANGE (0x0020) Format high limit violated
DM_VARSTATE_MIN_RANGE (0x0040) Format low limit violated
DM_VARSTATE_CONVERSION_ERROR (0x0080) Display conversion error (in conjunc‐
tion with DM_VAR‐
STATE_..._RANGE)
DM_VARSTATE_STARTUP_VALUE (0x0100) Initialization value of tag
DM_VARSTATE_DEFAULT_VALUE (0x0200) Substitute value of tag
DM_VARSTATE_ADDRESS_ERROR (0x0400) Addressing error in channel
DM_VARSTATE_INVALID_KEY (0x0800) Tag not found / not available
DM_VARSTATE_ACCESS_FAULT (0x1000) Access to tag denied
DM_VARSTATE_TIMEOUT (0x2000) Timeout / no feedback from channel
DM_VARSTATE_SERVERDOWN (0x4000) Server is down

Required files
dmclient.h

API functions

DM_NOTIFY_VARIABLE_PROC (Page 450) Get tag values (callback)


DMGetValue (Page 335) Get tag values

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 227
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
DM_NOTIFY_VARIABLE_PROC (Page 450)
DM_VARKEY (Page 239)
DMGetValue (Page 335)
DM_TYPEREF (Page 224)

2.2.2.15 DM_VAR_UPDATE_STRUCTEX (RT Professional)

Declaration

typedef struct {
DM_TYPEREF dmTypeRef;
DM_VARKEY dmVarKey;
VARIANT dmValue;
DWORD dwState;
DWORD dwQualityCode;
}
DM_VAR_UPDATE_STRUCTEX;

Members

dmTypeRef
The DM_TYPEREF (Page 224) structure contains information on the tag type.
Exception: For performance reasons, nothing is entered into this structure in case of cyclic
requests.

dmVarKey
The tag to be edited is specified through the DM_VARKEY (Page 239) structure.

WinCC Professional V13 SP2 – Programming reference


228 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

dmValue
Tag value.

Note
The VARIANT dmValue must be initialized with VariantInit(&dmValue) before its first use and
then released with VariantClear(&dmValue) after its use.
Only an array of several DM_VAR_UPDATE_STRUCT can be pre-initialized before its first use
with ZeroMemory() or memset(). This affects the VARIANT dmValue contained here like a
VariantInit(&dmValue), since 0 corresponds to a VT_EMPTY.
The DM_VAR_UPDATE_STRUCTEX structure may not be cleared with ZeroMemory() or
memset() once it has been used. VARIANT then contains data that may be of the VT_BSTR
type.
If the tag type is VT_BSTR, problems can occur in memory management (memory leak), if no
VariantClear(&dmValue) is made before allocated DM_VAR_UPDATE_STRUCTEX structures
are deleted with delete[].

dwState
Indicates whether the value of the tag was successfully changed or whether errors have
occurred:

DM_VARSTATE_NOT_ESTABLISHED 0x0001 Connection to partner not established


DM_VARSTATE_HANDSHAKE_ERROR 0x0002 Protocol error
DM_VARSTATE_HARDWARE_ERROR 0x0004 Network adapter defective
DM_VARSTATE_MAX_LIMIT 0x0008 Configured high limit violated
DM_VARSTATE_MIN_LIMIT 0x0010 Configured low limit violated
DM_VARSTATE_MAX_RANGE 0x0020 Format high limit violated
DM_VARSTATE_MIN_RANGE 0x0040 Format low limit violated
DM_VARSTATE_CONVERSION_ERROR 0x0080 Display conversion error (in conjunction
with DM_VARSTATE_..._RANGE)
DM_VARSTATE_STARTUP_VALUE 0x0100 Initialization value of tag
DM_VARSTATE_DEFAULT_VALUE 0x0200 Substitute value of tag
DM_VARSTATE_ADDRESS_ERROR 0x0400 Addressing error in channel
DM_VARSTATE_INVALID_KEY 0x0800 Tag not found / not available
DM_VARSTATE_ACCESS_FAULT 0x1000 Access to tag denied
DM_VARSTATE_TIMEOUT 0x2000 Timeout / no feedback from channel
DM_VARSTATE_SERVERDOWN 0x4000 Server is down

dwQualityCode
Quality code of the tag value.
The quality code is formed as follows:

WinCC DM tag status Quality code from Profibus PA/OPC


DM_VARSTATE_SERVERDOWN (0x4000) Server is down Bad, out of service, 0x1C
DM_VARSTATE_HARDWARE_ERROR Network adapter defective Bad, device failure, 0x0C
(0x0004)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 229
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

DM_VARSTATE_NOT_ESTABLISHED Connection to partner not estab‐ Bad, not connected, 0x08


(0x0001) lished
DM_VARSTATE_TIMEOUT (0x2000) Timeout / no feedback from chan‐ Uncertain, last usable value, 0x44
nel
DM_VARSTATE_HANDSHAKE_ERROR Protocol error Bad, no communication (no usable val‐
(0x0002) ue), 0x18
DM_VARSTATE_ADDRESS_ERROR Addressing error in channel Bad, configuration error, value not ac‐
(0x0400) cepted, 0x04
DM_VARSTATE_INVALID_KEY (0x0800) Tag not found / not available Bad, configuration error, value not ac‐
cepted, 0x04
DM_VARSTATE_ACCESS_FAULT (0x1000) Access to tag denied Bad, configuration error, value not ac‐
cepted, 0x04
DM_VARSTATE_MAX_RANGE (0x0020) Format high limit violated Uncertain, engineering unit range viola‐
tion, high limit gesetzt, 0x56
DM_VARSTATE_MIN_RANGE (0x0040) Format low limit violated Uncertain, engineering unit range viola‐
tion, low limit gesetzt, 0x55
DM_VARSTATE_CONVERSION_ERROR Display conversion error Uncertain, engineering unit range viola‐
(0x0080) tion, ohne limits gesetzt, 0x54
DM_VARSTATE_MAX_LIMIT (0x0008) Configured high limit violated Indicate with Limit-Bit HIGH, 0x01, OR‐
ed together with the other tag status,
e.g. good (cascade), ok, results in 0xC2
DM_VARSTATE_MIN_LIMIT (0x0010) Configured low limit violated Indicate with Limit-Bit LOW, 0x02, OR‐
ed together with the other tag status,
e.g. good (cascade), ok, results in 0xC1
DM_VARSTATE_STARTUP_VALUE Initialization value of tag Uncertain, initial value, 0x4C
(0x0100)
DM_VARSTATE_DEFAULT_VALUE Substitute value of tag Uncertain, substitute-set, 0x48
(0x0200)

Required files
dmclient.h

API functions

DM_NOTIFY_VARIABLEEX_PROC (Page 461) Get tag values (callback)


DMGetValueEx (Page 337) Get tag values

See also
DM_NOTIFY_VARIABLEEX_PROC (Page 461)
DM_TYPEREF (Page 224)
DM_VARKEY (Page 239)
DMGetValueEx (Page 337)

WinCC Professional V13 SP2 – Programming reference


230 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.2.16 DM_VARFILTER (RT Professional)

Declaration

typedef struct {
DWORD dwFlags;
DWORD dwNumTypes;
LPDWORD pdwTypes;
LPSTR lpszGroup;
LPSTR lpszName;
LPSTR lpszConn;
}
DM_VARFILTER;

Members

dwFlags
The dwFlags parameter can be used to set a selection criterion for the tags:

DM_VARFILTER_TYPE 0x00000001 The tag type (pdwTypes) is used as the selection crite‐
rion.
DM_VARFILTER_GROUP 0x00000002 The group name (lpszGroup) is used as the selection
criterion.
DM_VARFILTER_NAME 0x00000004 The tag name (lpszName) is used as the selection cri‐
terion.
DM_VARFILTER_CONNECTION 0x00000008 The name of the logical connection (lpszConn) is used
as the selection criterion.
DM_VARFILTER_FAST_CALLBACK 0x00010000 (Flag for DMEnumVariables): If this flag is set, the call‐
back data is no longer buffered. The callback therefore
returns the data directly from the database.
The advantage of the flag is a faster response before
the first callback is sent. At the same time, it avoids
heavy memory load for a large amounts of data.
Caution
You may not call any other DMClient function in this
callback. A blockade may otherwise occur.
DM_VARFILTER_LOCAL_ONLY 0x00020000 (Flag for DMEnumVariables): If this flag is set, only local
tags are enumerated. Tags used in the project from oth‐
er servers are not required.

dwNumTypes
Number of tag types specified in pdwTypes.

pdwTypes
pdwTypes identifies the tag types that are to be used as a selection criterion.

DM_VARTYPE_BIT Binary tag


DM_VARTYPE_SBYTE Signed 8-bit value

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 231
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

DM_VARTYPE_BYTE Unsigned 8-bit value


DM_VARTYPE_SWORD Signed 16-bit value
DM_VARTYPE_WORD Unsigned 16-bit value
DM_VARTYPE_SDWORD Signed 32-bit value
DM_VARTYPE_DWORD Unsigned 32-bit value
DM_VARTYPE_FLOAT Floating-point number 32-bit IEEE 754
DM_VARTYPE_DOUBLE Floating-point number 64-bit IEEE 754
DM_VARTYPE_TEXT_8 Text tag, 8-bit character set
DM_VARTYPE_TEXT_16 Text tag, 16-bit character set

The DM_VARTYPE_RAW, DM_VARTYPE_STRUCT and DM_VARTYPE_TEXTREF types


are not supported.
Specify the appropriate TypID in order to select structured tags with self-defined structures.
Use the GAPIEnumTypes function to determine the TypID.

lpszGroup
Pointer to the name of the tag group. This name should be used as a selection criterion.
Wildcards are prohibited.

lpszName
Pointer to the name of a tag. This name should be used as a selection criterion. Wildcards are
prohibited.

lpszConn
Pointer to the name of a logical connection. This name should be used as a selection criterion.
Wildcards are prohibited.

Required files
dmclient.h

API functions

DMEnumVariables (Page 332) List tag names


DMShowVarDatabase (Page 402) Open tag selection dialog
DMShowVarDatabaseMulti (Page 407) Open tag selection dialog

See also
DMEnumVariables (Page 332)
DMShowVarDatabase (Page 402)
DMShowVarDatabaseMulti (Page 407)

WinCC Professional V13 SP2 – Programming reference


232 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.2.17 DM_VARGRP_DATA (RT Professional)

Declaration

typedef struct {
CHAR szName[ MAX_DM_VAR_NAME + 1 ];
DWORD dwCreatorID;
WORD dwVarNum;
LPVOID lpvUserData;
}
DM_VARGRP_DATA;

Members

szName
Name of the tag group

dwCreatorID
In the creator identification, you can determine who created an object.
The values 0 – 10100 and 11000 – 11100 are reserved for internal or specific systems.

dwVarNum
Number of tags within the tag group

lpvUserData
Pointer to application-specific data.

Required files
dmclient.h

API functions

DM_ENUM_VARGRP_PROC (Page 331) List information about a tag group (callback)

See also
DM_ENUM_VARGRP_PROC (Page 331)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 233
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.2.18 DM_VARGRPKEY (RT Professional)

Declaration

typedef struct {
CHAR szName[ MAX_DM_VAR_NAME + 1 ];
LPVOID lpvUserData;
}
DM_VARGRPKEY;

Members

szName
Name of the tag group

lpvUserData
Pointer to application-specific data.

Required files
dmclient.h

API functions

DMEnumVarGrpData (Page 327) List information about a tag group

See also
DMEnumVarGrpData (Page 327)

WinCC Professional V13 SP2 – Programming reference


234 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.2.19 DM_VARIABLE_DATA (RT Professional)

Declaration

typedef struct {
DM_TYPEREF dmTypeRef;
DM_VARLIMIT dmVarLimit;
VARIANT dmStart;
VARIANT dmDefault;
DWORD dwNotify;
DWORD dwFlags;
CHAR szSpecific[MAX_DM_VAR_SPECIFIC +1];
CHAR szGroup[MAX_DM_GROUP_NAME +1];
CHAR szConnection[
MAX_DM_CONNECTION_NAME +1];
CHAR szChannel[_MAX_PATH +1];
CHAR szUnit[MAX_DM_UNIT_NAME +1];
}
DM_VARIABLE_DATA;

Members

dmTypeRef
The DM_TYPEREF (Page 224) structure contains information on the tag type.

dmVarLimit
The DM_VARLIMIT (Page 242) structure contains information on the limits of a tag.

dmStart
Start value of the tag. Must be release with VariantClear(&dmStart) after use.

dmDefault
Substitute value of tag. Must be release with VariantClear(&dmDefault) after use.

dwNotify
dwNotify specifies the events that generate a report entry:

DM_NOTIFY_MAX_LIMIT 0x00000001 On reaching the high limit


DM_NOTIFY_MIN_LIMIT 0x00000002 On reaching the low limit
DM_NOTIFY_FORMAT_ERROR 0x00000004 On conversion error
DM_NOTIFY_ACCESS_FAULT 0x00000008 On prohibited write access
DM_NOTIFY_APPLICATION_WRITE 0x00000010 On write access by application
DM_NOTIFY_PROCESS_WRITE 0x00000020 On write access by process

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 235
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

dwFlags
indicates how the substitute value should be used:

DM_HAS_MIN_LIMIT 0x00000008 Tag has a fixed low limit


DM_HAS_MAX_LIMIT 0x00000010 Tag has a fixed high limit
DM_HAS_DEFAULT_VALUE 0x00000020 Tag has a substitute value
DM_HAS_STARTUP_VALUE 0x00000040 Tag has an initial value
DM_USE_DEFAULT_ON_STARTUP 0x00000080 Enter substitute value at system
start
DM_USE_DEFAULT_ON_MAX 0x00000100 Enter substitute value when high
limit is violated
DM_USE_DEFAULT_ON_MIN 0x00000200 Enter substitute value when low
limit is violated
DM_USE_DEFAULT_ON_COMM_ER‐ 0x00000400 Substitute value on connection
ROR error

szSpecific
szSpecific contains the address relationship of the tag, for example, data block and byte in the
block etc. Refer to the communication manual for PLC-specific details.
This is the same value that appears in the properties of a tag in WinCC in the Parameter column.

szGroup
Name of the group to which the tag belongs.
This value is not provided for server tags on the multi-client.

szConnection
Name of the logical connection to which the tag is linked.

szChannel
File name of the channel driver.

szUnit
Name of the channel unit to which the tag is linked.

Required files
dmclient.h

API functions

DM_ENUM_VARIABLE_PROC (Page 322) List information about a tag (callback)

See also
DM_TYPEREF (Page 224)
DM_ENUM_VARIABLE_PROC (Page 322)

WinCC Professional V13 SP2 – Programming reference


236 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

DM_VARLIMIT (Page 242)


DMEnumVarData (Page 320)

2.2.2.20 DM_VARIABLE_DATA4 (RT Professional)

Declaration

typedef struct {
DM_TYPEREF dmTypeRef;
DM_VARLIMIT dmVarLimit;
VARIANT dmStart;
VARIANT dmDefault;
DWORD dwNotify;
DWORD dwFlags;
CHAR szSpecific[MAX_DM_VAR_SPECIFIC +1];
CHAR szGroup[MAX_DM_GROUP_NAME +1];
CHAR szConnection[
MAX_DM_CONNECTION_NAME +1];
CHAR szChannel[_MAX_PATH +1];
CHAR szUnit[MAX_DM_UNIT_NAME +1];
MCP_VARIABLE_SCALES Scaling;
DWORD dwASDataSize;
DWORD dwOSDataSize;
DWORD dwVarProperty;
DWORD dwFormat;
}
DM_VARIABLE_DATA4;

Members

dmTypeRef
The DM_TYPEREF (Page 224) structure contains information on the tag type.

dmVarLimit
The DM_VARLIMIT (Page 242) structure contains information on the limits of a tag.

dmStart
Start value of the tag. Must be release with VariantClear(&dmStart) after use.

dmDefault
Substitute value of tag. Must be release with VariantClear(&dmDefault) after use.

dwNotify
dwNotify specifies the events that generate a report entry:

DM_NOTIFY_MAX_LIMIT 0x00000001 On reaching the high limit


DM_NOTIFY_MIN_LIMIT 0x00000002 On reaching the low limit

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 237
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

DM_NOTIFY_FORMAT_ERROR 0x00000004 On conversion error


DM_NOTIFY_ACCESS_FAULT 0x00000008 On prohibited write access
DM_NOTIFY_APPLICATION_WRITE 0x00000010 On write access by application
DM_NOTIFY_PROCESS_WRITE 0x00000020 On write access by process

dwFlags
Indicates how the substitute value should be used:

DM_HAS_MIN_LIMIT 0x00000008 Tag has a fixed low limit


DM_HAS_MAX_LIMIT 0x00000010 Tag has a fixed high limit
DM_HAS_DEFAULT_VALUE 0x00000020 Tag has a substitute value
DM_HAS_STARTUP_VALUE 0x00000040 Tag has an initial value
DM_USE_DEFAULT_ON_STARTUP 0x00000080 Enter substitute value at system
start
DM_USE_DEFAULT_ON_MAX 0x00000100 Enter substitute value when high
limit is violated
DM_USE_DEFAULT_ON_MIN 0x00000200 Enter substitute value when low
limit is violated
DM_USE_DEFAULT_ON_COMM_ERROR 0x00000400 Substitute value on connection
error

szSpecific
szSpecific contains the address relationship of the tag, for example, data block and byte in the
block etc. Refer to the communication manual for PLC-specific details.
This is the same value that appears in the properties of a tag in WinCC in the Parameter column.

szGroup
Name of the group to which the tag belongs.

szConnection
Name of the logical connection to which the tag is linked.

szChannel
File name of the channel driver.

szUnit
Name of the channel unit to which the tag is linked.

Scaling
MCP_VARIABLE_SCALES (Page 265) structure with the description of the tag scaling.

dwASDataSize
Length of the tags in the PLC (number of bits)

dwOSDataSize
Length of the tags in the OS (number of bits)

WinCC Professional V13 SP2 – Programming reference


238 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

dwVarProperty
Indicates whether this is an internal or external tag:

DM_INTERNAL_VAR 0x00000002 Internal tag


DM_EXTERNAL_VAR 0x00000004 External tag

dwFormat
Number of the conversion routine used. You can find more detailed information in the
"Conversion routines" section.

Required files
dmclient.h

API functions

DM_ENUM_VARIABLE_PROC4 (Page 326) List information about a tag (callback)

See also
DMEnumVarData4 (Page 324)
DM_ENUM_VARIABLE_PROC4 (Page 326)
DM_TYPEREF (Page 224)
DM_VARLIMIT (Page 242)
MCP_VARIABLE_SCALES (Page 265)

2.2.2.21 DM_VARKEY (RT Professional)

Declaration

typedef struct {
DWORD dwKeyType;
DWORD dwID;
char szName[ MAX_DM_VAR_NAME + 1 ];
LPVOID lpvUserData;
}
DM_VARKEY;

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 239
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Members

dwKeyType
dwKeyType defines whether the tag is to be addressed by a key ID or by its name.

DM_VARKEY_ID Specification via key ID


DM_VARKEY_NAME Specification via tag name

When DM_VARKEY is used as the return structure, both types can be set if the key ID and
tag name are returned.
When DM_VARKEY is used as a source parameter, the tag name should be preferably set,
since the server prefix can only be specified there. If the key ID is used, operation is always
local.

dwID
Contains the key ID of the tag, if dwKeyType is set accordingly.

szName
Contains the name of the tag, if dwKeyType is set accordingly.

lpvUserData
Pointer to application-specific data.

Comments
The DM_VARKEY structure is part of the DM_VAR_UPDATE_STRUCT (Page 226) structure.

Required files
dmclient.h

API functions

DM_ENUM_TYPEMEMBERS_PROC_EX List tags in a structured tag (callback)


(Page 427)
DM_ENUM_TYPEMEMBERS_PROC (Page 422) List tags in a structured tag (callback)
DM_ENUM_VAR_PROC (Page 334) List tag names (callback)
DM_ENUM_VARIABLE_PROC (Page 322) List information about a tag (callback)
DM_NOTIFY_SELECT_VAR_PROC (Page 413) Open tag selection dialog (callback)
DMEnumVarData (Page 320) List information about a tag
DMGetValue (Page 335) Get tag values
DMGetValueWait (Page 348) Get tag values with update
DMGetVarLimits (Page 366) Get limits of a tag
DMGetVarInfo (Page 354) Get tag ID, get tag name
DMGetVarType (Page 372) Get data type of a tag
DMSetValue (Page 379) Change tag values

WinCC Professional V13 SP2 – Programming reference


240 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

DMSetValueMessage (Page 384) Change tag values with alarm output


DMSetValueWait (Page 388) Change tag values with notification
DMSetValueWaitMessage (Page 393) Change tag values with notification and alarm out‐
put
DMShowVarDatabase (Page 402) Open tag selection dialog
DMStartVarUpdate (Page 448) Define update tags

See also
DMStartVarUpdate (Page 448)
DM_VAR_UPDATE_STRUCT (Page 226)
DMGetValue (Page 335)
DMGetValueWait (Page 348)
DMGetVarInfo (Page 354)
DMGetVarLimits (Page 366)
DMGetVarType (Page 372)
DMSetValue (Page 379)
DMSetValueMessage (Page 384)
DMSetValueWait (Page 388)
DMSetValueWaitMessage (Page 393)
DMShowVarDatabase (Page 402)
DMEnumVarData (Page 320)
DM_ENUM_VAR_PROC (Page 334)
DM_ENUM_VARIABLE_PROC (Page 322)
DM_ENUM_TYPEMEMBERS_PROC (Page 422)
DM_ENUM_TYPEMEMBERS_PROC_EX (Page 427)
DM_NOTIFY_SELECT_VAR_PROC (Page 413)
DMStartVarUpdateEx (Page 451)
DM_VAR_UPDATE_STRUCTEX (Page 228)
DM_ENUM_VARIABLE_PROC4 (Page 326)
DMGetValueEx (Page 337)
DMGetValueWaitEx (Page 350)
DM_ENUM_TYPEMEMBERS_PROC_EX4 (Page 430)
MSG_CSDATA_STRUCT_PLUS (Page 1020)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 241
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.2.22 DM_VARLIMIT (RT Professional)

Declaration

typedef struct {
VARIANT dmMaxRange;
VARIANT dmMinRange;
VARIANT dmMaxLimit;
VARIANT dmMinLimit;
}
DM_VARLIMIT;

Members

dmMaxRange
High limit of the format conversion

dmMinRange
Low limit of the format conversion

dmMaxLimit
High limit of the tag.

dmMinLimit
Low limit of the tag.

Comments
DM_VARLIMIT is part of the DM_VARIABLE_DATA (Page 235) structure. All VARIANT must
be release with VariantClear(&dmxxx) after use.

Required files
dmclient.h

API functions

DMGetVarLimits (Page 366) Get limits of a tag

See also
DM_VARIABLE_DATA (Page 235)
DMGetVarLimits (Page 366)
DM_VARIABLE_DATA4 (Page 237)

WinCC Professional V13 SP2 – Programming reference


242 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.2.23 MCP_NEWVARIABLE_DATA (RT Professional)

Declaration

typedef struct {
DWORD dwFlags;
char szProjectFile[_MAX_PATH +1];
char szConnection[
MAX_DM_CONNECTION_NAME +3];
char szVarName[MAX_DM_VAR_NAME +1];
char szGroupName[MAX_DM_GROUP_NAME +1];
MCP_VARIABLE_COMMON Common;
MCP_VARIABLE_PROTOCOL Protocol;
MCP_VARIABLE_LIMITS Limits;
char szSpecific[MAX_DM_VAR_SPECIFIC +1];
}
MCP_NEWVARIABLE_DATA;

Members

dwFlags
dwFlags indicates how the tag should be processed:

MCP_NVAR_FLAG_CREATE 1 Create tag


MCP_NVAR_FLAG_MODIFY 2 Change tag (not to be used in
RT)
MCP_NVAR_FLAG_TEST 3 Check for existence of a tag

The flags must not be ORed.

szProjectFile
Name of the project file, including path and extension.
The name of the project file can be determined with DMEnumOpenedProjects or in RT with
DMGetRuntimeProject.
If an empty string is entered, an internal DMEnumOpenedProjects is performed on the currently
open project.
Only the currently open project can be specified in runtime. Any other entry is rejected with an
error (DM_E_NOT_CONNECTED).

szConnection
Name of the logical connection assigned to the tag.

szVarName
Name of the tag to be processed.

szGroupName
Name of the group to which the tag belongs.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 243
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

If a specified group name is in a connection other than that specified in szConnection, the
group name is ignored without an error message and the tag is created directly in the
connection.
If a group name is specified that does not yet exist, the group is implicitly created.
When a tag is changed with MCP_NVAR_FLAG_MODIFY, a change in the group name is
ignored without an error message.

Common
MCP_VARIABLE_COMMON (Page 253) structure with the description of the tag.

Protocol
The MCP_VARIABLE_PROTOCOL (Page 262) structure with the description of how limit
violations are handled by the tag.

Limits
MCP_VARIABLE_LIMITS (Page 257) structure with the limits of the tag.

szSpecific
szSpecific contains the address relationship of the tag, for example, data block and byte in the
block etc. Refer to the communication manual for PLC-specific details.
This is the same value that is displayed in the Parameter column of the properties of a tag in
WinCC.

Comments
The MCP_NEWVARIABLE_DATA_EX (Page 249) structure has a similar use for extended
functionality.

Required files
dmclient.h

API functions

GAPICreateNewVariable (Page 414) Create tag

See also
GAPICreateNewVariable (Page 414)
MCP_VARIABLE_PROTOCOL (Page 262)
MCP_VARIABLE_COMMON (Page 253)
MCP_VARIABLE_LIMITS (Page 257)
MCP_NEWVARIABLE_DATA_EX (Page 249)

WinCC Professional V13 SP2 – Programming reference


244 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.2.24 MCP_NEWVARIABLE_DATA_4 (RT Professional)

Declaration

typedef struct {
DWORD dwFlags;
char szProjectFile[_MAX_PATH +1];
char szConnection[
MAX_DM_CONNECTION_NAME +3];
char szVarName[MAX_DM_VAR_NAME +1];
char szGroupName[MAX_DM_GROUP_NAME +1];
MCP_VARIABLE_COMMON Common;
MCP_VARIABLE_PROTOCOL Protocol;
MCP_VARIABLE_LIMITS Limits;
char szSpecific[MAX_DM_VAR_SPECIFIC +1];
MCP_VARIABLE_SCALES Scaling;
}
MCP_NEWVARIABLE_DATA_4;

Members

dwFlags
dwFlags indicates how the tag should be processed:

MCP_NVAR_FLAG_CREATE 1 Create tag


MCP_NVAR_FLAG_MODIFY 2 Change tag (if not available, then
re-create) (not to be used in RT)
MCP_NVAR_FLAG_TEST 3 Check for existence of a tag

The flags must not be ORed.

szProjectFile
Name of the project file, including path and extension.
The name of the project file can be determined with DMEnumOpenedProjects or in runtime
with DMGetRuntimeProject.
If an empty string is entered, an internal DMEnumOpenedProjects is performed on the currently
open project.
Only the currently open project can be specified in runtime. Any other entry is rejected with an
error (DM_E_NOT_CONNECTED).

szConnection
Name of the logical connection assigned to the tag.

szVarName
Name of the tag to be processed.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 245
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

szGroupName
Name of the group to which the tag belongs.
If a specified group name is in a connection other than that specified in szConnection, the
group name is ignored without an error message and the tag is created directly in the
connection.
If a group name is specified that does not yet exist, the group is implicitly created.
When a tag is changed with MCP_NVAR_FLAG_MODIFY, a change in the group name is
ignored without an error message.

Common
MCP_VARIABLE_COMMON (Page 253) structure with the description of the tag.

Protocol
The MCP_VARIABLE_PROTOCOL (Page 262) structure with the description of the how limit
violations are handled by the tag.

Limits
MCP_VARIABLE_LIMITS (Page 257) structure with the limits of the tag.

szSpecific
szSpecific contains the address relationship of the tag, for example, data block and byte in the
block etc. Refer to the communication manual for PLC-specific details.
This is the same value that is displayed in the Parameter column of the properties of a tag in
WinCC.

Scaling
MCP_VARIABLE_SCALES (Page 265) structure with the description of tag scaling.

Comments
The MCP_NEWVARIABLE_DATA_EX4 (Page 251) structure has a similar use for enhanced
functionality.

Required files
dmclient.h

API functions

GAPICreateNewVariable4 (Page 416) Create tag


GAPICreateNewVariableEx4 (Page 419) Create tag with Creator ID

WinCC Professional V13 SP2 – Programming reference


246 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
MCP_VARIABLE_COMMON (Page 253)
MCP_VARIABLE_LIMITS (Page 257)
MCP_VARIABLE_PROTOCOL (Page 262)
GAPICreateNewVariable4 (Page 416)
MCP_VARIABLE_SCALES (Page 265)
MCP_NEWVARIABLE_DATA_EX4 (Page 251)
GAPICreateNewVariableEx4 (Page 419)

2.2.2.25 MCP_NEWVARIABLE_DATA_5 (RT Professional)

Declaration

typedef struct {
DWORD dwFlags;
char szProjectFile[_MAX_PATH +1];
char szConnection[
MAX_DM_CONNECTION_NAME +3];
char szVarName[MAX_DM_VAR_NAME +1];
char szGroupName[MAX_DM_GROUP_NAME +1];
MCP_VARIABLE_COMMON Common;
MCP_VARIABLE_PROTOCOL Protocol;
MCP_VARIABLE_LIMITS5 Limits;
char szSpecific[MAX_DM_VAR_SPECIFIC +1];
MCP_VARIABLE_SCALES Scaling;
}
MCP_NEWVARIABLE_DATA_5;

Members

dwFlags
dwFlags indicates how the tag should be processed:

MCP_NVAR_FLAG_CREATE 1 Create tag


MCP_NVAR_FLAG_MODIFY 2 Change tag (if not available, then
re-create) (not to be used in RT)
MCP_NVAR_FLAG_TEST 3 Check for existence of a tag

The flags must not be ORed.

szProjectFile
Name of the project file, including path and extension.
The name of the project file can be determined with DMEnumOpenedProjects or in runtime
with DMGetRuntimeProject.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 247
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

If an empty string is entered, an internal DMEnumOpenedProjects is performed on the currently


open project.
Only the currently open project can be specified in runtime. Any other entry is rejected with an
error (DM_E_NOT_CONNECTED).

szConnection
Name of the logical connection assigned to the tag.

szVarName
Name of the tag to be processed.

szGroupName
Name of the group to which the tag belongs.
If a specified group name is in a connection other than that specified in szConnection, the
group name is ignored without an error message and the tag is created directly in the
connection.
If a group name is specified that does not yet exist, the group is implicitly created.
When a tag is changed with MCP_NVAR_FLAG_MODIFY, a change in the group name is
ignored without an error message.

Common
MCP_VARIABLE_COMMON (Page 253) structure with the description of the tag.

Protocol
The MCP_VARIABLE_PROTOCOL (Page 262) structure with the description of how limit
violations are handled by the tag.

Limits
MCP_VARIABLE_LIMITS5 (Page 259) structure with the limits of the tag.

szSpecific
szSpecific contains the address relationship of the tag, for example, data block and byte in the
block etc. Refer to the communication manual for PLC-specific details.
This is the same value that is displayed in the Parameter column of the properties of a tag in
WinCC.

Scaling
MCP_VARIABLE_SCALES (Page 265) structure with the description of tag scaling.

Comments
The MCP_NEWVARIABLE_DATA_EX4 (Page 251) structure has a similar use for extended
functionality.

Required files
dmclient.h

WinCC Professional V13 SP2 – Programming reference


248 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

API functions

GAPICreateNewVariable5 (Page 417) Create tag with Creator ID

See also
GAPICreateNewVariable5 (Page 417)
MCP_VARIABLE_COMMON (Page 253)
MCP_VARIABLE_LIMITS5 (Page 259)
MCP_VARIABLE_PROTOCOL (Page 262)
MCP_NEWVARIABLE_DATA_EX4 (Page 251)
MCP_VARIABLE_SCALES (Page 265)

2.2.2.26 MCP_NEWVARIABLE_DATA_EX (RT Professional)

Declaration

typedef struct {
DWORD dwFlags;
char szProjectFile[_MAX_PATH +1];
char szConnection[
MAX_DM_CONNECTION_NAME +3];
char szVarName[MAX_DM_VAR_NAME +1];
char szGroupName[MAX_DM_GROUP_NAME +1];
MCP_VARIABLE_COMMON_EX Common;
MCP_VARIABLE_PROTOCOL_EX Protocol;
MCP_VARIABLE_LIMITS_EX Limits;
char szSpecific[MAX_DM_VAR_SPECIFIC +1]
}
MCP_NEWVARIABLE_DATA_EX;

Members

dwFlags
dwFlags indicates how the tag should be processed:

MCP_NVAR_FLAG_CREATE 1 Create tag


MCP_NVAR_FLAG_MODIFY 2 Change tag (not to be used in runtime)
MCP_NVAR_FLAG_TEST 3 Checks for existence of a tag.

The flags must not be ORed.

szProjectFile
Name of the project file, including path and extension.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 249
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

The name of the project file can be determined with DMEnumOpenedProjects or in runtime
with DMGetRuntimeProject.
If an empty string is entered, an internal DMEnumOpenedProjects is performed on the currently
open project.
Only the currently open project can be specified in runtime. Any other entry is rejected with an
error (DM_E_NOT_CONNECTED).

szConnection
Name of the logical connection assigned to the tag.

szVarName
Name of the tag to be processed.

szGroupName
Name of the group to which the tag belongs.
If a specified group name is in a connection other than that specified in szConnection, the
group name is ignored without an error message and the tag is created directly in the
connection.
If a group name is specified that does not yet exist, the group is implicitly created.
When a tag is changed with MCP_NVAR_FLAG_MODIFY, a change in the group name is
ignored without an error message.

Common
MCP_VARIABLE_COMMON_EX (Page 255) structure with the description of the tag.

Protocol
The MCP_VARIABLE_PROTOCOL_EX (Page 264) structure with the description of how limit
violations are handled by the tag.

Limits
MCP_VARIABLE_LIMITS_EX (Page 261) structure with the limits of the tag.

szSpecific
szSpecific contains the address relationship of the tag, for example, data block and byte in the
block etc. Refer to the communication manual for PLC-specific details.
This is the same value that is displayed in the Parameter column of the properties of a tag in
WinCC.

Comments
The MCP_NEWVARIABLE_DATA (Page 243) structure has a similar use.

Required files
dmclient.h

WinCC Professional V13 SP2 – Programming reference


250 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

API functions

DM_ENUM_TYPEMEMBERS_PROC_EX List tags in a structured tag (callback)


(Page 427)

See also
MCP_NEWVARIABLE_DATA (Page 243)
DM_ENUM_TYPEMEMBERS_PROC_EX (Page 427)
MCP_VARIABLE_COMMON_EX (Page 255)
MCP_VARIABLE_LIMITS_EX (Page 261)
MCP_VARIABLE_PROTOCOL_EX (Page 264)

2.2.2.27 MCP_NEWVARIABLE_DATA_EX4 (RT Professional)

Declaration

typedef struct {
DWORD dwFlags;
char szProjectFile[_MAX_PATH +1];
char szConnection[
MAX_DM_CONNECTION_NAME +3];
char szVarName[MAX_DM_VAR_NAME +1];
char szGroupName[MAX_DM_GROUP_NAME +1];
MCP_VARIABLE_COMMON_EX Common;
MCP_VARIABLE_PROTOCOL_EX Protocol;
MCP_VARIABLE_LIMITS_EX Limits;
char szSpecific[MAX_DM_VAR_SPECIFIC +1]
MCP_VARIABLE_SCALES Scaling;
}
MCP_NEWVARIABLE_DATA_EX4;

Members

dwFlags
dwFlags indicates how the tag should be processed:

MCP_NVAR_FLAG_CREATE 1 Create tag


MCP_NVAR_FLAG_MODIFY 2 Change tag (not to be used in
RT)
MCP_NVAR_FLAG_TEST 3 Checks for existence of a tag.

The flags must not be ORed.

szProjectFile
Name of the project file, including path and extension.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 251
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

The name of the project file can be determined with DMEnumOpenedProjects or in runtime
with DMGetRuntimeProject.
If an empty string is entered, an internal DMEnumOpenedProjects is performed on the currently
open project.
Only the currently open project can be specified in runtime. Any other entry is rejected with an
error (DM_E_NOT_CONNECTED).

szConnection
Name of the logical connection assigned to the tag.

szVarName
Name of the tag to be processed.

szGroupName
Name of the group to which the tag belongs.
If a specified group name is in a connection other than that specified in szConnection, the
group name is ignored without an error message and the tag is created directly in the
connection.
If a group name is specified that does not yet exist, the group is implicitly created.
When a tag is changed with MCP_NVAR_FLAG_MODIFY, a change in the group name is
ignored without an error message.

Common
MCP_VARIABLE_COMMON_EX (Page 255) structure with the description of the tag.

Protocol
The MCP_VARIABLE_PROTOCOL_EX (Page 264) structure with the description of how limit
violations are handled by the tag.

Limits
MCP_VARIABLE_LIMITS_EX (Page 261) structure with the limits of the tag.

szSpecific
szSpecific contains the address relationship of the tag, for example, data block and byte in the
block etc. Refer to the communication manual for PLC-specific details.
This is the same value that is displayed in the Parameter column of the properties of a tag in
WinCC.

Scaling
MCP_VARIABLE_SCALES (Page 265) structure with the description of tag scaling.

Comments
The MCP_NEWVARIABLE_DATA_4 (Page 245) structure has a similar use.

WinCC Professional V13 SP2 – Programming reference


252 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Required files
dmclient.h

API functions

DM_ENUM_TYPEMEMBERS_PROC_EX4 List tags in a structured tag (callback)


(Page 430)

See also
MCP_NEWVARIABLE_DATA_4 (Page 245)
MCP_NEWVARIABLE_DATA_5 (Page 247)
DM_ENUM_TYPEMEMBERS_PROC_EX4 (Page 430)
MCP_VARIABLE_COMMON_EX (Page 255)
MCP_VARIABLE_LIMITS_EX (Page 261)
MCP_VARIABLE_PROTOCOL_EX (Page 264)
MCP_VARIABLE_SCALES (Page 265)

2.2.2.28 MCP_VARIABLE_COMMON (RT Professional)

Declaration

typedef struct {
DWORD dwVarType;
DWORD dwVarLength;
DWORD dwVarProperty;
DWORD dwFormat;
}
MCP_VARIABLE_COMMON;

Members

dwVarType
The type of tag is specified in dwVarType:

DM_VARTYPE_BIT Binary tag


DM_VARTYPE_SBYTE Signed 8-bit value
DM_VARTYPE_BYTE Unsigned 8-bit value
DM_VARTYPE_SWORD Signed 16-bit value
DM_VARTYPE_WORD Unsigned 16-bit value
DM_VARTYPE_SDWORD Signed 32-bit value
DM_VARTYPE_DWORD Unsigned 32-bit value

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 253
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

DM_VARTYPE_FLOAT Floating-point number 32-bit IEEE 754


DM_VARTYPE_DOUBLE Floating-point number 64-bit IEEE 754
DM_VARTYPE_TEXT_8 Text tag, 8-bit character set
DM_VARTYPE_TEXT_16 Text tag, 16-bit character set
DM_VARTYPE_RAW Raw data type
DM_VARTYPE_STRUCT Structure tag
DM_VARTYPE_TEXTREF Text reference from text lib

dwVarLength
The specification of the tag length us only relevant for text tags DM_VARTYPE_TEXT_8 and
DM_VARTYPE_TEXT_16.
The text length is specified in characters here (1 to 255).

dwVarProperty
Indicates whether this is an internal or external tag:

DM_INTERNAL_VAR Internal tag


DM_EXTERNAL_VAR External tag

dwFormat
Number of the conversion routine to be used. You can find more detailed information in the
"Conversion routines" section.

Comments
MCP_VARIABLE_COMMON is part of the MCP_NEWVARIABLE_DATA (Page 243) and
MCP_NEWVARIABLE_DATA_4 (Page 245) structures.
The MCP_VARIABLE_COMMON_EX (Page 255) structure has a similar use for enhanced
functionality.

Required files
dmclient.h

See also
MCP_NEWVARIABLE_DATA (Page 243)
MCP_NEWVARIABLE_DATA_4 (Page 245)
MCP_VARIABLE_COMMON_EX (Page 255)
MCP_NEWVARIABLE_DATA_5 (Page 247)

WinCC Professional V13 SP2 – Programming reference


254 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.2.29 MCP_VARIABLE_COMMON_EX (RT Professional)

Declaration

typedef struct {
DWORD dwVarType;
DWORD dwCreatorID
DWORD dwVarLength;
DWORD dwVarProperty;
DWORD dwFormat;
DWORD dwOSOffset;
DWORD dwASOffset;
char szStructTypeName
}
MCP_VARIABLE_COMMON_EX;

Members

dwVarType
The type of tag is specified in dwVarType:

DM_VARTYPE_BIT Binary tag


DM_VARTYPE_SBYTE Signed 8-bit value
DM_VARTYPE_BYTE Unsigned 8-bit value
DM_VARTYPE_SWORD Signed 16-bit value
DM_VARTYPE_WORD Unsigned 16-bit value
DM_VARTYPE_SDWORD Signed 32-bit value
DM_VARTYPE_DWORD Unsigned 32-bit value
DM_VARTYPE_FLOAT Floating-point number 32-bit IEEE 754
DM_VARTYPE_DOUBLE Floating-point number 64-bit IEEE 754
DM_VARTYPE_TEXT_8 Text tag, 8-bit character set
DM_VARTYPE_TEXT_16 Text tag, 16-bit character set
DM_VARTYPE_RAW Raw data type
DM_VARTYPE_STRUCT Structure tag
DM_VARTYPE_TEXTREF Text reference from text lib

dwCreatorID
In the creator identification, you can determine who created an object.
The values 0 – 10100 and 11000 – 11100 are reserved for internal or specific systems.

dwVarLength
The specification of the tag length us only relevant for text tags DM_VARTYPE_TEXT_8 and
DM_VARTYPE_TEXT_16. The text length is specified in characters here (1 to 255).

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 255
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

dwVarProperty
Indicates whether this is an internal or external tag:

DM_INTERNAL_VAR Internal tag


DM_EXTERNAL_VAR External tag

dwFormat
Number of the conversion routine to be used. You can find more detailed information in the
"Conversion routines" section.

dwOSOffset
The parameter is reserved for future development and must be preset to 0.

dwASOffset
Offset in the buffer of the PLC

The bit-oriented ASOffset is handled internally in BYTE.

szStructTypeName
Name of the structure type

Comments
MCP_VARIABLE_COMMON_EX is part of the MCP_NEWVARIABLE_DATA_EX (Page 249)
structure.
The MCP_VARIABLE_COMMON (Page 253) structure has a similar use.

Required files
dmclient.h

WinCC Professional V13 SP2 – Programming reference


256 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
MCP_NEWVARIABLE_DATA (Page 243)
MCP_VARIABLE_COMMON (Page 253)
MCP_NEWVARIABLE_DATA_EX (Page 249)
MCP_NEWVARIABLE_DATA_EX4 (Page 251)

2.2.2.30 MCP_VARIABLE_LIMITS (RT Professional)

Declaration

typedef struct {
double dTopLimit;
double dBottomLimit;
double dStartValue;
double dSubstituteValue;
BOOL bTopLimit;
BOOL bBottomLimit;
BOOL bStartValue;
BOOL bConnectionErr;
BOOL bTopLimitValid;
BOOL bBottomLimitValid;
BOOL bStartValueValid;
BOOL bSubstValueValid;
}
MCP_VARIABLE_LIMITS;

Members

dTopLimit
Value of high limit of the tag

dBottomLimit
Value of low limit of the tag

dStartValue
Start value of the tag

dSubstituteValue
Substitute value of tag

bTopLimit
If this parameter is set, the substitute value should be used if the value of the tag exceeds the
value specified in dTopLimit.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 257
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

bBottomLimit
If this parameter is set, the substitute value should be used if the value of the tag falls below
the value specified in dBottomLimit.

bStartValue
If this parameter is set, the substitute value should be used as a start value.

bConnectionErr
If this parameter is set, the substitute value should be used when when a connection error
occurs.

bTopLimitValid
If this parameter is set, the value specified in dTopLimit applies the high limit.

bBottomLimitValid
If this parameter is set, the value specified in dBottomLimit applies the low limit.

bStartValueValid
If this parameter is set, the value specified in dStartValue applies the start value.

bSubstValueValid
If this parameter is set, the value specified in dSubstitudeValue applies the substitute value.

Comments
MCP_VARIABLE_Limits is part of the MCP_NEWVARIABLE_DATA (Page 243) and
MCP_NEWVARIABLE_DATA_4 (Page 245) structures.
The MCP_VARIABLE_LIMITS_EX (Page 261) structure has a similar use for enhanced
functionality.

Required files
dmclient.h

See also
MCP_NEWVARIABLE_DATA (Page 243)
MCP_NEWVARIABLE_DATA_4 (Page 245)
MCP_VARIABLE_LIMITS_EX (Page 261)

WinCC Professional V13 SP2 – Programming reference


258 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.2.31 MCP_VARIABLE_LIMITS5 (RT Professional)

Declaration

typedef struct {
VARIANT varTopLimit;
VARIANT varBottomLimit;
VARIANT varStartValue;
VARIANT varSubstituteValue;
BOOL bTopLimit;
BOOL bBottomLimit;
BOOL bStartValue;
BOOL bConnectionErr;
BOOL bTopLimitValid;
BOOL bBottomLimitValid;
BOOL bStartValueValid;
BOOL bSubstValueValid;
}
MCP_VARIABLE_LIMITS5;

Members

varTopLimit
Value of high limit of the tag

varBottomLimit
Value of low limit of the tag

varStartValue
Start value of the tag

varSubstituteValue
Substitute value of tag

bTopLimit
If this parameter is set, the substitute value should be used if the value of the tag exceeds the
value specified in dTopLimit.

bBottomLimit
If this parameter is set, the substitute value should be used if the value of the tag falls below
the value specified in dBottomLimit.

bStartValue
If this parameter is set, the substitute value should be used as a start value.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 259
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

bConnectionErr
If this parameter is set, the substitute value should be used when when a connection error
occurs.

bTopLimitValid
If this parameter is set, the value specified in dTopLimit applies the high limit.

bBottomLimitValid
If this parameter is set, the value specified in dBottomLimit applies the low limit.

bStartValueValid
If this parameter is set, the value specified in dStartValue applies the start value.

bSubstValueValid
If this parameter is set, the value specified in dSubstitudeValue applies the substitute value.

Comments
MCP_VARIABLE_LIMITS5 is part of the MCP_NEWVARIABLE_DATA_5 (Page 247) structure
and is needed specify text tags with start and substitute values using the
GAPICreateNewVariable5 (Page 417) function.

Required files
dmclient.h

See also
MCP_NEWVARIABLE_DATA_5 (Page 247)
GAPICreateNewVariable5 (Page 417)

WinCC Professional V13 SP2 – Programming reference


260 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.2.32 MCP_VARIABLE_LIMITS_EX (RT Professional)

Declaration

typedef struct {
double dTopLimit
double dBottomLimit;
double dStartValue;
double dSubstituteValue;
DWORD dwLimitFlags
DWORD dwTextBibStartText;
char szTextStartText[255];
DWORD dwTextBibSubstitude;
char szTextSubstitude[255]
}
MCP_VARIABLE_LIMITS_EX;

Members

dTopLimit
Value of high limit of the tag

dBottomLimit
Value of low limit of the tag

dStartValue
Start value of the tag

dSubstituteValue
Substitute value of tag

LimitFlags
The LimitFlags parameter specifies the validity of the default values and limits of a tag:

MCP_VARLIM_HAS_MIN_LIMIT Tag has a fixed low limit


MCP_VARLIM_HAS_MAX_LIMIT Tag has a fixed high limit
MCP_VARLIM_HAS_DEFAULT_VALUE Tag has a substitute value
MCP_VARLIM_HAS_STARTUP_VALUE Tag has start value
MCP_VARLIM_USE_DEFAULT_ON_STARTUP The substitute value should be used at system startup.
MCP_VARLIM_USE_DEFAULT_ON_MAX The substitute value should be used when the high limit is
violated.
MCP_VARLIM_USE_DEFAULT_ON_MIN The substitute value should be used when the low limit is
violated.
MCP_VARLIM_USE_DEFAULT_ON_COMM_ERROR The substitute value should be used when a connection error
occurs.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 261
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

dwTextBibStartText
The parameter is only relevant for text tags. It the text to be used as the start value should be
read from the project text, enter the ID of the corresponding text here.

szTextStartText
The parameter is only relevant for text tags. Specify the text to be used as the start value
directly under szTextStartText.

dwTextBibSubstitude
The parameter is only relevant for text tags. It the text to be used as the substitute value should
be read from the project text, enter the ID of the corresponding text here.

szTextSubstitude
The parameter is only relevant for text tags. Specify the text to be used as the substitute value
directly under szTextSubstitude.

Comments
MCP_VARIABLE_LIMITS_EX is part of the MCP_NEWVARIABLE_DATA_EX (Page 249)
structure.
The MCP_VARIABLE_LIMITS (Page 257) structure has a similar use.

Required files
dmclient.h

See also
MCP_VARIABLE_LIMITS (Page 257)
MCP_NEWVARIABLE_DATA_EX (Page 249)
MCP_NEWVARIABLE_DATA_EX4 (Page 251)

2.2.2.33 MCP_VARIABLE_PROTOCOL (RT Professional)

Declaration

typedef struct {
BOOL bTopLimitErr;
BOOL bBottomLimitErr;
BOOL bTransformationErr;
BOOL bWriteErr;
BOOL bWriteErrApplication;
BOOL bWriteErrProzess;
}
MCP_VARIABLE_PROTOCOL;

WinCC Professional V13 SP2 – Programming reference


262 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Members

bTopLimitErr
A report entry is generated when the value of the tag exceeds the high limit.

bBottomLimitErr
A report entry is generated when the value of the tag falls below the low limit.

bTransformationErr
A report entry is generated when a conversion error occurs.

bWriteErr
A report entry is generated with each unauthorized write access.

bWriteErrApplication
A report entry is generated with each unauthorized write access by the application.

bWriteErrProzess
A report entry is generated with each unauthorized write access by the process.

Comments
MCP_VARIABLE_PROTOCOL is part of the MCP_NEWVARIABLE_DATA (Page 243) and
MCP_NEWVARIABLE_DATA_4 (Page 245) structures.
The MCP_VARIABLE_PROTOCOL_EX (Page 264) structure has a similar use for enhanced
functionality.

Required files
dmclient.h

See also
MCP_NEWVARIABLE_DATA (Page 243)
MCP_NEWVARIABLE_DATA_4 (Page 245)
MCP_VARIABLE_PROTOCOL_EX (Page 264)
MCP_NEWVARIABLE_DATA_5 (Page 247)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 263
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.2.34 MCP_VARIABLE_PROTOCOL_EX (RT Professional)

Declaration

typedef struct {
DWORD dwProtocolFlags
}
MCP_VARIABLE_PROTOCOL_EX;

Members

dwProtocolFlags
You can use the dwProtocolFlags parameter to determine which events generate a report
entry:

MCP_VARPROT_TOPLIMITERR A report entry is generated when the value of the


tag exceeds the high limit.
MCP_VARPROT_BOTTEMLIMITERR A report entry is generated when the value of the
tag falls below the low limit.
MCP_VARPROT_TRANSFORMATIONERR A report entry is generated when a conversion er‐
ror occurs.
MCP_VARPROT_WRITEERR A report entry is generated with each unauthorized
write access.
MCP_VARPROT_WRITEERRAPPLICATION A report entry is generated with each unauthorized
write access by the application.
MCP_VARPROT_WRITEERRPROCESS A report entry is generated with each unauthorized
write access by the process.

A logical combination of these constants is possible.

Comments
MCP_VARIABLE_PROTOCOL_EX is part of the MCP_NEWVARIABLE_DATA_EX
(Page 249) structure.
The MCP_VARIABLE_PROTOCOL (Page 262) structure has a similar use.

Required files
dmclient.h

See also
MCP_VARIABLE_PROTOCOL (Page 262)
MCP_NEWVARIABLE_DATA_EX (Page 249)
MCP_NEWVARIABLE_DATA_EX4 (Page 251)

WinCC Professional V13 SP2 – Programming reference


264 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.2.35 MCP_VARIABLE_SCALES (RT Professional)

Declaration

typedef struct {
DWORD dwVarScaleFlags;
double doMinProc;
double doMaxProc;
double doMinVar;
double doMaxVar;
}
MCP_VARIABLE_SCALES;

Members

dwVarScaleFlags
DM_VARSCALE_NOSCALE: No scaling
DM_VARSCALE_LINEAR: Linear scaling

doMinProc
Lowest value of the tag in the process

doMaxProc
Highest value of the tag in the process

doMinVar
Lowest value of the tag in WinCC

doMaxVar
Highest value of the tag in WinCC

Comments
MCP_VARIABLE_SCALES is part of the MCP_NEWVARIABLE_DATA_4 (Page 245)
structure.

Required files
dmclient.h

See also
MCP_NEWVARIABLE_DATA_4 (Page 245)
MCP_NEWVARIABLE_DATA_5 (Page 247)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 265
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

DM_VARIABLE_DATA4 (Page 237)


MCP_NEWVARIABLE_DATA_EX4 (Page 251)

2.2.3 General functions (RT Professional)

2.2.3.1 DMActivateRTProject (RT Professional)

Use
This function enabled the project open in WinCC.

Declaration

BOOL DMActivateRTProject (
LPCMN_ERROR lpdmError);

Parameters

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Project enabled.

FALSE
Error.

Comment
This function is processed internally asynchronously. If the instruction is correctly forwarded
internally, it always returns TRUE. If, for example, the name of the server computer in the
project is specified incorrectly, no error is reported.
A successful start is checked with DMGetRTProject(..) .
If a check for a correct computer name is required, use the DMGetMachineTable(..) and
GetComputername(..) functions.

WinCC Professional V13 SP2 – Programming reference


266 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Required files
dmclient.h
dmclient.lib
dmclient.dll

See also
DMGetMachineTable (Page 297)

2.2.3.2 DMAddNotify (RT Professional)

Declaration
BOOL DMAddNotify (
DM_NOTIFY_PROC lpfnNotify,
LPVOID lpvUser,
LPDWORD lpdwNotifyCookie,
LPCMN_ERROR lpdmError);

Description
Connect a further notify function call to DMClient. The notify functionality corresponds with the
functionality you can specify for DMConnect.

Parameters

lpfnNotify
Pointer to further notify functions.

lpvUser
Pointer to application-specific data. The function does not evaluate this pointer, but makes it
available again within the notify function.

lpdwNotifyCookie
Pointer to a DWORD, in which a cookie to the notify is returned.
The cookie is later required again in the DMRemoveNotify function to remove notify editing
again.

lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. In the
event of an error, the system writes error information to this structure.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 267
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Return value

TRUE
Additional notify function connected.

FALSE
Error

Comments
The function is required in case a DMConnect has been performed within the process already
but no access is possible to the notify function specified there. This way, an additional notify
can be included to also evaluate the notify functions involved.
If, e.g., you use a DLL with DMClient functionality you created yourself within a global script
function, it is no longer possible to perform a DMConnect there. A DMConnect has been
performed already using the script and notification is no longer possible.
On rare occasions, the notify may be returned even before the function call has returned.
The notify functions included here in addition must be removed again using DMRemoveNotify
before DMDisconnect. Also, the notify function must not be a member function of a class object
which can be destroyed or deleted prematurely. Eventually, a notify call is pendant following
a DMRemoveNotify.

Error messages

DM_E_NOT_CONNECTED No DMConnect performed yet. The internal admin‐


istration has not been initialized yet.
DM_E_ALREADY_EXIST A NotifyProc with the same address exists already
in this process.
DM_E_MAX_LIMIT Maximum number of additional notify functions
has been reached (16).
DM_E_PARAM Parameter error

Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll

Related functions

DMFireNotifyData Sends data to the additional notify function using


the cookie or to all functions
DMRemoveNotify Removes the additional notify function using the
cookie from the notify list

WinCC Professional V13 SP2 – Programming reference


268 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Samples
Button AddNotify:
#include "apdefap.h"
void OnClick(char* lpszPictureName,
char* lpszObjectName,
char* lpszPropertyName)
{
AddNotify();
}
Project function AddNotify:
extern BOOL DM_NotifyProcA(DWORD dwNotifyClass,
DWORD dwNotifyCode,
LPBYTE lpbyData,
DWORD dwItems,
LPVOID lpvUser);

void AddNotify()
{
BOOL bRet = FALSE;
DWORD dwNotifyCookie = 0L;
LPVOID lpvUser = NULL;
CMN_ERRORA err;

memset(&err, 0, sizeof(CMN_ERRORA));

dwNotifyCookie = GetTagDWord("DMdwNotifyCookie");
if (dwNotifyCookie)
{
printf("\r\nremove first previous Notify Cookie=%08lx",
dwNotifyCookie);

bRet = DMRemoveNotifyA(dwNotifyCookie, &err);

if (FALSE == bRet)
{
printf("\r\nERROR: DMRemoveNotifyA [%s],%ld,%ld,%ld,
%ld,%ld",
err.szErrorText,
err.dwError1,
err.dwError2,
err.dwError3,
err.dwError4,
err.dwError5);
}
dwNotifyCookie = 0L;
SetTagDWord("DMdwNotifyCookie",dwNotifyCookie);
}

memset(&err, 0, sizeof(CMN_ERRORA));
lpvUser = (LPVOID)dwNotifyCookie; //set only for show in notify

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 269
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

bRet = DMAddNotifyA(DM_NotifyProcA,
lpvUser,
&dwNotifyCookie,
&err);
if (bRet)
{
printf("\r\nNotify added, Cookie=%08lx!", dwNotifyCookie);
SetTagDWord("DMdwNotifyCookie",dwNotifyCookie);
}
else
{
printf("\r\nERROR: DMAddNotifyA [%s],%ld,%ld,%ld,%ld,%ld",
err.szErrorText,
err.dwError1,
err.dwError2,
err.dwError3,
err.dwError4,
err.dwError5);
}
}
Project function DM_NotifyProcA:
extern void RemoveNotify();

BOOL DM_NotifyProcA(DWORD dwNotifyClass,


DWORD dwNotifyCode,
LPBYTE lpbyData,
DWORD dwItems,
LPVOID lpvUser)
{
BOOL bShowParams = FALSE;
BOOL bSpecialActionRemoveNotify = FALSE;

printf("\r\n\r\n#### extra added DMNotifyProc [%08lx] entry: ####",


(DWORD)lpvUser);
switch (dwNotifyClass)
{
case DM_NOTIFY_CLASS_ERROR :
switch (dwNotifyCode)
{
case DM_NOTIFY_SHUTDOWN :
printf("\r\nDM_NOTIFY_CLASS_ERROR: DM_NOTIFY_SHUTDOWN");
bShowParams = TRUE;
bSpecialActionRemoveNotify = TRUE;
break;
case DM_NOTIFY_PROCESSNET_ERROR:
printf("\r\nDM_NOTIFY_CLASS_ERROR:
DM_NOTIFY_PROCESSNET_ERROR");
bShowParams = TRUE;
break;
case DM_NOTIFY_SYSNET_ERROR:
printf("\r\nDM_NOTIFY_CLASS_ERROR:
DM_NOTIFY_SYSNET_ERROR");

WinCC Professional V13 SP2 – Programming reference


270 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

bShowParams = TRUE;
break;
default:
printf("\r\nunknown DM_NOTIFY_CLASS_ERROR:
dwNotifyCode[%08lx]", dwNotifyCode);
bShowParams = TRUE;
}
break;
case DM_NOTIFY_CLASS_WARNING:
switch (dwNotifyCode)
{
case DM_NOTIFY_QUEUE_50_PERCENT:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_QUEUE_50_PERCENT");
break;
case DM_NOTIFY_QUEUE_60_PERCENT:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_QUEUE_60_PERCENT");
break;
case DM_NOTIFY_QUEUE_70_PERCENT:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_QUEUE_70_PERCENT");
break;
case DM_NOTIFY_QUEUE_80_PERCENT:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_QUEUE_80_PERCENT");
break;
case DM_NOTIFY_QUEUE_90_PERCENT:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_QUEUE_90_PERCENT");
break;
case DM_NOTIFY_QUEUE_OVERFLOW:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_QUEUE_OVERFLOW");
break;
case DM_NOTIFY_CYCLES_CHANGED:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_CYCLES_CHANGED");
bShowParams = TRUE;
break;
case DM_NOTIFY_MACHINES_CHANGED:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_MACHINES_CHANGED");
bShowParams = TRUE;
break;
case DM_NOTIFY_PROJECT_OPENED:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_PROJECT_OPENED [%s]",
(LPSTR)lpbyData);
bSpecialActionRemoveNotify = TRUE;
break;
case DM_NOTIFY_PROJECT_CLOSED:

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 271
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_PROJECT_CLOSE");
bSpecialActionRemoveNotify = TRUE;
break;
case DM_NOTIFY_SYSTEM_LOCALE:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_SYSTEM_LOCALE [%ld]",
*(DWORD*)lpbyData);
break;
case DM_NOTIFY_DATA_LOCALE:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_DATA_LOCALE [%ld]",
*(DWORD*)lpbyData);
break;
case DM_NOTIFY_PROJECT_RUNTIME:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_ROJECT_RUNTIME [%s]",
(LPSTR)lpbyData);
break;
case DM_NOTIFY_PROJECT_EDIT:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_PROJECT_EDIT [%s]",
(LPSTR)lpbyData);
bSpecialActionRemoveNotify = TRUE;
break;
case DM_NOTIFY_HOTKEY_CHANGE:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_HOTKEY_CHANGE");
bShowParams = TRUE;
break;
case DM_NOTIFY_URSEL:
printf("\r\nDM_NOTIFY_CLASS_WARNING: DM_NOTIFY_URSEL");
bShowParams = TRUE;
break;
case DM_NOTIFY_BODO:
printf("\r\nDM_NOTIFY_CLASS_WARNING: DM_NOTIFY_BODO");
bShowParams = TRUE;
break;
case DM_NOTIFY_BEGIN_PROJECT_EDIT:
printf("\r\nDM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_BEGIN_PROJECT_EDIT [%s]",
(LPSTR)lpbyData);
bShowParams = TRUE;
bSpecialActionRemoveNotify = TRUE;
break;
default:
printf("\r\nunknown DM_NOTIFY_CLASS_WARNING:
dwNotifyCode[%08lx]", dwNotifyCode);
bShowParams = TRUE;
}
break;
case DM_NOTIFY_CLASS_DATA:

WinCC Professional V13 SP2 – Programming reference


272 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

switch (dwNotifyCode)
{
case DM_NOTIFY_APPLICATION_DATA:
printf("\r\nDM_NOTIFY_CLASS_DATA:
DM_NOTIFY_APPLICATION_DATA:");
bShowParams = TRUE;
break;
case DM_NOTIFY_VARIABLE_DATA:
printf("\r\nDM_NOTIFY_CLASS_DATA:
DM_NOTIFY_VARIABLE_DATA:");
bShowParams = TRUE;
break;
case DM_NOTIFY_FIRE_DATA:
// the data sended with DMFireNotifyData is char text
printf("\r\nDM_NOTIFY_CLASS_DATA: DM_NOTIFY_FIRE_DATA:
(data as text: [%s])",
(char*)lpbyData);
bShowParams = TRUE;
break;
default:
printf("\r\nunknown DM_NOTIFY_CLASS_DATA:
dwNotifyCode[%08lx]", dwNotifyCode);
bShowParams = TRUE;
}
break;
default:
printf("\r\nunknown dwNotifyClass[%08lx],
dwNotifyCode[%08lx]",
dwNotifyClass,
dwNotifyCode);
bShowParams = TRUE;
}

if (bShowParams)
{
printf("\r\ndwNotifyClass=%08lx, dwNotifyCode=%08lx,
dwItems=%ld, lpbyData=%08lx, lpvUser=%08lx",
dwNotifyClass,
dwNotifyCode,
dwItems,
lpbyData,
(DWORD)lpvUser);
}

if (bSpecialActionRemoveNotify)
{
printf("\r\nHave to remove notify if RT exits:");
RemoveNotify();
}

printf("\r\n#### extra added Notify [%08lx] exit ####\r\n",


(DWORD)lpvUser);

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 273
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

return TRUE;
}

2.2.3.3 DMChangeDataLocale (RT Professional)

Use
Provides notification of switching of the runtime language to all applications connected with
DMConnect.

Declaration

BOOL DMChangeDataLocale (
LPCTSTR lpszProjectFile,
DWORD dwLocaleID,
LPCMN_ERROR lpdmError );

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.

dwLocaleID
Pointer to the code of the newly selected language. Possible values are the codes of all
languages configured in the text library.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Notify applications when language is switched.

FALSE
Error.

WinCC Professional V13 SP2 – Programming reference


274 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Comment
The application is notified via the callback function DM_NOTIFY_PROC (Page 278) with the
following parameters:

dwNotifyClass DM_NOTIFY_CLASS_WARNING
dwNotifyCode DM_NOTIFY_DATA_LOCALE
lpbyData Pointer to the code of the newly configured lan‐
guage.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_NOT_SUPPORTED Requested service unavailable

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

AUTOHOTSPOT Make connection to the Data Manager

See also
DM_NOTIFY_PROC (Page 278)
DMEnumOpenedProjects (Page 300)
DMGetRuntimeProject (Page 306)

2.2.3.4 DMConnect (RT Professional)

Use
Establishment of a connection by application to the Data Manager. Only one DMConnect can
be performed in an application (process). Additional calls return the error
DM_E_ALREADY_CONNECTED.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 275
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL DMConnect (
LPTSTR lpszAppName,
DM_NOTIFY_PROC lpfnNotify,
LPVOID lpvUser,
LPCMN_ERROR lpdmError );

Parameters

lpszAppName
Pointer to the name of the calling application. Any name can be selected since the parameter
is used for internal identification.
The length of application name is limited to MAX_DM_APP_NAME (32 characters). Longer
names lead to errors in the embedded OHIOIPC.DLL and to termination with the error
DM_E_NOT_CONNECTED.

lpfnNotify
Pointer to the notification function for administrative messages from the Data Manager to the
application.
If a program declares a Notify routine, it must empty its message queue regularly. Unremoved
messages can block WinCC notifications and thus the entire WinCC.
In rare cases, the Notify may already be delivered before the function call has returned.
The Notify routine should still be available after DMDisConnect, since the late calls may arrive.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Set up connection to Data Manager.

FALSE
Error.

WinCC Professional V13 SP2 – Programming reference


276 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Comment
In the WinCC variants that are implemented on the operating system platforms with multi-
threading support, the calls for the notification function are executed asynchronous to the
calling process.
You need to configure appropriate synchronization within the application.
If Data Manager functions are distributed to multiple threads in a program, run DMConnect in
each of these threads and a DMDisconnet at the end.
First, use DMGetConnectionState to check if another thread has already established a
connection. If a connection already exists, you may not perform DMConnect or DMDisConnect.
To avoid this conflict, combine the function calls to the Data Manager in a single thread and
execute the calls only from there.
If Data Manager functions are swapped out to a DLL that is embedded in an application with
the Data Manager functions, check if the connection can be established and terminated via
the DLL. In this case, the application must always secure its own Data Manager function calls
with DMGetConnectionState. However, this offers no protection against disconnection when
the thread is encapsulated in the DLL.
Therefore, define your own connection establishment in a flag, so that DMDisConnect is only
carried out in the desired situation.
An unchecked DMConnect call with Notify that returns the DM_E_ALREADY_CONNECTED
error message may cancel the Notify of a previous call and lead to undesirable results.
Pointers to data ranges passed to the callback function are only valid within the function, in
other words, the Data Manager may release allocated memory areas after the return of the
callback. If the application requires access to the data beyond the time of the call, it must copy
it accordingly.
In addition, pointers to memory areas on the platforms that only support this only have read
access, so that a write access to relevant data cause a protection fault!
The return value of the callback is currently not evaluated and will only be of significance in
future versions. The application should return TRUE by default here.
API DLLs must not be directly used in (ISS) services because the internal resources required
there are not available.
If you use Data Manager functions, such as a wrapper, in a managed environment (C#), ensure
that multiple ApplicationDomains in an application run in the same process. Therefore, only
one DMConnect is permitted in all ApplicationDomains.

Error messages

DM_E_ALREADY_CONNECTED Connection to the Data Manager already estab‐


lished.
DM_E_NOT_CONNECTED Connection to the Data Manager could not be es‐
tablished (for example, application name too long,
etc.).
DM_E_ACCESS_FAULT No right to establish connection to Data Manager
(Invalid user context, for example ISS services,
etc.).

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 277
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DMDisconnect (Page 281) Terminate connection to the Data Manager


DMGetConnectionState (Page 293) Check connection to the Data Manager
DM_NOTIFY_PROC (Page 278) Notification function

Examples
Connection to DM (Page 467)"DM01.cpp"

See also
DM_NOTIFY_PROC (Page 278)
DMDisconnect (Page 281)
DMGetConnectionState (Page 293)
Connection to DM (Page 467)
APConnect (Page 593)

2.2.3.5 DM_NOTIFY_PROC (RT Professional)

Description
In order for your application to provide notification of language switching, for example, you
need to provide a DM_NOTIFY_PROC type callback function.

Declaration

BOOL ( * DM_NOTIFY_PROC) (
DWORD dwNotifyClass,
DWORD dwNotifyCode,
LPBYTE lpbyData,
DWORD dwItems,
LPVOID lpvUser);

WinCC Professional V13 SP2 – Programming reference


278 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Parameters

dwNotifyClass
identifies the notification class:

DM_NOTIFY_CLASS_ERROR (0x00000001)
DM_NOTIFY_CLASS_WARNING (0x00000002)
DM_NOTIFY_CLASS_DATA (0x00000003)

dwNotifyCode
Notification code

for DM_NOTIFY_CLASS_ERROR:
DM_NOTIFY_SHUTDOWN (0x00000001) Data manager is closed
DM_NOTIFY_PROCESSNET_ERROR (0x00000002) Error on the process bus
DM_NOTIFY_SYSNET_ERROR (0x00000003) Error on the system bus
for DM_NOTIFY_CLASS_WARNING:
DM_NOTIFY_QUEUE_50_PERCENT (0x00000001) Fill level of application queue
50%
DM_NOTIFY_QUEUE_60_PERCENT (0x00000002) Fill level of application queue
60%
DM_NOTIFY_QUEUE_70_PERCENT (0x00000003) Fill level of application queue
70%
DM_NOTIFY_QUEUE_80_PERCENT (0x00000004) Fill level of application queue
80%
DM_NOTIFY_QUEUE_90_PERCENT (0x00000005) Fill level of application queue
90%
DM_NOTIFY_QUEUE_OVERFLOW (0x00000006) Overflow of the application
queue
DM_NOTIFY_CYCLES_CHANGED (0x00000010) Rescan update cycles
DM_NOTIFY_MACHINES_CHANGED (0x00000011) Rescan computer list
DM_NOTIFY_PROJECT_OPENED (0x00000012) Load project
DM_NOTIFY_PROJECT_CLOSE (0x00000013) Close project
DM_NOTIFY_SYSTEM_LOCALE (0x00000014) Switch configuration language
DM_NOTIFY_DATA_LOCALE (0x00000015) Switch GUI language
DM_NOTIFY_PROJECT_RUNTIME (0x00000016) Enable project
DM_NOTIFY_PROJECT_EDIT (0x00000017) Disable project
DM_NOTIFY_HOTKEY_CHANGE (0x00000018) A hot key was changed
for DM_NOTIFY_CLASS_DATA:
DM_NOTIFY_APPLICATION_DATA (0x00000001) Application data
DM_NOTIFY_VARIABLE_DATA (0x00000002) Tag data

You can find more information in the notification codes in the description of the constants.

lpbyData
Pointer to the data provided within the DM_NOTIFY_CLASS_DATA class.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 279
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

dwItems
Number of entries in lpbyData.

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value
The return values depend on your implementation.

Note
Data should only be copied again here. The following types of function calls within the callback
can lead to deadlocks or stack overflows:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations
If a program declares a Notify routine, it must empty its message queue regularly. Unremoved
messages can block WinCC notifications and thus the entire WinCC.
In rare cases, the Notify may already be delivered before the DMConnect function call has
returned.

Required files
dmclient.h

Related functions

DMConnect (Page 275) Make connection to the Data Manager

Examples
AUTOHOTSPOT"DM01.cpp"

See also
DMConnect (Page 275)

2.2.3.6 DMDeactivateRTProject (RT Professional)

Use
The project in the runtime mode is disabled.

WinCC Professional V13 SP2 – Programming reference


280 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL DMDeactivateRTProject (
LPCMN_ERROR lpdmError);

Parameters

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Project disabled.

FALSE
Error.

Error messages

DM_E_NO_RT_PRJ No project in runtime mode

Required files
dmclient.h
dmclient.lib
dmclient.dll

Examples
OnTestDeactivateRuntimeProject (Page 479)"TESTCDoc.cpp"

See also
OnTestDeactivateRuntimeProject (Page 479)

2.2.3.7 DMDisconnect (RT Professional)

Use
This function is used by an application to terminate an existing connection to the Data Manager.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 281
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL DMDisConnect (
LPCMN_ERROR lpdmError );

Parameters

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Connection terminated.

FALSE
Error.

Comments
If no connection to the Data Manager has been established with the DMConnect function, the
return value is FALSE. The lpdmError->dwError error code contains the
DM_E_NOT_CONNECTED, value, no connection to the Data Manager.

Note
The call may not be used in the destructor of an application (EXE, DLL, OCX, etc.). Due to
Microsoft-specific mechanisms, this can cause the call to freeze and thereby crash the
program.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager

Required files
dmclient.h
dmclient.lib
dmclient.dll

WinCC Professional V13 SP2 – Programming reference


282 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Related functions

DMConnect (Page 275) Make connection to the Data Manager

Examples
Connection to DM (Page 467)"DM01.cpp"

See also
DMConnect (Page 275)
Connection to DM (Page 467)

2.2.3.8 DMEnumNumberFormats (RT Professional)

Use
The function lists all format conversions available within FORMAT.DLL .

Declaration

BOOL DMEnumNumberFormats (
LPDWORD lpdwItems,
DM_ENUM_FORMATS_PROC lpfnFormat,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Parameters

lpdwItems
Pointer to a double word of the application, which contains the number of enumerated format
data after the call.

lpfnFormat
Pointer to your callback function that is called for every available number format.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 283
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Return value

TRUE
Format conversions listed.

FALSE
Error.

Comments
Pointers passed to the callback are only valid within this, since the system releases all allocated
memory areas once the function returns. If an application requires access to the data beyond
this, it must copy it accordingly.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DM_ENUM_FORMATS_PROC (Page 284) List format conversions (callback)

See also
DM_ENUM_FORMATS_PROC (Page 284)

2.2.3.9 DM_ENUM_FORMATS_PROC (RT Professional)

Description
In order to evaluate the format conversions listed by the system, you must provide a
DM_ENUM_FORMATS_PROC type callback function.

WinCC Professional V13 SP2 – Programming reference


284 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL ( * DM_ENUM_FORMATS_PROC) (
LPDM_FORMAT_INFO lpdmFormat,
DWORD dwItem,
LPVOID lpvUser );

Parameters

lpdmFormat
Pointer to a DM_FORMAT_INFO (Page 218) type structure with the data of a format
conversion.

dwItem
Continuous call counter. If the enumeration is not cancelled prematurely, dwItem will contain
the number of available format conversions.

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
The enumeration is continued.

FALSE
The enumeration is cancelled.

Note
Data should only be copied again here. The following types of function calls within the callback
can lead to deadlocks or stack overflows:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
dmclient.h

Related functions

DMEnumNumberFormats (Page 283) List format conversions

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 285
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
DMEnumNumberFormats (Page 283)
DM_FORMAT_INFO (Page 218)

2.2.3.10 DMEnumUpdateCycles (RT Professional)

Use
The function lists all update cycles defined in the system. The function passes an information
structure for the cycle each time the callback function is called.

Declaration

BOOL DMEnumUpdateCycles (
LPCSTR lpszProjectFile,
LPDWORD lpdwItems,
DM_ENUM_CYCLES_PROC lpfnCycle,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.

lpdwItem
Pointer to a double word of the application, which contains the number of enumerated cycle
data after the call.

lpfnCycle
Pointer to your callback function that is called for every available update cycle.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


286 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Return value

TRUE
Update cycles listed

FALSE
Error

Comments
Pointers passed to the callback function are only valid within the function, since the system
releases all allocated memory areas once the function returns.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DM_ENUM_CYCLES_PROC (Page 287) List update cycles (callback)

Examples
OnTestUpdateCycles (Page 487)"TESTCDoc.cpp"

See also
DM_ENUM_CYCLES_PROC (Page 287)
OnTestUpdateCycles (Page 487)

2.2.3.11 DM_ENUM_CYCLES_PROC (RT Professional)

Description
In order to evaluate the update cycles listed by the system, you must provide a
DM_ENUM_CYCLES_PROC type callback function.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 287
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL ( * DM_ENUM_CYCLES_PROC) (
LPDM_CYCLE_INFO lpdmCycle,
DWORD dwItem,
LPVOID lpvUser);

Parameters

lpdmCycle
Pointer to a DM_CYCLE_INFO (Page 214) type structure with the data of an update cycle.

dwItem
Continuous call counter. If the enumeration is not cancelled prematurely, dwItem will contain
the number of available update cycles.

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
The enumeration is continued.

FALSE
The enumeration is cancelled.

Note
Data should only be copied again here. The following types of function calls within the callback
can lead to deadlocks or stack overflows:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
dmclient.h

Related functions

DMEnumUpdateCycles (Page 286) List update cycles

WinCC Professional V13 SP2 – Programming reference


288 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
DMEnumUpdateCycles (Page 286)
DM_CYCLE_INFO (Page 214)

2.2.3.12 DMExitWinCC (RT Professional)

Use
You can use this function to close WinCC.

Declaration

BOOL DMExitWinCC (
VOID);

Parameters
None

Comments
You can also use the DMExitWinCCEx to specify how the operating system should react to
the closing of WinCC.

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DMExitWinCCEx (Page 290) Close WinCC with defaults

Examples
OnTestWinCCShutdown (Page 504)"TESTCDoc.cpp"

See also
OnTestWinCCShutdown (Page 504)
DMExitWinCCEx (Page 290)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 289
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.3.13 DMExitWinCCEx (RT Professional)

Use
You can use this function to close WinCC. You can also specify how the operating system
reacts after WinCC is closed.

Declaration

BOOL DMExitWinCCEx (
DWORD dwMode );

Parameters

dwMode
You can use dwMode to specify various ways the operating system should react after WinCC
is closed.

DM_SDMODE_WINCC WinCC is closed


DM_SDMODE_LOGOFF When WinCC is closed, the user is also logged off
of the OS.
DM_SDMODE_SYSTEM When WinCC is closed, the operating system is
shut down.
DM_SDMODE_REBOOT When WinCC is closed, the operating system is
restarted.

Comments
With the DM_SDMODE_WINCC parameter, the function has the same effect as
DMExitWinCC.

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DMExitWinCC (Page 289) Close WinCC

See also
DMExitWinCC (Page 289)

WinCC Professional V13 SP2 – Programming reference


290 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.3.14 DMFireNotifyData (RT Professional)

Declaration
BOOL DMFireNotifyData (
DWORD dwNotifyCookie,
DWORD dwByteCount,
LPBYTE lpbyData,
LPCMN_ERROR lpdmError);

Description
Sends an additional notify to a connected notify using the specified cookie identifier.

Parameters

dwNotifyCookie
Cookie for an additional notify function which was connected using DMAddNotify.
If "0" is specified the notify data is sent to all active notifies (broadcast).

dwByteCount
Size of the data buffer to be sent in BYTE.

lpbyData
Pointer to a byte buffer that contains the notify data to be sent.
The size of the buffer is specified by dwByteCount.

lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. In the
event of an error, the system writes error information to this structure.

Return value

TRUE
Notify data sent.

FALSE
Error

Comments
The sent notify is edited in the said notify routine under
dwNotifyClass=DM_NOTIFY_CLASS_DATA and dwNotifyCode=DM_NOTIFY_FIRE_DATA.
If a DMDisconnect is performed without previously removing the additional notify functions, a
final DM_NOTIFY_SHUTDOWN is issued again to all these notify functions which are then

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 291
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

removed internally using administration. You can then discard the connection and the cookies
as they are no longer valid.

Error messages

DM_E_NOT_CONNECTED No DMConnect performed yet or DMDisconnect


performed already
DM_E_DONT_EXIST No notify exists for the specified cookie
DM_E_PARAM Parameter error

Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll

Related functions

DMAddNotify Connects a further notify function to "DMClient".


DMFireNotify Removes the additional notify function using the
cookie from the notify list

Samples
Button DMFireNotifyData:
#include "apdefap.h"
void OnClick(char* lpszPictureName,
char* lpszObjectName,
char* lpszPropertyName)
{
DWORD dwNotifyCookie;
CHAR* pszNotifyText;
CMN_ERROR err;
BOOL bRet;

dwNotifyCookie = GetTagDWord("DMdwNotifyCookie");
pszNotifyText = GetTagChar("DMNotifySendText");
memset(&err, 0, sizeof(err));
bRet = FALSE;

bRet = DMFireNotifyData(dwNotifyCookie,
strlen(pszNotifyText)*sizeof(CHAR)+1,
(LPBYTE)pszNotifyText, &err);
if (FALSE == bRet)
{
printf("\r\nERROR: DMFireNotifyData [%s],%ld,%ld,%ld,%ld,%ld",
err.szErrorText,
err.dwError1,

WinCC Professional V13 SP2 – Programming reference


292 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

err.dwError2,
err.dwError3,
err.dwError4,
err.dwError5);
}

2.2.3.15 DMGetConnectionState (RT Professional)

Use
You can use this function to query for a connection to the Data Manager, for example, to check
whether the DMConnect function call has been correctly executed.

Declaration

BOOL DMGetConnectionState (
LPCMN_ERROR lpdmError);

Parameters

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Connection established.

FALSE
Error or no connection.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager

Required files
dmclient.h
dmclient.lib
dmclient.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 293
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Related functions

DMConnect (Page 275) Make connection to the Data Manager

Examples
AUTOHOTSPOT"DM01.cpp"

See also
DMConnect (Page 275)
Connection to DM (Page 467)

2.2.3.16 DMGetDataLocale (RT Professional)

Use
The function returns the ID of the currently selected runtime language.

Declaration

BOOL DMGetDataLocale (
LPDWORD lpdwLocaleID,
LPCMN_ERROR lpdmError);

Parameters

lpdwLocaleID
Pointer to the code of the currently configured language. Return values are the codes of all
languages configured in the text library.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Get language ID.

FALSE
Error.

WinCC Professional V13 SP2 – Programming reference


294 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager

Required files
dmclient.h
dmclient.lib
dmclient.dll

2.2.3.17 DMGetHotkey (RT Professional)

Use
This function determines the action associated with a hotkey.

Declaration

BOOL DMGetHotKey (
DWORD dwHotKeyAction,
LPDWORD lpdwHotKey,
LPCMN_ERROR lpdmError);

Parameters

dwHotKeyAction
Action

lpdwHotKey
Pointer to the memory location where the hotkey is stored.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Get hotkey ID.

FALSE
Error.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 295
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Required files
dmclient.h
dmclient.lib
dmclient.dll

2.2.3.18 DMGetMachineInfo (RT Professional)

Use
This function is used by an application to determine the startup parameters of the specific
computer. For this to occur, the application must have the relevant entries for the computer
properties made with the project management functions beforehand.

Declaration

BOOL DMGetMachineInfo (
LPCSTR lpszLogicalName,
LPVOID lpvData,
LPDWORD lpdwSize,
LPCMN_ERROR lpdmError);

Parameters

lpszLogicalName
Pointer to the logical name of the Explorer DLL whose startup parameters are queried.

lpvData
Pointer to a data range through which the data of the startup parameters are passed to the
application.

lpdwSize
If lpvData = 0, the size of the data range is specified in lpdwSize.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Get information about the local PC.

WinCC Professional V13 SP2 – Programming reference


296 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

FALSE
Error.

Error messages

DM_E_NO_RT_PRJ No project in runtime mode


DM_E_MACHINE_NOT_FOUND Cannot find PC
DM_E_NO_INFO_FOUND Cannot find startup information

Required files
dmclient.h
dmclient.lib
dmclient.dll

2.2.3.19 DMGetMachineTable (RT Professional)

Use
You can use this function to determine information on individual PCs in addition to the number
of PCs involved in the project.

Declaration

BOOL DMGetMachineTable (
LPCSTR lpszProjectFile,
LPDM_MACHINE_TABLE lpdmMachineTable,
LPCMN_ERROR lpdmError);

Parameters

lpdwProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.

lpdmMachineTable
Pointer to the DM_MACHINE_TABLE (Page 219) structure in which the data from the computer
list is stored.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 297
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Return value

TRUE
Data for computer list determined.

FALSE
Error.

Required files
dmclient.h
dmclient.lib
dmclient.dll

Examples
OnTestMachines (Page 482)"TESTCDoc.cpp"

See also
DM_MACHINE_TABLE (Page 219)
OnTestMachines (Page 482)
DMActivateRTProject (Page 266)

2.2.3.20 DMRemoveNotify (RT Professional)

Declaration
BOOL DMRemoveNotify (
DWORD dwNotifyCookie,
LPCMN_ERROR lpdmError);

Description
Removes an additionally connected notify function using its cookie identifier from the additional
notify list.
This function is only available in WinCC Version V7.2 or higher.

Parameters

dwNotifyCookie
Cookie for an additional notify function which was connected using DMAddNotify.

WinCC Professional V13 SP2 – Programming reference


298 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. In the
event of an error, the system writes error information to this structure.

Return value

TRUE
Additional notify function removed.

FALSE
Error

Comments
If a DMDisconnect is performed without previously removing the additional notify functions, a
final DM_NOTIFY_SHUTDOWN is issued again to all these notify functions which are then
removed internally using administration. You can then discard the connection and the cookies
as they are no longer valid.

Error messages

DM_E_NOT_CONNECTED No DMConnect performed yet or DMDisconnect


performed already
DM_E_DONT_EXIST No notify exists for the specified cookie
DM_E_PARAM Parameter error

Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll

Related functions

DMFireNotifyData Sends data to the additional notify function using


the cookie or to all functions
DMAddNotify Connects a further notify function to DMClient.

Samples
Button RemoveNotify:
#include "apdefap.h"
void OnClick(char* lpszPictureName,
char* lpszObjectName,
char* lpszPropertyName)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 299
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

{
RemoveNotify ();
}
Project function RemoveNotify:
void RemoveNotify()
{
DWORD dwNotifyCookie = 0L;
CMN_ERRORA err;
BOOL bRet = FALSE;

memset(&err, 0, sizeof(CMN_ERRORA));
dwNotifyCookie = GetTagDWord("DMdwNotifyCookie");

if (dwNotifyCookie)
{
bRet = DMRemoveNotify(dwNotifyCookie, &err);
if (bRet)
{
printf("\r\nNotify [%08lx] removed", dwNotifyCookie);
dwNotifyCookie = 0L;
SetTagDWord("DMdwNotifyCookie",dwNotifyCookie);
}
else
{
printf("\r\nERROR: DMRemoveNotifyA [%s],%ld,%ld,%ld,
%ld,%ld, Cookie=%08lx",
err.szErrorText,
err.dwError1,
err.dwError2,
err.dwError3,
err.dwError4,
err.dwError5,
dwNotifyCookie);
}
}
else
{
printf("\r\nNo Notify present to remove!");
}
}

2.2.4 Functions for project management (RT Professional)

2.2.4.1 DMEnumOpenedProjects (RT Professional)

Use
Calls the passed callback function for each project open in WinCC.

WinCC Professional V13 SP2 – Programming reference


300 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL DMEnumOpenedProjects (
LPDWORD lpdwItems,
DM_ENUM_OPENED_PROJECTS_PROC lpfnEnum,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Parameters

lpdwItems
Pointer to a double word, which contains the number of open projects when the enumeration
is completed.

lpfnEnum
Pointer to your callback function, which receives the project data.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Projects listed.

FALSE
Error.

Comments
Currently, only one project can be open in WinCC. You therefore only get the information for
this one project.

Error messages

DM_E_FILE Error with file operation

Required files
dmclient.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 301
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

dmclient.lib
dmclient.dll

Related functions

DM_ENUM_OPENED_PROJECTS_PROC List open projects (callback)


(Page 302)

Examples
Enum open projects (Page 472)"DM01.cpp"
OnTestOpenProjects (Page 486)"TESTCDoc.cpp"

See also
DM_ENUM_OPENED_PROJECTS_PROC (Page 302)
DM_PROJECT_INFO (Page 220)
Enum open projects (Page 472)
OnTestOpenProjects (Page 486)
DMChangeDataLocale (Page 274)

2.2.4.2 DM_ENUM_OPENED_PROJECTS_PROC (RT Professional)

Description
In order to evaluate the projects listed by the system, you must provide a
DM_ENUM_OPENED_PROJECTS_PROC type callback function.

Declaration

BOOL ( * DM_ENUM_OPENED_PROJECTS_PROC) (
LPDM_PROJECT_INFO lpInfo,
LPVOID lpvUser);

Parameters

lpInfo
Pointer to a DM_PROJECT_INFO (Page 220) type structure with information about an open
project.

WinCC Professional V13 SP2 – Programming reference


302 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
The enumeration is continued.

FALSE
The enumeration is cancelled.

Comments
Currently, only one project can be open in WinCC. You therefore only get the information for
this one project.

Note
Data should only be copied again here. The following types of function calls within the callback
can lead to deadlocks or stack overflows:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
dmclient.h

Related functions

DMEnumOpenedProjects (Page 300) List projects (open)

Examples
Enum open projects "DM01.cpp"

See also
DMEnumOpenedProjects (Page 300)
DM_PROJECT_INFO (Page 220)
Enum open projects (Page 472)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 303
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.4.3 DMGetProjectDirectory (RT Professional)

Use
Returns the path to the configuration data for the given project that is valid for the application.

Declaration

BOOL DMGetProjectDirectory (
LPCSTR lpszAppName,
LPCSTR lpszProjectFile,
LPDM_DIRECTORY_INFO lpdmDirInfo,
LPCMN_ERROR lpdmError );

Parameters

lpszAppName
Pointer to the name of the application for which the path is to be determined.

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be determined with DMEnumOpenedProjects.

lpdmDirInfo
Pointer to the DM_DIRECTORY_INFO (Page 216) structure in which the path of the
configuration data is stored.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Get path information.

FALSE
Error.

Error messages

DM_E_FILE Error with file operation

WinCC Professional V13 SP2 – Programming reference


304 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Required files
dmclient.h
dmclient.lib
dmclient.dll

Examples
OnTestProjectPaths (Page 484)"TESTCDoc.cpp"

See also
DM_DIRECTORY_INFO (Page 216)
OnTestProjectPaths (Page 484)

2.2.4.4 DMGetProjectInformation (RT Professional)

Use
Determines relevant information about the given project, such as paths, data source name,
computer configuration, etc.

Declaration

BOOL DMGetProjectInformation (
LPCSTR lpszProjectFile,
LPDM_PROJECT_INFO lpProjectInfo,
LPCMN_ERROR lpdmError);

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.

lpProjectInfo
Pointer to the DM_PROJECT_INFO (Page 220) structure in which the project information is
stored.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 305
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Return value

TRUE
Get project information

FALSE
Error

Error messages

DM_E_FILE Error with file operation

Required files
dmclient.h
dmclient.lib
dmclient.dll

Examples
Inquire project informations (Page 478)"DM01.cpp"
OnTestProjectInfo (Page 482)"TESTCDoc.cpp"

See also
DM_PROJECT_INFO (Page 220)
Inquire project informations (Page 478)
OnTestProjectInfo (Page 482)

2.2.4.5 DMGetRuntimeProject (RT Professional)

Use
Returns the file name of the project that is in online mode. To determine all other project data
after successful execution, the calling application remembers the name of the project file
entered in lpszProjectFile.

Declaration

BOOL DMGetRuntimeProject (
LPSTR lpszProjectFile,
DWORD dwBufSize,
LPCMN_ERROR lpdmError);

WinCC Professional V13 SP2 – Programming reference


306 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Parameters

lpszProjectFile
Buffer for storing the name of the project file, including path and extension. The buffer must
be at least _MAX_PATH characters in size.

dwBufSize
Size of the given buffer in characters.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Name of the enabled project determined.

FALSE
Error.

Comments
The call is successfully executed even when runtime has started but not all components are
enabled.

Error messages

DM_E_FILE Error with file operation


DM_E_NO_RT_PRJ No project in runtime mode

Required files
dmclient.h
dmclient.lib
dmclient.dll

Examples
Read tag (Page 506)"DM02.cpp"
Write tag (Page 511)"DM02.cpp"
OnTestRuntimeProject (Page 486)"TESTCDoc.cpp"

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 307
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
Read tag (Page 506)
Write tag (Page 511)
OnTestRuntimeProject (Page 486)
DMChangeDataLocale (Page 274)

2.2.4.6 DMOpenProjectDocPlus (RT Professional)

Use
Opens the project specified in lpszProjectFile.

Declaration

BOOL DMOpenProjectDocPlus (
LPSTR lpszProjectFile,
LPCMN_ERROR lpdmError);

Parameters

lpszProjectFile
Pointer to the name of the project file to be opened, including path and extension.
The release name (e.g. WinCC 50_Project_Odk) implicitly generated by WinCC cannot be
used as a path because it exists only as long as this project is open.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Project opened.

FALSE
Error.

Required files
dmclient.h

WinCC Professional V13 SP2 – Programming reference


308 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

dmclient.lib
dmclient.dll

2.2.4.7 DMOpenProjectPlus (RT Professional)

Use
Selection of a project file via the standard selection dialog of the system. If the project is not
yet open in WinCC, the information required for the project is loaded.
When the execution is successful, the calling application should remember the name of the
project file entered in lpszProjectFile, since it can be used to determine all other information
about the project.
The name of the project file can later be determined with DMEnumOpenedProjects.

Declaration

BOOL DMOpenProjectPlus (
HWND hwndParent,
LPSTR lpszProjectFile,
DWORD dwBufSize,
LPCMN_ERROR lpdmError );

Parameters

hwndParent
Handle to the window that is used as the parent window for the dialog.

lpszProjectFile
Pointer to the buffer for storing the name of the project file, including path and extension. The
buffer should be at least _MAX_PATH characters in size.
lpszProjectFile must be an empty string or a valid path of an existing project when the function
is called.
If lpszProjectFile is an empty string, the default selection dialog of the system (see above) is
called.
If lpszProjectFile is not empty, WinCC interprets the string contained in lpszProjectFile as the
project path and attempts to open it without opening the selection dialog.
The release name (e.g. WinCC 50_Project_Odk) implicitly generated by WinCC cannot be
used as a project path because it exists only as long as this project is open.

dwBufSize
Size of the given buffer in characters.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 309
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Close the dialog with "OK".

FALSE
Error or close dialog with "CANCEL"

Comments
The process of opening a project may take several minutes.

Error messages

DM_E_CANCEL User has selected "Cancel" in a dialog


DM_E_FILE Error with file operation
DM_E_UPDATE Updating project

Required files
dmclient.h
dmclient.lib
dmclient.dll

Examples
Open project by means of dialog (Page 505)"DM01.cpp"
OnTestOpenProject (Page 485)"TESTCDoc.cpp"

See also
Open project by means of dialog (Page 505)
OnTestOpenProject (Page 485)

WinCC Professional V13 SP2 – Programming reference


310 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.5 Data transport channels (RT Professional)

2.2.5.1 DMClearBlockQueue (RT Professional)

Use
Deletes all entries in the notification queue of the application.

Declaration

BOOL DMClearBlockQueue (
LPCMN_ERROR lpdmError );

Parameters

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Notification queue is deleted.

FALSE
Error.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager

Required files
dmclient.h
dmclient.lib
dmclient.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 311
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.5.2 DMEnumDataServices (RT Professional)

Use
DMEnumDataServices calls the passed callback function for each service already installed,
as long as the callback function returns TRUE.

Declaration

BOOL DMEnumDataServices (
LPDWORD lpdwItems,
DM_ENUM_DATA_SERVICE_PROC lpfnEnum,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Parameters

lpdwItems
Pointer to a double word of the application, which contains the number of listed services after
the call.

lpfnEnum
Pointer to your callback function that is called for every installed service.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Services listed.

FALSE
Error.

Comment
Pointers passed to the callback are only valid within this, since the system releases all allocated
memory areas once the function returns. If an application requires access to the data beyond
this, it must copy it accordingly.

WinCC Professional V13 SP2 – Programming reference


312 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DM_ENUM_DATA_SERVICE_PROC (Page 313) List data transport channels (callback)


DMInstallDataService (Page 317) Install data transport channel

See also
DM_ENUM_DATA_SERVICE_PROC (Page 313)
DMInstallDataService (Page 317)

2.2.5.3 DM_ENUM_DATA_SERVICE_PROC (RT Professional)

Description
In order to evaluate the installed data transport channels listed by the system, you must provide
a DM_ENUM_DATA_SERVICE_PROC type callback function.

Declaration

BOOL ( * DM_ENUM_DATA_SERVICE_PROC) (
LPCSTR pszService,
DM_DATA_SERVICE_PROC pfnService,
LPVOID lpvUser );

Parameters

pszService
Pointer to the logical name of the data transport channel.

pfnService
Pointer to your DM_DATA_SERVICE_PROC (Page 314) type callback function, through which
the additional data of a service are made available.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 313
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
The enumeration is continued.

FALSE
The enumeration is cancelled.

Note
Data should only be copied again here. The following types of function calls within the callback
can lead to deadlocks or stack overflows:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
dmclient.h

Related functions

DMEnumDataServices (Page 312) List data transport channels

See also
DMEnumDataServices (Page 312)
DM_DATA_SERVICE_PROC (Page 314)

2.2.5.4 DM_DATA_SERVICE_PROC (RT Professional)

Description
To enable your application to receive data, you must have a data transport channel installed
via DMInstallDataService and provide a DM_DATA_SERVICE_PROC type callback function.
You also need a callback function of this type if you want to evaluate the transport channels
(services) listed by the system.

WinCC Professional V13 SP2 – Programming reference


314 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL ( * DM_DATA_SERVICE_PROC) (
LPDM_DATA_SERVICE lpds,
LPVOID lpvUser);

Parameters

lpds
Pointer to a DM_DATA_SERVICE (Page 215) type structure with the information on an
installed data transport channels (service).

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
Depending on the use of the callback function.

FALSE
Error

Note
Data should only be copied again here. The following types of function calls within the callback
can lead to deadlocks or stack overflows:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations
If a program declares a Notify routine, it must empty its message queue regularly. Unremoved
messages can block WinCC notifications and thus the entire WinCC.
In rare cases, the Notify may already be delivered before the function call has returned.

Required files
dmclient.h

Related functions

DMInstallDataService (Page 317) Install data transport channel


DM_ENUM_DATA_SERVICE_PROC (Page 313) List data transport channels (callback)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 315
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
DM_ENUM_DATA_SERVICE_PROC (Page 313)
DM_DATA_SERVICE (Page 215)
DMInstallDataService (Page 317)

2.2.5.5 DMGetNumPendingBlocks (RT Professional)

Use
This function is used by an application to determine the entries in its queue.

Declaration

BOOL DMGetNumPendingBlocks (
LONG *plEntries,
LPCMN_ERROR lpdmError);

Parameters

plEntries
After successful execution, the function contains the number of data packets in the queue of
the application.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Number of entries in queue determined.

FALSE
Error.

DM_E_NOT_CONNECTED No connection to the Data Manager

Required files
dmclient.h
dmclient.lib
dmclient.dll

WinCC Professional V13 SP2 – Programming reference


316 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.5.6 DMInstallDataService (RT Professional)

Use
Installs a transport channel (service) for data transfer between applications. The function
signals the readiness of the application to receive data sent by any other applications under
the specified service name. If a service is already installed under the given name, the callback
function installed for this is replaced by whatever is passed. If lpfnService == NULL , the service
installed lpszService is removed.

Declaration

BOOL DMInstallDataService (
LPCSTR lpszService,
DM_DATA_SERVICE_PROC lpfnService,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Parameters

lpszService
Pointer to the name of the service. The transport channel is identified by this name, which have
have freely assigned.

lpfnService
Pointer to a callback function that is called when data are sent to the application through this
service.
When a program reports a notify routine, it must empty its message queue at regular intervals.
Messages that are not fetched can block WinCC notifications and thus block the entire WinCC.
In rare cases, the notification may already be delivered before the function call returns.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Data transport channel installed.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 317
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

FALSE
Error.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DM_DATA_SERVICE_PROC (Page 314) List data transport channels (callback), install data
transport channel (callback)

See also
DMEnumDataServices (Page 312)
DM_DATA_SERVICE_PROC (Page 314)

2.2.5.7 DMSendApplicationData (RT Professional)

Use
The data passed in lpdmSendData are sent to all applications that meet the conditions
specified in the DM_SEND_DATA_STRUCT structure and have installed the service described
under szService using DMInstallDataService.

Declaration

BOOL DMSendApplicationData (
LPDM_SEND_DATA_STRUCT lpdmSendData,
LPCMN_ERROR lpdmError);

Parameters

lpdmSendData
Pointer to the DM_SEND_DATA_STRUCT (Page 221) structure.

WinCC Professional V13 SP2 – Programming reference


318 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Data sent to application.

FALSE
Error.

Comment
The function is only implemented locally.
The members in the DM_SEND_DATA_STRUCT structure for remote access to the
"TargetMachine" are reserved for future development.
The dwTargetMachineFlags can only be specified with DM_SD_LOCAL , any other
specification leads to errors and dwTargetMachines must be 0L.

Required files
dmclient.h
dmclient.lib
dmclient.dll

See also
DM_SEND_DATA_STRUCT (Page 221)

2.2.5.8 DMSetBlockQueueSize (RT Professional)

Use
This function specifies the maximum number of messages that can be held in the notification
queue of the application.

Declaration

BOOL DMSetBlockQueueSize (
LONG nCount,
LPCMN_ERROR lpdmError);

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 319
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Parameters

nCount
Maximum number of messages.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Size of the queue set.

FALSE
Error.

Comment
The default value for 32-bit platforms is 1000 entries, which is usually sufficient.
Each message occupies address space of the application. Think carefully before increasing
the number of messages as this will slow processing by the application.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager

Required files
dmclient.h
dmclient.lib
dmclient.dll

2.2.6 Functions for processing tags (RT Professional)

2.2.6.1 DMEnumVarData (RT Professional)

Use
The function is used to determine information about objects that are associated with a tag, for
example, associated tag group, channel unit, etc.

WinCC Professional V13 SP2 – Programming reference


320 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL DMEnumVarData (
LPCSTR lpszProjectFile,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
DM_ENUM_VARIABLE_PROC lpfnEnum,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.

lpdmVarKey
Pointer to the beginning of a field for DM_VARKEY (Page 239) type structures, through which
the tags to be listed are specified. As of V5.0 SP2, if no array is specified and supplied with
NULL, all tags are enumerated.
If an incorrect name or a false ID is given for DM_VARKEY , no errors are displayed because
some can be valid and some incorrect in a list. In order for the user to identify an incorrect
DM_VARKEY , a DM_VARIABLE_DATA (Page 235) type structure is passed for this in the
callback, which is filled with 0.

dwItems
Number of tags whose data are listed (= number of tag specifications in lpdmVarKey). If the
number is set to 0, all tags are enumerated.

lpfnEnum
Pointer to your callback, which receives the information about a tag.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Information on the tag listed.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 321
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

FALSE
Error

Comment
There is an advanced function, DMEnumVarData4.

Note
Existing implementations of a multi-stage enumeration of DMEnumVariables with the call of
DMEnumVarDataX in the callback for each individual element should be replaced by a single
call of DMEnumVarData4. Any necessary filtering should be performed here in the callback
itself. The change considerably improves performance.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_INVALID_KEY Tag not found

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DM_ENUM_VARIABLE_PROC (Page 322) List information about a tag (callback)

See also
DM_VARKEY (Page 239)
DM_VARIABLE_DATA (Page 235)
DM_ENUM_VARIABLE_PROC (Page 322)

2.2.6.2 DM_ENUM_VARIABLE_PROC (RT Professional)

Description
In order to evaluate information about a tag listed by the system, you must provide a
DM_ENUM_VARIABLE_PROC type callback function.

WinCC Professional V13 SP2 – Programming reference


322 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL ( * DM_ENUM_VARIABLE_PROC) (
LPDM_VARKEY lpdmVarKey,
LPDM_VARIABLE_DATA lpdmVarData,
LPVOID lpvUser

Parameters

lpdmVarKey
Pointer to a DM_VARKEY (Page 239) type structure for specification of the tag to be listed.

lpdmVarData
Pointer to a DM_VARIABLE_DATA (Page 235) type structure with information about a tag.
When the structure completely filled with 0, an incorrect name or incorrect ID was given in
DM_VARKEY. Can be queried via lpdmVarData->dmTypeRef->dwType, for example.

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
The enumeration is continued.

FALSE
The enumeration is cancelled

Note
Data should only be copied again here. The following types of function calls within the callback
can lead to deadlocks or stack overflows:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
dmclient.h

Related functions

DMEnumVarData (Page 320) List information about a tag

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 323
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
DM_VARKEY (Page 239)
DM_VARIABLE_DATA (Page 235)
DMEnumVarData (Page 320)

2.2.6.3 DMEnumVarData4 (RT Professional)

Use
The function is used to determine information about objects that are associated with a tag, for
example, associated tag group, channel unit, etc.
If differs from DMEnumVarData due to the additional specification of scaling information.

Declaration

BOOL DMEnumVarData4 (
LPCSTR lpszProjectFile,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
DM_ENUM_VARIABLE_PROC4 lpfnEnum,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.

lpdmVarKey
Pointer to the beginning of a field for DM_VARKEY (Page 239) type structures, through which
the tags to be listed are specified. If the parameter is set to NULL, all tags are enumerated.
If an incorrect name or a false ID is given for DM_VARKEY , no errors are displayed because
some can be valid and some incorrect in a list. In order for the user to identify an incorrect
DM_VARKEY, a DM_VARIABLE_DATA4 (Page 237) type structure is passed for this in the
callback, which is filled with 0.

dwItems
Number of tags whose data should be listed (= number of tag specifications in lpdmVarKey).
If the number is set to 0, all tags are enumerated.

lpfnEnum
Pointer to your callback, which receives the information about a tag.

WinCC Professional V13 SP2 – Programming reference


324 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Information on the tag listed.

FALSE
Error.

Comment

Note
Existing implementations of a multi-stage enumeration of DMEnumVariables with the call of
DMEnumVarDataX in the callback for each individual element should be replaced by a single
call of DMEnumVarData4. Any necessary filtering should be performed here in the callback
itself. The change considerably improves performance.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_INVALID_KEY Tag not found

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DM_ENUM_VARIABLE_PROC4 (Page 326) List information about a tag (callback)

Examples
Enum Data of Tags (Page 470)"DM01.cpp"

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 325
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
DM_VARKEY (Page 239)
DM_VARIABLE_DATA4 (Page 237)
DM_ENUM_VARIABLE_PROC4 (Page 326)
Enum Data of Tags (Page 470)

2.2.6.4 DM_ENUM_VARIABLE_PROC4 (RT Professional)

Description
In order to evaluate information about a tag listed by the system, you must provide a
DM_ENUM_VARIABLE_PROC4 type callback function. This callback function differs from
DM_ENUM_VARIABLE_PROC due to the additional specification of scaling information.

Declaration

BOOL ( * DM_ENUM_VARIABLE_PROC4) (
LPDM_VARKEY lpdmVarKey,
LPDM_VARIABLE_DATA4 lpdmVarData,
LPVOID lpvUser

Parameters

lpdmVarKey
Pointer to a DM_VARKEY (Page 239) type structure for specification of the tag to be listed.

lpdmVarData
Pointer to a DM_VARIABLE_DATA4 (Page 237) type structure with information about a tag.
When the structure completely filled with 0, an incorrect name or incorrect ID was given in
DM_VARKEY. Can be queried via lpdmVarData->dmTypeRef->dwType, for example.

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
The enumeration is continued.

WinCC Professional V13 SP2 – Programming reference


326 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

FALSE
The enumeration is cancelled.

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
dmclient.h

Related functions

DMEnumVarData4 (Page 324) List information about a tag

Examples
Enum Data of Tags (Page 470)"DM01.cpp"

See also
DMEnumVarData4 (Page 324)
DM_VARKEY (Page 239)
DM_VARIABLE_DATA4 (Page 237)
Enum Data of Tags (Page 470)

2.2.6.5 DMEnumVarGrpData (RT Professional)

Use
The function returns information about the tag groups via the DM_ENUM_VARGRP_PROC
callback function, for example, name, creator ID and number of tags in the group.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 327
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL DMEnumVarGrpData (
LPSTR lpszProjectFile,
LPDM_VARGRPKEY lpdmVarGrpKey,
DWORD dwItems,
DM_ENUM_VARGRP_PROC lpfnEnum,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.

lpdmVarGrpKey
Pointer to the first of the DM_VARGRPKEY (Page 234) type structures, through which the tag
group is specified.

dwItems
The number of tags whose data are listed.

lpfnEnum
Pointer to your callback, which receives the information about a tag group.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Information on the tag group listed.

FALSE
Error.

WinCC Professional V13 SP2 – Programming reference


328 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_INVALID_KEY Tag not found

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DM_ENUM_VARGRP_PROC List information about a tag group (callback)


(Page 331)

Examples
OnTestEnumGroupsAll (Page 479)"TESTCDoc.cpp"

See also
DM_VARGRPKEY (Page 234)
DM_ENUM_VARGRP_PROC (Page 331)
OnTestEnumGroupsAll (Page 479)

2.2.6.6 DMEnumVarGrpDataExStr (RT Professional)

Declaration
BOOL DMEnumVarGrpDataExStr (
LPTSTR lpszProjectFile,
DWORD dwFlags,
LPVARIANT lpvdmVarGrpKey,
LPDWORD lpdwVarGrpCount,
DM_ENUM_VARGRP_PROC_EXSTR lpfnEnum,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Description
This function returns tag group information by means of the
DM_ENUM_VARGRP_PROC_EXSTR callback function, for example, name, ID and number
of tags in the group.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 329
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be retrieved with DMEnumOpenedProjects, or with
DMGetRuntimeProject in Runtime.

dwFlags
Reserved for future use. Is to be filled with 0L.

lpvdmVarGrpKey
Pointer to the first structure of the DM_VARGRPKEY type specifying the tag groups.
Pointer to a VARIANT for this tag group list. You must create the list as VT_ARRAY |
VT_VARIANT as different data types such as VT_I4, VT_BSTR and under certain conditions
also VT_LPSTR can be different for each tag. Alternatively, you create a single VARIANT if
only one key is specified.
VT_EMPTY or NULL pointers are used to enumerate all groups.

lpdwVarGrpCount
Pointer to DWORD returning the number of tag groups.
lpfnCallback = NULL is used to initially determine how much memory is required for the tag
groups.

lpfnEnum
Pointer to your callback function which receives the tag group information.

lpvUser
Pointer to application-specific data. The function does not evaluate this pointer, but makes it
available again within the callback function.

lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. In the
event of an error, the system writes error information to this structure.

Return value

TRUE
Tag group information enumerated

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


330 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Error messages

DM_E_NOT_CONNECTED No connection to data manager


DM_E_INVALID_KEY Tag not found

Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll

Related functions

DM_ENUM_VARGRP_PROC_EXSTR Enumerate tag group information (callback)

2.2.6.7 DM_ENUM_VARGRP_PROC (RT Professional)

Description
In order to evaluate information about a tag group listed by the system, you must provide a
DM_ENUM_VARGRP_PROC type callback function.

Declaration

BOOL ( * DM_ENUM_VARGRP_PROC) (
LPDM_VARGRP_DATA lpdmVarGrpData,
LPVOID lpvUser );

Parameters

lpdmVarGrpData
Pointer to a DM_VARGRP_DATA (Page 233) type structure with information about the tag
group.

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
The enumeration is continued.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 331
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

FALSE
The enumeration is cancelled.

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
dmclient.h

Related functions

DMEnumVarGrpData (Page 327) List information about a tag group

See also
DMEnumVarGrpData (Page 327)
DM_VARGRP_DATA (Page 233)

2.2.6.8 DMEnumVariables (RT Professional)

Use
The function lists the names of all tags that match a certain selection criterion. The selection
criterion is determined by the DM_VARFILTER structure.

Declaration

BOOL DMEnumVariables (
LPCSTR lpszProjectFile,
LPDM_VARFILTER lpdmVarFilter,
DM_ENUM_VAR_PROC lpfnEnum,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

WinCC Professional V13 SP2 – Programming reference


332 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.

lpdmVarFilter
Pointer to the DM_VARFILTER (Page 231) structure in which the selection criterion is specified.

lpfnEnum
Pointer to your callback function, which receives the tag names.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Tag names listed.

FALSE
Error.

Comment

Note
Existing implementations of a multi-stage enumeration of DMEnumVariables with the call of
DMEnumVarDataX in the callback for each individual element should be replaced by a single
call of DMEnumVarData4. Any necessary filtering should be performed here in the callback
itself. The change considerably improves performance.

Required files
dmclient.h
dmclient.lib
dmclient.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 333
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Related functions

DM_ENUM_VAR_PROC (Page 334) List tag names (callback)

Examples
OnTestEnumVariables (Page 480)"TESTCDoc.cpp"

See also
DM_VARFILTER (Page 231)
DM_ENUM_VAR_PROC (Page 334)
OnTestEnumVariables (Page 480)

2.2.6.9 DM_ENUM_VAR_PROC (RT Professional)

Description
In order to evaluate the names of tags listed by the system, you must provide a
DM_ENUM_VAR_PROC type callback function.

Declaration

BOOL ( * DM_ENUM_VAR_PROC) (
LPDM_VARKEY lpdmVarKey,
LPVOID lpvUser

Parameters

lpdmVarKey
Pointer to a DM_VARKEY (Page 239) type structure with the name of a tag.

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
Additional callback calls are desirable.

FALSE
The callback series should be cancelled.

WinCC Professional V13 SP2 – Programming reference


334 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Comment

NOTICE
You may not call any other DMClient function in this callback. A blockade may otherwise
occur.

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
dmclient.h

Related functions

DMEnumVariables (Page 332) List tag names

See also
DM_VARKEY (Page 239)
DMEnumVariables (Page 332)

2.2.6.10 DMGetValue (RT Professional)

Use
Reads the value of one or more tags from the process image of the Data Manager. The value
that is read is that given at the time of the most recent update.
The more advanced DMGetValueEx function, additionally returns the quality code in the
DM_VAR_UPDATE_STRUCTEX structure.

Declaration

BOOL DMGetValue (
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
LPDM_VAR_UPDATE_STRUCT lpdmvus,
LPCMN_ERROR lpdmError);

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 335
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Parameters

lpdmVarKey
Pointer to the DM_VARKEY (Page 239) structure that identifies the tag values to be read.

dwItems
Number of passed structures (corresponds to the number of tag values to be read).

lpdmvus
Pointer to the first DM_VAR_UPDATE_STRUCT (Page 226) structure that contains the tag
values once the function returns.

lpdmError
Pointer to the first of dwItems error structure with the CMN_ERROR type. When an error occurs
during the writing of a tag, the system writes the error information into the appropriate structure.
Therefore, remember to reserve space for these structures.

Return value

TRUE
Values determined.

FALSE
Error.

Comment
To provide an application the possibility of separate cycle management, a ZERO pointer is
specified as the callback function for DMStartVarUpdate. The Data Manager then performs
the updating the tags in the required cycle, but leaves the responsibility for the timing of the
readout from the process image to the application.
Since update requests for a tag can be present from several applications in different cycles,
the Data Manager always updates its process image based on the shortest requested cycle.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_PARAM Invalid parameter
DM_E_OOM Out of memory

Required files
dmclient.h
dmclient.lib
dmclient.dll

WinCC Professional V13 SP2 – Programming reference


336 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Related functions

DMGetValueWait (Page 348) Get tag values with update


DMSetValue (Page 379) Change tag values

Examples
Read tag (Page 506)"DM02.cpp"
OnTestVariablenGetvalue (Page 490)"TESTCDoc.cpp"

See also
DM_VARKEY (Page 239)
DM_VAR_UPDATE_STRUCT (Page 226)
DMGetValueWait (Page 348)
DMSetValue (Page 379)
Read tag (Page 506)
OnTestVariablenGetvalue (Page 490)

2.2.6.11 DMGetValueEx (RT Professional)

Use
Reads the value of one or more tags from the process image of the Data Manager. The value
that is read is that given at the time of the most recent update.
In contrast to DMGetValue, the quality code is also returned in the
DM_VAR_UPDATE_STRUCTEX structure.

Declaration

BOOL DMGetValueEx (
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
LPDM_VAR_UPDATE_STRUCTEX lpdmvus,
LPCMN_ERROR lpdmError);

Parameters

lpdmVarKey
Pointer to the DM_VARKEY (Page 239) structure that identifies the tag values to be read.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 337
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

dwItems
Number of passed structures (corresponds to the number of tag values to be read).

lpdmvus
Pointer to the first DM_VAR_UPDATE_STRUCTEX (Page 228) structure that contains the tag
values once the function returns.

lpdmError
Pointer to the first of dwItems error structure with the CMN_ERROR type. When an error occurs
during the writing of a tag, the system writes the error information into the appropriate structure.
Therefore, remember to reserve space for these structures.

Return value

TRUE
Values determined.

FALSE
Error.

Comment
To provide an application the possibility of separate cycle management, a NULL pointer can
be specified as the callback function for DMStartVarUpdate. The Data Manager then performs
the updating the tags in the required cycle, but leaves the responsibility for the timing of the
readout from the process image to the application.
Since update requests for a tag can be present from several applications in different cycles,
the Data Manager always updates its process image based on the shortest requested cycle.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_PARAM Invalid parameter
DM_E_OOM Out of memory

Required files
dmclient.h
dmclient.lib
dmclient.dll

WinCC Professional V13 SP2 – Programming reference


338 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Related functions

DMGetValueWait (Page 348) Get tag values with update


DMSetValue (Page 379) Change tag values

See also
DM_NOTIFY_VARIABLEEX_PROC (Page 461)
DM_VAR_UPDATE_STRUCTEX (Page 228)
DM_VARKEY (Page 239)
DMGetValueWait (Page 348)
DMSetValue (Page 379)
DMGetValueWaitEx (Page 350)

2.2.6.12 DMGetValueExStr (RT Professional)

Declaration
BOOL DMGetValueExStr (
DWORD dwFlags,
LPVARIANT lpdmVarKey,
LPDM_VAR_UPDATE_STRUCT_EXSTR lpdmvus,
DWORD dwdmvusCount,
LPCMN_ERROR lpdmError);

Description
Reads the value of one or more tags from the process image of the data manager. The function
reads out the value existing at the moment of the latest update.
In contrast to DMGetValueEx, the DM_VARKEY structure is no longer used; as a result no
length constraint applies with tag names.

Parameters

dmFlags
If the tag name needs to be returned in the VT_LPSTR format in the VARIANT of the
DM_VAR_UPDATE_STRUCT_EXSTR structure of
DM_NOTIFY_VARIABLE_PROC_EXSTR, the
DM_FLAG_RETURN_PROPVARIANT_VT_LPSTR flag can be specified here.

lpvdmVarKey
Pointer to a VARIANT for the tag list. You must create the list as VT_ARRAY | VT_VARIANT,
as various data types such as VT_I4, VT_BSTR and, in some cases, also VT_LPSTR can be
present. This applies also to a single key.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 339
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

lpdmvus
Pointer to the first of the DM_VAR_UPDATE_STRUCT_EXSTR structures which contains the
values of the tags after the return of the function.

dwdmvusCount
Number of DM_VAR_UPDATE_STRUCT_EXSTR structures passed (identical with the
number of tag values to be read). The number must conform with the size of the variant array
in lpvdmVarKey.

lpdmError
Pointer to the first "dwdmvusCount" error structure of the CMN_ERROR type. If a tag writing
error occurs, the system writes the error information into the corresponding structure.
Therefore, you should not forget to reserve space for these structures.

Return value

TRUE
Values have been determined

FALSE
Error

Comments
In order to e.g. enable an application to manage its own cycle administration, a NULL pointer
can be specified for DMStartVarUpdate as a callback function. Then, the data manager
updates the tags according to the required cycle. However, the application remains responsible
for the timing of the readout obtained from the process image.
As update requests for a tag can be made by multiple applications operating with different
cycles, the data manager always updates its process image based on the shortest cycle time.

Error messages

DM_E_NOT_CONNECTED No connection to data manager


DM_E_PARAM Invalid parameter
DM_E_OOM Out of memory

These errors are only returned in the first error structure.

Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll

WinCC Professional V13 SP2 – Programming reference


340 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Related functions

DMGetValueWaitExStr Retrieve tag values with update


DMSetValueExStr Change tag values

Samples
Script sample "Button DMGetValueExStr/DMSetValueExStr|DMGetValueWaitExStr/
DMSetValueWaitExStr":
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
#pragma code ("kernel32.dll")
#define CP_ACP 0
int MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR
lpMultiByteStr, int cbMultiByte, LPWSTR lpWideCharStr, int
cchWideChar);
int WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR
lpWideCharStr, int cchWideChar, LPSTR lpMultiByteStr, int
cbMultiByte, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar);
#pragma code()

#pragma code ("OleAut32.dll")


//#include "OleAuto.h"
SAFEARRAY * SafeArrayCreateVector(VARTYPE vt, long lLbound, unsigned
int cElements );
HRESULT SafeArrayPtrOfIndex(SAFEARRAY FAR* psa, long FAR* rgIndices,
void HUGEP* FAR* ppvData );
HRESULT SafeArrayLock(SAFEARRAY FAR* psa);
HRESULT SafeArrayUnlock(SAFEARRAY FAR* psa);
HRESULT VariantChangeType( VARIANTARG FAR* pvargDest, VARIANTARG
FAR* pvarSrc, unsigned short wFlags, VARTYPE vt);
typedef WCHAR OLECHAR;
BSTR SysAllocString(OLECHAR FAR* sz);
HRESULT SysFreeString(BSTR bstr);
#pragma code()

extern BOOL DM_NotifyVariableProcExStr_GetValueWait(DWORD dwTAID,


LPDM_VAR_UPDATE_STRUCT_EXSTR lpdmvus, DWORD dwItems, LPVOID lpvUser);
extern BOOL DM_CompletitionProc(DWORD dwTAID, LPDWORD lpdmVarState,
DWORD dwItems, LPVOID lpvUser);

VARIANT vVarKey;
VARIANT* pvElem;
VARIANT vdmValue;
SAFEARRAY* parrayKeys;
SAFEARRAY* parrayValues;
DWORD dwVal[4];
DWORD dwState[4];
DWORD dwMerk;

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 341
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

CMN_ERROR err;
CMN_ERROR errArray[4];
DM_VAR_UPDATE_STRUCT_EXSTR dmvus[4];
HRESULT hr;
long lInx;
BOOL bRet;
DWORD dwFlags;
DWORD* pdwVarState;
DWORD dwTAID;

memset(&err, 0, sizeof(err));
memset(dmvus, 0, sizeof(dmvus));
dwVal[0] = 1;
dwVal[1] = 2;
dwVal[2] = 3;
dwVal[3] = 4;
dwMerk = 0L;
memset(dwState, 0, sizeof(dwState));
pvElem = NULL;
parrayKeys = NULL;
parrayValues = NULL;
hr = 0L; //S_OK
lInx = 0L;
bRet = FALSE;
dwFlags = DM_FLAG_RETURN_PROPVARIANT_VT_LPSTR;
pdwVarState = dwState;
dwTAID = 0L;

printf("\r\n\r\n########## enter Test with DMGetValue(Wait)ExStr/


DMSetValue(Wait)ExStr ##########");

VariantInit(&vVarKey);
parrayKeys = SafeArrayCreateVector(VT_VARIANT, 0L, 4);
vVarKey.vt = VT_ARRAY | VT_VARIANT;
vVarKey.u.parray = parrayKeys;

SafeArrayLock(parrayKeys);
lInx = 0L;
hr = SafeArrayPtrOfIndex(parrayKeys, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = "dwVal_1";
lInx = 1L;
hr = SafeArrayPtrOfIndex(parrayKeys, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = "dwVal_2";
lInx = 2L;
hr = SafeArrayPtrOfIndex(parrayKeys, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = "dwVal_3";
lInx = 3L;
hr = SafeArrayPtrOfIndex(parrayKeys, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;

WinCC Professional V13 SP2 – Programming reference


342 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

pvElem->u.pbVal = "dwVal_4";
SafeArrayUnlock(parrayKeys);

printf("\r\ncall DMGetValueExStr:");
bRet = DMGetValueExStr(dwFlags, &vVarKey, dmvus, 4L, &err);

if (bRet == FALSE)
{
printf("\r\n error DMGetValueExStr, err=%ld,%ld,%ld,%ld,%ld,
[%s]",
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
}
else
{
int i = 0;
for (i = 0; i < 4; i++)
{
hr = VariantChangeType((VARIANTARG*)&(dmvus[i].vdmValue),
(VARIANTARG*)&(dmvus[i].vdmValue), 0, VT_I4);
if (hr)
{
printf("\r\n error VariantChangeType[%d] hr=%08lx",
i, hr);
}
else
{
if (dmvus[i].vdmValue.vt == VT_I4)
{
dwVal[i] = dmvus[i].vdmValue.u.lVal;
printf("\r\n Var[%d]:[%s] = %ld",
i, dmvus[i].vdmVarKey.u.pbVal,
dmvus[i].vdmValue.u.lVal);
}
else
{
printf("\r\n wrong datatype %ld, VT_I4 expected after
VariantChange",
dmvus[i].vdmValue.vt == VT_I4);
}
}
}

//clear the internal alloced Data, that no memoryleaks


//the vdmValues no need to clear here, while no PROPVARIANT here
given (double used)
//only the dmVarkey of dmvus have to free here
for (i = 0; i < 4; i++)
{
free(dmvus[i].vdmVarKey.u.pbVal);
dmvus[i].vdmVarKey.u.pbVal = NULL;
dmvus[i].vdmVarKey.vt = VT_EMPTY;

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 343
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

}
}

// change the values before set again


dwMerk = dwVal[0];
dwVal[0] = dwVal[3];
dwVal[3] = dwMerk;
dwMerk = dwVal[1];
dwVal[1] = dwVal[2];
dwVal[2] = dwMerk;

VariantInit(&vdmValue);
parrayValues = SafeArrayCreateVector(VT_VARIANT, 0L, 4);
vdmValue.vt = VT_ARRAY | VT_VARIANT;
vdmValue.u.parray = parrayValues;

SafeArrayLock(parrayValues);
lInx = 0L;
hr = SafeArrayPtrOfIndex(parrayValues, &lInx, &pvElem);
pvElem->vt = VT_I4;
pvElem->u.pbVal = dwVal[0];
lInx = 1L;
hr = SafeArrayPtrOfIndex(parrayValues, &lInx, &pvElem);
pvElem->vt = VT_I4;
pvElem->u.pbVal = dwVal[1];
lInx = 2L;
hr = SafeArrayPtrOfIndex(parrayValues, &lInx, &pvElem);
pvElem->vt = VT_I4;
pvElem->u.pbVal = dwVal[2];
lInx = 3L;
hr = SafeArrayPtrOfIndex(parrayValues, &lInx, &pvElem);
pvElem->vt = VT_I4;
pvElem->u.pbVal = dwVal[3];
SafeArrayUnlock(parrayValues);

printf("\r\ncall DMSetValueExStr:");
memset(&err, 0, sizeof(err));
bRet = DMSetValueExStr(&vVarKey, &vdmValue, pdwVarState, &err);

if (bRet == FALSE)
{
printf("\r\n error DMSetValueExStr, err=%ld,%ld,%ld,%ld,%ld,
[%s]",
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
}
else
{
int i = 0;
for (i = 0; i < 4; i++)
{
printf("\r\n dwVarState[%d] = %ld", i, dwState[i]);

WinCC Professional V13 SP2 – Programming reference


344 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

}
}

// clear the values before read back again with DMGetValueWait


(timeout 2sec.)
dwVal[0] = 0;
dwVal[1] = 0;
dwVal[2] = 0;
dwVal[3] = 0;

printf("\r\ncall DMGetValueWaitExStr:");
memset(&err, 0, sizeof(err));
bRet = DMGetValueWaitExStr(&dwTAID, dwFlags, &vVarKey, TRUE, 2000,
DM_NotifyVariableProcExStr_GetValueWait, dwVal, &err);
if (bRet == FALSE)
{
printf("\r\n error DMGetValueWaitExStr, err=%ld,%ld,%ld,%ld,%ld,
[%s]",
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
}
else
{
int i = 0;
for (i = 0; i < 4; i++)
{
printf("\r\n dwValue[%d] = %ld", i, dwVal[i]);
}
}

//increment values for identify execute of following DMSetValueWait


dwVal[0] = dwVal[0] + 1;
if (dwVal[0] >= 100)
{
dwVal[0] = dwVal[0] - 100;
}
dwVal[1] = dwVal[1] + 1;
if (dwVal[1] >= 100)
{
dwVal[1] = dwVal[1] - 100;
}
dwVal[2] = dwVal[2] + 1;
if (dwVal[2] >= 100)
{
dwVal[2] = dwVal[2] - 100;
}
dwVal[3] = dwVal[3] + 1;
if (dwVal[3] >= 100)
{
dwVal[3] = dwVal[3] - 100;
}
VariantClear(&vdmValue);

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 345
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

parrayValues = SafeArrayCreateVector(VT_VARIANT, 0L, 4);


vdmValue.vt = VT_ARRAY | VT_VARIANT;
vdmValue.u.parray = parrayValues;
SafeArrayLock(parrayValues);
lInx = 0L;
hr = SafeArrayPtrOfIndex(parrayValues, &lInx, &pvElem);
pvElem->vt = VT_I4;
pvElem->u.pbVal = dwVal[0];
lInx = 1L;
hr = SafeArrayPtrOfIndex(parrayValues, &lInx, &pvElem);
pvElem->vt = VT_I4;
pvElem->u.pbVal = dwVal[1];
lInx = 2L;
hr = SafeArrayPtrOfIndex(parrayValues, &lInx, &pvElem);
pvElem->vt = VT_I4;
pvElem->u.pbVal = dwVal[2];
lInx = 3L;
hr = SafeArrayPtrOfIndex(parrayValues, &lInx, &pvElem);
pvElem->vt = VT_I4;
pvElem->u.pbVal = dwVal[3];
SafeArrayUnlock(parrayValues);

printf("\r\ncall DMSetValueWaitExStr:");
memset(errArray, 0, sizeof(errArray));
bRet = DMSetValueWaitExStr(&dwTAID, &vVarKey, 4, &vdmValue,
pdwVarState, 2000, DM_CompletitionProc, NULL, errArray);
if (bRet == FALSE)
{
int i = 0;
for(i=0; i < 4; i++)
{
printf("\r\n error DMSetValueWaitExStr, errArray[%d]=%ld,
%ld,%ld,%ld,%ld,[%s]",
i, errArray[i].dwError1, errArray[i].dwError2,
errArray[i].dwError3,
errArray[i].dwError4, errArray[i].dwError5,
errArray[i].szErrorText);
}
}
else
{
}

printf("\r\n########## exit Test with DMGetValue(Wait)ExStr/


DMSetValue(Wait)ExStr ##########\r\n");

Script example "Projekt-Funktion DM_NotifyVariableProcExStr_GetValueWait":


#pragma code ("OleAut32.dll")
//#include "OleAuto.h"

WinCC Professional V13 SP2 – Programming reference


346 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

HRESULT VariantChangeType( VARIANTARG FAR* pvargDest, VARIANTARG


FAR* pvarSrc, unsigned short wFlags, VARTYPE vt);
#pragma code()

BOOL DM_NotifyVariableProcExStr_GetValueWait(DWORD dwTAID,


LPDM_VAR_UPDATE_STRUCT_EXSTR lpdmvus, DWORD dwItems, LPVOID lpvUser)
{
BOOL bRet = FALSE;
int i = 0;
DWORD* pdwVal = NULL;

pdwVal = (DWORD*)lpvUser;
// the DMGetValueWait used PROPVARIANT and the lpvUser is ptr to
OutDataArray (DWORDS)
printf("\r\n*** DM_NotifyVariableProcExStr_GetValueWait entry ***");

for (i = 0; i < dwItems; i++)


{
VariantChangeType((VARIANTARG*)&(lpdmvus[i].vdmValue),
(VARIANTARG*)&(lpdmvus[i].vdmValue), 0, VT_I4);
if (0 == strcmp((LPCSTR)lpdmvus[i].vdmVarKey.u.pbVal, "dwVal_1"))
{
pdwVal[0] = lpdmvus[i].vdmValue.u.lVal;
printf("\r\n set dwVal_1=%ld to dwVal[0]", pdwVal[0]);
bRet = TRUE;
}
if (0 == strcmp((LPCSTR)lpdmvus[i].vdmVarKey.u.pbVal, "dwVal_2"))
{
pdwVal[1] = lpdmvus[i].vdmValue.u.lVal;
printf("\r\n set dwVal_2=%ld to dwVal[1]", pdwVal[1]);
bRet = TRUE;
}
if (0 == strcmp((LPCSTR)lpdmvus[i].vdmVarKey.u.pbVal, "dwVal_3"))
{
pdwVal[2] = lpdmvus[i].vdmValue.u.lVal;
printf("\r\n set dwVal_3=%ld to dwVal[2]", pdwVal[2]);
bRet = TRUE;
}
if (0 == strcmp((LPCSTR)lpdmvus[i].vdmVarKey.u.pbVal, "dwVal_4"))
{
pdwVal[3] = lpdmvus[i].vdmValue.u.lVal;
printf("\r\n set dwVal_4=%ld to dwVal[3]", pdwVal[3]);
bRet = TRUE;
}
}

printf("\r\n*** DM_NotifyVariableProcExStr_GetValueWait exit ***");


return bRet;
}

Project-Function DM_CompletitionProc:

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 347
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

BOOL DM_CompletitionProc(DWORD dwTAID, LPDWORD lpdmVarState, DWORD


dwItems, LPVOID lpvUser)
{
BOOL bRet = FALSE;
int i = 0;

printf("\r\n*** DM_CompletitionProc entry ***");

for (i = 0; i < dwItems; i++)


{
printf("\r\n VarState[%d] = %ld", i, lpdmVarState[i]);
}

printf("\r\n*** DM_CompletitionProc exit ***");

return bRet;
}

2.2.6.13 DMGetValueWait (RT Professional)

Use
Reads the value of one or more tags from the process image of the Data Manager. The value
that is read is that given at the time of the most recent update.
In contrast to DMGetValue, this function forces a value-based update of the tag values.
The more advanced DMGetValueWaitEx function, additionally returns the quality code in the
DM_NOTIFY_VARIABLEEX_PROC callback in the DM_VAR_UPDATE_STRUCTEX
structure.

Declaration

BOOL DMGetValueWait (
LPDWORD pdwTAID,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
BOOL fWaitForCompletition,
DWORD dwTimeOut,
DM_NOTIFY_VARIABLE_PROC lpfnVariable,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Parameters

pdwTAID
Pointer to a tag that contains the transaction ID assigned by the Data Manager after a
successful call of the function.

WinCC Professional V13 SP2 – Programming reference


348 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

lpdmVarKey
Pointer to the DM_VARKEY (Page 239) structure that identifies the tag values to be read.

dwItems
Number of passed structures (corresponds to the number of tag values to be read).

fWaitForCompletition
If the fWaitForCompletition flag is set, the passed callback function is called only called when
either all the requested tags are updated or the specified timeout period is exceeded.
If fWaitForCompletition is not set, the passed callback function is called immediately. The time
characteristics correspond to the function DMGetValue.

dwTimeout
Maximum waiting time of the application in ms. If, after expiration of the waiting period, not all
tags are updated, the callback function is called with appropriate error code.
If the fWaitForCompletition == FALSE flag is set, the passed value is not evaluated.

lpfnVariable
Pointer to your DM_NOTIFY_VARIABLE_PROC callback function, which is called either after
the update of all requested tags or after the waiting period.
If fWaitForCompletition == FALSE, the callback function is called immediately with the values
currently set in the process image of the Data Manager.
When a program reports a notify routine, it must empty its message queue at regular intervals.
Messages that are not fetched can block WinCC notifications and thus block the entire WinCC.
In rare cases, the notification may already be delivered before the function call returns.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Values determined.

FALSE
Error.

Required files
dmclient.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 349
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

dmclient.lib
dmclient.dll

Related functions

DM_NOTIFY_VARIABLE_PROC (Page 450) Get tag values with update (callback)


DMGetValue (Page 335) Get tag values
DMGetValueWaitEx (Page 350) Get tag values with update
AUTOHOTSPOT Change tag values with notification

Examples
OnTestVariablenGetvaluewait (Page 493)"TESTCDoc.cpp"

See also
DM_NOTIFY_VARIABLE_PROC (Page 450)
DM_VARKEY (Page 239)
DMGetValue (Page 335)
DMGetValueEx (Page 337)
DMSetValueWait (Page 388)
OnTestVariablenGetvaluewait (Page 493)
DMGetValueWaitEx (Page 350)

2.2.6.14 DMGetValueWaitEx (RT Professional)

Use
Reads the value of one or more tags from the process image of the Data Manager. The value
that is read is that given at the time of the most recent update.
In contrast to DMGetValueEx, this function forces a value-based update of the tag values.

WinCC Professional V13 SP2 – Programming reference


350 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL DMGetValueWaitEx (
LPDWORD pdwTAID,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
BOOL fWaitForCompletition,
DWORD dwTimeOut,
DM_NOTIFY_VARIABLEEX_PROC lpfnVariable,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Parameters

pdwTAID
Pointer to a tag that contains the transaction ID assigned by the Data Manager after a
successful call of the function.

lpdmVarKey
Pointer to the DM_VARKEY (Page 239) structure that identifies the tag values to be read.

dwItems
Number of passed structures (corresponds to the number of tag values to be read).

fWaitForCompletition
If the fWaitForCompletition flag is set, the passed callback function is called only called when
either all the requested tags are updated or the specified timeout period is exceeded.
If fWaitForCompletition is not set, the passed callback function is called immediately. The time
characteristics correspond to the function DMGetValue.

dwTimeout
Maximum waiting time of the application in ms. If, after expiration of the waiting period, not all
tags are updated, the callback function is called with appropriate error code.
If the fWaitForCompletition == FALSE flag is set, the passed value is not evaluated.

lpfnVariable
Pointer to your DM_NOTIFY_VARIABLEEX_PROC callback function, which is called either
after the update of all requested tags or after the waiting period.
If fWaitForCompletition == FALSE, the callback function is called immediately with the values
currently set in the process image of the Data Manager.
When a program reports a notify routine, it must empty its message queue at regular intervals.
Messages that are not fetched can block WinCC notifications and thus block the entire WinCC.
In rare cases, the notification may already be delivered before the function call returns.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 351
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Values determined.

FALSE
Error.

Related functions

DM_NOTIFY_VARIABLEEX_PROC (Page 461) Get tag values with notification (callback)


DMGetValueEx (Page 337) Get tag values
DMSetValueWait (Page 388) Change tag values with notification

See also
DM_NOTIFY_VARIABLEEX_PROC (Page 461)
DMGetValueWait (Page 348)
DM_VARKEY (Page 239)
DMGetValueEx (Page 337)
DMSetValueWait (Page 388)

2.2.6.15 DMGetValueWaitExStr (RT Professional)

Declaration
BOOL DMGetValueWaitExStr (
LPDWORD pdwTAID,
DWORD dwFlags
LPVARIANT lpvdmVarKey,
LPVARIANT lpvCookie,
BOOL fWaitForCompletition,
DWORD dwTimeOut,
DM_NOTIFY_VARIABLE_PROC_EXSTR lpfnVariable,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

WinCC Professional V13 SP2 – Programming reference


352 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Description
Reads the value of one or more tags from the process image of the data manager. The function
reads out the value existing at the moment of the latest update.
In contrast to DMGetValueExStr, this function can be used to enforce a value-based update
of the tag values.
In contrast to DMGetValueEx, the DM_VARKEY structure is no longer used; as a result no
length constraint applies with tag names.

Parameters

pdwTAID
Pointer to a tag containing the transaction ID allocated by the data manager after the function
has been called successfully.

dwFlags
If the tag name needs to be returned in the VT_LPSTR format in the VARIANT of the
DM_VAR_UPDATE_STRUCT_EXSTR structure of
DM_NOTIFY_VARIABLE_PROC_EXSTR, the
DM_FLAG_RETURN_PROPVARIANT_VT_LPSTR flag can be specified here.

lpvdmVarKey
Pointer to a VARIANT for the tag list. You must create the list as VT_ARRAY | VT_VARIANT,
as various data types such as VT_I4, VT_BSTR and, in some cases, also VT_LPSTR can be
present.

lpvCookie
Pointer to a VARIANT for an additional list of user-dependent data for each tag.
This is intended as substitute for lpvUserData of the previous DM_VARKEY and is also
returned in the DM_VAR_UPDATE_STRUCT_EXSTR structure for each tag.

fWaitForCompletition
If the fWaitForCompletion flag has been set, the callback function passed is not called before
all tags requested have been updated or the timeout time specified has been exceeded.
If the fWaitForCompletition flag has not been set, the callback function is called immediately.
The timing is identical with that of the DMGetValueExStr function.

dwTimeout
Maximum waiting time of the application in ms. If not all tag values have been updated when
the waiting time expires, the callback function with corresponding error codes is called.
If the fWaitForCompletition flag = FALSE, the value passed is not evaluated.

lpfnVariable
Pointer to your DM_NOTIFY_VARIABLEEX_PROC_EXSTR callback function which is called
either after all requested tags have been updated or after the waiting time has expired.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 353
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

If fWaitForCompletition = FALSE, the callback function is called immediately with the values
currently stored in the process image of the data manager.
If a program requests a notify routine, it has to clear its message queue at regular intervals.
Unread messages could block WinCC notifications or finally block WinCC altogether.
On rare occasions, the notify may be returned before the function call has returned.

lpvUser
Pointer to application-specific data. The function does not evaluate this pointer, but makes it
available again within the callback function.

lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. In the
event of an error, the system writes error information to this structure.

Return value

TRUE
Values have been determined

FALSE
Error

Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll

Related functions

DMGetValueExStr Retrieve tag values


DMSetValueWaitExStr Change tag values with notify message

Samples
You can find samples on the DMGetValueExStr page.

2.2.6.16 DMGetVarInfo (RT Professional)

Use
DMGetVarInfo determines the full tag key of a tag. This command can be used to obtain a tag
name associated with a tag ID and vice versa.

WinCC Professional V13 SP2 – Programming reference


354 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL DMGetVarInfo (
LPCSTR lpszProjectFile,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
LPCMN_ERROR lpdmError);

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.

lpdmVarKey
Pointer to the DM_VARKEY (Page 239) structure to be completed with the tag keys.

dwItems
Number of completed structures.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Get tag key.

FALSE
Error.

Comment
Do not use the call alternating with calls for creating tags. If DMGetVarInfo is used after creating
a tag the first time, search lists are resorted, which costs an additional execution time.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager

Required files
dmclient.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 355
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

dmclient.lib
dmclient.dll

Examples
OnTestVariablenGetVarInfo (Page 497)"TESTCDoc.cpp"

See also
DM_VARKEY (Page 239)
OnTestVariablenGetVarInfo (Page 497)

2.2.6.17 DMGetVarInfoExStr (RT Professional)

Declaration
BOOL DMGetVarInfoExStr (
LPCTSTR lpszProjectFile,
DWORD dwFlags,
LPVARIANT lpvdmVarKeyIn,
LPVARIANT lpvdmVarKeyOut,
LPCMN_ERROR lpdmError);

Description
Determines the complete tag key of a tag. This command enables you to obtain the tag name
to a tag ID and vice versa.
In contrast to DMGetVarInfo, the tag list is passed on as pointer to VARIANT with VT_ARRAY
| VT_VARIANT. It is returned in a second VARIANT. As a result, no length limit applies to tag
names.

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be retrieved with DMEnumOpenedProjects, or with
DMGetRuntimeProject in Runtime.

dwFlags
If the tag name needs to be returned in the VT_LPSTR format in the VARIANT
lpvdmVarKeyOut, DM_FLAG_RETURN_PROPVARIANT_VT_LPSTR can be specified here.

lpvdmVarKeyIn
Pointer to VARIANT with VT_ARRAY | VT_VARIANT to pass the tag list or single VARIANT
when only one tag is specified.

WinCC Professional V13 SP2 – Programming reference


356 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

A TagID is entered in the relevant list element with the type VT_I4 and the tag name with
VT_BSTR. In addition, VT_LPSTR (PROPVARIANT) can be entered for passing on as
allocated ASCII string in order, for example, to pass on constant names from the script.
VT_LPSTR is then converted internally into the required VT_BSTR type.

lpvdmVarKeyOut
Pointer to VARIANT used to return the corresponding values for lpvdmVarKeyIn.
Then, the tag ID for a given tag name in lpvdmVarKeyIn is returned or vice versa.
If the VARIANT is initialized with VT_EMPTY, a corresponding array is created and filled with
VT_ARRAY | VT_VARIANT of the same size as in lpvdmVarKeyIn.
If the VARIANT is not empty, a VariantClear is called first before a new one is created. A
VARIANT which is not initialized can result in an exception.
If the tag does not exist or cannot be accessed, the type of the corresponding entry remains
VT_EMPTY.

lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. In the
event of an error, the system writes error information to this structure.

Return value

TRUE
Tag keys have been determined

FALSE
Error

Comments
This call should not be used alternately with calls for creating tags. Whenever the
DMGetVarInfo or DMGetVarInfoExStr function is used for the first time after creating a tag
search lists must be sorted again. This requires additional runtime.

Error messages

DM_E_NOT_CONNECTED No connection to data manager

Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 357
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Samples
Script sample Button DMGetVarInfoExStr:
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
#pragma code ("kernel32.dll")
#define CP_ACP 0
int MultiByteToWideChar(UINT CodePage,
DWORD dwFlags,
LPCSTR lpMultiByteStr,
int cbMultiByte,
LPWSTR lpWideCharStr,
int cchWideChar);
int WideCharToMultiByte(UINT CodePage,
DWORD dwFlags,
LPCWSTR lpWideCharStr,
int cchWideChar,
LPSTR lpMultiByteStr,
int cbMultiByte,
LPCSTR lpDefaultChar,
LPBOOL lpUsedDefaultChar);
#pragma code()

#pragma code ("OleAut32.dll")


//#include "OleAuto.h"
SAFEARRAY * SafeArrayCreateVector(VARTYPE vt, long lLbound, unsigned
int cElements );
HRESULT SafeArrayPutElement(SAFEARRAY FAR* psa, long FAR* rgIndices,
void FAR* pv );
HRESULT SafeArrayGetElement(SAFEARRAY FAR* psa, long FAR* rgIndices,
void FAR* pv );
HRESULT SafeArrayPtrOfIndex(SAFEARRAY FAR* psa, long FAR* rgIndices,
void HUGEP* FAR* ppvData );
HRESULT SafeArrayLock(SAFEARRAY FAR* psa);
HRESULT SafeArrayUnlock(SAFEARRAY FAR* psa);
typedef WCHAR OLECHAR;
BSTR SysAllocString(OLECHAR FAR* sz);
HRESULT SysFreeString(BSTR bstr);
#pragma code()
VARIANT vVarkeyIn;
VARIANT vVarkeyOut;
VARIANT vElem;
VARIANT* pvElem;
HRESULT hr;
CHAR szProjectName[256];
CMN_ERROR err;
DWORD dwFlags;
BOOL bRet;
DWORD dwVarID1, dwVarID2, dwVarID3, dwVarID4;
CHAR szVarNam1[256], szVarNam2[256], szVarNam3[256], szVarNam4[265];
SAFEARRAY* parrayIN;

WinCC Professional V13 SP2 – Programming reference


358 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

SAFEARRAY* parrayOUT;
long lInx;
WCHAR wszBuffer[256];
int nRet;
memset(&err, 0, sizeof(err));
bRet = FALSE;
szProjectName[0] = 0;
dwFlags = 0;
VariantInit(&vVarkeyIn);
VariantInit(&vVarkeyOut);
VariantInit(&vElem);
parrayIN = NULL;
parrayOUT = NULL;
//hr = E_FAIL;
nRet = 0;
printf("\r\n\r\n########## enter Test with DMGetVarInfoExStr
##########");

bRet = DMGetRuntimeProject(szProjectName, 256, &err);


if (!bRet)
{
printf("\r\n error DMGetRuntimeProject =>[%s], err=%ld,%ld,%ld,
%ld,%ld,[%s]", szProjectName,
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
}
dwVarID1 = GetTagDWord("dwVarKeyID_1");
dwVarID2 = GetTagDWord("dwVarKeyID_2");
dwVarID3 = GetTagDWord("dwVarKeyID_3");
dwVarID4 = GetTagDWord("dwVarKeyID_4");
strncpy(szVarNam1, GetTagChar("szVarKeyName_1"), 256);
strncpy(szVarNam2, GetTagChar("szVarKeyName_2"), 256);
strncpy(szVarNam3, GetTagChar("szVarKeyName_3"), 256);
strncpy(szVarNam4, GetTagChar("szVarKeyName_4"), 256);
printf("\r\n set vVarkeyIn:");
printf("\r\n dwVarID1=%ld, szVarNam1=[%s] (use name as VT_BSTR)",
dwVarID1, szVarNam1);
printf("\r\n dwVarID2=%ld, szVarNam2=[%s] (use name as VT_LPSTR)",
dwVarID2, szVarNam2);
printf("\r\n dwVarID3=%ld, szVarNam3=[%s] (use ID)", dwVarID3,
szVarNam3);
printf("\r\n dwVarID4=%ld, szVarNam4=[%s] (useID)", dwVarID4,
szVarNam4);
//preseting input Variant: name1, name2, id3, id4
// will deliver on output Variant: id1, id2, name3, name4
parrayIN = SafeArrayCreateVector(VT_VARIANT, 0L, 4);
vVarkeyIn.vt = (VT_ARRAY | VT_VARIANT);
vVarkeyIn.u.parray = parrayIN;
// name1 as VT_BSTR
vElem.vt = VT_BSTR;
nRet = MultiByteToWideChar(CP_ACP, 0, szVarNam1, -1, wszBuffer,
256);

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 359
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

vElem.u.bstrVal = SysAllocString(wszBuffer);
lInx = 0;
hr = SafeArrayPutElement(parrayIN, &lInx, &vElem);
VariantClear(&vElem);
// name2 als VT_LPSTR
SafeArrayLock(parrayIN);
lInx = 1;
hr = SafeArrayPtrOfIndex(parrayIN, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = szVarNam2;
SafeArrayUnlock(parrayIN);
if (hr)
{
printf("\r\nerror SafeArrayPutElement: hr = %08lx", hr);
}
VariantClear(&vElem);
vElem.vt = VT_I4;
vElem.u.lVal = dwVarID3;
lInx = 2;
hr = SafeArrayPutElement(parrayIN, &lInx, &vElem);
vElem.vt = VT_I4;
vElem.u.lVal = dwVarID4;
lInx = 3;
hr = SafeArrayPutElement(parrayIN, &lInx, &vElem);

memset(&err, 0, sizeof(err));
bRet = DMGetVarInfoExStr(szProjectName, dwFlags, &vVarkeyIn,
&vVarkeyOut, &err);
if (!bRet)
{
printf("\r\n error DMGetVarInfoExStr[%s], err=%ld,%ld,%ld,%ld,
%ld,[%s]", szProjectName,
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
if (err.dwError1 == DM_E_DONT_EXIST)
{
//reset error, elements will be checked each for error in
type (VT_EMPTY == not exist)
bRet = TRUE;
}
}
else
{
printf("\r\n DMGetVarInfoExStr return OK");
}
if (bRet)
{
if (vVarkeyOut.vt == VT_EMPTY)
{
printf("\r\n vVarkeyOut is VT_EMPTY");
}
else

WinCC Professional V13 SP2 – Programming reference


360 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

{
parrayOUT = vVarkeyOut.u.parray;
lInx = 0;
SafeArrayGetElement(parrayOUT, &lInx, &vElem);
if (vElem.vt != VT_I4)
{
printf("\r\n vVarKeyOut[%ld].vt = [%ld] != VT_I4", lInx,
vElem.vt);
dwVarID1 = 0L;
}
else
{
dwVarID1 = vElem.u.lVal;
}
SetTagDWord("dwVarKeyID_1",dwVarID1);
lInx = 1;
SafeArrayGetElement(parrayOUT, &lInx, &vElem);
if (vElem.vt != VT_I4)
{
printf("\r\n vVarKeyOut[%ld].vt = [%ld] != VT_I4", lInx,
vElem.vt);
dwVarID2 = 0L;
}
else
{
dwVarID2 = vElem.u.lVal;
}
SetTagDWord("dwVarKeyID_2",dwVarID2);
lInx = 2;
SafeArrayGetElement(parrayOUT, &lInx, &vElem);
if (vElem.vt != VT_BSTR)
{
printf("\r\n vVarKeyOut[%ld].vt = [%ld] != VT_BSTR",
lInx, vElem.vt);
strcpy(szVarNam3, "error!!!");
}
else
{
nRet = WideCharToMultiByte(CP_ACP, 0L,
(WCHAR*)vElem.u.bstrVal, -1,
szVarNam3, 256, NULL, NULL);
}
SetTagChar("szVarKeyName_3",szVarNam3);
lInx = 3;
SafeArrayGetElement(parrayOUT, &lInx, &vElem);
if (vElem.vt != VT_BSTR)
{
printf("\r\n vVarKeyOut[%ld].vt = [%ld] != VT_BSTR",
lInx, vElem.vt);
strcpy(szVarNam4, "error!!!");
}
else

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 361
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

{
nRet = WideCharToMultiByte(CP_ACP, 0L,
(WCHAR*)vElem.u.bstrVal, -1,
szVarNam4, 256, NULL, NULL);
}
SetTagChar("szVarKeyName_4",szVarNam4);
printf("\r\n get vVarkeyOut:");
printf("\r\n dwVarID1=%ld, szVarNam1=[%s] (delivered ID)",
dwVarID1, szVarNam1);
printf("\r\n dwVarID2=%ld, szVarNam2=[%s] (delivered ID)",
dwVarID2, szVarNam2);
printf("\r\n dwVarID3=%ld, szVarNam3=[%s] (delivered name
VT_BSTR)", dwVarID3, szVarNam3);
printf("\r\n dwVarID4=%ld, szVarNam4=[%s] (delivered name
VT_BSTR)", dwVarID4, szVarNam4);
}
}
printf("\r\n set flag DM_FLAG_RETURN_PROPVARIANT_VT_LPSTR and
repeat DMGetVarInfoExStr");
dwFlags = DM_FLAG_RETURN_PROPVARIANT_VT_LPSTR;
memset(&err, 0, sizeof(err));
hr = VariantClear(&vVarkeyOut);
if (hr)
{
printf("\r\nerror VariantClear(vVarKeyOut: hr = %08lx", hr);
}
bRet = DMGetVarInfoExStr(szProjectName, dwFlags, &vVarkeyIn,
&vVarkeyOut, &err);
if (!bRet)
{
printf("\r\n error DMGetVarInfoExStr[%s], err=%ld,%ld,%ld,%ld,
%ld,[%s]", szProjectName,
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
if (err.dwError1 == DM_E_DONT_EXIST)
{
//reset error, elements will be checked each for error in
type (VT_EMPTY == not exist)
bRet = TRUE;
}
}
else
{
printf("\r\n DMGetVarInfoExStr return OK");
}
if (bRet)
{
if (vVarkeyOut.vt == VT_EMPTY)
{
printf("\r\n vVarkeyOut is VT_EMPTY");
}
else

WinCC Professional V13 SP2 – Programming reference


362 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

{
parrayOUT = vVarkeyOut.u.parray;
lInx = 0;
SafeArrayGetElement(parrayOUT, &lInx, &vElem);
if (vElem.vt != VT_I4)
{
printf("\r\n vVarKeyOut[%ld].vt = [%ld] != VT_I4", lInx,
vElem.vt);
dwVarID1 = 0L;
}
else
{
dwVarID1 = vElem.u.lVal;
}
SetTagDWord("dwVarKeyID_1",dwVarID1);
lInx = 1;
SafeArrayGetElement(parrayOUT, &lInx, &vElem);
if (vElem.vt != VT_I4)
{
printf("\r\n vVarKeyOut[%ld].vt = [%ld] != VT_I4", lInx,
vElem.vt);
dwVarID2 = 0L;
}
else
{
dwVarID2 = vElem.u.lVal;
}
SetTagDWord("dwVarKeyID_2",dwVarID2);

SafeArrayLock(parrayOUT);
lInx = 2;
SafeArrayPtrOfIndex(parrayOUT, &lInx, &pvElem);
if (pvElem->vt != VT_LPSTR)
{
printf("\r\n vVarKeyOut[%ld].vt = [%ld] != VT_LPSTR",
lInx, pvElem->vt);
strcpy(szVarNam3, "error!!!");
}
else
{
strncpy(szVarNam3, (LPSTR)pvElem->u.pbVal, 255);
szVarNam3[255] = 0;
}
SetTagChar("szVarKeyName_3",szVarNam3);
lInx = 3;
SafeArrayPtrOfIndex(parrayOUT, &lInx, &pvElem);
if (pvElem->vt != VT_LPSTR)
{
printf("\r\n vVarKeyOut[%ld].vt = [%ld] != VT_LPSTR",
lInx, pvElem->vt);
strcpy(szVarNam4, "error!!!");
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 363
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

else
{
strncpy(szVarNam4, (LPSTR)pvElem->u.pbVal, 255);
szVarNam4[255] = 0;
}
SetTagChar("szVarKeyName_4",szVarNam4);
SafeArrayUnlock(parrayOUT);

printf("\r\n get vVarkeyOut:");


printf("\r\n dwVarID1=%ld, szVarNam1=[%s] (delivered ID)",
dwVarID1, szVarNam1);
printf("\r\n dwVarID2=%ld, szVarNam2=[%s] (delivered ID)",
dwVarID2, szVarNam2);
printf("\r\n dwVarID3=%ld, szVarNam3=[%s] (delivered name
VT_LPSTR)", dwVarID3, szVarNam3);
printf("\r\n dwVarID4=%ld, szVarNam4=[%s] (delivered name
VT_LPSTR)", dwVarID4, szVarNam4);
}
}

printf("\r\n only 1 Input (ID = VT_I4 and dwVarID1) without


VT_ARRAY, set flag DM_FLAG_RETURN_PROPVARIANT_VT_LPSTR and repeat
DMGetVarInfoExStr");
dwFlags = DM_FLAG_RETURN_PROPVARIANT_VT_LPSTR;
memset(&err, 0, sizeof(err));
hr = VariantClear(&vVarkeyIn);
if (hr)
{
printf("\r\n error VariantClear(vVarKeyIn): hr = %08lx", hr);
// know that error, have to free the PROPVARIANT in Array manualy
//this can be set to VT_EMPTY direct, while no alloc of string
was used
parrayIN = vVarkeyIn.u.parray;
SafeArrayLock(parrayIN);
lInx = 1;
hr = SafeArrayPtrOfIndex(parrayIN, &lInx, &pvElem);
pvElem->vt = VT_EMPTY;
pvElem->u.pbVal = NULL;
SafeArrayUnlock(parrayIN);
hr = VariantClear(&vVarkeyIn);
if (hr)
{
printf("\r\n error VariantClear(vVarkeyIn) again after
manualy reset the PROPVARIANT in 2. elem: hr = %08lx", hr);
}
else
{
printf("\r\n VariantClear(vVarkeyIn) OK after manualy reset
the PROPVARIANT in 2. elem");
}
}
hr = VariantClear(&vVarkeyOut);

WinCC Professional V13 SP2 – Programming reference


364 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

if (hr)
{
printf("\r\n error VariantClear(vVarkeyOut): hr = %08lx", hr);
}
vVarkeyIn.vt = VT_I4;
vVarkeyIn.u.lVal = dwVarID1;
bRet = DMGetVarInfoExStr(szProjectName, dwFlags, &vVarkeyIn,
&vVarkeyOut, &err);
if (!bRet)
{
printf("\r\n error DMGetVarInfoExStr[%s], err=%ld,%ld,%ld,%ld,
%ld,[%s]", szProjectName,
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
if (err.dwError1 == DM_E_DONT_EXIST)
{
//reset error, elements will be checked each for error in
type (VT_EMPTY == not exist)
bRet = TRUE;
}
}
else
{
printf("\r\n DMGetVarInfoExStr return OK");
}
if (bRet)
{
if (vVarkeyOut.vt == VT_EMPTY)
{
printf("\r\n vVarkeyOut is VT_EMPTY");
}
else
{
if (vVarkeyOut.vt != VT_LPSTR)
{
printf("\r\n vVarKeyOut.vt = [%ld] != VT_LPSTR",
vVarkeyOut.vt);
strcpy(szVarNam1, "error!!!");
}
else
{
strncpy(szVarNam1, (LPSTR)vVarkeyOut.u.pbVal, 255);
szVarNam1[255] = 0;
}
SetTagChar("szVarKeyName_1",szVarNam1);
}
}

printf("\r\n########## exit Test with DMGetVarInfoExStr ##########\r


\n");

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 365
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.6.18 DMGetVarLimits (RT Professional)

Use
DMGetVarLimits determines the limits for the specified tag, within which write operations are
possible with DMSetValue functions.

Declaration

BOOL DMGetVarLimits (
LPCSTR lpszProjectFile,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
LPDM_VARLIMIT lpdmVarLimit,
LPCMN_ERROR lpdmError );

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.

lpdmVarKey
Pointer to a DM_VARKEY (Page 239) type structure for specification of the tags.

dwItems
Number of completed structures.

lpdmVarLimit
Pointer to the DM_VARLIMIT (Page 242) type structure in which the limits are is stored.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Limits determined.

FALSE
Error.

WinCC Professional V13 SP2 – Programming reference


366 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Comment
In addition to the high and low limits of a tag defined in the configuration, a further limit to the
allowed number range is set by any format specifications made.
The following example shows the relationships for a DM_VARTYPE_BYTE type tag that is
stored in an automation system as a byte in BCD format.

Error messages

DM_E_MAX_RANGE High limit of the format conversion violated


DM_E_MIN_RANGE Low limit of the format conversion violated
DM_E_MAX_LIMIT High limit of the tag violated
DM_E_MIN_LIMIT Low limit of the tag violated
DM_E_NOT_CONNECTED No connection to the Data Manager
DM_E_INVALID_KEY Tag not found
DM_E_INVALID_TYPE Invalid tag type

Required files
dmclient.h
dmclient.lib
dmclient.dll

Examples
OnTestVariablenGetvarlimits (Page 498)"TESTCDoc.cpp"

See also
DM_VARKEY (Page 239)
DM_VARLIMIT (Page 242)
OnTestVariablenGetvarlimits (Page 498)

2.2.6.19 DMGetVarLimitsExStr (RT Professional)

Declaration
BOOL DMGetVarLimitsExStr (
LPCTSTR lpszProjectFile,
LPVARIANT lpvdmVarKey,
LPDM_VARLIMIT lpdmVarLimit,
LPCMN_ERROR lpdmError );

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 367
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Description
For the tags specified, DMGetVarLimitsExStr determines the limits within which it is possible
to execute write operations using the DMSetValueExStr functions.
In contrast to DMGetVarLimits, the tag list is passed as pointer to VARIANT with VT_ARRAY
| VT_VARIANT. As a result, no length limit applies to tag names.

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be retrieved with DMEnumOpenedProjects, or with
DMGetRuntimeProject in Runtime.

lpvdmVarKey
Pointer to VARIANT with VT_ARRAY | VT_VARIANT to pass the tag list or single VARIANT
when only one tag is specified.
A TagID is entered in the relevant list element with the type VT_I4 and the tag name with
VT_BSTR. In addition, VT_LPSTR (PROPVARIANT) can be entered for passing on as
allocated ASCII string in order, for example, to pass on constant names from the script.
VT_LPSTR is then converted internally into the required VT_BSTR type.

lpdmVarLimit
Pointer to structures of the DM_VARLIMIT type to store the limit values.

lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. In the
event of an error, the system writes error information to this structure.

Return value

TRUE
Limit values have been determined

FALSE
Error

Comments
In addition to the configured high and low limits of a tag, a stored format instruction leads to a
further restriction of the valid numerical value range.
The following sample explains this situation for a tag of the DM_VARTYPE_BYTE type stored
in the AS in the BCD byte format.

WinCC Professional V13 SP2 – Programming reference


368 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Error messages

DM_E_MAX_RANGE High limit of format conversion violated


DM_E_MIN_RANGE Low limit of format conversion violated
DM_E_MAX_LIMIT High limit of tag violated
DM_E_MIN_LIMIT Low limit of tag violated
DM_E_NOT_CONNECTED No connection to data manager
DM_E_INVALID_KEY Tag not found
DM_E_INVALID_TYPE Invalid tag type

Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll

Samples
Script sample Button DMGetVarLimitsExStr:
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
#pragma code ("OleAut32.dll")
SAFEARRAY * SafeArrayCreateVector(VARTYPE vt, long lLbound, unsigned
int cElements );
HRESULT SafeArrayPtrOfIndex(SAFEARRAY FAR* psa, long FAR* rgIndices,
void HUGEP* FAR* ppvData );
HRESULT SafeArrayLock(SAFEARRAY FAR* psa);
HRESULT SafeArrayUnlock(SAFEARRAY FAR* psa);
HRESULT VariantChangeType( VARIANTARG FAR* pvargDest, VARIANTARG
FAR* pvarSrc, unsigned short wFlags, VARTYPE vt);
#pragma code()

VARIANT vdmVarkey;
VARIANT* pvElem;
VARIANT vElem;
HRESULT hr;
CHAR szProjectName[256];
CMN_ERROR err;
BOOL bRet;
CHAR szVarNam1[256], szVarNam2[256], szVarNam3[256], szVarNam4[265];
SAFEARRAY* parray;
long lInx;
int nRet;
DM_VARLIMIT dmLimits[4];
int i;

memset(&err, 0, sizeof(err));

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 369
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

bRet = FALSE;
szProjectName[0] = 0;
VariantInit(&vElem);
VariantInit(&vdmVarkey);
parray = NULL;
nRet = 0;
i = 0;

printf("\r\n\r\n########## enter Test with DMGetVarLimitsExStr


##########");

bRet = DMGetRuntimeProject(szProjectName, 256, &err);


if (!bRet)
{
printf("\r\n error DMGetRuntimeProject =>[%s], err=%ld,%ld,%ld,
%ld,%ld,[%s]", szProjectName,
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
}

strncpy(szVarNam1, GetTagChar("szVarKeyName_1"), 256);


strncpy(szVarNam2, GetTagChar("szVarKeyName_2"), 256);
strncpy(szVarNam3, GetTagChar("szVarKeyName_3"), 256);
strncpy(szVarNam4, GetTagChar("szVarKeyName_4"), 256);
printf("\r\n set the vdmVarkey with names in VT_LPSTR:");
parray = SafeArrayCreateVector(VT_VARIANT, 0L, 4);
vdmVarkey.vt = (VT_ARRAY | VT_VARIANT);
vdmVarkey.u.parray = parray;
SafeArrayLock(parray);
lInx = 0;
hr = SafeArrayPtrOfIndex(parray, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = szVarNam1;
lInx = 1;
hr = SafeArrayPtrOfIndex(parray, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = szVarNam2;
lInx = 2;
hr = SafeArrayPtrOfIndex(parray, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = szVarNam3;
lInx = 3;
hr = SafeArrayPtrOfIndex(parray, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = szVarNam4;
SafeArrayUnlock(parray);

memset(&err, 0, sizeof(err));
memset(dmLimits, 0, sizeof(DM_VARLIMIT)*4);
bRet = DMGetVarLimitsExStr(szProjectName, &vdmVarkey, dmLimits,
&err);
if (!bRet)

WinCC Professional V13 SP2 – Programming reference


370 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

{
printf("\r\n error DMGetVarLimitsExStr[%s], err=%ld,%ld,%ld,%ld,
%ld,[%s]", szProjectName,
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
bRet = TRUE; //clear error flag, the defect data is set to VT_EMPTY
}
else
{
printf("\r\n DMGetVarLimitsExStr return OK");
}
if (bRet)
{
for (i = 0; i < 4; i++)
{
VariantClear(&vElem);
printf("\r\n dmLimits[%d]:{",i);
hr = VariantChangeType((VARIANTARG*)&vElem,
(VARIANTARG*)&dmLimits[i].dmMaxRange, 0, VT_R8);
if ((0L == hr) && (VT_R8 == vElem.vt) && (VT_EMPTY !=
dmLimits[i].dmMaxRange.vt))
{
printf("dmMaxRange=[%g], ", vElem.u.dblVal);
}
else
{
printf("dmMaxRange{VariantChangeType error hr = 0x%08lx,
vt=0x%04x}",
hr, dmLimits[i].dmMaxRange.vt);
}
VariantClear(&vElem);
hr = VariantChangeType((VARIANTARG*)&vElem,
(VARIANTARG*)&dmLimits[i].dmMinRange, 0, VT_R8);
if ((0L == hr) && (VT_R8 == vElem.vt) && (VT_EMPTY !=
dmLimits[i].dmMinRange.vt))
{
printf("dmMinRange=[%g], ", vElem.u.dblVal);
}
else
{
printf("dmMinRange{VariantChangeType error hr = 0x%08lx,
vt=0x%04x}",
hr, dmLimits[i].dmMinRange.vt);
}
VariantClear(&vElem);
hr = VariantChangeType((VARIANTARG*)&vElem,
(VARIANTARG*)&dmLimits[i].dmMaxLimit, 0, VT_R8);
if ((0L == hr) && (VT_R8 == vElem.vt) && (VT_EMPTY !=
dmLimits[i].dmMaxLimit.vt))
{
printf("dmMaxLimit=[%g], ", vElem.u.dblVal);
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 371
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

else
{
printf("dmMaxLimitVariantChangeType error hr = 0x%08lx,
vt=0x%04x}",
hr, dmLimits[i].dmMaxLimit.vt);
}
VariantClear(&vElem);
hr = VariantChangeType((VARIANTARG*)&vElem,
(VARIANTARG*)&dmLimits[i].dmMinLimit, 0, VT_R8);
if ((0L == hr) && (VT_R8 == vElem.vt) && (VT_EMPTY !=
dmLimits[i].dmMinLimit.vt))
{
printf("dmMinLimit=[%g]", vElem.u.dblVal);
}
else
{
printf("dmMinLimitVariantChangeType error hr = 0x%08lx,
vt=0x%04x}",
hr, dmLimits[i].dmMinLimit.vt);
}
printf("}");
}
}

printf("\r\n########## exit Test with DMGetVarLimitsExStr ##########


\r\n");

2.2.6.20 DMGetVarType (RT Professional)

Use
DMGetVarType determines the type reference for the passed tags.

Declaration

BOOL DMGetVarType (
LPCSTR lpszProjectFile,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
LPDM_TYPEREF lpdmTypeRef,
LPCMN_ERROR lpdmError);

WinCC Professional V13 SP2 – Programming reference


372 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.

lpdmVarKey
Pointer to the DM_VARKEY (Page 239) structure with which the tag keys determined for the
type.

dwItems
Number of completed structures.

lpdmTypeRef
Pointer to the list of DM_TYPEREF (Page 224) structures for returning the details about the
tag type.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Data type determined.

FALSE
Error.

Comment
The configuration functions for creating tags pass the completed DM_VARREF and
DM_TYPEREF structures to the calling application with details of the data type of the tag.
To save memory space within the application, it does not necessarily have to remember the
type reference to each tag itself; it can query this information with DMGetVarType at any time
from the Data Manager.
Do not use the call alternating with calls for creating tags. If DMGetVarType is used after
creating a tag the first time, search lists are resorted, which costs an additional execution time.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_INVALID_KEY Tag not found

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 373
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Required files
dmclient.h
dmclient.lib
dmclient.dll

Examples
OnTestVariablenGetvartype (Page 499)"TESTCDoc.cpp"

See also
DM_VARKEY (Page 239)
DM_TYPEREF (Page 224)
OnTestVariablenGetvartype (Page 499)

2.2.6.21 DMGetVarTypeExStr (RT Professional)

Declaration
BOOL DMGetVarTypeExStr (
LPCTSTR lpszProjectFile,
LPVARIANT lpvdmVarKey,
LPDM_TYPEREF_EXSTR lpdmTypeRef,
LPCMN_ERROR lpdmError);

Description
Determines the type reference for the tags passed.
In contrast to DMGetVarType, the tag list is passed as pointer to VARIANT with VT_ARRAY
| VT_ VARIANT. As a result, no length limit applies to tag names. This applies also for the type
names in the DM_TYPEREF_EXSTR structures.

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be retrieved with DMEnumOpenedProjects, or with
DMGetRuntimeProject in Runtime.

lpvdmVarKey
Pointer to VARIANT with VT_ARRAY | VT_VARIANT for passing the tag list.
A TagID is entered in the relevant list element with the type VT_I4 and the tag name with
VT_BSTR. In addition, VT_LPSTR (PROPVARIANT) can be entered for passing on as

WinCC Professional V13 SP2 – Programming reference


374 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

allocated ASCII string in order, for example, to pass on constant names from the script.
VT_LPSTR is then converted internally into the required VT_BSTR type.

lpdmTypeRef
Pointer to the list of DM_TYPEREF_EXSTR structures that return tag type information.
The list must have at least the size of the variant array in lpvdmVarKey. The pointers
lpszTypeName and dwBufferCount must be initialized and point to a separate string array.
If lpszTypeName is NULL check the return. Allocated pointer has to enable it again.

lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. In the
event of an error, the system writes error information to this structure.

Return value

TRUE
Data type has been determined

FALSE
Error

Comments
In order to economize the memory management within the application, the application is not
forced to store the type reference for each tag. Instead, it can obtain this information from the
data manager anytime by means of DMGetVarType.
This call should not be used alternately with calls for creating tags. Whenever the
"DMGetVarType" or "DMGetVarTypeExStr" function is used for the first time after creating a
tag, search lists must be sorted again. This requires additional runtime.

Error messages

DM_E_NOT_CONNECTED No connection to data manager


DM_E_INVALID_KEY Tag not found

Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll

Samples
Script sample Button DMGetVarTypeExStr:
#include "apdefap.h"

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 375
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

void OnClick(char* lpszPictureName, char* lpszObjectName, char*


lpszPropertyName)
{
#pragma code ("OleAut32.dll")
SAFEARRAY * SafeArrayCreateVector(VARTYPE vt, long lLbound, unsigned
int cElements );
HRESULT SafeArrayPtrOfIndex(SAFEARRAY FAR* psa, long FAR* rgIndices,
void HUGEP* FAR* ppvData );
HRESULT SafeArrayLock(SAFEARRAY FAR* psa);
HRESULT SafeArrayUnlock(SAFEARRAY FAR* psa);
#pragma code()

VARIANT vdmVarkey;
VARIANT* pvElem;
HRESULT hr;
CHAR szProjectName[256];
CMN_ERROR err;
BOOL bRet;
CHAR szVarNam1[256], szVarNam2[256], szVarNam3[256], szVarNam4[256];
SAFEARRAY* parray;
long lInx;
int nRet;
DM_TYPEREF_EXSTR dmTypeRef[4];
CHAR szTypeName[4][256];
int i;

memset(&err, 0, sizeof(err));
memset(dmTypeRef, 0, sizeof(DM_TYPEREF_EXSTR)*4);
szTypeName[0][0] = 0;
szTypeName[1][0] = 0;
szTypeName[2][0] = 0;
szTypeName[3][0] = 0;
bRet = FALSE;
szProjectName[0] = 0;
VariantInit(&vdmVarkey);
parray = NULL;
nRet = 0;
i = 0;

printf("\r\n\r\n########## enter Test with DMGetVarTypeExStr


##########");

bRet = DMGetRuntimeProject(szProjectName, 256, &err);


if (!bRet)
{
printf("\r\n error DMGetRuntimeProject =>[%s], err=%ld,%ld,%ld,
%ld,%ld,[%s]", szProjectName,
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
}

strncpy(szVarNam1, GetTagChar("szVarKeyName_1"), 256);

WinCC Professional V13 SP2 – Programming reference


376 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

strncpy(szVarNam2, GetTagChar("szVarKeyName_2"), 256);


strncpy(szVarNam3, GetTagChar("szVarKeyName_3"), 256);
strncpy(szVarNam4, GetTagChar("szVarKeyName_4"), 256);
printf("\r\n set the vdmVarkey with names in VT_LPSTR:");
parray = SafeArrayCreateVector(VT_VARIANT, 0L, 4);
vdmVarkey.vt = (VT_ARRAY | VT_VARIANT);
vdmVarkey.u.parray = parray;
SafeArrayLock(parray);
lInx = 0;
hr = SafeArrayPtrOfIndex(parray, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = szVarNam1;
lInx = 1;
hr = SafeArrayPtrOfIndex(parray, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = szVarNam2;
lInx = 2;
hr = SafeArrayPtrOfIndex(parray, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = szVarNam3;
lInx = 3;
hr = SafeArrayPtrOfIndex(parray, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = szVarNam4;
SafeArrayUnlock(parray);

printf("\r\n call DMGetVarTypeExStr with NULL for names");


memset(&err, 0, sizeof(err));
bRet = DMGetVarTypeExStr(szProjectName, &vdmVarkey, dmTypeRef, &err);
if (!bRet)
{
printf("\r\n error DMGetVarTypeExStr[%s], err=%ld,%ld,%ld,%ld,
%ld,[%s]", szProjectName,
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
}
else
{
printf("\r\n DMGetVarTypeExStr return OK");
}
if (bRet)
{
for (i = 0; i < 4; i++)
{
printf("\r\n dmTypeRef[%d]:{",i);
printf("dwType=[%ld]", dmTypeRef[i].dwType);
printf(", dwSize=[%ld]", dmTypeRef[i].dwSize);
if (dmTypeRef[i].lpszTypeName)
{
printf(", lpszTypeName=[%s]", dmTypeRef[i].lpszTypeName);
printf(", dwNameCharCount=[%ld]",
dmTypeRef[i].dwNameCharCount);

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 377
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

//clear the delivered strings that no memoryleak


free(dmTypeRef[i].lpszTypeName);
dmTypeRef[i].lpszTypeName = NULL;
dmTypeRef[i].dwNameCharCount = 0L;
//set name store for next read (no need to free after
call)
dmTypeRef[i].lpszTypeName = szTypeName[i];
dmTypeRef[i].dwNameCharCount = 255;
}
printf("}");
}
}
printf("\r\n call DMGetVarTypeExStr with pointers and size for name
storage");
memset(&err, 0, sizeof(err));
bRet = DMGetVarTypeExStr(szProjectName, &vdmVarkey, dmTypeRef, &err);
if (!bRet)
{
printf("\r\n error DMGetVarTypeExStr[%s], err=%ld,%ld,%ld,%ld,
%ld,[%s]", szProjectName,
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
}
else
{
printf("\r\n DMGetVarTypeExStr return OK");
}
if (bRet)
{
for (i = 0; i < 4; i++)
{
printf("\r\n dmTypeRef[%d]:{",i);
printf("dwType=[%ld]", dmTypeRef[i].dwType);
printf(", dwSize=[%ld]", dmTypeRef[i].dwSize);
printf(", lpszTypeName=[%s]", dmTypeRef[i].lpszTypeName);
printf(", dwNameCharCount=[%ld]",
dmTypeRef[i].dwNameCharCount);
printf("}");
}
}
printf("\r\n########## exit Test with DMGetVarTypeExStr ##########\r
\n");

WinCC Professional V13 SP2 – Programming reference


378 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.6.22 DMSetValue (RT Professional)

Use
The function changes the values of the tags described by lpdmVarKey to the values specified
in lpdmValue.
Changes are made to the tags asynchronously, according to the motto "fire and forget".

Declaration

BOOL DMSetValue (
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
LPVARIANT lpdmValue,
LPDWORD lpdmVarState,
LPCMN_ERROR lpdmError);

Parameters

lpdmVarKey
Pointer to the first DM_VARKEY (Page 239) structure that identifies the tag values to be
changed.

dwItems
Number of passed structures (corresponds to the number of tag values to be changed).

lpdmValue
Pointer to the first of the new values for the tags to be changed.

lpdmVarState
Pointer to the first memory location where information is stored indicating whether the tag value
could be changed successfully or whether errors have occurred.
A 0 (OK) means successfully sent/changed and at least one of the specified tag exists. An
error with the DM_VARSTATE_INVALID_KEY status only occurs if none of the specified tags
exist.
DMSetValueWait must be used to check if the value has been applied.

DM_VARSTATE_NOT_ESTABLISHED (0x0001) Connection to partner not established


DM_VARSTATE_HANDSHAKE_ERROR (0x0002) Protocol error
DM_VARSTATE_HARDWARE_ERROR (0x0004) Network adapter defective
DM_VARSTATE_MAX_LIMIT (0x0008) Configured high limit violated
DM_VARSTATE_MIN_LIMIT (0x0010) Configured low limit violated
DM_VARSTATE_MAX_RANGE (0x0020) Format high limit violated
DM_VARSTATE_MIN_RANGE (0x0040) Format low limit violated

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 379
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

DM_VARSTATE_CONVERSION_ER‐ (0x0080) Display conversion error (in conjunc‐


ROR tion with DM_VARSTATE_..._RANGE)
DM_VARSTATE_STARTUP_VALUE (0x0100) Initialization value of tag
DM_VARSTATE_DEFAULT_VALUE (0x0200) Substitute value of tag
DM_VARSTATE_ADDRESS_ERROR (0x0400) Addressing error in channel
DM_VARSTATE_INVALID_KEY (0x0800) Tag not found / not available
DM_VARSTATE_ACCESS_FAULT (0x1000) Access to tag denied
DM_VARSTATE_TIMEOUT (0x2000) Timeout / no feedback from channel
DM_VARSTATE_SERVERDOWN (0x4000) Server is down

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Tags changed.

FALSE
Error.

Comment
Specification of an access rule for lpdmValue is not necessary, since the Data Manager can
map each type based on the passed tag key.
Write access is performed in the process for external tags. For WinCC client PCs, the request
is forwarded to the respective server.
Normally, write requests of the applications are executed asynchronously. All write requests
are listed in the queue of the Data Manager on the server and passed sequentially to the
appropriate channel DLL.
If the channel DLL positively confirms the write request, the new value becomes valid in the
process image of the server responsible for the request. Finally, the update is performed on
the WinCC stations connected via the system bus.
This means that that different stations may have different values for a tag for brief periods.

Error messages

DM_E_MAX_LIMIT High limit of the tag violated


DM_E_MIN_LIMIT Low limit of the tag violated
DM_E_MAX_RANGE High limit of the format conversion violated
DM_E_MIN_RANGE Low limit of the format conversion violated
DM_E_ACCESS_FAULT Prohibited write access to a tag
DM_E_NOT_CONNECTED No connection to the Data Manager

WinCC Professional V13 SP2 – Programming reference


380 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

DM_E_PARAM Invalid parameter


DM_E_OOM Out of memory

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DMGetValue (Page 335) Get tag values


DMSetValueMessage (Page 384) Change tag values with alarm output
DMSetValueWait (Page 388) Change tag values with notification
DMSetValueWaitMessage (Page 393) Change tag values with notification and alarm out‐
put

Examples
Write tag (Page 511)"DM02.cpp"
OnTestVariablenSetvalue (Page 501)"TESTCDoc.cpp"

See also
DM_VARKEY (Page 239)
DMGetValue (Page 335)
DMGetValueEx (Page 337)
DMSetValueMessage (Page 384)
DMSetValueWait (Page 388)
DMSetValueWaitMessage (Page 393)
Write tag (Page 511)
OnTestVariablenSetvalue (Page 501)

2.2.6.23 DMSetValueExStr (RT Professional)

Declaration
BOOL DMSetValueExStr (
LPVARIANT lpvdmVarKey,
LPVARIANT lpvdmValue,
LPDWORD lpdmVarState,
LPCMN_ERROR lpdmError);

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 381
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Description
This function changes the values of the tags described by lpvdmVarKey to obtain the values
specified in lpvdmValue.
Tag modifications are transmitted in asynchronous mode according to the principle "fire and
forget".
In contrast to DMSetValue, the tag list is passed on as pointer to VARIANT with VT_ARRAY
| VT_VARIANT. As a result, no length limit applies to tag names.

Parameters

lpvdmVarKey
Pointer to VARIANT with VT_ARRAY | VT_VARIANT for passing on the tag list or single
VARIANT if only one tag is specified.
A TagID is entered in the relevant list element with the type VT_I4 and the tag name with
VT_BSTR. In addition, VT_LPSTR (PROPVARIANT) can be entered for passing on as
allocated ASCII string in order, for example, to pass on constant names from the script.
VT_LPSTR is then converted internally into the required VT_BSTR type.
For a multi-client project in WinCC Version 5.0 or higher, it may be required here to add a
server prefix to each name (refer to "Project types and versions" ).

lpvdmValue
Pointer to the new value of the tag to be changed.

lpdmVarState
Pointer to a memory location which stores the information whether the value of the tag could
be changed successfully or if errors occurred.
The value "0" (OK) means that the transmission/modification has been completed successfully
and that at least one of the specified tags is existing. The DM_VARSTATE_INVALID_KEY
error status is only returned if none of the specified tags exists.
In order to check if the value has been applied by the PLC also, DMSetValueWaitExStr must
be used.

DM_VARSTATE_NOT_ESTABLISHED (0x0001) Connection to partner not established


DM_VARSTATE_HANDSHAKE_ERROR (0x0002) Log error
DM_VARSTATE_HARDWARE_ERROR (0x0004) Network module faulty
DM_VARSTATE_MAX_LIMIT (0x0008) Configured high limit violated
DM_VARSTATE_MIN_LIMIT (0x0010) Configured low limit violated
DM_VARSTATE_MAX_RANGE (0x0020) High format limit violated
DM_VARSTATE_MIN_RANGE (0x0040) Low format limit violated
DM_VARSTATE_CONVERSION_ER‐ (0x0080) Conversion error display (in connec‐
ROR tion with DM_VARSTATE_..._RANGE)
DM_VARSTATE_STARTUP_VALUE (0x0100) Start-up value of the tag
DM_VARSTATE_DEFAULT_VALUE (0x0200) Substitute value of the tag
DM_VARSTATE_ADDRESS_ERROR (0x0400) Address error in channel
DM_VARSTATE_INVALID_KEY (0x0800) Tag not found / not existing

WinCC Professional V13 SP2 – Programming reference


382 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

DM_VARSTATE_ACCESS_FAULT (0x1000) Access to tag not permitted


DM_VARSTATE_TIMEOUT (0x2000) Timeout / no feedback from channel
DM_VARSTATE_SERVERDOWN (0x4000) Server is down

lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. In the
event of an error, the system writes error information to this structure.

Return value

TRUE
Tags have been changed.

FALSE
Error

Comments
It is not necessary to specify an access instruction for lpdmValue because the tag keys passed
enable the data manager to allocate the information appropriately.
For external tags, write access to the process is obtained while the job is passed on to the
appropriate server by WinCC client computers.
The write jobs of the application are normally executed in asynchronous mode, i.e. all write
jobs are lined up in the queue which the data manager keeps on the server, and then passed
on to the appropriate channel DLL sequentially.
If the channel DLL confirms the write job affirmatively, the new value becomes valid in the
process image of the server responsible for the job. The update is then performed within the
WinCC stations which are interconnected by means of the system bus.
As a result, a tag can temporarily have different values on different stations.

Error messages

DM_E_MAX_LIMIT High limit of tag violated


DM_E_MIN_LIMIT Low limit of tag violated
DM_E_MAX_RANGE High limit of format conversion violated
DM_E_MIN_RANGE Low limit of format conversion violated
DM_E_ACCESS_FAULT Unauthorized write access to tag
DM_E_NOT_CONNECTED No connection to data manager
DM_E_PARAM Invalid parameter
DM_E_OOM Out of memory

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 383
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll

Related functions

DMGetValueExStr Retrieve tag values


DMSetValueMessageExStr Change tag values with alarm display
DMSetValueWaitExStr Change tag values with notify message
DMSetValueWaitMessageExStr Change tag values with notify message and alarm
display

Samples
You can find samples on the DMGetValueExStr page.

2.2.6.24 DMSetValueMessage (RT Professional)

Use
The function changes the value of the tag described by lpdmVarKey to the value specified in
lpdmValue.
Only one tag is changed, in contrast to the DMSetValue function. After successful update of
the tag value, a freely definable alarm text is generated.

Declaration

BOOL DMSetValueMessage (
LPDM_VARKEY lpdmVarKey,
LPVARIANT lpdmValue,
DWORD fFlags,
LPSTR lpszMessage,
LPCMN_ERROR lpdmError);

Parameters

lpdmVarKey
Pointer to the DM_VARKEY (Page 239) structure that identifies the tag to be changed.
A server prefix (see project types and versions) may also specified in lpdmVarKey->szName
for multiclient projects as of WinCC Version 5.0.

WinCC Professional V13 SP2 – Programming reference


384 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

lpdmValue
Pointer to the new value for the tag to be changed.

fFlags
fFlags determines how the alarm text is processed:

DMSVM_OPERATIONREPORT The alarm is stored in the operator input log.


DMSVM_OPERATIONMESSAGE The alarm is output as an operator input alarm.

lpszMessage
Text of the alarm that is output.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Tag changed.

FALSE
Error.

Comment
You can find more information about changing tag values at the DMSetValue function.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_PARAM Invalid parameter
DM_E_OOM Out of memory

Required files
dmclient.h
dmclient.lib
dmclient.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 385
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Related functions

DMSetValue (Page 379) Change tag values


DMSetValueWait (Page 388) Change tag values with notification
DMSetValueWaitMessage (Page 393) Change tag values with notification and alarm out‐
put

See also
DM_VARKEY (Page 239)
DMSetValue (Page 379)
DMSetValueWait (Page 388)
DMSetValueWaitMessage (Page 393)

2.2.6.25 DMSetValueMessageExStr (RT Professional)

Declaration
BOOL DMSetValueMessageExStr (
LPVARIANT lpvdmVarKey,
LPVARIANT lpvdmValue,
DWORD fFlags,
LPTSTR lpszMessage,
LPCMN_ERROR lpdmError);

Description
This function changes the value of the tag described by lpvdmVarKey to obtain the value
specified in lpdmValue.
In contrast to the DMSetValueExStr function, only one tag can be changed at a time. If the tag
value has been changed successfully, a alarm text of your choice is transmitted.

Parameters

lpvdmVarKey
Pointer to VARIANT for passing on the tag name or TagID or single VARIANT, if only one tag
is specified that identifies the tags to be changed.
A TagID is entered in the relevant list element with the type VT_I4 and the tag name with
VT_BSTR. In addition, VT_LPSTR (PROPVARIANT) can be entered for passing on as
allocated ASCII string in order, for example, to pass on constant names from the script.
VT_LPSTR is then converted internally into the required VT_BSTR type.
If you specify an array using VT_ARRAY | VT_VARIANT, only the first element is evaluated.
For a multi-client project in WinCC Version 5.0 or higher, it may be required in this case to add
a server prefix to each name (refer to "Project types and versions" ).

WinCC Professional V13 SP2 – Programming reference


386 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

lpvdmValue
Pointer to the new value of the tag to be changed.

fFlags
fFlags specifies how to process the alarm text:

DMSVM_OPERATIONREPORT The alarm is stored in the operator activities log.


DMSVM_OPERATIONMESSAGE The alarm is displayed as an operator input mes‐
sage.

lpszMessage
Text of the alarm to be transmitted.

lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. In the
event of an error, the system writes error information to this structure.

Return value

TRUE
Tags have been changed

FALSE
Error

Comments
For more information on changing the values of tags refer to the DMSetValueExStr function.

Error messages

DM_E_NOT_CONNECTED No connection to data manager


DM_E_PARAM Invalid parameter
DM_E_OOM Out of memory

Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 387
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Related functions

DMSetValueExStr Change tag values


DMSetValueWaitExStr Change tag values with notify message
DMSetValueWaitMessageExStr Change tag values with notify message and alarm
display

2.2.6.26 DMSetValueWait (RT Professional)

Use
The function changes the values of the tags described by lpdmVarKey to the values specified
in lpdmValue.
In contrast to DMSetValue, DMSetValueWait allows the application to be notified when the
update is successfully completed on the local machine.

Declaration

BOOL DMSetValueWait (
LPDWORD pdwTAID,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
LPVARIANT lpdmValue,
DWORD dwTimeOut,
DM_COMPLETITION_PROC lpfnCompletition,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Parameters

pdwTAID
Pointer to a tag that contains the transaction ID assigned by the Data Manager after a
successful call of the function.

lpdmVarKey
Pointer to the first DM_VARKEY (Page 239) structure that identifies the tag values to be
changed.

dwItems
Number of passed structures (corresponds to the number of tag values to be changed).

lpdmValue
Pointer to the first of the new values for the tags to be changed.

WinCC Professional V13 SP2 – Programming reference


388 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

dwTimeout
Maximum waiting time of the application in ms. If, after expiration of the waiting period, not all
tags have been written, the callback function is called with appropriate error code.

lpfnCompletition
Pointer to your callback function, which is called either after the update of all requested tags
or after the waiting period.
When a program reports a notify routine, it must empty its message queue at regular intervals.
Messages that are not fetched can block WinCC notifications and thus block the entire WinCC.
In rare cases, the notification may already be delivered before the function call returns.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the first of dwItems error structure with the CMN_ERROR type. When an error occurs
during the writing of a tag, the system writes the error information into the appropriate structure.
Therefore, remember to reserve space for these structures.

Return value

TRUE
Tags changed.

FALSE
The occurring error can be identified with error structures.

Comment
You can find more information about changing tag values at the DMSetValue function.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_PARAM Invalid parameter

Required files
dmclient.h
dmclient.lib
dmclient.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 389
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Related functions

DMSetValue (Page 379) Change tag values


DMSetValueMessage (Page 384) Change tag values with alarm output
DMSetValueWaitMessage (Page 393) Change tag values with notification and alarm out‐
put
DM_COMPLETITION_PROC (Page 398) Change tag values (callback)

Examples
OnTestVariablenSetvaluewait (Page 502)"TESTCDoc.cpp"

See also
DM_VARKEY (Page 239)
DMGetValueWait (Page 348)
DMGetValueWaitEx (Page 350)
DMSetValue (Page 379)
DMSetValueMessage (Page 384)
DMSetValueWaitMessage (Page 393)
DM_COMPLETITION_PROC (Page 398)
OnTestVariablenSetvaluewait (Page 502)

2.2.6.27 DMSetValueWaitExStr (RT Professional)

Declaration (
BOOL DMSetValueWaitExStr (
LPDWORD pdwTAID,
LPVARIANT lpvdmVarKey,
DWORD dwItems,
LPVARIANT lpvdmValue,
LPDWORD lpdwState,
DWORD dwTimeOut,
DM_COMPLETITION_PROC lpfnCompletition,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Description
This function changes the values of the tags described by lpvdmVarKey to obtain the values
specified in lpvdmValue.
In contrast to the DMSetValueExStr function, DMSetValueWaitExStr enables your application
to display a notify message on the local computer if the update has been executed.

WinCC Professional V13 SP2 – Programming reference


390 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

In contrast to DMSetValueWait, the tag list is passed on as pointer to VARIANT with


VT_ARRAY | VT_VARIANT. As a result, no length limit applies to tag names.

Parameters

pdwTAID
Pointer to a tag containing the transaction ID allocated by the data manager after the function
has been called successfully.

lpvdmVarKey
Pointer to VARIANT with VT_ARRAY | VT_VARIANT for passing on the tag list or single
VARIANT if only one tag is specified.
A TagID is entered in the relevant list element with the type VT_I4 and the tag name with
VT_BSTR. In addition, VT_LPSTR (PROPVARIANT) can be entered for passing on as
allocated ASCII string in order, for example, to pass on constant names from the script.
VT_LPSTR is then converted internally into the required VT_BSTR type.
For multi-client projects in WinCC Version 5.0 or higher, it may be required here to add a server
prefix (refer to "Project types and versions" ).

dwItems
Number of values passed in lpvdmValue and error structures in IpdmError. The number must
be at least as large as the input array in lpvdmVarKey.
If the number is larger than the input array, the excess values are ignored and DM_E_PARAM
is assigned to the affected error structures, as no allocation is possible.
If the number is less than the input array, the error DM_E_PARAM is returned only in the first
error structure and no values are written.

lpvdmValue
Pointer to the new value of the tag to be changed.

lpdwState
Pointer to a memory location which stores the information whether the value of the tag could
be changed successfully or if errors occurred.
The value 0 (OK) means that the transmission/modification has been completed successfully
and that at least one of the specified tags is existing. The DM_VARSTATE_INVALID_KEY
error status is only returned if none of the specified tags exists.

DM_VARSTATE_NOT_ESTABLISHED (0x0001) Connection to partner not established


DM_VARSTATE_HANDSHAKE_ERROR (0x0002) Log error
DM_VARSTATE_HARDWARE_ERROR (0x0004) Network module faulty
DM_VARSTATE_MAX_LIMIT (0x0008) Configured high limit violated
DM_VARSTATE_MIN_LIMIT (0x0010) Configured low limit violated
DM_VARSTATE_MAX_RANGE (0x0020) High format limit violated
DM_VARSTATE_MIN_RANGE (0x0040) Low format limit violated
DM_VARSTATE_CONVERSION_ER‐ (0x0080) Conversion error display (in connec‐
ROR tion with DM_VARSTATE_..._RANGE)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 391
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

DM_VARSTATE_STARTUP_VALUE (0x0100) Start-up value of the tag


DM_VARSTATE_DEFAULT_VALUE (0x0200) Substitute value of the tag
DM_VARSTATE_ADDRESS_ERROR (0x0400) Address error in channel
DM_VARSTATE_INVALID_KEY (0x0800) Tag not found / not existing
DM_VARSTATE_ACCESS_FAULT (0x1000) Access to tag not permitted
DM_VARSTATE_TIMEOUT (0x2000) Timeout / no feedback from channel
DM_VARSTATE_SERVERDOWN (0x4000) Server is down

dwTimeout
Maximum waiting time of the application in ms. If not all tag values have been updated when
the waiting time expires, the callback function with corresponding error codes is called.

lpfnCompletition
Pointer to the callback function which is called either after all requested tags have been updated
or after the waiting time has expired.
If a program requests a notify routine, it has to clear its message queue at regular intervals.
Unread messages could block WinCC notifications or finally block WinCC altogether.
On rare occasions, the notify may be returned before the function call has returned.

lpvUser
Pointer to application-specific data. The function does not evaluate this pointer, but makes it
available again within the callback function.

lpdmError
Pointer to the first dwItems error structure of the CMN_ERROR type. If a tag writing error
occurs, the system writes the error information into the corresponding structure. Therefore,
you should not forget to reserve space for these structures.

Return value

TRUE
Tags have been changed

FALSE
The error which occurred can be identified by means of the error structures.

Comments
For more information on changing the values of tags refer to the DMSetValueExStr function.

Error messages

DM_E_NOT_CONNECTED No connection to data manager


DM_E_PARAM Invalid parameter

WinCC Professional V13 SP2 – Programming reference


392 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll

Related functions

DMSetValueExStr Change tag values


DMSetValueMessageExStr Change tag values with alarm display
DMSetValueWaitMessageExStr Change tag values with notify message and alarm
display
DM_COMPLETITION_PROC Change tag values (callback)

Samples
You can find samples on the DMGetValueExStr page.

2.2.6.28 DMSetValueWaitMessage (RT Professional)

Use
The function combines the functions of DMSetValueMessage and DMSetValueWait. Only one
tag can be changed, in contrast to the DMSetValueWait function.
The value of the tag described by lpdmVarKey is changed to the value specified in lpdmValue.
Once the tag is successfully changed, a freely definable alarm text is output and the application
can be be notified that the update has been successfully performed on the local machine.

Declaration

BOOL DMSetValueWaitMessage (
LPDWORD pdwTAID,
LPDM_VARKEY lpdmVarKey,
LPVARIANT lpdmValue,
DWORD dwTimeOut,
DM_COMPLETITION_PROC lpfnCompletition,
DWORD fFlags,
LPSTR lpszMessage,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 393
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Parameters

pdwTAID
Pointer to a tag that contains the transaction ID assigned by the Data Manager after a
successful call of the function.

lpdmVarKey
Pointer to the DM_VARKEY (Page 239) structure that identifies the tag to be changed.

lpdmValue
Pointer to the new value for the tag to be changed.

dwTimeOut
Maximum waiting time of the application in ms. If, after expiration of the waiting period, not all
tags have been written, the callback function is called with appropriate error code.

lpfnCompletition
Pointer to your callback function, which is called either after the update of all requested tags
or after the waiting period.
When a program reports a notify routine, it must empty its message queue at regular intervals.
Messages that are not fetched can block WinCC notifications and thus block the entire WinCC.
In rare cases, the notification may already be delivered before the function call returns.

fFlags
fFlags determines how the alarm text is processed:

DMSVM_OPERATIONREPORT The alarm is stored in the operator input log.


DMSVM_OPERATIONMESSAGE The alarm is output as an operator input alarm.

lpszMessage
Alarm text that is output.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the first of dwItems error structure with the CMN_ERROR type. When an error occurs
during the writing of a tag, the system writes the error information into the appropriate structure.
Therefore, remember to reserve space for these structures.

Return value

TRUE
Tags changed.

WinCC Professional V13 SP2 – Programming reference


394 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

FALSE
Error.

Comment
You can find more information about changing tag values at the DMSetValue function.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_PARAM Invalid parameter
DM_E_OOM Out of memory

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DM_COMPLETITION_PROC (Page 398) Change tag values (callback)


DMSetValue (Page 379) Change tag values
DMSetValueMessage (Page 384) Change tag values with alarm output
DMSetValueWait (Page 388) Change tag values with notification

See also
DM_VARKEY (Page 239)
DMSetValue (Page 379)
DMSetValueMessage (Page 384)
DMSetValueWait (Page 388)
OnTestVariablenSetvaluewait (Page 502)
DM_COMPLETITION_PROC (Page 398)

2.2.6.29 DMSetValueWaitMessageExStr (RT Professional)

Declaration
BOOL DMSetValueWaitMessageExStr (
LPDWORD pdwTAID,
LPVARIANT lpvdmVarKey,
LPVARIANT lpvdmValue,

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 395
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

DWORD dwTimeOut,
DM_COMPLETITION_PROC lpfnCompletition,
DWORD fFlags,
LPTSTR lpszMessage,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Description
This function combines the functionalities of DMSetValueMessageExStr and
DMSetValueWaitExStr.
In contrast to the DMSetValueWaitExStr function, only one tag can be changed at a time.
The value of the tag described by lpvdmVarKey is changed to obtain the value specified in
lpvdmValue. If the tag value has been changed successfully, a alarm text of your choice is
transmitted. The application also has the option to display a notify message on the local
computer if the update has been executed.
In contrast to DMSetValueWaitMessage, the tag list is passed on as pointer to VARIANT. As
a result, no limitation applies to the length of the tag names.

Parameters

pdwTAID
Pointer to a tag containing the transaction ID allocated by the data manager after the function
has been called successfully.

lpvdmVarKey
Pointer to VARIANT for passing on the tag name, TagID or single VARIANT, if only one tag is
specified that identifies the tags to be changed.
A TagID is entered in the relevant list element with the type VT_I4 and the tag name with
VT_BSTR. In addition, VT_LPSTR (PROPVARIANT) can be entered for passing on as
allocated ASCII string in order, for example, to pass on constant names from the script.
VT_LPSTR is then converted internally into the required VT_BSTR type.
For multi-client projects in WinCC Version 5.0 or higher, it may be required here to add a server
prefix (refer to "Project types and versions" ).

lpvdmValue
Pointer to the new value of the tag to be changed.

dwTimeOut
Maximum waiting time of the application in ms. If not all tag values have been updated when
the waiting time expires, the callback function with corresponding error codes is called.

lpfnCompletition
Pointer to the callback function which is called either after all requested tags have been updated
or after the waiting time has expired.

WinCC Professional V13 SP2 – Programming reference


396 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

If a program requests a notify routine, it has to clear its message queue at regular intervals.
Unread messages could block WinCC notifications or finally block WinCC altogether.
On rare occasions, the notify may be returned before the function call has returned.

fFlags
fFlags specifies how to process the alarm text:

DMSVM_OPERATIONREPORT The alarm is stored in the operator activities log.


DMSVM_OPERATIONMESSAGE The alarm is displayed as an operator input mes‐
sage.

lpszMessage
Text of the alarm to be transmitted.

lpvUser
Pointer to application-specific data. The function does not evaluate this pointer, but makes it
available again within the callback function.

lpdmError
Pointer to the first dwItems error structure of the CMN_ERROR type. If a tag writing error
occurs, the system writes the error information into the corresponding structure. Therefore,
you should not forget to reserve space for these structures.

Return value

TRUE
Tags have been changed

FALSE
Error

Comments
For more information on changing the values of tags refer to the DMSetValueExStr function.

Error messages

DM_E_NOT_CONNECTED No connection to data manager


DM_E_PARAM Invalid parameter
DM_E_OOM Out of memory

Required files
dmclient_exstr.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 397
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

dmclient.lib
dmclient.dll

Related functions

DM_COMPLETITION_PROC Change tag values (callback)


DMSetValueExStr Change tag values
DMSetValueMessageExStr Change tag values with alarm display
DMSetValueWaitExStr Change tag values with notify message

2.2.6.30 DM_COMPLETITION_PROC (RT Professional)

Description
You need to provide a DM_COMPLETITION_PROC type callback function in order for your
application to notified that tag values have been successfully changed.

Declaration

BOOL ( * DM_COMPLETITION_PROC) (
DWORD dwTAID,
LPDWORD lpdmVarState,
DWORD dwItems,
LPVOID lpvUser);

Parameters

dwTAID
Transaction ID that was assigned by the Data Manager for the function to change the tag
values.

lpdmVarState
Pointer to the first memory location where information is stored indicating whether the tag
values could be changed successfully or whether errors have occurred.
A 0 (OK) means successfully sent/changed and at least one of the specified tag exists. An
error with the DM_VARSTATE_INVALID_KEY status only occurs if none of the specified tags
exist.

DM_VARSTATE_NOT_ESTABLISHED (0x0001) Connection to partner not established


DM_VARSTATE_HANDSHAKE_ERROR (0x0002) Protocol error
DM_VARSTATE_HARDWARE_ERROR (0x0004) Network adapter defective
DM_VARSTATE_MAX_LIMIT (0x0008) Configured high limit violated
DM_VARSTATE_MIN_LIMIT (0x0010) Configured low limit violated

WinCC Professional V13 SP2 – Programming reference


398 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

DM_VARSTATE_MAX_RANGE (0x0020) Format high limit violated


DM_VARSTATE_MIN_RANGE (0x0040) Format low limit violated
DM_VARSTATE_CONVERSION_ERROR (0x0080) Display conversion error (in conjunc‐
tion with DM_VARSTATE_..._RANGE)
DM_VARSTATE_STARTUP_VALUE (0x0100) Initialization value of tag
DM_VARSTATE_DEFAULT_VALUE (0x0200) Substitute value of tag
DM_VARSTATE_ADDRESS_ERROR (0x0400) Addressing error in channel
DM_VARSTATE_INVALID_KEY (0x0800) Tag not found / not available
DM_VARSTATE_ACCESS_FAULT (0x1000) Access to tag denied
DM_VARSTATE_TIMEOUT (0x2000) Timeout / no feedback from channel
DM_VARSTATE_SERVERDOWN (0x4000) Server is down

dwItems
Number of tag changes, the status of which is passed in lpdmVarState.

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value
The return values depend on your implementation

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations
If a program declares a Notify routine, it must empty its message queue regularly. Unremoved
messages can block WinCC notifications and thus the entire WinCC.
In rare cases, the Notify may already be delivered before the function call has returned.

Required files
dmclient.h

Related functions

DMSetValueWait (Page 388) Change tag values with notification


DMSetValueWaitMessage (Page 393) Change tag values with notification and alarm out‐
put

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 399
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
DMSetValueWait (Page 388)
DMSetValueWaitMessage (Page 393)

2.2.6.31 DMShowVarPropertiesExStr (RT Professional)

Declaration
BOOL DMShowVarPropertiesExStr (
LPCTSTR lpszProjectFile,
HWND hwndParent,
LPCTSTR lpszVariableName,
DWORD dwVariableID,
LPCMN_ERROR lpdmError);

Description
This function opens the dialog box for editing the properties of tags.

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be retrieved with DMEnumOpenedProjects, or with
DMGetRuntimeProject in Runtime.

hwndParent
Handle to the window which is used as the parent window for the dialog.

lpszVariableName
Pointer to the name of the tag whose properties are displayed.
If lpszVariableName is "NULL" you must specify a valid dwVariableID. If not, the
DM_E_PARAM error is returned.

dwVariableID
ID of the tag. Is not used if a name is specified in lpszVariableName.

lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. In the
event of an error, the system writes error information to this structure.

Return value

TRUE
Exit dialog with "OK".

WinCC Professional V13 SP2 – Programming reference


400 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

FALSE
Error or exit dialog with "Cancel"

Error messages

DM_E_NOT_CONNECTED No connection to data manager


DM_E_INVALID_KEY Tag not found
DM_E_CANCEL User has selected "Cancel" in a dialog box
DM_E_PARAM At least one parameter is passed on with errors

Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll

Samples
Script sample Button DMShowVarDatabaseExStr:
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
BOOL bRet = FALSE;
CHAR szProjectName[256];
CHAR szVariableName[256];
DWORD dwVariableID;
CMN_ERROR err;
HWND hwndParent;

szProjectName[0] = 0;
szVariableName[0] = 0;
dwVariableID = 0L;
memset(&err, 0, sizeof(err));
hwndParent = NULL;

printf("\r\n\r\n########## enter Test with DMShowVarDatabaseExStr


##########");

bRet = DMGetRuntimeProject(szProjectName, 256, &err);


if (!bRet)
{
printf("\r\n error DMGetRuntimeProject =>[%s], err=%ld,%ld,%ld,
%ld,%ld,[%s]", szProjectName,
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 401
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

memset(&err, 0, sizeof(err));

dwVariableID = GetTagDWord("dwVarKeyID_1");
printf("\r\n call DMShowVarPropertiesExStr with ID");
bRet = DMShowVarPropertiesExStr(szProjectName, hwndParent, NULL,
dwVariableID, &err);
if (!bRet)
{
printf("\r\n error DMShowVarPropertiesExStr: err=%ld,%ld,%ld,
%ld,%ld,[%s]",
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
}
else
{
printf("\r\n DMShowVarPropertiesExStr OK!");
}

strncpy(szVariableName, GetTagChar("szVarKeyName_1"), 255);


szVariableName[255] = 0;

printf("\r\n call DMShowVarPropertiesExStr with VarName");


bRet = DMShowVarPropertiesExStr(szProjectName, hwndParent,
szVariableName, 0L, &err);
if (!bRet)
{
printf("\r\n error DMShowVarPropertiesExStr: err=%ld,%ld,%ld,
%ld,%ld,[%s]",
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
}
else
{
printf("\r\n DMShowVarPropertiesExStr OK!");
}

printf("\r\n########## exit Test with DMShowVarProperitesExStr


##########\r\n");
}

2.2.6.32 DMShowVarDatabase (RT Professional)

Use
The function opens the tag selection dialog for the specified project. Only one tag is selected,
in contrast to the ShowVarDatabaseMulti function.

WinCC Professional V13 SP2 – Programming reference


402 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL DMShowVarDatabase (
LPCSTR lpszProjectFile,
HWND hwndParent,
LPDM_DLGOPTIONS lpdmOptions,
LPDM_VARFILTER lpdmFilter,
LPDM_VARKEY lpdmVarKey,
LPCMN_ERROR lpdmError);

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.

hwndParent
Handle to the window that is used as the parent window for the dialog.

lpdmOptions
Pointer to the DM_DLGOPTIONS (Page 217) structure with specifications on how the dialog
should react. When the pointer is NULL, the standard dialog is selected.

lpdmFilter
Pointer to the DM_VARFILTER (Page 231) filter structure. When the pointer is NULL , all tags
are displayed.
Only filtering by tag name and tag type is supported. Filtering tags by group and connections
is not implemented.

lpdmVarKey
Pointer to the DM_VARKEY (Page 239) structure. If the properties of a tag to be displayed,
lpdmVarKey contains the key to this tag after the dialog closed.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Close the dialog with "OK".

FALSE
Error or close dialog with "CANCEL".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 403
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_INV_PRJ Cannot find/load specified project

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DMShowVarDatabaseMulti (Page 407) Open tag selection dialog

See also
DM_VARKEY (Page 239)
DM_VARFILTER (Page 231)
DM_DLGOPTIONS (Page 217)
DMShowVarDatabaseMulti (Page 407)

2.2.6.33 DMShowVarDatabaseExStr (RT Professional)

Declaration
BOOL DMShowVarDatabaseExStr (
LPCTSTR lpszProjectFile,
HWND hwndParent,
LPDM_DLGOPTIONS lpdmOptions,
LPDM_VARFILTER lpdmFilter,
LPTSTR* lppszVariableName,
LPDWORD lpdwVarNameCharCount,
LPDWORD lpdwVariableID,
LPCMN_ERROR lpdmError);

Description
This function opens the tag selection dialog for the project specified. In contrast to
ShowVarDatabaseMultiExStr, only one tag can be selected.

WinCC Professional V13 SP2 – Programming reference


404 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be retrieved with DMEnumOpenedProjects, or with
DMGetRuntimeProject in Runtime.

hwndParent
Handle to the window which is used as the parent window for the dialog.

lpdmOptions
Pointer to the DM_DLGOPTIONS structure containing instructions for the dialog; if NULL =>
standard dialog.

lpdmFilter
Pointer to the DM_VARFILTER filter structure. If NULL, all tags are displayed.
Only tag name and tag type filtering are supported. Tag group and tag connection filtering is
not implemented.

lpszVariableName
Pointer to pointer of the return buffer for the tag name.
If NULL, a valid pointer to lpdwVariableID must be present. Then, only the ID and no name is
returned. dwVarNameCharCount is not considered. If both pointers are NULL, DM_E_PARAM
is returned.
If the internal pointer is NULL, the buffer is allocated and returned. The size is returned in
lpdwVarNameCharCount.

lpdwVarNameCharCount
Pointer to a DWORD which stores the size of the return buffer. The size must be selected big
enough to store the tag name with zero termination.
If the buffer is too small, the truncated name is stored and the DM_E_OOM error returned.

lpdwVariableID
Pointer to a DWORD which stores the tag ID.
If NULL, a valid pointer to lpdwVariableName and a valid size in dwVarNameCharCount must
be present. Then, only the tag name will be returned.
Return of the tag ID cannot always be guaranteed, e.g. PackageTag, specific S7 tags etc. In
these cases, 0 is returned.
Under certain conditions, the information can be complemented by a subsequent call of
DMGetVarInfoExStr.

lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. In the
event of an error, the system writes error information to this structure.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 405
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Return value

TRUE
Exit dialog with "OK".

FALSE
Error or exit dialog with "Cancel".

Error messages

DM_E_NOT_CONNECTED No connection to data manager


DM_E_INV_PRJ Specified project not found / loaded
DM_E_PARAM Parameter not consistent
DM_E_OOM Memory error: the buffer lpszVariableName is
specified too small in dwVarNameCharCount and
the name was truncated

Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll

Related functions

DMShowVarDatabaseMultiExStr Open tag selection dialog box

Samples
Script sample Button DMShowVarDatabaseExStr:
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
BOOL bRet = FALSE;
CMN_ERROR err;
CHAR szProjectName[256];
HWND hwndParent;
CHAR szVariableName[256];
LPSTR pszVariableName;
DWORD dwVarNamCharCount = 256;
DWORD dwVarID = 0L;

szProjectName[0] = 0;
szVariableName[0] = 0;
hwndParent = NULL;
pszVariableName= szVariableName;

WinCC Professional V13 SP2 – Programming reference


406 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

memset(&err, 0, sizeof(err));

printf("\r\n\r\n########## enter Test with DMShowVarDatabaseExStr


##########");

bRet = DMGetRuntimeProject(szProjectName, 256, &err);


if (!bRet)
{
printf("\r\n error DMGetRuntimeProject =>[%s], err=%ld,%ld,%ld,
%ld,%ld,[%s]", szProjectName,
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
}

bRet = DMShowVarDatabaseExStr(szProjectName, hwndParent, NULL, NULL,


&pszVariableName, &dwVarNamCharCount,
&dwVarID, &err);
if (!bRet)
{
printf("\r\n error DMShowVarDatabaseExStr: err=%ld,%ld,%ld,%ld,
%ld,[%s]",
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
}
else
{
printf("\r\n DMShowVarDatabaseEsStr OK! (set to first line)");
printf("\r\n szVarName=[%s], dwVarID=[%ld]", szVariableName,
dwVarID);
SetTagChar("szVarKeyName_1",szVariableName);
SetTagDWord("dwVarKeyID_1",dwVarID);
}

2.2.6.34 DMShowVarDatabaseMulti (RT Professional)

Use
The function opens the tag selection dialog for the specified project. Several tags can be
selected, in contrast to ShowVarDatabase.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 407
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL DMShowVarDatabaseMulti (
LPCSTR lpszProjectFile,
HWND hwndParent,
LPDM_DLGOPTIONS lpdmOptions,
LPDM_VARFILTER lpdmFilter,
LPDWORD lpdwItems,
DM_NOTIFY_SELECT_VAR_PROC lpfnVariables,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in RT.

hwndParent
Handle to the window that is used as the parent window for the dialog.

lpdmOptions
Pointer to the DM_DLGOPTIONS (Page 217) structure with specifications on how the dialog
should react. The standard dialog is used with NULL.

lpdmFilter
Pointer to the DM_VARFILTER (Page 231) filter structure. All tags are displayed with NULL,.
Only filtering by tag name and tag type is supported. Filtering tags by group and connections
is not implemented.

lpdwItems
Pointer to a DWORD buffer that receives the number of selected tags.

lpfnVariables
Pointer to your callback function that is called for every selected tag.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


408 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Return value

TRUE
Close the dialog with "OK".

FALSE
Error or close dialog with "CANCEL".

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_INV_PRJ Cannot find/load specified project

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DMShowVarDatabase (Page 402) Open tag selection dialog


DM_NOTIFY_SELECT_VAR_PROC (Page 413) Open tag selection dialog (callback)

See also
DM_VARFILTER (Page 231)
DMShowVarDatabase (Page 402)
DM_DLGOPTIONS (Page 217)
DM_NOTIFY_SELECT_VAR_PROC (Page 413)

2.2.6.35 DMShowVarDatabaseMultiExStr (RT Professional)

Declaration
BOOL DMShowVarDatabaseMultiExStr (
LPCTSTR lpszProjectFile,
HWND hwndParent,
LPDM_DLGOPTIONS lpdmOptions,
LPDM_VARFILTER lpdmFilter,
LPDWORD lpdwItems,
DM_NOTIFY_SELECT_VAR_PROC_EXSTR lpfnVariables,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 409
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Description
This function opens the tag selection dialog for the project specified. In contrast to
ShowVarDatabaseExStr, multiple tags can be selected.

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be retrieved with DMEnumOpenedProjects, or with
DMGetRuntimeProject in Runtime.

hwndParent
Handle to the window which is used as the parent window for the dialog.

lpdmOptions
Pointer to the DM_DLGOPTIONS structure containing instructions for the dialog; if NULL =>
standard dialog.

lpdmFilter
Pointer to the DM_VARFILTER filter structure. If NULL, all tags are displayed.
Only tag name and tag type filtering are supported. Tag group and tag connection filtering is
not implemented.

lpdwItems
Pointer to a DWORD buffer to store the number of tags selected in total.

lpfnVariables
Pointer to the callback function which is called for each selected tag.

lpvUser
Pointer to application-specific data. The function does not evaluate this pointer, but makes it
available again within the callback function.

lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. In the
event of an error, the system writes error information to this structure.

Return value

TRUE
Exit dialog with "OK".

FALSE
Error or exit dialog with "Cancel".

WinCC Professional V13 SP2 – Programming reference


410 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Error messages

DM_E_NOT_CONNECTED No connection to data manager


DM_E_INV_PRJ Specified project not found / loaded

Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll

Related functions

DMShowVarDatabaseExStr Open tag selection dialog box


DM_NOTIFY_SELECT_VAR_PROC_EXSTR Open tag selection dialog (callback)

Samples
Script sample Button DMShowVarDatabaseMultiExStr:
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
extern BOOL DM_NotifySelectVarProcA(LPCSTR lpszVariableName, DWORD
dwVariableID, LPVOID lpvUser);

BOOL bRet = FALSE;


CMN_ERROR err;
CHAR szProjectName[256];
HWND hwndParent;
DWORD dwItems;
DWORD dwInxDecr;

szProjectName[0] = 0;
hwndParent = NULL;
memset(&err, 0, sizeof(err));
dwItems = 0;
dwInxDecr = 4; /*for decrement index to save in DM tags from callback
set to lpvUser*/

printf("\r\n\r\n########## enter Test with


DMShowVarDatabaseMultiExStr ##########");

bRet = DMGetRuntimeProject(szProjectName, 256, &err);


if (!bRet)
{
printf("\r\n error DMGetRuntimeProject =>[%s], err=%ld,%ld,%ld,
%ld,%ld,[%s]", szProjectName,

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 411
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

err.dwError1, err.dwError2, err.dwError3, err.dwError4,


err.dwError5, err.szErrorText);
}

bRet = DMShowVarDatabaseMultiExStr(szProjectName, hwndParent, NULL,


NULL,
&dwItems, DM_NotifySelectVarProcA,
&dwInxDecr, &err);
if (!bRet)
{
printf("\r\n error DMShowVarDatabaseMultiExStr: err=%ld,%ld,%ld,
%ld,%ld,[%s]",
err.dwError1, err.dwError2, err.dwError3, err.dwError4,
err.dwError5, err.szErrorText);
}
else
{
printf("\r\n DMShowVarDatabaseExStrMulti OK!");
printf("\r\n [%ld] Var's selected", dwItems);
}

printf("\r\n########## exit Test with DMShowVarDatabaseMultiExStr


##########\r\n");
}

Script sample Project-Function DM_NotifySelectVarProcA:

BOOL DM_NotifySelectVarProcA(LPCSTR lpszVariableName, DWORD


dwVariableID, LPVOID lpvUser)
{
BOOL bRet = TRUE;
DWORD* pdwInxDecr = NULL;

pdwInxDecr = (DWORD*)lpvUser;

printf("\r\n\r\n#### DM_NotifySelectVarProc entry: ####");


printf("\r\n VarName=[%s], VarID=[%ld], lpvUser=[0x%08lx]",
lpszVariableName, dwVariableID, lpvUser);
if (pdwInxDecr)
{
// handle max 4 outputs, ignore all others
if(4 == *pdwInxDecr )
{
SetTagChar("szVarKeyName_4",lpszVariableName);
SetTagDWord("dwVarKeyID_4",dwVariableID);
printf("\r\n save in szVarKeyName_4 and dwVarKeyID_4");
}
if(3 == *pdwInxDecr )
{
SetTagChar("szVarKeyName_3",lpszVariableName);
SetTagDWord("dwVarKeyID_3",dwVariableID);
printf("\r\n save in szVarKeyName_3 and dwVarKeyID_3");

WinCC Professional V13 SP2 – Programming reference


412 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

}
if(2 == *pdwInxDecr )
{
SetTagChar("szVarKeyName_2",lpszVariableName);
SetTagDWord("dwVarKeyID_2",dwVariableID);
printf("\r\n save in szVarKeyName_2 and dwVarKeyID_2");
}
if(1 == *pdwInxDecr )
{
SetTagChar("szVarKeyName_1",lpszVariableName);
SetTagDWord("dwVarKeyID_1",dwVariableID);
printf("\r\n save in szVarKeyName_1 and dwVarKeyID_1");
}
}
if (pdwInxDecr && (0L < *pdwInxDecr))
{
*pdwInxDecr = *pdwInxDecr - 1L;
printf("\r\n Inx=%ld", *pdwInxDecr);
}

printf("\r\n#### DM_NotifySelectVarProc exit ####\r\n");

return bRet;
}

2.2.6.36 DM_NOTIFY_SELECT_VAR_PROC (RT Professional)

Description
In order to evaluate the tags selected by the DMShowVarDatabaseMulti function, you must
provide a DM_NOTIFY_SELECT_VAR_PROC type callback function.

Declaration

BOOL ( * DM_NOTIFY_SELECT_VAR_PROC) (
LPDM_VARKEY lpdmVarKey,
DWORD dwItem,
LPVOID lpvUser );

Parameters

lpdmVarKey
Pointer to first DM_VARKEY (Page 239) type structure with the name and ID of a tag.

dwItem
Number of structures passed in lpdmVarKey.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 413
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
The enumeration is continued.

FALSE
The enumeration is cancelled.

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
dmclient.h

Related functions

DMShowVarDatabaseMulti (Page 407) Open tag selection dialog

See also
DM_VARKEY (Page 239)
DMShowVarDatabaseMulti (Page 407)

2.2.6.37 GAPICreateNewVariable (RT Professional)

Use
Creates a new tag or check whether a tag exists. This function can only be used for temporary
$ tags.

WinCC Professional V13 SP2 – Programming reference


414 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL GAPICreateNewVariable (
LPMCP_NEWVARIABLE_DATA pData,
LPCMN_ERROR lpdmError);

Parameters

pData
Pointer to the MCP_NEWVARIABLE_DATA (Page 243) structure with the data of the tag.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Tag created.
When checked: Tag does not yet exist.

FALSE
Error.
When checked with Errorcode1 = DM_E_ALREADY_EXIST: Tag exists

Comment
There are more advanced functions.

GAPICreateNewVariable4
GAPICreateNewVariableEx4
GAPICreateNewVariable5

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_ALREADY_EXIST Object to be created already exists

Required files
dmclient.h
dmclient.lib
dmclient.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 415
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Related functions

GAPICreateNewVariable4 (Page 416) Create tag


GAPICreateNewVariableEx4 (Page 419) Create tag with Creator ID
GAPICreateNewVariable5 (Page 417) Create tag with Creator ID

See also
MCP_NEWVARIABLE_DATA (Page 243)
GAPICreateNewVariable4 (Page 416)
GAPICreateNewVariable5 (Page 417)
GAPICreateNewVariableEx4 (Page 419)

2.2.6.38 GAPICreateNewVariable4 (RT Professional)

Use
Creates a new tag or check whether a tag exists. This function can only be used for temporary
$ tags.
This function differs from GAPICreateNewVariable due to the additional specification of scaling
information.

Declaration

BOOL GAPICreateNewVariable4 (
LPMCP_NEWVARIABLE_DATA_4 pData,
LPCMN_ERROR lpdmError);

Parameters

pData
Pointer to the MCP_NEWVARIABLE_DATA_4 (Page 245) structure with the data of the tag.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Tag created.
When checked: Tag does not yet exist.

WinCC Professional V13 SP2 – Programming reference


416 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

FALSE
Error.
When checked with Errorcode1 = DM_E_ALREADY_EXIST: Tag exists.

Comment
There are more advanced functions.

GAPICreateNewVariableEx4 Create tag with Creator ID


GAPICreateNewVariable5 Create tag with Creator ID

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_ALREADY_EXIST Object to be created already exists

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

GAPICreateNewVariable (Page 414) Create tag


GAPICreateNewVariableEx4 (Page 419) Create tag with Creator ID
GAPICreateNewVariable5 (Page 417) Create tag with Creator ID

See also
GAPICreateNewVariable (Page 414)
MCP_NEWVARIABLE_DATA_4 (Page 245)
GAPICreateNewVariable5 (Page 417)
GAPICreateNewVariableEx4 (Page 419)

2.2.6.39 GAPICreateNewVariable5 (RT Professional)

Use
Creates a new tag or check whether a tag exists. This function can only be used for temporary
$ tags.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 417
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

This function differs from GAPICreateNewVariable4 due to the specification of the creator ID
and the start and substitute values that can also be specified for text tags.

Declaration

BOOL GAPICreateNewVariable5 (
DWORD dwCreatorID,
LPMCP_NEWVARIABLE_DATA_5 pData,
LPCMN_ERROR lpdmError);

Parameters

dwCreatorID
In the creator identification, you can determine who created an object.
The values 0 – 10100 and 11000 – 11100 are reserved for internal or specific systems.

pData
Pointer to the MCP_NEWVARIABLE_DATA_5 (Page 247) structure with the data of the tag.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Tag created.
When checked: Tag does not yet exist.

FALSE
Error.
When checked with Errorcode1 = DM_E_ALREADY_EXIST: Tag exists.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_ALREADY_EXIST Object to be created already exists

Required files
dmclient.h
dmclient.lib

WinCC Professional V13 SP2 – Programming reference


418 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

dmclient.dll

Related functions

GAPICreateNewVariable (Page 414) Create tag


GAPICreateNewVariable4 (Page 416) Create tag
GAPICreateNewVariableEx4 (Page 419) Create tag with Creator ID

See also
GAPICreateNewVariable (Page 414)
GAPICreateNewVariable4 (Page 416)
MCP_NEWVARIABLE_DATA_5 (Page 247)
GAPICreateNewVariableEx4 (Page 419)
MCP_VARIABLE_LIMITS5 (Page 259)

2.2.6.40 GAPICreateNewVariableEx4 (RT Professional)

Use
Creates a new tag or check whether a tag exists. This function can only be used for temporary
$ tags.
This function differs from GAPICreateNewVariable4 due to the specification of the creator ID.

Declaration

BOOL GAPICreateNewVariableEx4 (
DWORD dwCreatorID,
LPMCP_NEWVARIABLE_DATA_4 pData,
LPCMN_ERROR lpdmError);

Parameters

dwCreatorID
In the creator identification, you can determine who created an object.
The values 0 – 10100 and 11000 – 11100 are reserved for internal or specific systems.

pData
Pointer to the MCP_NEWVARIABLE_DATA_4 (Page 245) structure with the data of the tag.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 419
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Tag created.
When checked: Tag does not yet exist.

FALSE
Error.
When checked with Errorcode1 = DM_E_ALREADY_EXIST: Tag exists.

Comment
There is an advanced function.

GAPICreateNewVariable5

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_ALREADY_EXIST Object to be created already exists

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

GAPICreateNewVariable (Page 414) Create tag


GAPICreateNewVariable4 (Page 416) Create tag
GAPICreateNewVariable5 (Page 417) Create tag with Creator ID

See also
GAPICreateNewVariable (Page 414)
GAPICreateNewVariable4 (Page 416)

WinCC Professional V13 SP2 – Programming reference


420 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

MCP_NEWVARIABLE_DATA_4 (Page 245)


GAPICreateNewVariable5 (Page 417)

2.2.7 Functions for processing structured tags (RT Professional)

2.2.7.1 GAPIEnumTypeMembers (RT Professional)

Use
The function returns the names of the tags belonging to a structured tag.

Declaration

BOOL GAPIEnumTypeMembers (
LPCSTR lpszProjectFile,
LPCSTR lpszTypeName,
DM_ENUM_TYPEMEMBERS_PROC lpfnCallback,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in runtime.
If an empty string is entered, an internal DMEnumOpenedProjects is performed on the currently
open project.
Only the currently open project can be specified in runtime. Any other specification is rejected
with the error, DM_E_NOT_CONNECTED.

lpszTypeName
Name of a type of structured tag whose tags are to be listed.

lpfnCallback
Pointer to your callback function that is called for every tag.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 421
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
List tags in a structured tag.

FALSE
Error.

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DM_ENUM_TYPEMEMBERS_PROC List tags in a structured tag


(Page 422) (callback)
GAPIEnumTypeMembersEx (Page 424) Tags in a structured tag listed
GAPIEnumTypeMembersEx4 Tags in a structured tag listed
(Page 428)

See also
DM_ENUM_TYPEMEMBERS_PROC (Page 422)
GAPIEnumTypeMembersEx (Page 424)
GAPIEnumTypeMembersEx4 (Page 428)

2.2.7.2 DM_ENUM_TYPEMEMBERS_PROC (RT Professional)

Description
In order to evaluate the names of tags listed by the system, you must provide a
DM_ENUM_TYPEMEMBERS_PROC type callback function.

WinCC Professional V13 SP2 – Programming reference


422 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL ( * DM_ENUM_TYPEMEMBERS_PROC) (
LPCSTR lpszMemberName,
LPVOID lpvUser );

Parameters

lpszStructTypeName
Pointer to the name of the tags associated with a structured tag.

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
The enumeration is continued.

FALSE
The enumeration is cancelled.

Note
Data should only be copied again here. The following types of function calls within the callback
can lead to deadlocks or stack overflows:
● Functions in which a message loop is accessed, for example: GetMessage
● ODK functions from the same DLL
● Enumerations that call other enumerations

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

GAPIEnumTypeMembers (Page 421) Tags in a structured tag listed

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 423
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
GAPIEnumTypeMembers (Page 421)

2.2.7.3 GAPIEnumTypeMembersEx (RT Professional)

Use
The function returns a description, including all the predefined values of tags belonging to a
structured tag but without scaling data.
If you want to read the scaling data, you need the GAPIEnumTypeMembersEx4 function.

Declaration

BOOL GAPIEnumTypeMembersEx (
LPCSTR lpszProjectFile,
LPCSTR lpszTypeName,
DM_ENUM_TYPEMEMBERS_PROC_EX lpfnCallback,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in runtime.
If an empty string is entered, an internal DMEnumOpenedProjects is performed on the currently
open project.
Only the currently open project can be specified in runtime. Any other specification is rejected
with the error, DM_E_NOT_CONNECTED.

lpszTypeName
Name of a type of structured tag whose tags are to be listed.
Only local tags can be enumerated on clients.

lpfnCallback
Pointer to your callback function that is called for every tag.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

WinCC Professional V13 SP2 – Programming reference


424 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Tags of a structured tag listed.

FALSE
Error.

Comment
There is an advanced function, GAPIEnumTypeMembersEx4..

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DM_ENUM_TYPEMEMBERS_PROC_EX List tags in a structured tag (callback)


(Page 427)
GAPIEnumTypeMembers (Page 421) Tags in a structured tag listed
GAPIEnumTypeMembersEx4 (Page 428) Tags in a structured tag listed

See also
GAPIEnumTypeMembers (Page 421)
DM_ENUM_TYPEMEMBERS_PROC_EX (Page 427)
GAPIEnumTypeMembersEx4 (Page 428)

2.2.7.4 GAPIEnumTypeMembersExStr (RT Professional)

Declaration
BOOL GAPIEnumTypeMembersExStr (
LPCTSTR lpszProjectFile,
LPCTSTR lpszTypeName,
DM_ENUM_TYPEMEMBERS_PROC_EXSTR lpfnCallback,
LPVOID lpvUser,

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 425
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

LPCMN_ERROR lpdmError);

Description
This function returns a description, including all defaults of the tags belonging to a structured
tag; however no scaling data are returned.

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be retrieved with DMEnumOpenedProjects, or with
DMGetRuntimeProject in Runtime.
In WinCC version V5.0 SP2 or higher, entering a blank string will cause an internal
DMEnumOpenedProjects to be executed for a currently open project.
In Runtime, only the currently open project may be entered. Other entries are rejected with
error DM_E_NOT_CONNECTED in WinCC V5.0 SP2 or higher.

lpszTypeName
Name of the type of a structured tag whose tags you want to have enumerated.
Only local tag types can be enumerated on multi-clients (V5) or clients (V6).

lpfnCallback
Pointer to the callback function which is called for each tag.

lpvUser
Pointer to application-specific data. The function does not evaluate this pointer, but makes it
available again within the callback function.

lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. In the
event of an error, the system writes error information to this structure.

Return value

TRUE
Tags of a structured tag have been enumerated

FALSE
Error

Required files
dmclient_exstr.h

WinCC Professional V13 SP2 – Programming reference


426 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

dmclient.lib
dmclient.dll

Related functions

DM_ENUM_TYPEMEM‐ Enumerate tags of a structured tag (callback)


BERS_PROC_EXSTR
GAPIEnumTypeMembersEx4 Enumerate tags of a structured tag

2.2.7.5 DM_ENUM_TYPEMEMBERS_PROC_EX (RT Professional)

Description
In order to evaluate the descriptions of tags listed by the system, you must provide a
DM_ENUM_TYPEMEMBERS_PROC_EX type callback function.

Declaration

BOOL ( * DM_ENUM_TYPEMEMBERS_PROC_EX) (
LPDM_VARKEY lpdmVarKey,
LPMCP_NEWVARIABLE_DATA_EX lpdmVarDataEx,
LPVOID lpvUser );

Parameters

lpdmVarKey
Pointer to the first of the AUTOHOTSPOT type structures with the keys (ID and name) of a tag

lpdmVarDataEx
Pointer to a MCP_NEWVARIABLE_DATA_EX (Page 249) type structure with the description
of the tag.

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
The enumeration is continued.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 427
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

FALSE
The enumeration is cancelled.

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
dmclient.h

Related functions

GAPIEnumTypeMembersEx Tags in a structured tag listed


(Page 424)

See also
GAPIEnumTypeMembersEx (Page 424)
MCP_NEWVARIABLE_DATA_EX (Page 249)

2.2.7.6 GAPIEnumTypeMembersEx4 (RT Professional)

Use
The function returns a complete description, including all the predefined values of tags
belonging to a structured tag.

Declaration

BOOL GAPIEnumTypeMembersEx4 (
LPCSTR lpszProjectFile,
LPCSTR lpszTypeName,
DM_ENUM_TYPEMEMBERS_PROC_EX4 lpfnCallback,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

WinCC Professional V13 SP2 – Programming reference


428 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in runtime.
If an empty string is entered, an internal DMEnumOpenedProjects is performed on the currently
open project.
Only the currently open project can be specified in runtime. Any other specification is rejected
(DM_E_NOT_CONNECTED).

lpszTypeName
Name of a type of structured tag whose tags are to be listed.
Only local tags can be enumerated on clients.

lpfnCallback
Pointer to your callback function that is called for every tag.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Tags of a structured tag listed.

FALSE
Error.

Required files
dmclient.h
dmclient.lib
dmclient.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 429
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Related functions

DM_ENUM_TYPEMEMBERS_PROC_EX4 List tags in a structured tag (callback)


(Page 430)
GAPIEnumTypeMembers (Page 421) Tags in a structured tag listed

See also
GAPIEnumTypeMembers (Page 421)
GAPIEnumTypeMembersEx (Page 424)
DM_ENUM_TYPEMEMBERS_PROC_EX4 (Page 430)

2.2.7.7 DM_ENUM_TYPEMEMBERS_PROC_EX4 (RT Professional)

Description
In order to evaluate the descriptions of tags listed by the system, you must provide a
DM_ENUM_TYPEMEMBERS_PROC_EX4 type callback function. It differs from
DM_ENUM_TYPEMEMBERS_PROC_EX due to the additional specification of scaling
information.

Declaration

BOOL ( * DM_ENUM_TYPEMEMBERS_PROC_EX4) (
LPDM_VARKEY lpdmVarKey,
LPMCP_NEWVARIABLE_DATA_EX4 lpdmVarDataEx,
LPVOID lpvUser );

Parameters

lpdmVarKey
Pointer to the first of the DM_VARKEY (Page 239) type structures with the keys (ID and name)
of a tag

lpdmVarDataEx
Pointer to a MCP_NEWVARIABLE_DATA_EX4 (Page 251) type structure with the description
of a tag.

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

WinCC Professional V13 SP2 – Programming reference


430 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Return value

TRUE
The enumeration is continued.

FALSE
The enumeration is cancelled.

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
dmclient.h

Related functions

GAPIEnumTypeMembersEx4 Tags in a structured tag listed


(Page 428)

See also
GAPIEnumTypeMembersEx4 (Page 428)
DM_VARKEY (Page 239)
MCP_NEWVARIABLE_DATA_EX4 (Page 251)

2.2.7.8 GAPIEnumTypes (RT Professional)

Use
This function lists the names and ID numbers of the configured structured tag types.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 431
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL GAPIEnumTypes (
LPCSTR lpszProjectFile,
DM_ENUM_TYPES_PROC lpfnCallback,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in runtime.
If an empty string is entered, an internal DMEnumOpenedProjects is performed on the currently
open project.
Only the currently open project can be specified in runtime. Any other specification is rejected
with the error, DM_E_NOT_CONNECTED.

lpfnCallback
Pointer to your callback function, which receives the data of the tag types.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Types of structured tags listed.

FALSE
Error.

Required files
dmclient.h
dmclient.lib
dmclient.dll

WinCC Professional V13 SP2 – Programming reference


432 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Related functions

DM_ENUM_TYPES_PROC List types of structured tags (callback)


(Page 433)

Examples
Enumerate all structured types (Page 474)"DM01.cpp"

See also
DM_ENUM_TYPES_PROC (Page 433)
Enumerate all structured types (Page 474)

2.2.7.9 DM_ENUM_TYPES_PROC (RT Professional)

Description
In order to evaluate the tag types listed by the system, you must provide a
DM_ENUM_TYPES_PROC type callback function.

Declaration

BOOL ( * DM_ENUM_TYPES_PROC) (
LPCSTR lpszTypeName,
DWORD dwTypeID,
DWORD dwCreatorID,
LPVOID lpvUser );

Parameters

lpszTypeName
Pointer on the name of the tag type.

dwTypeID
dwTypeID corresponds to the ID as assigned by GAPICreateType for the tag type.

dwCreatorID
In the creator identification, you can determine who created an object.
The values 0 – 10100 and 11000 – 11100 are reserved for internal or specific systems.

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 433
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Return value

TRUE
The enumeration is continued.

FALSE
The enumeration is cancelled.

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
dmclient.h

Related functions

GAPIEnumTypes (Page 431) List types of structured tags

Examples
Enumerate all structured types (Page 474)"DM01.cpp"

See also
GAPIEnumTypes (Page 431)
Enumerate all structured types (Page 474)

2.2.8 Functions for processing connections (RT Professional)

2.2.8.1 DMEnumConnectionData (RT Professional)

Use
The function determines the information about a configured logical connection.

WinCC Professional V13 SP2 – Programming reference


434 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL DMEnumConnectionData (
LPCSTR lpszProjectFile,
LPDM_CONNKEY lpdmConnKey,
DWORD dwItems,
DM_ENUM_CONNECTION_PROC lpfnCallback,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file is determined with DMEnumOpenedProjects or with
DMGetRuntimeProject in runtime.

lpdmConnKey
Pointer to the first DM_CONNKEY (Page 213) type structure. These structures are used to
specify the logical connections, the data of which are to enumerated.

dwItems
The number of logical connections, the data of which is to listed.
A value of 0 triggers the listing of all connections.

lpfnCallback
Pointer to your callback function, which receives the data of the logical connection.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Data listed.

FALSE
Error.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 435
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DM_ENUM_CONNECTION_PROC (Page 438) List connection data (callback)

Examples
Enumerate all connections (Page 476)"DM01.cpp"
OnTestEnumConnectionDataAll (Page 481)"TESTCDoc.cpp"

See also
DM_CONNKEY (Page 213)
DM_ENUM_CONNECTION_PROC (Page 438)
Enumerate all connections (Page 476)
OnTestEnumConnectionDataAll (Page 481)

2.2.8.2 DMEnumConnectionDataExStr (RT Professional)

Declaration
BOOL DMEnumConnectionDataExStr (
LPCTSTR lpszProjectFile,
DM_ENUM_CONNECTION_PROC_EXSTR lpfnCallback,
LPVOID lpvUser,
LPDWORD lpdwConnectionCount,
LPCMN_ERROR lpdmError);

Description
This function is used to determine all configured logical connections.

WinCC Professional V13 SP2 – Programming reference


436 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Parameters

lpszProjectFile
Pointer to the name of the project file, including path and extension.
The name of the project file can be retrieved with DMEnumOpenedProjects, or with
DMGetRuntimeProject in Runtime.

lpfnCallback
Pointer to your callback function which receives the data of the logical connection.

lpvUser
Pointer to application-specific data. The function does not evaluate this pointer, but makes it
available again within the callback function.

lpdwConnectionCount
Pointer to a "DWORD", in which the number of existing connections is returned.
Thus, "lpfnCallback = NULL" first determines how much memory is required for the
connections.

lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. In the
event of an error, the system writes error information to this structure.

Return value

TRUE
Data have been enumerated

FALSE
Error

Error messages

DM_E_NOT_CONNECTED No connection to data manager

Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll

Related functions

DM_ENUM_CONNECTION_PROC_EXSTR Enumerate connection data (callback)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 437
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.8.3 DM_ENUM_CONNECTION_PROC (RT Professional)

Description
In order to evaluate information about a logical connection listed by the system, you must
provide a DM_ENUM_CONNECTION_PROC type callback function.

Declaration

BOOL ( * DM_ENUM_CONNECTION_PROC) (
LPDM_CONNECTION_DATA lpdmConData,
LPVOID lpvUser);

Parameters

lpdmConData
Pointer to a DM_CONNECTION_DATA (Page 212) type structure in which the data of a logical
connection are stored.

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
The enumeration is continued.

FALSE
The enumeration is cancelled.

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
dmclient.h

WinCC Professional V13 SP2 – Programming reference


438 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Related functions

DMEnumConnectionData (Page 434) List connection data

Examples
Enumerate all connections (Page 476)"DM01.cpp"

See also
DM_CONNECTION_DATA (Page 212)
DMEnumConnectionData (Page 434)
Enumerate all connections (Page 476)

2.2.9 Functions for the work platform (RT Professional)

2.2.9.1 DMGetOSVersion (RT Professional)

Use
Determines the operating system used on the PC.

Declaration

DWORD DMGetOSVersion (
VOID);

Parameters
None.

Return value
The return value indicates the operating system:

DM_OS_UNKNOWN 0 Unknown operating system


DM_OS_NT 1 Windows NT
DM_OS_32S 2 Windows 3.x with Win 32s
DM_OS_CHICAGO 3 Windows 95
DM_OS_2000 4 Windows 2000
DM_OS_XP 5 Windows XP
DM_OS_2003 6 Windows 2003

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 439
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Required files
dmclient.h
dmclient.lib
dmclient.dll

2.2.9.2 DMGetSystemLocale (RT Professional)

Use
Gets the code of the currently used configuration language.

Declaration

BOOL DMGetSystemLocale (
LPDWORD lpdwLocaleID,
LPCMN_ERROR lpdmError);

Parameters

lpdwLocaleID
Pointer to the code of the currently configured language.
Possible return values are the language codes for:

German 0x0407
English 0x0409
French 0x040C

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Currently used configuration language determined.

FALSE
Error

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager

WinCC Professional V13 SP2 – Programming reference


440 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Required files
dmclient.h
dmclient.lib
dmclient.dll

Examples
OnTestSystemLocale (Page 487)"TESTCDoc.cpp"

See also
OnTestSystemLocale (Page 487)

2.2.9.3 DMSetLanguage (RT Professional)

Use
Switches the configuration language.

Declaration

BOOL DMSetLanguage (
DWORD dwLocaleID,
LPCMN_ERROR lpdmError );

Parameters

dwLocaleID
Pointer to the code of the language to be set. Possible values are the language codes for:

German 0x0407
English 0x0409
French 0x040C

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Language switched.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 441
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

FALSE
Error.

Error messages

DM_E_NOT_SUPPORTED Requested service unavailable

Required files
dmclient.h
dmclient.lib
dmclient.dll

2.2.9.4 DMShowLanguageDialog (RT Professional)

Use
The function opens a dialog box for selecting the language.

Declaration

BOOL DMShowLanguageDialog (
HWND hwndParent,
DWORD dwFlags,
DWORD dwSetLocaleIDs[],
UINT uSetIDArraySize,
LPDWORD lpdwGetLocaleID,
LPCMN_ERROR lpdmError);

Parameters

hwndParent
Handle to the window that is used as the parent window for the dialog.

dwFlags
dwFlags indicates the languages that appear in the dialog and can be selected:

DM_LANGDLG_REMOVE Set All languages that can be registered with dwSetLocaleIDs are
displayed, except for the languages in the EnumSystemLocales
(LCID_SUPPORTED) array.
Not set All languages in the dwSetLocaleIDs array are displayed.
DM_LANGDLG_ONLY_PRIMARY Set Only the main languages (PRIMARY_LANGUAGE) are displayed.
Not set Sublanguages are also displayed.
DM_LANGDLG_NO_NOTIFY Applications are not notified when the dialog is closed with "OK"

WinCC Professional V13 SP2 – Programming reference


442 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

dwSetLocaleIDs
Array with the IDs of the languages to be displayed in the dialog.

uSetIDArraySize
Size of the dwSetLocaleIDs array.

lpdwGetLocaleID
Pointer to a DWORD, in which the selected language ID should be stored.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Close the dialog with "OK".

FALSE
Error or close dialog with "CANCEL".

Error messages

DM_E_CANCEL User has selected "Cancel" in a dialog

Required files
dmclient.h
dmclient.lib
dmclient.dll

2.2.10 Functions for updating tags (RT Professional)

2.2.10.1 DMBeginStartVarUpdate (RT Professional)

Use
Trigger an update request. A transaction ID for identifying transaction is assigned with this
function.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 443
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL DMBeginStartVarUpdate (
LPDWORD pdwTAID
LPCMN_ERROR lpdmError )

Parameters

pdwTAID
Pointer to a tag that contains the transaction ID assigned by the Data Manager after a
successful call of the function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Transaction ID assigned.

FALSE
Error.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager

Required files
dmclient.h
dmclient.lib
dmclient.dll

Examples
OnTestVariablenBeginstartvarupdate (Page 488)"TESTCDoc.cpp"

See also
OnTestVariablenBeginstartvarupdate (Page 488)
DMEndStartVarUpdate (Page 445)
DMResumeVarUpdate (Page 446)

WinCC Professional V13 SP2 – Programming reference


444 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

DMStartVarUpdate (Page 448)


DMStartVarUpdateEx (Page 451)
DMStopVarUpdate (Page 463)
DMSuspendVarUpdate (Page 465)

2.2.10.2 DMEndStartVarUpdate (RT Professional)

Use
After the function is successfully called, Data Manager updates the tags and forwards the new
values to your application as required.

Declaration

BOOL DMEndStartVarUpdate (
DWORD dwTAID,
LPCMN_ERROR lpdmError );

Parameters

dwTAID
dwTAID contains the transaction ID assigned with the call of the DMBeginStartVarUpdate
function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Update started.

FALSE
Error.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_INVALID_TAID Invalid transaction ID

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 445
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Required files
dmclient.h

Related functions

DMBeginStartVarUpdate (Page 443) Trigger an update request


DMStartVarUpdate (Page 448) Define update tags

Examples
OnTestVariablenEndstartvarupdate (Page 489)"TESTCDoc.cpp"

See also
OnTestVariablenEndstartvarupdate (Page 489)
DMBeginStartVarUpdate (Page 443)
DMStartVarUpdate (Page 448)

2.2.10.3 DMResumeVarUpdate (RT Professional)

Use
Starts the updating of all tags defined by the transaction, when the transaction reaches the
value 0 after calling the reference counter.
The function is the counterpart to DMSuspendVarUpdate and should always be called together
with it in pairs.

Declaration

BOOL DMResumeVarUpdate (
DWORD dwTAID,
LPCMN_ERROR lpdmError);

Parameters

dwTAID
dwTAID contains the transaction ID assigned with the call of the DMBeginStartVarUpdate
function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


446 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Return value

TRUE
Continue update.

FALSE
Error.

Comment
Transactions have a reference counter that is incremented each time the
DMSuspendVarUpdate function is called. If the update of the tags should be continued,
DMResumeVarUpdate must be called repeatedly until the reference counter returns to the 0
position.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_INVALID_TAID Invalid transaction ID

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DMBeginStartVarUpdate (Page 443) Trigger an update request


DMSuspendVarUpdate (Page 465) Stop updating of tags

Examples
OnTestVariablenResumevarupdate (Page 500)"TESTCDoc.cpp"

See also
DMBeginStartVarUpdate (Page 443)
DMSuspendVarUpdate (Page 465)
OnTestVariablenResumevarupdate (Page 500)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 447
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.10.4 DMStartVarUpdate (RT Professional)

Use
The function is used to specify the tags to be updated by the Data Manager. The Data Manager
passes the new tag values to your application in the callback function when an update is
performed.
DMStartVarUpdateEx is a more advanced function, which additionally returns the quality code
in the DM_NOTIFY_VARIABLEEX_PROC callback in the DM_VAR_UPDATE_STRUCTEX
structure.

Declaration

BOOL DMStartVarUpdate (
DWORD dwTAID,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
DWORD dwCycle,
DM_NOTIFY_VARIABLE_PROC lpfnVariable,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Parameters

dwTAID
dwTAID contains the transaction ID assigned with the call of the DMBeginStartVarUpdate
function.

lpdmVarKey
Pointer to the first of the DM_VARKEY (Page 239) type structures, through which the tags to
be updated are specified.

dwItems
Number of tags to be updated in the passed DM_VARKEY structures.

dwCycle
The update cycle defined in dwCycle applies to all tags specified by lpdmVarKey. The upgrade
cycle is defined by the index of the entries in the list of update cycles.

"On change" Acyclic Index: 0


"250 ms" 250 Index: 1
"500 ms" 500 Index: 2
"1 s" 1000 Index: 3
"2 s" 2000 Index: 4
"5 s" 5000 Index: 5
"10 s" 10000 Index: 6

WinCC Professional V13 SP2 – Programming reference


448 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

"1 min" 60000 Index: 7


"5 min" 300000 Index: 8
"10 min" 600000 Index: 9
"1 h" 3600000 Index: 10
"User cycle 1" (e.g. 2000) Index: 11
"User cycle 2" (e.g. 3000) Index: 12
"User cycle 3" (e.g. 4000) Index: 13
"User cycle 4" (e.g. 5000) Index: 14
"User cycle 5" (e.g. 10000) Index: 15

lpfnVariable
Pointer to the DM_NOTIFY_VARIABLE_PROC callback function for data transfer by the Data
Manager.
With lpfnVariable == NULL, the update in the process image of the Data Manager is performed
at least in the required cycle, to the extent physically possible based on the current system
load, computer performance, coupling medium etc. The determination of the current value
needs to be performed independently by the application by calling the DMGetValue function.
When a program reports a notify routine, it must empty its message queue at regular intervals.
Messages that are not fetched can block WinCC notifications and thus block the entire WinCC.
In rare cases, the notification may already be delivered before the function call returns.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Update tags specified.

FALSE
Error.

Required files
dmclient.h
dmclient.lib
dmclient.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 449
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Related functions

DMBeginStartVarUpdate (Page 443) Trigger an update request


DM_NOTIFY_VARIABLE_PROC (Page 450) Specify update tags (callback)

See also
DMEndStartVarUpdate (Page 445)
DM_VARKEY (Page 239)
DMBeginStartVarUpdate (Page 443)
DM_NOTIFY_VARIABLE_PROC (Page 450)

2.2.10.5 DM_NOTIFY_VARIABLE_PROC (RT Professional)

Description
In order to evaluate the data determined by the system, you must provide a
DM_NOTIFY_VARIABLE_PROC type callback function.

Declaration

BOOL ( * DM_NOTIFY_VARIABLE_PROC) (
DWORD dwTAID,
LPDM_VAR_UPDATE_STRUCT lpdmvus,
DWORD dwItems,
LPVOID lpvUser);

Parameters

dwTAID
Transaction ID that was assigned by the Data Manager for the calling function.

lpdmvus
Pointer to the first DM_VAR_UPDATE_STRUCT (Page 226) type structure that contains the
values of the tags requested.

dwItems
Number of structures passed in lpdmvus (corresponding to the number of returned tag values).

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

WinCC Professional V13 SP2 – Programming reference


450 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Return value
The return values depend on your implementation

Comment

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations
If a program declares a Notify routine, it must empty its message queue regularly. Unremoved
messages can block WinCC notifications and thus the entire WinCC.
In rare cases, the Notify may already be delivered before the function call has returned.

Required files
dmclient.h

Related functions

DMGetValueWait (Page 348) Get tag values with update


DMStartVarUpdate (Page 448) Define update tags

See also
DMStartVarUpdate (Page 448)
DM_VAR_UPDATE_STRUCT (Page 226)
DMGetValueWait (Page 348)

2.2.10.6 DMStartVarUpdateEx (RT Professional)

Use
The function is used to specify the tags to be updated by the Data Manager. The Data Manager
passes the new tag values to the application in the callback function when an update is
performed.
In contrast to DMStartVarUpdate, the quality code is also provided in the
DM_VAR_UPDATE_STRUCTEX structure, which is returned in the
DM_NOTIFY_VARIABLEEX_PROC callback.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 451
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Declaration

BOOL DMStartVarUpdateEx (
DWORD dwTAID,
LPDM_VARKEY lpdmVarKey,
DWORD dwItems,
DWORD dwCycle,
DM_NOTIFY_VARIABLEEX_PROC lpfnVariable,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Parameters

dwTAID
dwTAID contains the transaction ID assigned with the call of the DMBeginStartVarUpdate
function.

lpdmVarKey
Pointer to the first of the DM_VARKEY (Page 239) type structures, through which the tags to
be updated are specified.

dwItems
Number of tags to be updated in the passed DM_VARKEY structures.

dwCycle
The update cycle defined here applies to all tags specified by lpdmVarKey . The upgrade cycle
is defined by the index of the entries in the list of update cycles.

"On change" Acyclic Index: 0


"250 ms" 250 Index: 1
"500 ms" 500 Index: 2
"1 s" 1000 Index: 3
"2 s" 2000 Index: 4
"5 s" 5000 Index: 5
"10 s" 10000 Index: 6
"1 min" 60000 Index: 7
"5 min" 300000 Index: 8
"10 min" 600000 Index: 9
"1 h" 3600000 Index: 10
"User cycle 1" (e.g. 2000) Index: 11
"User cycle 2" (e.g. 3000) Index: 12
"User cycle 3" (e.g. 4000) Index: 13
"User cycle 4" (e.g. 5000) Index: 14
"User cycle 5" (e.g. 10000) Index: 15

WinCC Professional V13 SP2 – Programming reference


452 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

lpfnVariable
Pointer to the DM_NOTIFY_VARIABLEEX_PROC callback function for data transfer by the
Data Manager.
With lpfnVariable == NULL, the update in the process image of the Data Manager is performed
at least in the required cycle, to the extent physically possible based on the current system
load, computer performance, coupling medium etc. The determination of the current value
needs to be performed independently by the application by calling the DMGetValue function.
When a program reports a notify routine, it must empty its message queue at regular intervals.
Messages that are not fetched can block WinCC notifications and thus block the entire WinCC.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Update tags specified.

FALSE
Error.

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DMBeginStartVarUpdate (Page 443) Trigger an update request


DM_NOTIFY_VARIABLEEX_PROC (Page 461) Specify update tags (callback)

See also
DM_VARKEY (Page 239)
DMBeginStartVarUpdate (Page 443)
DM_NOTIFY_VARIABLEEX_PROC (Page 461)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 453
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.10.7 DMStartVarUpdateExStr (RT Professional)

Declaration
BOOL DMStartVarUpdateExStr (
DWORD dwTAID,
DWORD dwFlags,
LPVARIANT lpvdmVarKey,
LPVARIANT lpvCookie,
DWORD dwCycle,
DM_NOTIFY_VARIABLEEX_PROC_EXSTR lpfnVariable,
LPVOID lpvUser,
LPCMN_ERROR lpdmError);

Description
This function is used to specify the tags to be updated by the data manager. Within the callback
function, the data manager passes on the new tag values to the application when an update
is executed.

Parameters

dwTAID
dwTAID contains the transaction ID allocated when the DMBeginStartVarUpdate function was
called.

dwFlags
If the tag name needs to be returned in the VT_LPSTR format in the VARIANT of the
DM_VAR_UPDATE_STRUCT_EXSTR structure of
DM_NOTIFY_VARIABLE_PROC_EXSTR, the
DM_FLAG_RETURN_PROPVARIANT_VT_LPSTR flag can be specified here.

lpvdmVarKey
Pointer to VARIANT with VT_ARRAY | VT_VARIANT for passing on the tag list that identifies
the tags to be changed.
A TagID is entered in the relevant list element with the type VT_I4 and the tag name with
VT_BSTR. In addition, VT_LPSTR (PROPVARIANT) can be entered for passing on as
allocated ASCII string in order, for example, to pass on constant names from the script.
VT_LPSTR is then converted internally into the required VT_BSTR type.
For multi-client projects in WinCC Version 5.0 or higher, it may be required here to add a server
prefix (refer to "Project types and versions" ).

lpvCookie
Pointer to a VARIANT for an additional list of user-dependent data for each tag.
This is intended as substitute for lpvUserData of the previous DM_VARKEY and is also
returned in the DM_VAR_UPDATE_STRUCT_EXSTR structure for each tag.

WinCC Professional V13 SP2 – Programming reference


454 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

dwCycle
The update cycle defined here is applied to all tags specified by means of lpvdmVarKey. The
update cycle is defined by means of the index of the entries included in the update cycle list.

"When changed" acyclic Index: 0


"250 ms" 250 Index: 1
"500 ms" 500 Index: 2
"1 s" 1000 Index: 3
"2 s" 2000 Index: 4
"5 s" 5000 Index: 5
"10 s" 10000 Index: 6
"1 min" 60000 Index: 7
"5 min" 300000 Index: 8
"10 min" 600000 Index: 9
"1 h" 3600000 Index: 10
"User cycle 1" (e.g. 2000) Index: 11
"User cycle 2" (e.g. 3000) Index: 12
"User cycle 3" (e.g. 4000) Index: 13
"User cycle 4" (e.g. 5000) Index: 14
"User cycle 5" (e.g. 10000) Index: 15

lpfnVariable
Pointer to the DM_NOTIFY_VARIABLEEX_PROC callback function for data transfer through
the data manager.
If lpfnVariable = NULL, the update in the process image of the data manager will be executed
at least in the required cycle (if physically possible with the current system load, computer
performance, coupling medium, etc.); however, each value must be determined individually
by calling the DMGetValue function through the application.
If a program requests a notify routine, it has to clear its message queue at regular intervals.
Unread messages could block WinCC notifications or finally block WinCC altogether.

lpvUser
Pointer to application-specific data. The function does not evaluate this pointer, but makes it
available again within the callback function.

lpdmError
Pointer to the data of the extended error message within the CMN_ERROR structure. In the
event of an error, the system writes error information to this structure.

Return value

TRUE
Update tags have been specified

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 455
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

FALSE
Error

Required files
dmclient_exstr.h
dmclient.lib
dmclient.dll

Related functions

DMBeginStartVarUpdate Initiate update request

Samples
Script sample "Button DMStartVarUpdateExStr":
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
#pragma code ("OleAut32.dll")
//#include "OleAuto.h"
SAFEARRAY * SafeArrayCreateVector(VARTYPE vt, long lLbound, unsigned
int cElements );
HRESULT SafeArrayPtrOfIndex(SAFEARRAY FAR* psa, long FAR* rgIndices,
void HUGEP* FAR* ppvData );
HRESULT SafeArrayLock(SAFEARRAY FAR* psa);
HRESULT SafeArrayUnlock(SAFEARRAY FAR* psa);
#pragma code()

extern BOOL DM_NOTIFY_VARIABLE_PROC_EXSTR


DM_NotifyVariableProcExStr_VarUpdate(
DWORD dwTAID,
LPDM_VAR_UPDATE_STRUCT_EXSTRA lpdmvus,
DWORD dwItems,
LPVOID lpvUser);

VARIANT vVarKey;
VARIANT* pvElem;
SAFEARRAY* parrayKeys;
HRESULT hr;
CMN_ERROR err;
BOOL bRet;
long lInx;
DWORD dwTAID;
DWORD dwFlags;
DWORD dwCycle;

WinCC Professional V13 SP2 – Programming reference


456 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

memset(&err, 0, sizeof(err));
bRet = FALSE;
parrayKeys = NULL;
lInx = 0L;
dwFlags = DM_FLAG_RETURN_PROPVARIANT_VT_LPSTR;
//dwCycle = 3; /* 1sec*/
dwCycle = 0; /* on change*/

printf("\r\n\r\n########## enter Test with DMStartVarUpdateExStr


##########");

dwTAID = GetTagDWord("dwUpdTAID");

if (dwTAID)
{
printf("\r\nStartVarUpdate always running. Stop it before start
again!");
printf("\r\n########## exit Test with DMStartVarUpdateExStr
(nothing done) ##########\r\n");
return;
}

VariantInit(&vVarKey);
parrayKeys = SafeArrayCreateVector(VT_VARIANT, 0L, 4);
vVarKey.vt = VT_ARRAY | VT_VARIANT;
vVarKey.u.parray = parrayKeys;

SafeArrayLock(parrayKeys);
lInx = 0L;
hr = SafeArrayPtrOfIndex(parrayKeys, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = "dwVal_1";
lInx = 1L;
hr = SafeArrayPtrOfIndex(parrayKeys, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = "dwVal_2";
lInx = 2L;
hr = SafeArrayPtrOfIndex(parrayKeys, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = "dwVal_3";
lInx = 3L;
hr = SafeArrayPtrOfIndex(parrayKeys, &lInx, &pvElem);
pvElem->vt = VT_LPSTR;
pvElem->u.pbVal = "dwVal_4";
SafeArrayUnlock(parrayKeys);

bRet = DMBeginStartVarUpdate(&dwTAID, &err);


if (FALSE == bRet)
{
printf("\r\n error DMBeginStartVarUpdate, err=%ld,%ld,%ld,%ld,
%ld,[%s]",

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 457
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

err.dwError1, err.dwError2, err.dwError3,


err.dwError4, err.dwError5, err.szErrorText);
}
else
{
printf("\r\n DMBeginStartVarUpdate (dwTAID=%ld) OK.", dwTAID);
}
if (dwTAID)
{
SetTagDWord("dwUpdTAID",dwTAID);

memset(&err, 0, sizeof(err));
bRet = DMStartVarUpdateExStr(dwTAID, dwFlags, &vVarKey, dwCycle,
DM_NotifyVariableProcExStr_VarUpdate,
NULL, &err);
if (FALSE == bRet)
{
printf("\r\n error DMStartVarUpdateExStr (dwTAID=%ld): err=
%ld,%ld,%ld,%ld,%ld,[%s]",
dwTAID, err.dwError1, err.dwError2, err.dwError3,
err.dwError4, err.dwError5, err.szErrorText);
}
else
{
printf("\r\n DMStartVarUpdateExStr (dwTAID=%ld) OK.",
dwTAID);
}

memset(&err, 0, sizeof(err));
bRet = DMEndStartVarUpdate(dwTAID, &err);
if (FALSE == bRet)
{
printf("\r\n error DMEndStartVarUpdate (dwTAID=%ld): err=
%ld,%ld,%ld,%ld,%ld,[%s]",
dwTAID, err.dwError1, err.dwError2, err.dwError3,
err.dwError4, err.dwError5, err.szErrorText);
}
else
{
printf("\r\n DMEndStartVarUpdate (dwTAID=%ld) OK.", dwTAID);
}
}
else
{
printf("\r\n dwTAID == 0L ???");
}

printf("\r\n########## exit Test with DMStartVarUpdateExStr (dwTAID=


%ld) ##########\r\n", dwTAID);

WinCC Professional V13 SP2 – Programming reference


458 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Script sample "Project-Function DM_NotifyVariableProcExStr_VarUpdate":

#pragma code ("OleAut32.dll")


//#include "OleAuto.h"
HRESULT VariantChangeType( VARIANTARG FAR* pvargDest, VARIANTARG
FAR* pvarSrc, unsigned short wFlags, VARTYPE vt);
#pragma code()

BOOL DM_NotifyVariableProcExStr_VarUpdate(
DWORD dwTAID,
LPDM_VAR_UPDATE_STRUCT_EXSTRA lpdmvus,
DWORD dwItems,
LPVOID lpvUser)
{
BOOL bRet = FALSE;
int i = 0;
HRESULT hr = 0L;

printf("\r\n*** DM_NotifyVariableProcExStr_VarUpdate entry (dwTAID=


%ld) ***", dwTAID);

for (i = 0; i < dwItems; i++)


{
hr = VariantChangeType((VARIANTARG*)&(lpdmvus[i].vdmValue),
(VARIANTARG*)&(lpdmvus[i].vdmValue), 0,
VT_R8);
if (VT_LPSTR == lpdmvus[i].vdmVarKey.vt)
{
printf("\r\n [%d]:{VarKey=[%s]", i,
(LPCSTR)lpdmvus[i].vdmVarKey.u.pbVal);
}
else if (VT_I4 == lpdmvus[i].vdmVarKey.vt)
{
printf("\r\n [%d]:{VarKey=[%ld]", i,
lpdmvus[i].vdmVarKey.u.lVal);
}
else
{
printf("\r\n [%d]:{unexpected VarKey.vt=[%d]",
lpdmvus[i].vdmVarKey.vt);
}
printf(", dmValue=[%g]", lpdmvus[i].vdmValue.u.dblVal);
printf(", dwState=[%ld]", lpdmvus[i].dwState);
printf(", dwType=[%ld]", lpdmvus[i].dmTypeRef.dwType);
printf(", dwSize=[%ld]", lpdmvus[i].dmTypeRef.dwSize);
if (lpdmvus[i].dmTypeRef.lpszTypeName)
{
printf(", lpszTypeName=[%s]",
lpdmvus[i].dmTypeRef.lpszTypeName);
printf(", dwNameCharCount=[%ld]",
lpdmvus[i].dmTypeRef.dwNameCharCount);

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 459
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

}
else
{
printf(", lpszTypeName=[NULL]");
}
printf("}");
}

printf("\r\n*** DM_NotifyVariableProcExStr_VarUpdate exit (dwTAID=


%ld)***", dwTAID);
return bRet;
}

Script sample "Button DMStopVarUpdate":

#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
DWORD dwTAID;
CMN_ERROR err;
BOOL bRet;

dwTAID = GetTagDWord("dwUpdTAID");
memset(&err, 0, sizeof(err));
bRet = FALSE;

if (dwTAID)
{
bRet = DMStopVarUpdate(dwTAID, &err);
if (FALSE == bRet)
{
printf("\r\n!!! error DMStopVarUpdate (dwTAID=%ld): err=%ld,
%ld,%ld,%ld,%ld,[%s] !!!\r\n",
dwTAID, err.dwError1, err.dwError2, err.dwError3,
err.dwError4, err.dwError5, err.szErrorText);
memset(&err, 0, sizeof(err));
bRet = DMStopAllUpdates(&err);
if (FALSE == bRet)
{
printf("\r\n!!! error DMStopAllUpdates (dwTAID=%ld):
err=%ld,%ld,%ld,%ld,%ld,[%s] !!!\r\n",
dwTAID, err.dwError1, err.dwError2, err.dwError3,
err.dwError4, err.dwError5, err.szErrorText);
}
else
{
printf("\r\n DMStopAllUpdates OK.");
}
}
else
{

WinCC Professional V13 SP2 – Programming reference


460 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

printf("\r\n DMStopVarUpdate (dwTAID=%ld) OK.", dwTAID);


}
}

dwTAID = 0L;

SetTagDWord("dwUpdTAID",dwTAID);
}

2.2.10.8 DM_NOTIFY_VARIABLEEX_PROC (RT Professional)

Description
In order to evaluate the data determined by the system, you must provide a
DM_NOTIFY_VARIABLEEX_PROC type callback function.

Declaration

BOOL ( * DM_NOTIFY_VARIABLEEX_PROC) (
DWORD dwTAID,
LPDM_VAR_UPDATE_STRUCTEX lpdmvus,
DWORD dwItems,
LPVOID lpvUser);

Parameters

dwTAID
Transaction ID that was assigned by the Data Manager for the calling function.

lpdmvus
Pointer to the first DM_VAR_UPDATE_STRUCTEX (Page 228) type structure that contains
the values of the tags requested.

dwItems
Number of structures passed in lpdmvus (corresponding to the number of returned tag values).

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value
The return values depend on your implementation

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 461
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Comment

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations
If a program declares a Notify routine, it must empty its message queue regularly. Unremoved
messages can block WinCC notifications and thus the entire WinCC.
In rare cases, the Notify may already be delivered before the function call has returned.

Required files
dmclient.h

Related functions

DMGetValueWaitEx (Page 350) Get tag values with update


DMStartVarUpdateEx (Page 451) Define update tags

See also
DMStartVarUpdateEx (Page 451)
DM_VAR_UPDATE_STRUCTEX (Page 228)
DMGetValueWaitEx (Page 350)

2.2.10.9 DMStopAllUpdates (RT Professional)

Use
Stops all tag updates requested by the application. This function should be preferably called
after closing the corresponding module.

Declaration

BOOL DMStopAllUpdates (
LPCMN_ERROR lpdmError);

WinCC Professional V13 SP2 – Programming reference


462 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Parameters

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Updating of tags stopped.

FALSE
Error.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager

Required files
dmclient.h
dmclient.lib
dmclient.dll

Examples
OnTestVariablenStopallupdates (Page 503)"TESTCDoc.cpp"

See also
OnTestVariablenStopallupdates (Page 503)

2.2.10.10 DMStopVarUpdate (RT Professional)

Use
Stops the updating of tags for a specific transaction.

Declaration

BOOL DMStopVarUpdate (
DWORD dwTAID,
LPCMN_ERROR lpdmError);

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 463
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Parameters

dwTAID
dwTAID contains the transaction ID assigned with the call of the DMBeginStartVarUpdate
function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Updating of tags stopped.

FALSE
Error.

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_INVALID_TAID Invalid transaction ID

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DMBeginStartVarUpdate (Page 443) Trigger an update request

Examples
OnTestVariablenStopvarupdate (Page 503)"TESTCDoc.cpp"

See also
OnTestVariablenStopvarupdate (Page 503)
DMBeginStartVarUpdate (Page 443)

WinCC Professional V13 SP2 – Programming reference


464 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.10.11 DMSuspendVarUpdate (RT Professional)

Use
Interrupts the updating of all tags defined by the transaction.
Tags continue to be updated within the process image of the Data Manager. However, the
values are no longer transferred to the application.

Declaration

BOOL DMSuspendVarUpdate (
DWORD dwTAID,
LPCMN_ERROR lpdmError);

Parameters

dwTAID
dwTAID contains the transaction ID assigned with the call of the DMBeginStartVarUpdate
function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Updating suspended.

FALSE
Error.

Comment
Transactions have a reference counter, therefore the DMSuspendVarUpdate function can be
called multiple times for a transaction. If the transaction is already in the "SUSPENDED" state,
only the reference counter is incremented.
To continue updating, DMResumeVarUpdate must be called repeatedly until the reference
counter returns to the 0 position.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 465
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Error messages

DM_E_NOT_CONNECTED No connection to the Data Manager


DM_E_INVALID_TAID Invalid transaction ID

Required files
dmclient.h
dmclient.lib
dmclient.dll

Related functions

DMBeginStartVarUpdate (Page 443) Trigger an update request


DMResumeVarUpdate (Page 446) Continue updating of tags

Examples
OnTestVariablenSuspendvarupdate (Page 504)"TESTCDoc.cpp"

See also
DMResumeVarUpdate (Page 446)
DMBeginStartVarUpdate (Page 443)
OnTestVariablenSuspendvarupdate (Page 504)

WinCC Professional V13 SP2 – Programming reference


466 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11 Examples (RT Professional)

2.2.11.1 Connection to DM (RT Professional)

Example

// =====================================================================
// =====================================================================
// Desc. : Module with examples for Data Manager
// *********************************************************************
#include "stdafx.h" // if MFC classes
// #include "odkapi.h" // if console application
#include <time.h>
TCHAR g_szProjectFile[255] = {0};
TCHAR g_szDSNName[255] = {0};
#include "DM01.h"

//{{ODK_EXAMPLE}Connection to DM (MCP)}
//{{FUNCTION}DMGetConnectionState (MCP)}
//{{FUNCTION}DMConnect (MCP)}
//{{FUNCTION}DM_NOTIFY_PROC (MCP)}
//{{FUNCTION}DMDisConnect (MCP)}
//{{FUNCTION}(END)}

// =====================================================================
// Function: MyDMConnect(void) ODK DM CS
// =====================================================================
BOOL MyDMConnect(void)
{
CMN_ERROR Error;
BOOL ret = FALSE;
TCHAR szText[255];
TCHAR szAppName[255];
VOID* pvUser = AfxGetApp();
_tcsncpy_s(szAppName, _countof(szAppName), _T("MyODKApp_23"), _TRUNCATE);
memset(&Error, 0,sizeof(CMN_ERROR));
ret = DMGetConnectionState(&Error);
if(FALSE == ret) // not connected
{
memset(&Error, 0,sizeof(CMN_ERROR));
ret = DMConnect(szAppName, MyDMNotifyCallback, pvUser, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in DMConnect: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText,_countof(szText), _TRUNCATE, _T("DMConnect"));
}
ODKTrace(szText);
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 467
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

else // already connected


{
_sntprintf_s(szText,_countof(szText), _TRUNCATE, _T("DMGetConnectionState: OK"));
}
else // already connected
{
_sntprintf_s(szText,_countof(szText), _TRUNCATE, _T("DMGetConnectionState: OK"));
ODKTrace(szText);
}
return(ret);
}

// IMPLEMENTATION
// =====================================================================
// Function: MyDMGetConnectionState(void) ODK DM CS
// =====================================================================
BOOL MyDMGetConnectionState(void)
{
CMN_ERROR Error;
BOOL ret = FALSE;
TCHAR szText[255];
TCHAR szAppName[255];
VOID* pvUser = AfxGetApp();
_tcsncpy_s(szAppName, _countof(szAppName), _T("MyODKApp_23"), _TRUNCATE);
memset(&Error, 0,sizeof(CMN_ERROR));
ret = DMGetConnectionState(&Error);
if(FALSE == ret) // not connected
{
memset(&Error, 0,sizeof(CMN_ERROR));
ret = DMConnect(szAppName, MyDMNotifyCallback, pvUser, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in DMConnect: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText,_countof(szText), _TRUNCATE, _T("DMConnect"));
}
ODKTrace(szText);
//printf("%s\r\n",szText);
}
else // already connected
{
_sntprintf_s(szText,_countof(szText), _TRUNCATE, _T("DMGetConnectionState: OK"));
ODKTrace(szText);
}
return(ret);
}

// =====================================================================
// Function: MyDMDisConnect(void) ODK DM CS
// =====================================================================
BOOL MyDMDisConnect(void)
{

WinCC Professional V13 SP2 – Programming reference


468 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

CMN_ERROR Error;
BOOL ret = FALSE;
TCHAR szText[255];
memset(&Error, 0, sizeof(CMN_ERROR));
ret = DMDisConnect(&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in DMConnect: E1= 0x
%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText,_countof(szText), _TRUNCATE, _T("DMDisconnect"));
}
ODKTrace(szText);
return(ret);
}

// =====================================================================
// Function: MyDMNotifyCallback
// =====================================================================
BOOL MyDMNotifyCallback(DWORD dwNotifyClass, DWORD dwNotifyCode, LPBYTE lpbyData,
DWORD dwItems, LPVOID lpvUser)
{
lpvUser;
lpbyData;
TCHAR szText[255];
_sntprintf_s(szText ,_countof(szText), _TRUNCATE, _T("**DMNotifyCallback**"));
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" NotifyClass = 0x
%08X"),dwNotifyClass);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" NotifyCode = 0x%08X"),
dwNotifyCode);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" Items = %d"), dwItems);
ODKTrace(szText);
//printf("%s\r\n",szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("********************"));
ODKTrace(szText);
return(TRUE);
}

//{{ODK_EXAMPLE}(END)}

See also
DMConnect (Page 275)
DMDisconnect (Page 281)
DMGetConnectionState (Page 293)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 469
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.2 Enum Data of Tags (RT Professional)

Example

//{{ODK_EXAMPLE}Enum Data of Tags (MCP)}


//{{FUNCTION}DMEnumVarData4 (MCP)}
//{{FUNCTION}DM_ENUM_VARIABLE_PROC4 (MCP)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: MyDMEnumVarData4(void) ODK DM CS
// =====================================================================
// Desc. :
//--------------------------------------------------------------------------------
BOOL MyDMEnumVariable4Callback(LPDM_VARKEY lpdmVarKey, LPDM_VARIABLE_DATA4 lpdmVarData,
LPVOID lpvUser)
{
lpvUser;
TCHAR szText[255];
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("DMEnumVariableCallback"));
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("...szName=%s dwVarProperty=0x
%04X"),lpdmVarKey->szName, lpdmVarData->dwVarProperty);
ODKTrace(szText);
return TRUE;
}
void MyDMEnumVarData4()
{
// #define PROJ_PATH "C:\\siemens\\odk\\samples\\projects\\demo\\odk.mcp"
BOOL ret = FALSE;
DM_VARKEY dmVarKey[2];
TCHAR szText[255];
CMN_ERROR Error;
VOID* pUser = NULL;
memset(&Error,0,sizeof(CMN_ERROR));
memset(&dmVarKey, 0,2 * sizeof(DM_VARKEY));
dmVarKey[0].dwKeyType = DM_VARKEY_NAME;
_tcsncpy_s(dmVarKey[0].szName, _countof(dmVarKey[0].szName), _T("INT_TEST_VAR"),
_TRUNCATE);
dmVarKey[1].dwKeyType = DM_VARKEY_NAME;
_tcsncpy_s(dmVarKey[1].szName, _countof(dmVarKey[1].szName), _T("EXT_TEST_VAR"),
_TRUNCATE);
MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile
ret = DMEnumVarData4 (/*PROJ_PATH*/g_szProjectFile,
&dmVarKey[0],
2,
MyDMEnumVariable4Callback,
pUser,
&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in DMEnumVarData4: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);

WinCC Professional V13 SP2 – Programming reference


470 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

}
}
//{{ODK_EXAMPLE}(END)}

See also
DMEnumVarData4 (Page 324)
DM_ENUM_VARIABLE_PROC4 (Page 326)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 471
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.3 Enum open projects (RT Professional)

Example

//{{ODK_EXAMPLE}Enum open projects (MCP)}


//{{FUNCTION}DMEnumOpenedProjects (MCP)}
//{{FUNCTION}DM_ENUM_OPENED_PROJECTS_PROC (MCP)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: MyDMEnumOpenedProjects(void) ODK DM CS
// =====================================================================
// Desc. : Inquire project informations
// =====================================================================
BOOL MyDMEnumOpenProjectsCallback( LPDM_PROJECT_INFO lpInfo, LPVOID lpvUser )
{
lpvUser;
// this callback is only called once by every call of DMEnumOpenedProjects
// because, there can only opened one project at the same time
TCHAR szText[255];
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("**DMEnumOpenProjects**"));
ODKTrace(szText);
// copy the project file name to g_szProjectFile for global use
// many API-functions need this name to select the project database
_tcsncpy_s(g_szProjectFile, _countof(g_szProjectFile), lpInfo->szProjectFile,
_TRUNCATE);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" ProjectFile = %s"),lpInfo-
>szProjectFile);
ODKTrace(szText);

_tcsncpy_s(g_szDSNName, _countof(g_szDSNName), lpInfo->szDSNName, _TRUNCATE);


_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" DSNName = %s"),lpInfo-
>szDSNName);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" DataLocale = 0x%08X"),lpInfo-
>dwDataLocale);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("**********************"));
ODKTrace(szText);
return( TRUE ); // only 1. element
}

BOOL MyDMEnumOpenedProjects(void)
{
CMN_ERROR Error;
BOOL ret = FALSE;
DWORD dwItems;
TCHAR szText[255];
VOID* pvUser = AfxGetApp();
memset(&Error, 0, sizeof(CMN_ERROR));
ret = MyDMConnect();
if(TRUE == ret)
{
ret = DMEnumOpenedProjects(&dwItems, MyDMEnumOpenProjectsCallback, pvUser, &Error);
if(FALSE == ret)

WinCC Professional V13 SP2 – Programming reference


472 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
DMEnumOpenedProjects: E1= 0x%08lx ; E2= 0x%08lx ; %s"), %s",
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("DMEnumOpenedProjects"));
}
ODKTrace(szText);
}
return(ret);
}
//{{ODK_EXAMPLE}(END)}

See also
DMEnumOpenedProjects (Page 300)
DM_ENUM_OPENED_PROJECTS_PROC (Page 302)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 473
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.4 Enumerate all structured types (RT Professional)

Example

//{{ODK_EXAMPLE}Enumerate all structured types (MCP)}


//{{FUNCTION}GAPIEnumTypes (MCP)}
//{{FUNCTION}DM_ENUM_TYPES_PROC (MCP)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: MyGAPIEnumTypes(void) ODK DM CS
// =====================================================================
// Desc. :
//--------------------------------------------------------------------------------
BOOL MyDMEnumTypeCallback(LPCSTR lpszTypeName,DWORD dwTypeID,
DWORD dwCreatorID, LPVOID lpvUser )
{
lpvUser;
TCHAR szText[255];
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("**DMEnumTypeCallback**"));
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TypeName = %s TypeID = 0x%08x
CreatorID = %d"),
lpszTypeName,dwTypeID,dwCreatorID);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("**********************"));
ODKTrace(szText);
return TRUE;
}

void MyGAPIEnumTypes()
{
// #define PROJ_PATH "C:\\siemens\\odk\\samples\\projects\\demo\\odk.mcp"
CMN_ERROR Error;
BOOL ret = FALSE;
TCHAR szText[255];
TCHAR szProjectFile[255];
VOID* pvUser = NULL;
ret = FALSE;
memset(&Error,0,sizeof(CMN_ERROR));
ret = MyDMGetConnectionState(); //check the connection state to DM
if(FALSE != ret)
{
MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile
_tcsncpy_s(szProjectFile, _countof(szProjectFile), /*PROJ_PATH*/g_szProjectFile,
_TRUNCATE);
memset(&Error,0,sizeof(CMN_ERROR));
ret = GAPIEnumTypes(szProjectFile,
MyDMEnumTypeCallback,
pvUser,
&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in DMEnumTypes: E1=
0x%08lx ; E2= 0x%08lx ; %s"),

WinCC Professional V13 SP2 – Programming reference


474 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

Error.dwError1, Error.dwError2, Error.szErrorText);


}
else
{
_sntprintf_s(szText,_countof(szText), _TRUNCATE, _T("DMEnumTypes"));
}
ODKTrace(szText);
}
}
//{{ODK_EXAMPLE}(END)}

See also
GAPIEnumTypes (Page 431)
DM_ENUM_TYPES_PROC (Page 433)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 475
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.5 Enumerate all connections (RT Professional)

Example

//{{ODK_EXAMPLE}Enumerate all connections (MCP)}


//{{FUNCTION}DMEnumConnectionData (MCP)}
//{{FUNCTION}DM_ENUM_CONNECTION_PROC (MCP)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: MyDMEnumConnectionData(void) ODK DM CS
// =====================================================================
// Desc. :
//--------------------------------------------------------------------------------
BOOL MyDMEnumConnectionCallback(LPDM_CONNECTION_DATA lpdmConData, LPVOID lpvUser)
{
lpvUser;
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("DMEnumConnectionCallback"));
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("...Connection = %s"),lpdmConData-
>szConnection);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("...UnitName = %s"),lpdmConData-
>szUnitName);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("...Common=%s"),lpdmConData-
>szCommon);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("...Specific=%s"),lpdmConData-
>szSpecific);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("...VarNum=%d"),lpdmConData-
>dwVarNum);
ODKTrace(szText);
return TRUE;
}

void MyDMEnumConnectionData()
{
// #define PROJ_PATH "C:\\siemens\\odk\\samples\\projects\\demo\\odk.mcp"
BOOL ret = FALSE;
CMN_ERROR Error;
TCHAR szText[255];
DWORD dwItems = 0;
TCHAR szProjectFile[255];
DM_CONNKEY ConnKey;
memset(&ConnKey,0,sizeof(ConnKey));
memset(&Error,0,sizeof(Error));
ret = MyDMGetConnectionState();
if(FALSE != ret)
{
MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile
_tcsncpy_s(szProjectFile, _countof(szProjectFile), /*PROJ_PATH*/g_szProjectFile,
_TRUNCATE);
ret = DMEnumConnectionData(szProjectFile,

WinCC Professional V13 SP2 – Programming reference


476 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

&ConnKey,
dwItems,
MyDMEnumConnectionCallback,
NULL,
&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
DMEnumConnectionData: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("DMEnumConnectionData"));
}
ODKTrace(szText);
}
}
//{{ODK_EXAMPLE}(END)}

See also
DMEnumConnectionData (Page 434)
DM_ENUM_CONNECTION_PROC (Page 438)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 477
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.6 Inquire project informations (RT Professional)

Example

//{{ODK_EXAMPLE}Inquire project informations (MCP)}


//{{FUNCTION}DMGetProjectInformation (MCP)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: DMGetProjectInformation(void) ODK DM CS
// =====================================================================
// Desc. : Inquire project informations
// =====================================================================
void MyDMGetProjectInformation(void)
{
// #define PROJ_PATH "C:\\siemens\\odk\\samples\\projects\\demo\\odk.mcp"
CMN_ERROR Error;
BOOL ret = FALSE;
TCHAR szText[255];
TCHAR szProjectFile[_MAX_PATH +1];
VOID* pvUser = AfxGetApp();
DM_PROJECT_INFO Info;
memset(&Error, 0, sizeof(CMN_ERROR));
memset(&Info, 0, sizeof(DM_PROJECT_INFO));
ret = MyDMGetConnectionState(); //check the connection state
if(FALSE != ret)
{
MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile
_tcsncpy_s(szProjectFile, _countof(szProjectFile), /*PROJ_PATH*/g_szProjectFile,
_TRUNCATE);
ret = DMGetProjectInformation(szProjectFile, &Info, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
DMGetProjectInformation: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("**DMGetProjectInformation:
%d**"), ret);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" ProjectFile=
%s"),Info.szProjectFile);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" DSNName=
%s"),Info.szDSNName);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" DataLocale=0x
%08X"),Info.dwDataLocale);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE,
_T("******************************"), ret);
ODKTrace(szText);

WinCC Professional V13 SP2 – Programming reference


478 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

}
}
}
//{{ODK_EXAMPLE}(END)}

See also
DMGetProjectInformation (Page 305)

2.2.11.7 OnTestDeactivateRuntimeProject (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestDeactivateRuntimeProject (MCP)}
//{{FUNCTION}DMDeactivateRTProject (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestDeactivateRuntimeProject()
{
CCmnError cmnError;
if(!::DMDeactivateRTProject(cmnError))
{
cmnError.Show(__T("DMDeactivateRTProject failed\n"));
}
}
//{{ODK_EXAMPLE}(END)}

2.2.11.8 OnTestEnumGroupsAll (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestEnumGroupsAll (MCP)}
//{{FUNCTION}DMEnumVarGrpData (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestEnumGroupsAll()
{
CCmnError cmnError;
if(!::DMEnumVarGrpData((LPSTR)(LPCTSTR) m_strProject, NULL, 0, EnumVarGrpProc, this,
cmnError))
{
cmnError.Show(__T("DMEnumVarGrpData failed\n"));
}
}
//{{ODK_EXAMPLE}(END)}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 479
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
DMEnumVarGrpData (Page 327)

2.2.11.9 OnTestEnumVariables (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestEnumVariables (MCP)}
//{{FUNCTION}DMEnumVariables (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestEnumVariables()
{
DM_VARFILTER dmVarFilter;
memset( &dmVarFilter, 0, sizeof(DM_VARFILTER) );
//--------------------------------------------------
// Initialization of filter //
//--------------------------------------------------
// //
dmVarFilter.dwFlags = DM_VARFILTER_TYPE;
dmVarFilter.dwNumTypes = 3;
DWORD dwFilterTypes[3];
dwFilterTypes[0] = DM_VARTYPE_BIT;
dwFilterTypes[1] = DM_VARTYPE_DWORD;
dwFilterTypes[2] = DM_VARTYPE_DOUBLE;
dmVarFilter.pdwTypes = dwFilterTypes;
dmVarFilter.lpszName = __T("VAR_1_BIT");
dmVarFilter.lpszGroup = __T("VARGROUP_1");
dmVarFilter.lpszConn = __T("TF_CONN_1");
// //
//--------------------------------------------------
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!DMEnumVariables((LPSTR)(LPCTSTR) m_strProject, NULL/*&dmVarFilter*/,
EnumVariablesProc, this, &Error))
{
Error.Show(__T("DMEnumVariables failed\n"));
}
}
//{{ODK_EXAMPLE}(END)}

See also
DMEnumVariables (Page 332)

WinCC Professional V13 SP2 – Programming reference


480 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.10 OnTestEnumConnectionDataAll (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestEnumConnectionDataAll (MCP)}
//{{FUNCTION}DMEnumConnectionData (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestEnumConnectionDataAll()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if( !::DMEnumConnectionData( m_strProject, NULL, 0, EnumConnectionDataProc, this,
&Error))
{
Error.Show(__T("DMEnumConnectionData failed\n"));
}
}
//{{ODK_EXAMPLE}(END)}

See also
DMEnumConnectionData (Page 434)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 481
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.11 OnTestMachines (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestMachines (MCP)}
//{{FUNCTION}DMGetMachineTable (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestMachines()
{
CMN_ERROR Error;
memset(&Error,0,sizeof(CMN_ERROR));
DM_MACHINE_TABLE dmMachineTable;
memset(&dmMachineTable, 0, sizeof(dmMachineTable));
if(!DMGetMachineTable(m_strProject, &dmMachineTable, &Error))
{
// Error.Show(__TEXT("DMGetMachineTable failed\n"));
// AfxMessageBox( strError );
}
else
{
for( int i = 0; i < dmmachinetable.nNumMachines; i++ )
{
CString strData;
strData.Format( _T( "Computer : %s, Type : %s, Location : %s" ),
dmMachineTable.tm[i].szMachineName,
dmMachineTable.tm[i].fServer ? _T( "Server" ) : _T( "Client or ES" ),
dmMachineTable.tm[i].fLocal ? _T( "local" ) : _T( "remote" ));
PutStr( strData);
}
}
}
//{{ODK_EXAMPLE}(END)}

See also
DMGetMachineTable (Page 297)

2.2.11.12 OnTestProjectInfo (RT Professional)

Example
//{{ODK_EXAMPLE}OnTestProjectInfo (MCP)}
//{{FUNCTION}DMGetProjectInformation (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestProjectInfo()
{
CCmnError cmnError;
DM_PROJECT_INFO ProjectInfo;
memset(&ProjectInfo, 0, sizeof(DM_PROJECT_INFO));

WinCC Professional V13 SP2 – Programming reference


482 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

if(!DMGetProjectInformation(m_strProject, &ProjectInfo,
cmnError))
{
cmnError.Show(__TEXT("DMGetProjectInformation failed\n"));
}
else
{
CString strData;
strData.Format(_T("Projekt : %s, Data Source : %s,
DataLocale : %08X"),
ProjectInfo.szProjectFile,
ProjectInfo.szDSNName,
ProjectInfo.dwDataLocale );
PutStr(strData);
}
}
//{{ODK_EXAMPLE}(END)}

See also
DMGetProjectInformation (Page 305)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 483
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.13 OnTestProjectPaths (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestProjectPaths (MCP)}
//{{FUNCTION}DMGetProjectDirectory (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestProjectPaths()
{
DM_DIRECTORY_INFO dmDirInfo;
CCmnError Error;
memset(&dmDirInfo, 0, sizeof(DM_DIRECTORY_INFO));
memset(&Error,0,sizeof(CCmnError));
if(!DMGetProjectDirectory(m_strAppName, m_strProject,
&dmDirInfo, &Error))
{
Error.Show(__TEXT("DMGetProjectDirectory failed\n"));
}
else
{
CString strData;
strData.Format(_T("szProjectDir = %s"), dmDirInfo.szProjectDir);
PutStr(strData);
strData.Format(_T("szProjectAppDir = %s"), dmDirInfo.szProjectAppDir);
PutStr(strData);
strData.Format(_T("szProjectGlobalLibDir = %s"), dmDirInfo.szGlobalLibDir);
PutStr(strData);
strData.Format(_T("szProjectLibDir = %s"), dmDirInfo.szProjectLibDir);
PutStr(strData);
strData.Format(_T("szLokalProjectAppDir = %s"), dmDirInfo.szLokalProjectAppDir);
PutStr(strData);
}
}
//{{ODK_EXAMPLE}(END)}

See also
DMGetProjectDirectory (Page 304)

WinCC Professional V13 SP2 – Programming reference


484 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.14 OnTestOpenProject (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestOpenProject (MCP)}
//{{FUNCTION}DMOpenProject (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestOpenProject()
{
#define PROJ_PATH "C:\\siemens\\odk\\samples\\projects\\demo\\odk.mcp"
TCHAR szProject[_MAX_PATH + 1];
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
CTestCliView* pView = GetFirstView();
memset(szProject,0, sizeof(szProject)); // Delete projectname to call dialog
// Or set fixed projectname
strcpy( szProject, _T(PROJ_PATH) );
if(!DMOpenProject(pView->GetSafeHwnd(),
szProject, NELEM(szProject), &Error))
{
Error.Show(__TEXT("DMOpenProject failed.\n"));
}
else
{
AfxMessageBox(szProject);
m_strProject = szProject;
}
}
//{{ODK_EXAMPLE}(END)}

See also
DMOpenProjectPlus (Page 309)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 485
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.15 OnTestOpenProjects (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestOpenProjects (MCP)}
//{{FUNCTION}DMEnumOpenedProjects (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestOpenProjects()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!DMEnumOpenedProjects(NULL, OpenProjectsProc, this, &Error))
{
Error.Show(__TEXT("DMEnumOpenedProjects failed\n"));
}
}
//{{ODK_EXAMPLE}(END)}

See also
DMEnumOpenedProjects (Page 300)

2.2.11.16 OnTestRuntimeProject (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestRuntimeProject (MCP)}
//{{FUNCTION}DMGetRuntimeProject (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestRuntimeProject()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
TCHAR szBuffer[_MAX_PATH + 1];
if(!DMGetRuntimeProject(szBuffer, NELEM(szBuffer), &Error))
{
Error.Show(__TEXT("DMGetRuntimeProject failed\n"));
}
else
{
PutStr(szBuffer);
}
}
//{{ODK_EXAMPLE}(END)}

See also
DMGetRuntimeProject (Page 306)

WinCC Professional V13 SP2 – Programming reference


486 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.17 OnTestSystemLocale (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestSystemLocale (MCP)}
//{{FUNCTION}DMGetSystemLocale (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestSystemLocale()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
DWORD dwLocaleID = 0;
if(!DMGetSystemLocale(&dwLocaleID, &Error))
{
Error.Show(__TEXT("DMGetSystemLocale failed\n"));
}
else
{
CString strData;
strData.Format(_T("Systemlocale : %08X"), dwLocaleID);
PutStr(strData);
}
}
//{{ODK_EXAMPLE}(END)}

See also
DMGetSystemLocale (Page 440)

2.2.11.18 OnTestUpdateCycles (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestUpdateCycles (MCP)}
//{{FUNCTION}DMEnumUpdateCycles (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestUpdateCycles()
{
DWORD dwNumCalls = 0;
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if( !DMEnumUpdateCycles(m_strProject, &dwNumCalls,
EnumCyclesProc, this, &Error))
{
Error.Show(__TEXT("DMEnumUpdateCycles failed\n"));
}
}
//{{ODK_EXAMPLE}(END)}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 487
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
DMEnumUpdateCycles (Page 286)

2.2.11.19 OnTestVariablenBeginstartvarupdate (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestVariblenBeginstartvarupdate (MCP)}
//{{FUNCTION}DMBeginStartVarUpdate (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenBeginstartvarupdate()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!DMBeginStartVarUpdate(&m_dwTAID, &Error))
{
Error.Show(_T("DMBeginStartVarUpdate failed\n"));
}
else
{
CString strData;
strData.Format(_T("DMBeginStartVarUpdate: TAID:%lu."), m_dwTAID);
}
}
//{{ODK_EXAMPLE}(END)}

See also
DMBeginStartVarUpdate (Page 443)

WinCC Professional V13 SP2 – Programming reference


488 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.20 OnTestVariablenEndstartvarupdate (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestVariablenEndstartvarupdate (MCP)}
//{{FUNCTION}DMEndStartVarUpdate (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenEndstartvarupdate()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if( !DMEndStartVarUpdate(m_dwTAID, &Error))
{
Error.Show(_T("DMEndStartVarUpdate failed\n"));
}
else
{
CString strData;
strData.Format(_T("DMEndStartVarUpdate: TAID:%lu."), m_dwTAID);
}
}
//{{ODK_EXAMPLE}(END)}

See also
DMEndStartVarUpdate (Page 445)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 489
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.21 OnTestVariablenGetvalue (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestVariablenGetvalue (MCP)}
//{{FUNCTION}DMGetValue (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenGetvalue()
{
int nNum = GetVarCount();
LPDM_VARKEY lpdmVarKey = GetVarKeys();

LPDM_VAR_UPDATE_STRUCT lpdmvus = new DM_VAR_UPDATE_STRUCT[nNum];


memset(lpdmvus, 0, sizeof(DM_VAR_UPDATE_STRUCT) * nNum);
// the included VARIANT's in the DM_VAR_UPDATE_STRUCT's then initialized to VT_EMPTY
with the memset,
// don't do this later again, because VT_BSTR's can be present after DMGetValue(...)!

CCmnError Error;
memset(&Error, 0, sizeof(CCmnError));

if( !DMGetValue(lpdmVarKey, nNum, lpdmvus, &Error))


{
Error.Show(_T("DMGetValue failed\n"));
}
else
{
CString strData;
for( int i=0; i < nmum; i++)
{
LPDM_VAR_UPDATE_STRUCT lpdmvus2 = &lpdmvus[i];
switch( lpdmvus2->dmTypeRef.dwType )
{
case DM_VARTYPE_BIT:
if (lpdmvus2->dmValue.boolVal)
{
strData.Format(_T("GetValue: Tag: %s\t( ID = %d ):\tWert = TRUE"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID);
}
else
{
strData.Format(_T("GetValue: Tag: %s\t( ID = %d ):\tWert = FALSE"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID);
}
break;
case DM_VARTYPE_BYTE:
strData.Format(_T("GetValue: Tag: %s\t( ID = %d ):\tValue = %u"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.bVal);
break;
case DM_VARTYPE_SBYTE:

WinCC Professional V13 SP2 – Programming reference


490 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

strData.Format(_T("GetValue: Tag: %s\t( ID = %d ):\tValue = %d"),


lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.bVal);
break;
case DM_VARTYPE_WORD:
strData.Format(_T("GetValue: Tag: %s\t( ID = %d ):\tValue = %u"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.iVal);
break;
case DM_VARTYPE_SWORD:
strData.Format(_T("GetValue: Tag: %s\t( ID = %d ):\tValue = %d"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.iVal);
break;
case DM_VARTYPE_DWORD:
strData.Format(_T("GetValue: Tag: %s\t( ID = %d ):\tValue = %u"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.lVal);
break;
case DM_VARTYPE_SDWORD:
strData.Format(_T("GetValue: Tag: %s\t( ID = %d ):\tValue = %d"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.lVal);
break;
case DM_VARTYPE_FLOAT:
strData.Format(_T("GetValue: Tag: %s\t( ID = %d ):\tValue = %f"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.fltVal);
break;
case DM_VARTYPE_DOUBLE:
strData.Format(_T("GetValue: Tag: %s\t( ID = %d ):\tValue = %f"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.dblVal);
break;
case DM_VARTYPE_TEXT_8:
strData.Format(_T("GetValue: Tag: %s\t( ID = %d ):\tValue = %s"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.bstrVal);
break;
/*
case DM_VARTYPE_TEXT_16:
strData.Format(_T("GetValue: Tag: %s\t( ID = %d ):\tValue = %s"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.bstrVal);
break;
*/
default:

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 491
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

strData.Format(_T("Unknown tag type !"));


}
PutStr(strData);

// clear the given VARIANT's in every array element, because a VT_BSTR's can be
present
// do not only delete the array later without clearing the Variants here because
of memory leak's
VariantClear(&(lpdmvus2->dmValue));
}
}
delete []lpdmVarKey;
delete []lpdmvus;
}
//{{ODK_EXAMPLE}(END)}

See also
DMGetValue (Page 335)

WinCC Professional V13 SP2 – Programming reference


492 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.22 OnTestVariablenGetvaluewait (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestVariablenGetvaluewait (MCP)}
//{{FUNCTION}DMGetValueWait (MCP)}
//{{FUNCTION}(END)}
//-----< Notification-Callback for GetValueWait >-----------------------------
BOOL GetValueWaitNotify(DWORD dwTAID,
LPDM_VAR_UPDATE_STRUCT lpdmvus,
DWORD dwItems,
LPVOID lpvUser)
{
dwTAID;
CTestCliDoc* pDoc = (CTestCliDoc*)lpvUser;
for(DWORD i=0; i <dwitems; i++)
{
LPDM_VAR_UPDATE_STRUCT lpdmvus2 = &lpdmvus[i];
CString strData;
switch(lpdmvus2->dmTypeRef.dwType)
{
case DM_VARTYPE_BIT:
if (lpdmvus2->dmValue.boolVal)
{
strData.Format(_T("GetValueWait: Tag: %s\t( ID = %d ):\tValue = TRUE, Status=
%04x"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dwState);
}
else
{
strData.Format(_T("GetValueWait: Tag: %s\t( ID = %d ):\tValue = FALSE, Status=
%04x"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dwState);
}
break;
case DM_VARTYPE_BYTE:
strData.Format(_T("GetValueWait: Tag: %s\t( ID = %d ):\tValue = %u, Status=%04x"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.bVal,
lpdmvus2->dwState);
break;
case DM_VARTYPE_SBYTE:
strData.Format(_T("GetValueWait: Tag: %s\t( ID = %d ):\tValue = %d, Status=%04x"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.bVal,
lpdmvus2->dwState);
break;
case DM_VARTYPE_WORD:

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 493
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

strData.Format(_T("GetValueWait: Tag: %s\t( ID = %d ):\tValue = %u, Status=%04x"),


lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.iVal,
lpdmvus2->dwState);
break;
case DM_VARTYPE_SWORD:
strData.Format(_T("GetValueWait: Tag: %s\t( ID = %d ):\tValue = %d, Status=%04x"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.iVal,
lpdmvus2->dwState);
break;
case DM_VARTYPE_DWORD:
strData.Format(_T("GetValueWait: Tag: %s\t( ID = %d ):\tValue = %u, Status=%04x"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.lVal,
lpdmvus2->dwState);
break;
case DM_VARTYPE_SDWORD:
strData.Format(_T("GetValueWait: Tag: %s\t( ID = %d ):\tValue = %d, Status=%04x"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.lVal,
lpdmvus2->dwState);
break;
case DM_VARTYPE_FLOAT:
strData.Format(_T("GetValueWait: Tag: %s\t( ID = %d ):\tValue = %f, Status=%04x"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.fltVal,
lpdmvus2->dwState);
break;
case DM_VARTYPE_DOUBLE:
strData.Format(_T("GetValueWait: Tag: %s\t( ID = %d ):\tValue = %f, Status=%04x"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.dblVal,
lpdmvus2->dwState);
break;
case DM_VARTYPE_TEXT_8:
strData.Format(_T("GetValueWait: Tag: %s\t( ID = %d ):\tValue = %s, Status=%04x"),
lpdmvus2->dmVarKey.szName,
lpdmvus2->dmVarKey.dwID,
lpdmvus2->dmValue.bstrVal,
lpdmvus2->dwState);
break;
case DM_VARTYPE_RAW:
{
LPBYTE pArray;
HRESULT hr;
hr = SafeArrayAccessData(lpdmvus2->dmValue.parray, (VOID **) &pArray);
if (! FAILED(hr))
{
strData.Format(_T("Var:%s: Type:RawData\nValues:%02x %02x %02x %02x\n"),

WinCC Professional V13 SP2 – Programming reference


494 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

lpdmvus2->dmVarKey.szName,
pArray[0],
pArray[1],
pArray[2],
pArray[3]);
SafeArrayUnaccessData(lpdmvus2->dmValue.parray);
}
else
{
strData.Format(_T("SafeArrayAccessData failed\n"));
}
break;
}
default:
strData.Format(_T("GetValueWait: Unknown tag type !"));
}
pDoc->PutStr(strData);
}
return(TRUE);
}

//-----< OnTestVariablenGetvaluewait >------------------------------------------


void CTestCliDoc::OnTestVariablenGetvaluewait()
{
int nNum = GetVarCount();
LPDM_VARKEY lpdmVarKey = GetVarKeys();
LPDM_VAR_UPDATE_STRUCT lpdmvus = new DM_VAR_UPDATE_STRUCT[nNum];
memset(lpdmvus, 0, sizeof(DM_VAR_UPDATE_STRUCT) * nNum);
DWORD dwTAID = 5;
DWORD dwTimeOut = 5000;
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!DMGetValueWait(&dwTAID,
lpdmVarKey,
nNum,
FALSE,
dwTimeOut,
GetValueWaitNotify,
this,
&Error))
{
Error.Show(_T("DMGetValueWait (FALSE) failed\n"));
}
delete []lpdmVarKey;
delete []lpdmvus;
}

//-----< OnTestVariablenGetvaluewait >------------------------------------------


void CTestCliDoc::OnTestVariablenGetvaluewaitTrue()
{
int nNum = GetVarCount();
LPDM_VARKEY lpdmVarKey = GetVarKeys();
LPDM_VAR_UPDATE_STRUCT lpdmvus = new DM_VAR_UPDATE_STRUCT[nNum];
memset(lpdmvus, 0, sizeof(DM_VAR_UPDATE_STRUCT) * nNum);
DWORD dwTAID = 5;
DWORD dwTimeOut = 5000;

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 495
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!DMGetValueWait(&dwTAID,
lpdmVarKey,
nNum,
TRUE,
dwTimeOut,
GetValueWaitNotify,
this,
&Error))
{
Error.Show(_T("DMGetValueWait (TRUE) failed\n"));
}
delete []lpdmVarKey;
delete []lpdmvus;
}
//{{ODK_EXAMPLE}(END)}

See also
DMGetValueWait (Page 348)

WinCC Professional V13 SP2 – Programming reference


496 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.23 OnTestVariablenGetVarInfo (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestVariblenGetVarInfo (MCP)}
//{{FUNCTION}DMGetVarInfo (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenGetVarInfo()
{
int nNum = GetVarCount();
LPDM_VARKEY lpdmVarKey = GetVarKeys();
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!::DMGetVarInfo(m_strProject, lpdmVarKey, nNum, &Error))
{
Error.Show(_T("DMGetVarInfo failed\n"));
}
else
{
CString strData;
for(int i=0; i<nnum; i++)
{
strData.Format(_T("DMGetVarInfo: Tag name: %s, VarID:%lu."),
lpdmVarKey[i].szName,
lpdmVarKey[i].dwID);
PutStr(strData);
}
}
delete []lpdmVarKey;
}
//{{ODK_EXAMPLE}(END)}

See also
DMGetVarInfo (Page 354)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 497
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.24 OnTestVariablenGetvarlimits (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestVariblenGetvarlimits (MCP)}
//{{FUNCTION}DMGetVarLimits (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenGetvarlimits()
{
int nNum = GetVarCount();
LPDM_VARLIMIT lpdmVarLimit = new DM_VARLIMIT[nNum];
memset(lpdmVarLimit, 0, sizeof(DM_VARLIMIT) * nNum);
LPDM_VARKEY lpdmVarKey = GetVarKeys();
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!::DMGetVarLimits(m_strProject, lpdmVarKey, nNum,
lpdmVarLimit, &Error))
{
Error.Show(__T("DMGetVarLimits failed\n"));
}
else
{
CString strData;
for(int i=0; i<nnum; i++)
{
strData.Format(_T("DMGetVarLimits: Var:%s, MaxRange:%lf, MinRange:%lf, MinLimit:
%lf, MaxLimit:%lf."),
lpdmVarKey[i].szName,
lpdmVarLimit[i].dmMaxRange.dblVal,
lpdmVarLimit[i].dmMinRange.dblVal,
lpdmVarLimit[i].dmMaxLimit.dblVal,
lpdmVarLimit[i].dmMinLimit.dblVal);
PutStr(strData);
}
}
delete []lpdmVarLimit;
delete []lpdmVarKey;
}
//{{ODK_EXAMPLE}(END)}

See also
DMGetVarLimits (Page 366)

WinCC Professional V13 SP2 – Programming reference


498 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.25 OnTestVariablenGetvartype (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestVariblenGetvartype (MCP)}
//{{FUNCTION}DMGetVarType (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenGetvartype()
{
int nNum = GetVarCount();
LPDM_TYPEREF lpdmTypeRef = new DM_TYPEREF[nNum];
memset(lpdmTypeRef, 0, sizeof(DM_TYPEREF) * nNum);
LPDM_VARKEY lpdmVarKey = GetVarKeys();
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!::DMGetVarType(m_strProject, lpdmVarKey, nNum,
lpdmTypeRef, &Error))
{
Error.Show(_T("DMGetVarType failed\n"));
}
else
{
CString strData;
for(int i=0; i<nnum; i++)
{
strData.Format(_T("DMGetVarType: Var:%s, Size:%lu, Name:%s."),
lpdmVarKey[i].szName,
lpdmVarKey[i].dwID);
PutStr(strData);
}
}
delete []lpdmVarKey;
}
//{{ODK_EXAMPLE}(END)}

See also
DMGetVarType (Page 372)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 499
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.26 OnTestVariablenResumevarupdate (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestVariblenResumevarupdate (MCP)}
//{{FUNCTION}DMResumeVarUpdate (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenResumevarupdate()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!DMResumeVarUpdate(m_dwTAID, &Error))
{
Error.Show(_T("DMResumeVarUpdate failed.\n"));
}
else
{
CString strData;
strData.Format(_T("DMResumeVarUpdate ok."));
}
}
//{{ODK_EXAMPLE}(END)}

See also
DMResumeVarUpdate (Page 446)

WinCC Professional V13 SP2 – Programming reference


500 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.27 OnTestVariablenSetvalue (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestVariablenSetvalue (MCP)}
//{{FUNCTION}DMSetValue (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenSetvalue()
{
int nNum = GetVarCount();
LPDM_VARKEY lpdmVarKey = GetVarKeys();
LPDWORD lpdmVarState = new DWORD[nNum];
INT i;
CString strData;
CCmnError cmnError;
for (i = 0; i < 1; i++)</p>
{
DWORD dwStart = GetTickCount();
DWORD dwEnd;
if (! DMSetValue(lpdmVarKey, nNum, m_varValues, lpdmVarState, cmnError))
{
break;
}
dwEnd = GetTickCount();
strData.Format("DMSetValue OK, Dauer %d ms", dwEnd - dwStart);
PutStr(strData);
}
delete []lpdmVarKey;
delete []lpdmVarState;
}
//{{ODK_EXAMPLE}(END)}

See also
DMSetValue (Page 379)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 501
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.28 OnTestVariablenSetvaluewait (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestVariablenSetvaluewait (MCP)}
//{{FUNCTION}DMSetValueWait (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenSetvaluewait()
{
int nNum = GetVarCount();
LPDM_VARKEY lpdmVarKey = GetVarKeys();
LPDWORD lpdmVarState = new DWORD[nNum];
DWORD dwTimeOut = 1000L;
CCmnError cmnError;
if(!::DMSetValueWait(&m_dwTAID, lpdmVarKey,nNum, m_varValues,dwTimeOut,
CompletionProc, this, cmnError))
{
cmnError.Show(_T("DMSetValueWait failed\n"));
}
else
{
CString strData;
strData.Format(_T("DMSetValueWait ok."));
}
delete []lpdmVarKey;
delete []lpdmVarState;
}
//{{ODK_EXAMPLE}(END)}

See also
DMSetValueWaitMessage (Page 393)
DMSetValueWait (Page 388)

WinCC Professional V13 SP2 – Programming reference


502 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.29 OnTestVariablenStopallupdates (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestVariablenStopallupdates (MCP)}
//{{FUNCTION}DMStopAllUpdates (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenStopallupdates()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!DMStopAllUpdates(&Error))
{
Error.Show(_T("DMStopAllUpdates failed\n"));
}
else
{
CString strData;
strData.Format(_T("DMStopAllUpdates ok."));
}
}
//{{ODK_EXAMPLE}(END)}

See also
DMStopAllUpdates (Page 462)

2.2.11.30 OnTestVariablenStopvarupdate (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestVariablenStopvarupdate (MCP)}
//{{FUNCTION}DMStopVarUpdate (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenStopvarupdate()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if( !DMStopVarUpdate(m_dwTAID, &Error))
{
Error.Show(_T("DMStopVarUpdate failed\n"));
}
else
{
CString strData;
strData.Format(_T("DMStopVarUpdate: TAID:%lu."), m_dwTAID);
}
}
//{{ODK_EXAMPLE}(END)}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 503
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

See also
DMStopVarUpdate (Page 463)

2.2.11.31 OnTestVariablenSuspendvarupdate (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestVariablenSuspendvarupdate (MCP)}
//{{FUNCTION}DMSuspendVarUpdate (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestVariablenSuspendvarupdate()
{
CCmnError Error;
memset(&Error,0,sizeof(CCmnError));
if(!DMSuspendVarUpdate(m_dwTAID, &Error))
{
Error.Show(_T("DMSuspendVarUpdate failed\n"));
}
else
{
CString strData;
strData.Format(_T("DMSuspendVarUpdate ok."));
}
}
//{{ODK_EXAMPLE}(END)}

See also
DMSuspendVarUpdate (Page 465)

2.2.11.32 OnTestWinCCShutdown (RT Professional)

Example

//{{ODK_EXAMPLE}OnTestWinCCShutdown (MCP)}
//{{FUNCTION}DMExitWinCC (MCP)}
//{{FUNCTION}(END)}
void CTestCliDoc::OnTestWinCCShutdown()
{
DMExitWinCC();
}
//{{ODK_EXAMPLE}(END)}

See also
DMExitWinCC (Page 289)

WinCC Professional V13 SP2 – Programming reference


504 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.33 Open project by means of dialog (RT Professional)

Example

//{{ODK_EXAMPLE}Open projectby means of dialog (MCP)}


//{{FUNCTION}DMOpenProject (MCP)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: MyDMOpenProject(void) ODK DM CS
// =====================================================================
// Desc. : open project, give name through WinCC-Dialog-Box
// =====================================================================
void MyDMOpenProject(void)
{
CMN_ERROR Error;
BOOL ret = FALSE;
DWORD dwSize = 255;
HWND handle = NULL;
TCHAR szProjFile[255];
TCHAR szText[255];
_tcsncpy_s(szProjFile, _countof(szProjFile), _T("C:\\Siemens\\ODK\\Samples\\Projects\
\Demo\\odk.mcp"), _TRUNCATE);
memset(&Error, 0, sizeof(CMN_ERROR));
ret = MyDMConnect(); // check connection to DataManager
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in MyDMConnect"));
ODKTrace(szText);
}
else
{
memset(&Error, 0,sizeof( CMN_ERROR ));
ret = DMOpenProject(handle, szProjFile, dwSize, &Error);
if(ret == FALSE)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in DMOpenProject:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText,_countof(szText), _TRUNCATE, _T("DMOpenProject (%s)"),
szProjFile);
}
ODKTrace(szText);
}
}
//{{ODK_EXAMPLE}(END)}

See also
DMOpenProjectPlus (Page 309)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 505
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.34 Read tag (RT Professional)

Example

// =====================================================================
// =====================================================================
// short : Module with examples for DataManager-API
// RUNTIME
// SC: PO = Project opened PG= Project closed
// *********************************************************************
#include "stdafx.h" // if MFC classes
// #include "odkapi.h" // if console application
#include <time.h>
#include "dm02.h"

// =====================================================================
// 2.1 Interface IMPORT
// =====================================================================
//extern void ODKTrace(LPCTSTR);
extern BOOL MyDMConnect (void); // Connect
extern BOOL MyDMGetConnectionState(void);

// =====================================================================
// 2.2 Interface EXPORT
// =====================================================================
// =====================================================================
// 2.3 Interface LOCAL
// =====================================================================
// =====================================================================
// 3. Definitions
// =====================================================================

//{{ODK_EXAMPLE}Read tag (MCP)}


//{{FUNCTION}DMGetRuntimeProject (MCP)}
//{{FUNCTION}DMGetValue (MCP)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: MyDMGetValue(void) ODK DM CS
// =====================================================================
// short : Read tag
// =====================================================================
void MyDMGetValue(void)
{
CMN_ERROR Error;
BOOL ret = FALSE;
DWORD dwSize = _MAX_PATH;
TCHAR szText[255];
TCHAR szProjFile[_MAX_PATH +1];
TCHAR BstrValue[255]; //
const short int nNum = 11; // tagcount
const short int nTextMax = 20; // textlenght
TCHAR TagNames[nNum][nTextMax]=
{
"VAR_1_BOOL", // boolVal; // VT_BOOL.

WinCC Professional V13 SP2 – Programming reference


506 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

"VAR_2_BYTE", // bVal; // VT_UI1


"VAR_3_SBYTE", // iVal; // VT_I2
"VAR_4_WORD", // lVal // VT_I4
"VAR_5_SWORD", // iVal // VT_I2
"VAR_6_DWORD", // dblVal // VT_R8
"VAR_7_SDWORD", // lVal // VT_I4
"VAR_8_FLOAT", // fltVal // VT_R4
"VAR_9_DOUBLE", // dblVal // VT_R8
"VAR_A_TEXT8", // bstrVal // VT_BSTR
"VAR_B_TEXT16" // bstrVal // VT_BSTR
};
DM_VARKEY VarKey[nNum];

DM_VAR_UPDATE_STRUCT VarUp[nNum];
memset(&VarUp, 0, sizeof(DM_VAR_UPDATE_STRUCT) * nNum);
// the included VARIANT's in the DM_VAR_UPDATE_STRUCT's then initialized to VT_EMPTY
with the memset,
// don't do this later again, because VT_BSTR's can be present after DMGetValue(...)!

memset(&VarKey,0, sizeof(DM_VARKEY) * nNum);


memset(&Error,0,sizeof(Error));
ret = MyDMGetConnectionState();
if(FALSE != ret)
{
memset(&Error,0,sizeof(Error));
// RunTime project
ret = DMGetRuntimeProject(szProjFile, dwSize, &Error);
if(FALSE != ret)
{
// fill out DM_VARKEY
for(int iRead = 0; iRead <nNum; iRead++)
{
VarKey[iRead].dwKeyType = DM_VARKEY_NAME;
VarKey[iRead].dwID = 0;
strcpy( VarKey[iRead].szName, &TagNames[iRead][0]);
VarKey[iRead].lpvUserData = (VOID *) iRead;
}
memset(&Error,0,sizeof(Error));
ret = DMGetValue(VarKey, nNum, VarUp, &Error);
if(FALSE != ret)
{
for(int iOut=0; iOut <nNum; iOut++)
{
switch(VarUp[iOut].dmTypeRef.dwType)
{
case DM_VARTYPE_BIT: //vt = 3 VT_I4 = 3
{
sprintf(szText, "Index=%d Name=%s ID=%d Value=%d",
iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,
VarUp[iOut].dmValue.boolVal);
break;
}
case DM_VARTYPE_BYTE: //vt = 17 VT_UI1 = 17
{
sprintf(szText, "Index=%d Name=%s ID=%d Value=%d",

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 507
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,
VarUp[iOut].dmValue.bVal);
break;
}
case DM_VARTYPE_SBYTE: //vt = 2 VT_I2 = 2
{
sprintf(szText, "Index=%d Name=%s ID=%d Value=%d",
iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,
VarUp[iOut].dmValue.iVal);
break;
}
case DM_VARTYPE_WORD: //vt = 3 VT_I4 = 3
{
sprintf(szText, "Index=%d Name=%s ID=%d Value=%d",
iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,
VarUp[iOut].dmValue.lVal);
break;
}
case DM_VARTYPE_SWORD: //vt = 2 VT_I2 = 2
{
sprintf(szText, "Index=%d Name=%s ID=%d Value=%d",
iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,
VarUp[iOut].dmValue.iVal);
break;
}
case DM_VARTYPE_DWORD: //vt = 5 VT_R8 = 5
{
sprintf(szText, "Index=%d Name=%s ID=%d Value=%d",
iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,
VarUp[iOut].dmValue.dblVal);
break;
}
case DM_VARTYPE_SDWORD: //vt = 3 VT_I4 = 3
{
sprintf(szText, "Index=%d Name=%s ID=%d Value=%d",
iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,
VarUp[iOut].dmValue.lVal);
break;
}
case DM_VARTYPE_FLOAT: //vt = 4 VT_R4 = 4
{
sprintf(szText, "Index=%d Name=%s ID=%d Value=%f",
iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,
VarUp[iOut].dmValue.fltVal);
break;
}
case DM_VARTYPE_DOUBLE: //vt = 5 VT_R8 = 5
{
sprintf(szText, "Index=%d Name=%s ID=%d Value=%f",

WinCC Professional V13 SP2 – Programming reference


508 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,
VarUp[iOut].dmValue.dblVal);
break;
}
case DM_VARTYPE_TEXT_8: //vt = 8 VT_BSTR = 8
{
ret = WideCharToMultiByte( CP_ACP,
(DWORD)0,VarUp[iOut].dmValue.bstrVal,
-1,(LPSTR)&BstrValue[0],128,NULL,NULL);
sprintf(szText, "Index=%d Name=%s ID=%d StrValue=%s",
iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,BstrValue);
break;
}
case DM_VARTYPE_TEXT_16: // vt = 8 VT_BSTR = 8
{
ret = WideCharToMultiByte( CP_ACP,
(DWORD)0,VarUp[iOut].dmValue.bstrVal,
-1,(LPSTR)&BstrValue[0],128,NULL,NULL);
sprintf(szText, "Index=%d Name=%s ID=%d StrValue=%s",
iOut, VarUp[iOut].dmVarKey.szName,
VarUp[iOut].dmVarKey.dwID,BstrValue);
break;
}
default:
break;
}// end switch case
ODKTrace(szText);
//printf("%s\r\n",szText);

VariantClear( &VarUp[iOut].dmValue );
}//end for
}
else
{
sprintf(szText, "Error in DMGetValue: E1= 0x%08lx ; E2= 0x%08lx ; %s",
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
//printf("%s\r\n",szText);
}
}
else
{
sprintf(szText, "Error in DMGetRuntimeProject: E1= 0x%08lx ; E2= 0x%08lx ; %s",
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
//printf("%s\r\n",szText);
}
}
else
{
sprintf(szText, "Error in MyDMGetConnectionState: E1= 0x%08lx ; E2= 0x%08lx ; %s",
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
//printf("%s\r\n",szText);

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 509
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

}
}
//{{ODK_EXAMPLE}(END)}

See also
DMGetRuntimeProject (Page 306)
DMGetValue (Page 335)

WinCC Professional V13 SP2 – Programming reference


510 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

2.2.11.35 Write tag (RT Professional)

Example

//{{ODK_EXAMPLE}Write tag (MCP)}


//{{FUNCTION}DMGetRuntimeProject (MCP)}
//{{FUNCTION}DMSetValue (MCP)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: MyDMSetValue(void) ODK DM CS
// =====================================================================
// short : Write tag
// =====================================================================
void MyDMSetValue(void)
{
CMN_ERROR Error;
BOOL ret = FALSE;
DWORD dwSize = _MAX_PATH;
TCHAR szText[255];
TCHAR szProjFile[_MAX_PATH +1];
TCHAR szTextValue[255]; // for TEXT8 Values
const short int nNum = 11; // tagcount
const short int nTextMax = 20; // textlenght
TCHAR TagNames[nNum][nTextMax]=
{
"VAR_1_BOOL", // boolVal; // VT_BOOL.
"VAR_2_BYTE", // bVal; // VT_UI1
"VAR_3_SBYTE", // iVal; // VT_I2
"VAR_4_WORD", // lVal // VT_I4
"VAR_5_SWORD", // iVal // VT_I2
"VAR_6_DWORD", // dblVal // VT_R8
"VAR_7_SDWORD", // lVal // VT_I4
"VAR_8_FLOAT", // fltVal // VT_R4
"VAR_9_DOUBLE", // dblVal // VT_R8
"VAR_A_TEXT8", // bstrVal // VT_BSTR
"VAR_B_TEXT16" // bstrVal // VT_BSTR
};
DM_VARKEY VarKey[nNum];
DM_VAR_UPDATE_STRUCT VarUp[nNum];
VARIANT VarVal[nNum];
DWORD VarSta[nNum];
static short int Tmp[20];
BSTR bstrText1, bstrText2;
memset(&Error, 0, sizeof(CMN_ERROR));
memset(&VarUp, 0, sizeof(DM_VAR_UPDATE_STRUCT) * nNum);
memset(&VarKey,0, sizeof(DM_VARKEY) * nNum);
ret = MyDMGetConnectionState();
if(FALSE != ret)
{
// RunTime project
ret = DMGetRuntimeProject(szProjFile, dwSize, &Error);
if(FALSE != ret)
{
// read tag

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 511
Runtime API (RT Professional)
2.2 Data management functions (RT Professional)

for(int i = 0; i < nNum; i++)


{
VarKey[i].dwKeyType = DM_VARKEY_NAME;
VarKey[i].dwID = 0;
_tcsncpy_s(VarKey[i].szName, _countof(VarKey[i].szName), &TagNames[i][0],
_TRUNCATE);
VarKey[i].lpvUserData = (VOID *) i;
}
// init tag
//"VAR_1_BOOL",
VarVal[0].vt = VT_BOOL;
VarVal[0].boolVal = TRUE;
//"VAR_2_BYTE"
VarVal[1].vt = VT_UI1;
VarVal[1].bVal = 23;
//"VAR_3_SBYTE",
VarVal[2].vt = VT_I2;
VarVal[2].iVal = -23;
//"VAR_4_WORD",
VarVal[3].vt = VT_I4;
VarVal[3].lVal = 89;
//"VAR_5_SWORD",
VarVal[4].vt = VT_I2;
VarVal[4].iVal = -89;
//"VAR_6_DWORD",
VarVal[5].vt = VT_R8;
VarVal[5].dblVal = 1200;
//"VAR_7_SDWORD",
VarVal[6].vt = VT_I4;
VarVal[6].lVal = -1200;
//"VAR_8_FLOAT",
VarVal[7].vt = VT_R4;
VarVal[7].fltVal = (float)3.789;
//"VAR_9_DOUBLE",
VarVal[8].vt = VT_R8;
VarVal[8].dblVal = (double)34.789;
//"VAR_A_TEXT8",
_tcsncpy_s(szTextValue, _countof(szTextValue), _T("VAR_A_TEXT8 Value"),
_TRUNCATE);
ret = MultiByteToWideChar(CP_ACP,(DWORD)0, (LPCSTR) &szTextValue,-1,
(LPWSTR)&Tmp[0],30);
// SysFreeString(pBSTR);
bstrText1 = SysAllocString((OLECHAR FAR*)&Tmp[0]);
VarVal[9].vt = VT_BSTR;
VarVal[9].bstrVal = bstrText1;
//"VAR_B_TEXT16"
_tcsncpy_s(szTextValue, _countof(szTextValue), _T("VAR_B_TEXT16 Value"),
_TRUNCATE);
ret = MultiByteToWideChar(CP_ACP,(DWORD)0, (LPCSTR)&szTextValue,-1,
(LPWSTR)&Tmp[0],30);
// SysFreeString(pB2);
bstrText2 = SysAllocString((OLECHAR FAR*)&Tmp[0]);
VarVal[10].vt = VT_BSTR;
VarVal[10].bstrVal = bstrText2;
// set tag
memset(&Error,0,sizeof(CMN_ERROR));

WinCC Professional V13 SP2 – Programming reference


512 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

ret = DMSetValue(&VarKey[0], nNum, &VarVal[0], &VarSta[0], &Error);


if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in DMSetValue:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("write Value to WinCC"));
ODKTrace(szText);
}
SysFreeString(bstrText1);
SysFreeString(bstrText2);
}
}
}
//{{ODK_EXAMPLE}(END)}

See also
DMGetRuntimeProject (Page 306)
DMSetValue (Page 379)

2.3 Functions of the graphic system (RT Professional)

2.3.1 Basics (RT Professional)

2.3.1.1 Overview of the functions (RT Professional)

Overview

PDLRTShowApp (Page 556) Display graphic system


PDLRT_CALLBACK (Page 557) Callback function of the runtime functions
PDLRTClosePicture (Page 544) Close screen
PDLRTDisableClosePicture Disable close screen function
(Page 546)
PDLRTEnableClosePicture Enable close screen function
(Page 548)
PDLRTGetCursorKeys Query cursor control keys
(Page 559)
PDLRTGetDefPropEx Query default values of object properties
(Page 567)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 513
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

PDLRTGetPropEx (Page 569) Query default values of object properties


PDLRTGetFocus (Page 561) Query input focus
PDLRTGetLink (Page 577) Query link between object property and tag
PDLRTGotoPicture (Page 549) Query screen memory
PDLRTInquireFreeArea Determine free area of a window
(Page 551)
PDLRTOpenPicture (Page 552) Root screen switch in Runtime
PDLRTPictureNavigation Enable and disable screen navigation
(Page 555)
PDLRTSetCursorKeys Define cursor control keys
(Page 563)
PDLRTSetFocus (Page 565) Define input focus
PDLRTSetLink (Page 579) Define link between object property and tag
PDLRTSetMultiLink (Page 581) Define link between object property and tag (multiple tags)
PDLRTSetPropEx (Page 572) Define object property

2.3.1.2 Overview of structures (RT Professional)

Overview

FOCUSINFO (Page 544) Input focus data


LINKINFO (Page 540) Linking of object properties and tags
MULTILINK (Page 542) Linking of object properties and tags
MULTILINKINFO Linking of object properties and tags
(Page 543)

2.3.1.3 Error messages (RT Professional)

Overview
The following error messages can be returned by the API functions in the CMN_ERROR error
structure:

Configuration

PDLCS_ELIASES_NO_ERROR 0 No error occurred.


PDLCS_ERROR_NO_DISPATCH 5 Ole Automation cannot be run
PDLCS_ERROR_NO_PROJECT 10 Project does not exist
PDLCS_ERROR_NO_PICTURE 15 Screen does not exist
PDLCS_ERROR_NO_OBJECT 20 Object does not exist
PDLCS_ERROR_NO_PROPERTY 25 Property does not exit
PDLCS_ERROR_NO_OBJTYPE 30 Object type not present.
PDLCS_ERROR_NO_DYNAMIC 32 No dynamics available

WinCC Professional V13 SP2 – Programming reference


514 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

PDLCS_ERROR_ALREADY_OPEN 35 Specified screen is already open


PDLCS_ERROR_WRITE_PROTECTED 40 Specified screen is read-only
PDLCS_ERROR_PICTURE_SAVE 45 Specified screen could not be saved
PDLCS_ERROR_PICTURE_SAVE_AS 50 Specified screen could not be saved
PDLCS_ERROR_PICTURE_CLOSE 55 Specified screen could not be closed
PDLCS_ERROR_PICTURE_CLOSE_ALL 60 Screens could not be closed
PDLCS_ERROR_PICTURE_IMPORT 65 Screens could not be imported
PDLCS_ERROR_PICTURE_CREATE 70 General error when creating the screen
PDLCS_ERROR_PICTURE_EXISTS 75 Screen already exists
PDLCS_ERROR_NEW_OBJECT_NAME 80 Object name already exists
PDLCS_ERROR_NEW_OBJECT 85 Object could not be created
PDLCS_ERROR_DELETE_OBJECT 90 Object could not be deleted
PDLCS_ERROR_SET_PROPERTY 95 Property could not be set
PDLCS_ERROR_GET_PROPERTY 96 Property could not be read
PDLCS_ERROR_ENUM_OBJECTTYPE 100 Error while enumerating object types
PDLCS_ERROR_ENUM_PROPERTY 105 Error while enumerating object properties
PDLCS_ERROR_CREATE_PROPERTY 110 Property could not be defined
PDLCS_ERROR_SET_LINK 115 Connection could not be established
PDLCS_ERROR_REMOVE_LINK 120 Connection could not be deleted
PDLCS_ERROR_SET_ACTION 125 Action could not be stored
PDLCS_ERROR_GET_ACTION 126 Action could not be fetched
PDLCS_ERROR_ENUM_DYNAMICS 127 Dynamics could not be enumerated
PDLCS_ERROR_SET_DIRECTCONNECT 128 Direct connection could not be stored
PDLCS_ERROR_AUTOMATION 130 Error during transfer
PDLCS_ERROR_MEMORY 200 No memory

Runtime

PDLRT_OK 0 No error occurred.


PDLRT_APP_NOT_RUNNING 1 PDL application not started
PDLRT_NO_TRANSFER 2 PDL application cannot be accessed
PDLRT_NO_PIC 3 Screen not selected
PDLRT_NO_OBJ 4 Cannot find object
PDLRT_NO_PROP 5 Cannot find property
PDLRT_NO_MET 6 Cannot find method for object
PDLRT_LINK_NOT_SET 7 Property could not be connected
PDLRT_WNAME_NOT_UNIQUE 8 Instance name of new window not unique
PDLRT_WCREATION_FAILED 9 Window could not be created
PDLRT_PICTURE_NOT_LOADED 10 Screen file could not be loaded
PDLRT_ILLEGAL_USERLEVEL 11 Insufficient operator authorization level
PDLRT_NO_POSITION 12 Rectangle cannot be placed
PDLRT_POSITION_WITH_MODY 13 Rectangle was modified
PDLRT_E_ALREADY_CONNECTED 14 Another connection to the PDLRT already exists

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 515
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

PDLRT_PICTURE_ALREADY_OPEN 15 Screen is already open


PDLRT_BAD_OLE_CONVERSION 16 Error during conversion via OLE Automation
PDLRT_NO_LINK 17 Property has no dynamics
PDLRT_IND_LINK_READ_ERR 18 Error while reading the indirect tag
PDLRT_NO_IND_LINK 19 Property has no indirect dynamics
PDLRT_FAILURE_PARAM 20 Wrong parameter

2.3.1.4 Constants (RT Professional)

Addressing mode

PDLRT_AM_DEFAULT 0 The addressing of screen and object is relative


PDLRT_AM_PICTABS 1 The addressing of the screen is absolute
PDLRT_AM_OBJABS 2 The addressing of the object is absolute

The PDLRT_AM_PICTABS and PDLRT_AM_OBJABS values can be ORed.

PDLRTInquireFreeArea

PDLRT_IQ_ONLY 0x01 Only inquiry with result: ''fits/does not fit''


PDLRT_IQ_MODY_POSX 0x02 The x-position of the rectangle may be
modified so that it can be placed
PDLRT_IQ_MODY_POSY 0x04 The y-position of the rectangle may be
modified so that it can be placed
PDLRT_IQ_MODY_HEIGHT 0x08 The height of the rectangle may be modi‐
fied so that it can be placed
PDLRT_IQ_MODY_WIDTH 0x10 The width of the rectangle may be modi‐
fied so that it can be placed
PDLRTOpenPicture
PDLRT_WS_STYLE_FROM_PIC 0 The display attributes are taken from the
screen data
PDLRT_WS_BORDER WS_BORDER Window with frame
PDLRT_WS_CAPTION WS_CAPTION Window with title and frame
PDLRT_WS_THICKFRAME WS_THICKFRAME Window with thick frame. Size can be
changed via mouse operation.
PDLRT_WS_HSCROLL WS_HSCROLL Window with horizontal slider
PDLRT_WS_VSCROLL WS_VSCROLL Window with vertical slider

Update cycles

Name Index
"On change" 0
"250 ms" 1
"500 ms" 2

WinCC Professional V13 SP2 – Programming reference


516 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"1 s" 3
"2 s" 4
"5 s" 5
"10 s" 6
"1 min" 7
"5 min" 8
"10 min" 9
"1 h" 10
"User cycle 1" 11
"User cycle 2" 12
"User cycle 3" 13
"User cycle 4" 14
"User cycle 5" 15
"Window cycle" 235
"Screen cycle" 255

2.3.1.5 List of object properties (A-K) (Graphics Designer) (RT Professional)

Overview

Note
For many API functions of the Graphics Designer, you must initialize the lpszPropName
parameter. The English name of an object property must be specified for this.
Properties of type VT_USERDEFINED must not be processed with the Get/Set Property
functions.
VT_DISPATCH and other references must not be used; only the standard types and at most
one VT_VARIANT for an array property of simple types may be used.

OLE Automation Data type Property name Attribute name Object association
name
"ActualPointLeft" VT_I4 Current Value Current Value X Polygon
X
"ActualPointTop" VT_I4 Current Value Current Value Y Polygon
Y
"AdaptBorder" VT_BOO Adapt Border Adapt Border Button, static text, I/O
L field, text list, check
box, radio box
"AdaptPicture" VT_BOO Adapt Picture Adapt Picture Screen window
L
"AdaptSize" VT_BOO Adapt Size Adapt Size Screen window
L
"AdaptWidth"

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 517
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"AlarmHigh" VT_R8 Limit AH Limit AH Bar


"AlarmLow" VT_R8 Limit AL Limit AL Bar
"Alignment" VT_BOO Alignment Alignment Bar
L
"AlignmentLeft" VT_I4 X Alignment X Alignment Button, static text, I/O
field, group display,
text list, check box, ra‐
dio box
"AlignmentTop" VT_I4 Y Alignment Y Alignment Button, static text, I/O
field, group display,
text list, check box, ra‐
dio box
"Analog" VT_BOO OCX Analog Analog DAClockCtrl
L
"AngleAlpha" VT_I4 BPC Alpha Alpha 3D bar
"AngleBeta" VT_I4 BPC Beta Beta 3D bar
"AngleMax" VT_R8 OCX AngleMax AngleMax XGaugeCtrl
"AngleMin" VT_R8 OCX AngleMin AngleMin XGaugeCtrl
"Application" VT_BST WindowCon‐ WindowContent Print job/Script diag‐
R tent nostics
"ApplicationData‐
Path"
"Assignments" VT_BST Assignments Assignments Text list
R
"AssumeOnExit" VT_BOO Apply on Exit Apply on Exit I/O field, text list
L
"AssumeOnFull" VT_BOO Apply on Full Apply on Full In‐ I/O field
L put
"Autoscroll" VT_BOO OCX AutoScroll AutoScroll CCAlgWinCtrl
L
"AutoSize" VT_I4 OCX AutoSize AutoSize PButtonCtrl
"Average" VT_BOO Average Value Average Value Bar
L
"Axe" VT_I4
"AxisSection" VT_R8 Axis Section Axis Section Bar
"BackBorderWidth" VT_I4 3D Border 3D Border Button, group display,
Weight Weight round button, slider ob‐
ject
"BackColor" VT_I4 Background Background Col‐ Button, ellipse, ellipse
Color or segment, circle, circle
segment, polygon, rec‐
tangle, rounded rectan‐
gle, static text, 3D bar,
I/O field, bar, graphic
object, group display,
text list, check box, ra‐
dio box, round button,
slider object

WinCC Professional V13 SP2 – Programming reference


518 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"BackColor" VT_UI4 BackColor BackColor DAClockCtrl, XGau‐


geCtrl, PButtonCtrl, Sli‐
derCtrl
"BackColor2" VT_I4 Bar Color Bar Color Bar
"BackColor3" VT_I4 Bar Back‐ Bar Background Bar
ground Color Color
"BackColorBottom" VT_I4 Low Limit Low Limit Back‐ Slider object
Background ground Color
Color
"BackColorTop" VT_I4 High Limit High Limit Back‐ Slider object
Background ground Color
Color
"BackFlashColorOff" VT_I4 Flashing Back‐ Flashing Back‐ Button, ellipse, ellipse
ground Color ground Color Off segment, circle, circle
Off segment, polygon, rec‐
tangle, rounded rectan‐
gle, static text, I/O field,
bar, graphic object,
text list, check box, ra‐
dio box, round button,
slider object
"BackFlashColorOn" VT_I4 Flashing Back‐ Flashing Back‐ Button, ellipse, ellipse
ground Color ground Color On segment, circle, circle
On segment, polygon, rec‐
tangle, rounded rectan‐
gle, static text, I/O field,
bar, graphic object,
text list, check box, ra‐
dio box, round button,
slider object
"Background" VT_BOO Background Background 3D bar
L
"BackgroundPicture" VT_USE Background‐ BackgroundPic‐ XGaugeCtrl
RDE‐ Picture ture
FINED
"BarBackColor" VT_UI4 BarBackColor BarBackColor SliderCtrl
"BarFillColor" VT_UI4 BarFillColor BarFillColor SliderCtrl
"BarDepth" VT_I4 Bar Depth Bar Depth 3D bar
"BarHeight" VT_I4 Bar Height Bar Height 3D bar
"BarWidth" VT_I4 Bar Width Bar Width 3D bar
"BasePicRefer‐ VT_BOO Basic Picture Basic Picture Status display
enced" L Referenced Referenced
"BasePicTransColor" VT_I4 Basic Picture Basic Picture Status display
Transparent Transparent Col‐
Color or
"BasePicture" VT_BST Basic Picture Basic Picture Status display
R
"BasePicUseTrans‐ VT_BOO Basic Picture Basic Picture Status display
Color" L Transparent Transparent Col‐
Color On or On
"BaseX" VT_I4 Base X Base X 3D bar

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 519
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"BaseY" VT_I4 Base Y Base Y 3D bar


"Beveler" VT_I4 Beveler Beveler SliderCtrl
"BevelColorDown" VT_UI4 BevelColor‐ BevelColorDown SliderCtrl
Down
"BevelColorUp" VT_UI4 BevelColorUp BevelColorUp SliderCtrl
"BevelOuter" VT_I4 BevelOuter BevelOuter XGaugeCtrl
"BevelWidth" VT_I4 BevelWidth BevelWidth XGaugeCtrl
"BitNumber" VT_I4 Bit number Status display
"BorderBackColor" VT_I4 Border Back‐ Border Back‐ Button, ellipse, ellipti‐
ground Color, ground Color, cal arc, ellipse seg‐
Line Back‐ Line Background ment, circle, circular
ground Color Color arc, circle segment,
line, polygon, polyline,
rectangle, rounded rec‐
tangle, static text, I/O
field, bar, graphic ob‐
ject, text list, check
box, radio box, round
button, slider object
"BorderColor" VT_I4 Border Color, Border Color, Button, ellipse, ellipti‐
Line Back‐ Line Background cal arc, ellipse seg‐
ground Color Color ment, circle, circular
arc, circle segment,
line, polygon, polyline,
rectangle, rounded rec‐
tangle, static text, 3-D
bar, I/O field, bar,
graphic object, text list,
status display, check
box, radio box, round
button, slider object
"BorderColorBottom" VT_I4 3D Shadow 3D Shadow Color Button, round button
Color
"BorderColorTop" VT_I4 3D Border Col‐ 3D Border Color Button, round button
or
"BorderEndStyle" VT_UI4 Line End Style Line End Style Line, polyline
"BorderFlashColor‐ VT_I4 Flashing Bor‐ Flashing Border Button, ellipse, ellipti‐
Off" der Color Off, Color Off, Flash‐ cal arc, ellipse seg‐
Flashing Line ing Line Color Off ment, circle, circular
Color Off arc, circle segment,
line, polygon, polyline,
rectangle, rounded rec‐
tangle, static text, I/O
field, bar, graphic ob‐
ject, text list, check
box, radio box, slider
object

WinCC Professional V13 SP2 – Programming reference


520 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"BorderFlashColor‐ VT_I4 Flashing Bor‐ Flashing Border Button, ellipse, ellipti‐


On" der Color On, Color On, Flash‐ cal arc, ellipse seg‐
Flashing Line ing Line Color On ment, circle, circular
Color On arc, circle segment,
line, polygon, polyline,
rectangle, rounded rec‐
tangle, static text, I/O
field, bar, graphic ob‐
ject, text list, check
box, radio box, round
button, slider object
"BorderStyle" VT_UI4 Line Style Line Style Button, ellipse, ellipti‐
cal arc, ellipse seg‐
ment, circle, circular
arc, circle segment,
line, polygon, polyline,
rectangle, rounded rec‐
tangle, static text, 3-D
bar, I/O field, graphic
object, text list, status
display, check box, ra‐
dio box, round button,
slider object
"BorderWidth" VT_I4 Line Weight Line Weight Button, ellipse, ellipti‐
cal arc, ellipse seg‐
ment, circle, circular
arc, circle segment,
line, polygon, polyline,
rectangle, rounded rec‐
tangle, static text, 3-D
bar, I/O field, bar,
graphic object, text list,
status display, check
box, radio box, round
button, slider object
"BorderWidth" VT_I4 OCX BorderWidth BorderWidth XGaugeCtrl
"BoxAlignment" VT_BOO Box Alignment Box Alignment Check box, radio box
L
"BoxCount" VT_I4 Number of Number of Boxes Check box, radio box
Boxes
"BoxType" VT_I4 Field Type Field Type I/O field, text list
"Button1Width" VT_I4 Button 1 Width Button 1 Width Group display
"Button2Width" VT_I4 Button 2 Width Button 2 Width Group display
(Error: But‐
ton 1 Width 2)
"Button3Width" VT_I4 Button 3 Width Button 3 Width Group display
(Error: But‐
ton 1 Width 3)
"Button4Width" VT_I4 Button 4 Width Button 4 Width Group display
"ButtonColor" VT_I4 Button Color Button Color Slider object
"ButtonCommand" VT_I4 OCX ButtonCom‐ ButtonCommand CCAlgWinCtrl
mand

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 521
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"Caption" VT_BOO Title Title Print job/Script diag‐


L nostics, screen window
"Caption" VT_BST OCX Caption Caption XGaugeCtrl, PBut‐
R tonCtrl, SliderCtrl
"CaptionColor" VT_UI4 OCX CaptionColor CaptionColor XGaugeCtrl
"CaptionFont" VT_USE OCX CaptionFont CaptionFont XGaugeCtrl
RDE‐
FINED
"CaptionOffset" VT_R8 OCX CaptionOffset CaptionOffset XGaugeCtrl
"CellCut" VT_BOO OCX CellCut CellCut CCAlgWinCtrl
L
"CenterColor" VT_UI4 OCX CenterColor CenterColor XGaugeCtrl
"CenterScale" VT_R4 OCX CenterScale CenterScale XGaugeCtrl
"CheckAlarmHigh" VT_BOO Monitoring AH Monitoring AH Bar
L
"CheckAlarmLow" VT_BOO Monitoring AL Monitoring AL Bar
L
"CheckLimitHigh4" VT_BOO Monitoring Monitoring RH4 Bar
L RH4
"CheckLimitHigh5" VT_BOO Monitoring Monitoring RH5 Bar
L RH5
"CheckLimitLow4" VT_BOO Monitoring RL4 Monitoring RL4 Bar
L
"CheckLimitLow5" VT_BOO Monitoring RL5 Monitoring RL5 Bar
L
"CheckTolerance‐ VT_BOO Monitoring TH Monitoring TH Bar
High" L
"CheckTolerance‐ VT_BOO Monitoring TL Monitoring TL Bar
Low" L
"CheckWarningHigh" VT_BOO Monitoring WH Monitoring WH Bar
L
"CheckWarningLow" VT_BOO Monitoring WL Monitoring WL Bar
L
"ClearOnError" VT_BOO Clear on Inva‐ Clear on Invalid I/O field
L lid Input Input
"ClearOnNew" VT_BOO Clear on New Clear on New In‐ I/O field
L Input put
"CloseButton" VT_BOO Can be Closed Can be Closed Print job/Script diag‐
L nostics, screen window
"CollectValue" VT_UI4 Group Value Group Value Group display
"ColMove" VT_BOO OCX ColMove ColMove CCAlgWinCtrl
L
"ColorAlarmHigh" VT_I4 Bar Color AH Bar Color AH Bar
"ColorAlarmLow" VT_I4 Bar Color AL Bar Color AL Bar
"ColorBottom" VT_I4 Low Limit Color Low Limit Color Slider object
"ColorChangeType" VT_BOO Change Color Change Color Bar
L
"ColorLimitHigh4" VT_I4 Bar Color RH4 Bar Color RH4 Bar

WinCC Professional V13 SP2 – Programming reference


522 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"ColorLimitHigh5" VT_I4 Bar Color RH5 Bar Color RH5 Bar


"ColorLimitLow4" VT_I4 Bar Color RL4 Bar Color RL4 Bar
"ColorLimitLow5" VT_I4 Bar Color RL5 Bar Color RL5 Bar
"ColorTolerance‐ VT_I4 Bar Color TH Bar Color TH Bar
High"
"ColorTolerance‐ VT_I4 Bar Color TL Bar Color TL Bar
Low"
"ColorTop" VT_I4 High Limit Col‐ High Limit Color Slider object
or
"ColorWarningHigh" VT_I4 Bar Color WH Bar Color WH Bar
"ColorWarningLow" VT_I4 Bar Color WL Bar Color WL Bar
"ColTitle" VT_BOO OCX ColTitle ColTitle CCAlgWinCtrl
L
"ColWidth" VT_BOO OCX ColWidth ColWidth CCAlgWinCtrl
L
"CursorControl" VT_BOO Cursor Control Cursor Control I/O field, text list
L
"CursorMode" VT_BOO
L
"Danger" VT_R4 OCX Danger Danger XGaugeCtrl
"DangerColor" VT_UI4 OCX DangerColor DangerColor XGaugeCtrl
"DataFormat" VT_I4 Data Format Data Format I/O field
"DataLanguage" VT_I4 Configured Configured Lan‐ Button, static text,
Languages guages check box, radio box
"Delta" VT_R4 Delta Delta XGaugeCtrl
"DesignMode"
"DigitNumber"
"Direction" VT_I4 Bar Alignment Bar Alignment 3D bar, slider object,
bar
"EditAtOnce" VT_BOO Immediate In‐ Immediate Input I/O field, text list
L put
"EnableTime"
"EnableWriting"
"EndAngle" VT_I4 End Angle End Angle Elliptical arc, ellipse
segment, circular arc,
circle segment
"Exponent" VT_BOO Exponent Dis‐ Exponent Dis‐ Bar
L play play
"ExtendedOperation" VT_BOO Extended Op‐ Extended Opera‐ Slider object
L eration tion
"FillBackColor"

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 523
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"FillColor" VT_I4 Fill Pattern Col‐ Fill Pattern Color Button, ellipse, ellipse
or segment, circle, circle
segment, polygon, rec‐
tangle, rounded rectan‐
gle, static text, I/O field,
bar, graphic object,
text list, check box, ra‐
dio box, round button,
slider object
"Filling" VT_BOO Dynamic Filling Dynamic Filling Button, ellipse, ellipse
L segment, circle, circle
segment, polygon, rec‐
tangle, rounded rectan‐
gle, static text, graphic
object, check box, ra‐
dio box, round button
"FillingIndex" VT_I4 Fill Level Fill Level Button, ellipse, ellipse
segment, circle, circle
segment, polygon, rec‐
tangle, rounded rectan‐
gle, static text, graphic
object, check box, ra‐
dio box, round button,
slider object
"FillStyle" VT_UI4 Fill Pattern Fill Pattern Button, ellipse, ellipse
segment, circle, circle
segment, polygon, rec‐
tangle, rounded rectan‐
gle, static text, I/O field,
bar, graphic object,
text list, check box, ra‐
dio box, round button,
slider object
"FillStyle2" VT_UI4 Bar Pattern Bar Pattern Bar
"FlashBackColor" VT_BOO Flashing Back‐ Flashing Back‐ Button, ellipse, ellipse
L ground Active ground Active segment, circle, circle
segment, polygon, rec‐
tangle, rounded rectan‐
gle, static text, I/O field,
bar, graphic object,
text list, check box, ra‐
dio box, round button,
slider object
"FlashBorderColor" VT_BOO Flashing Line Flashing Line Ac‐ Button, ellipse, ellipti‐
L Active tive cal arc, ellipse seg‐
ment, circle, circular
arc, circle segment,
line, polygon, polyline,
rectangle, rounded rec‐
tangle, static text, I/O
field, bar, graphic ob‐
ject, text list, check
box, radio box, round
button, slider object

WinCC Professional V13 SP2 – Programming reference


524 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"FlashBorderColor‐
Ex"
"FlashFlashPicture" VT_BOO Flashing Flash Flashing Flash Status display
L Picture Active Picture Active
"FlashForeColor" VT_BOO Flashing Text Flashing Text Ac‐ Button, static text, I/O
L Active tive field, text list, check
box, radio box
"FlashPicRefer‐ VT_BOO Flash Picture Flash Picture Status display
enced" L Referenced Referenced
"FlashPicTransCol‐ VT_I4 Basic Picture Basic Picture Status display
or" Transparent Transparent Col‐
Color or
"FlashPicture" VT_BST Flash Picture Flash Picture Status display
R
"FlashPicUseTrans‐ Flash Picture Flash Picture Status display
Color" Transparent Transparent Col‐
Color On or On
"FlashRate" VT_I4 Flash Frequen‐ Flash Frequency Group display
cy
"FlashRateBackCol‐ VT_I4 Background Background Button, ellipse, ellipse
or" Flash Frequen‐ Flash Frequency segment, circle, circle
cy segment, polygon, rec‐
tangle, rounded rectan‐
gle, static text, I/O field,
bar, graphic object,
text list, check box, ra‐
dio box, round button,
slider object
"FlashRateBorder‐ VT_I4 Line Flash Fre‐ Background Button, ellipse, ellipti‐
Color" quency Flash Frequency cal arc, ellipse seg‐
ment, circle, circular
arc, circle segment,
line, polygon, polyline,
rectangle, rounded rec‐
tangle, static text, I/O
field, bar, graphic ob‐
ject, text list, check
box, radio box, round
button, slider object
"FlashRateFlashPic" VT_I4 Flash Picture Flash Picture Status display
Flash Frequen‐ Flash Frequency
cy
"FlashRateForeCol‐ VT_I4 Text Flash Fre‐ Text Flash Fre‐ Button, static text, I/O
or" quency quency field, text list, check
box, radio box
"Font" VT_USE OCX Font Font DAClockCtrl, PBut‐
RDE‐ tonCtrl, SliderCtrl
FINED
"FontBold" VT_BOO Bold Bold Button, static text, I/O
L field, bar, group dis‐
play, text list, check
box, radio box

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 525
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"FontBold" VT_BOO OCX FontBold FontBold PButtonCtrl


L
"FontItalic" VT_BOO Italic Italic Button, static text, I/O
L field, group display,
text list, check box, ra‐
dio box
"FontItalic" VT_BOO FontItalic FontItalic PButtonCtrl
L
"FontName" VT_BST Font Font Button, static text, I/O
R field, group display,
text list, check box, ra‐
dio box
"FontName" VT_BST OCX FontName FontName PButtonCtrl
R
"FontPosition" VT_USE OCX FontPosition FontPosition SliderCtrl
RDE‐
FINED
"FontSize" VT_I4 Font Size Font Size Button, static text, I/O
field, group display,
text list, check box, ra‐
dio box
"FontSize" VT_BST OCX FontSize Font Size PButtonCtrl
R
"FontStrikeThru" VT_BOO OCX FontStrikeThru FontStrikeThru PButtonCtrl
L
"FontUnderline" VT_BOO Underline Underline Button, static text, I/O
L field, group display,
text list, check box, ra‐
dio box
"FontUnderline" VT_BOO OCX FontUnderline FontUnderline PButtonCtrl
L
"ForceInput"
"ForeColor" VT_I4 Font Color Font Color Button, static text, I/O
field, group display,
text list, check box, ra‐
dio box
"ForeColor" VT_UI4 OCX ForeColor ForeColor DAClockCtrl, PBut‐
tonCtrl, SliderCtrl
"ForeFlashColorOff" VT_I4 Flashing Text Flashing Text Button, static text, I/O
Color Off Color Off field, group display,
text list, check box, ra‐
dio box
"ForeFlashColorOn" VT_I4 Flashing Text Flashing Text Button, static text, I/O
Color On Color On field, group display,
text list, check box, ra‐
dio box
"FrameColor" VT_UI4
"FrameColorDown" VT_UI4 OCX FrameColor‐ FrameColor‐ PButtonCtrl
Down Down
"FrameColorUp" VT_UI4 OCX FrameColorUp FrameColorUp PButtonCtrl

WinCC Professional V13 SP2 – Programming reference


526 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"FramePicture" VT_USE OCX FramePicture FramePicture XGaugeCtrl


RDE‐
FINED
"FrameScale" VT_R4 OCX FrameScale FrameScale XGaugeCtrl
"FrameSize" OCX FrameSize FrameSize PButtonCtrl
"FrameWidth" VT_I4 OCX FrameWidth FrameWidth PButtonCtrl
"Freeze" VT_BOO Freeze Freeze WTVctrlCtrl
L
"Grid" VT_BOO
L
"GridColor" VT_I4
"GridHeight" VT_I4
"GridLineHorz" VT_BOO OCX GridLineHorz GridLineHorz CCAlgWinCtrl
L
"GridLineVert" VT_BOO OCX GridLineVert GridLineVert CCAlgWinCtrl
L
"GridWidth" VT_I4
"Height" VT_I4 Height Height Button, ellipse, ellipti‐
cal arc, ellipse seg‐
ment, circle, circular
arc, circle segment,
line, polygon, polyline,
rectangle, rounded rec‐
tangle, static text, 3-D
bar, I/O field, bar,
graphic object, group
display, text list, status
display, check box, ra‐
dio box, round button,
slider object, DA‐
ClockCtrl, XGau‐
geCtrl, CCAlgWinCtrl,
PButtonCtrl, SliderCtrl,
WTVctrlCtrl
"Height" VT_I4 Window Height Window Height Print job/Script diag‐
nostics, screen window
"HiddenInput" VT_BOO Hidden Input Hidden Input I/O field
L
"Hotkey" VT_UI4 Hot Key Hot Key Button
"HourNeedleHeight" VT_I4 HourNeedle‐ HourNeedle‐ DAClockCtrl
Height Height
"HourNeedleWidth" VT_I4 HourNeedle‐ HourNeedle‐ DAClockCtrl
Width Width
"Hysteresis" VT_BOO Hysteresis Hysteresis Bar
L
"HysteresisRange" VT_R8 Hysteresis Hysteresis Bar
Range Range
"Index" VT_I4 Index Index Polygon, polyline, sta‐
tus display, check box,
radio box

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 527
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"InnerBevelOffset" VT_I4 OCX InnerBevelOff‐ InnerBevelOffset SliderCtrl


set
"InnerBevelStyle" VT_I4 OCX InnerBevel‐ InnerBevelStyle SliderCtrl
Style
"InnerBevelWidth" VT_I4 OCX InnerBevel‐ InnerBevelWidth SliderCtrl
Width
"ItemBorderBack‐ VT_I4 Dividing Back‐ Dividing Back‐ Text list
Color" ground Color ground Color
"ItemBorderColor" VT_I4 Dividing Line Dividing Line Col‐ Text list
Color or
"ItemBorderStyle" VT_UI4 Dividing Line Dividing Line Text list
Style Style

2.3.1.6 List of object properties (L-Z) (Graphics Designer) (RT Professional)

Overview

Note
For many API functions of the Graphics Designer, you must initialize the lpszPropName
parameter. The English name of an object property must be specified for this.
Properties of type VT_USERDEFINED must not be processed with the Get/Set Property
functions.
VT_DISPATCH and other references must not be used; only the standard types and at most
one VT_VARIANT for an array property of simple types may be used.

OLE Automation Data type Property name Attribute name Object association
name
"LanguageS‐ VT_BOOL Language Language Text list
witch" Switch switching
"LastChange" VT_BSTR
"Layer" VT_I4 Layer Layer Button, ellipse, elliptical
arc, ellipse segment, cir‐
cle, circular arc, circle seg‐
ment, line, polygon, poly‐
line, rectangle, rounded
rectangle, static text, 3-D
bar, print job/script diag‐
nostics, screen window, I/
O field, bar, graphic object,
group display, text list, sta‐
tus display, check box, ra‐
dio box, round button, slid‐
er object, XGaugeCtrl,
CCAlgWinCtrl, PBut‐
tonCtrl, SliderCtrl,
WTVctrlCtrl

WinCC Professional V13 SP2 – Programming reference


528 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"Lay‐ VT_BOOL BPC Monitoring 0 Monitoring 0 3D bar


er00Checked"
"Lay‐ VT_BOOL BPC Monitoring 1 Monitoring 1 3D bar
er01Checked"
"Lay‐ VT_BOOL BPC Monitoring 2 Monitoring 2 3D bar
er02Checked"
"Lay‐ VT_BOOL BPC Monitoring 3 Monitoring 3 3D bar
er03Checked"
"Lay‐ VT_BOOL BPC Monitoring 4 Monitoring 4 3D bar
er04Checked"
"Lay‐ VT_BOOL BPC Monitoring 5 Monitoring 5 3D bar
er05Checked"
"Lay‐ VT_BOOL BPC Monitoring 6 Monitoring 6 3D bar
er06Checked"
"Lay‐ VT_BOOL BPC Monitoring 7 Monitoring 7 3D bar
er07Checked"
"Lay‐ VT_BOOL BPC Monitoring 8 Monitoring 8 3D bar
er08Checked"
"Lay‐ VT_BOOL BPC Monitoring 9 Monitoring 9 3D bar
er09Checked"
"Lay‐ VT_BOOL BPC Monitoring 10 Monitoring 10 3D bar
er10Checked"
"Layer00Color" VT_I4 BPC Bar Color 0 Bar Color 0 3D bar
"Layer01Color" VT_I4 BPC Bar Color 1 Bar Color 1 3D bar
"Layer02Color" VT_I4 BPC Bar Color 2 Bar Color 2 3D bar
"Layer03Color" VT_I4 BPC Bar Color 3 Bar Color 3 3D bar
"Layer04Color" VT_I4 BPC Bar Color 4 Bar Color 4 3D bar
"Layer05Color" VT_I4 BPC Bar Color 5 Bar Color 5 3D bar
"Layer06Color" VT_I4 BPC Bar Color 6 Bar Color 6 3D bar
"Layer07Color" VT_I4 BPC Bar Color 7 Bar Color 7 3D bar
"Layer08Color" VT_I4 BPC Bar Color 8 Bar Color 8 3D bar
"Layer09Color" VT_I4 BPC Bar Color 9 Bar Color 9 3D bar
"Layer10Color" VT_I4 BPC Bar Color 10 Bar Color 10 3D bar
"Layer00Value" VT_R8 BPC Limit 0 Limit 0 3D bar
"Layer01Value" VT_R8 BPC Limit 1 Limit 1 3D bar
"Layer02Value" VT_R8 BPC Limit 2 Limit 2 3D bar
"Layer03Value" VT_R8 BPC Limit 3 Limit 3 3D bar
"Layer04Value" VT_R8 BPC Limit 4 Limit 4 3D bar
"Layer05Value" VT_R8 BPC Limit 5 Limit 5 3D bar
"Layer06Value" VT_R8 BPC Limit 6 Limit 6 3D bar
"Layer07Value" VT_R8 BPC Limit 7 Limit 7 3D bar
"Layer08Value" VT_R8 BPC Limit 8 Limit 8 3D bar
"Layer09Value" VT_R8 BPC Limit 9 Limit 9 3D bar
"Layer10Value" VT_R8 BPC Limit 10 Limit 10 3D bar

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 529
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"Left" VT_I4 X position X position Button, ellipse, elliptical


arc, ellipse segment, cir‐
cle, circular arc, circle seg‐
ment, line, polygon, poly‐
line, rectangle, rounded
rectangle, static text, 3-D
bar, print job/script diag‐
nostics, screen window, I/
O field, bar, graphic object,
group display, text list, sta‐
tus display, check box, ra‐
dio box, round button, slid‐
er object, XGaugeCtrl,
CCAlgWinCtrl, PBut‐
tonCtrl, SliderCtrl,
WTVctrlCtrl
"LeftComma" VT_I4 Digits to the Digits to the Bar
Left of the Dec‐ Left of the Dec‐
imal Point imal Point
"LightEffect" VT_BOOL Light Effect Light Effect 3D bar
"LimitHigh4" VT_R8 Limit RH4 Limit RH4 Bar
"LimitHigh5" VT_R8 Limit RH5 Limit RH5 Bar
"LimitLow4" VT_R8 Limit RL4 Limit RL4 Bar
"LimitLow5" VT_R8 Limit RL5 Limit RL5 Bar
"LimitMax" VT_R8
"LimitMin" VT_R8
"LineFont" VT_BOOL OCX LineFont LineFont CCAlgWinCtrl
"LineHeight" VT_BOOL OCX LineHeight LineHeight CCAlgWinCtrl
"LineTitle" VT_BOOL OCX LineTitle LineTitle CCAlgWinCtrl
"ListType" VT_I4 List Type List Type Text list
"Locale"
"LockBackColor" VT_I4 Lock Back‐ Lock Back‐ Group display
ground Color ground Color
"LockStatus" VT_BOOL Lock Display Lock Display Group display
"LockText" VT_BOOL Lock Display Lock Display Group display
Text Text
"LockTextColor" VT_I4 Lock Font Col‐ Lock Font Col‐ Group display
or or
"LongStrokes‐ VT_BOOL Long Axis Sec‐ Long Axis Sec‐ Bar
Bold" tion tion
"LongStrokesOn‐ VT_BOOL Only Long Axis Only Long Axis Bar
ly" Section Section
"LongStrokes‐ VT_UI4 Length of Axis Length of Axis Bar
Size" Section Section
"LongStrokes‐ VT_UI4 Label Each Label Each Bar
TextEach"
"Marker" VT_BOOL Limit Marker Limit Marker Bar
"Max" VT_R8 Maximum Val‐ Maximum Val‐ 3D bar, slider object, bar
ue ue

WinCC Professional V13 SP2 – Programming reference


530 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"MaximizeBut‐ VT_BOOL Can be Maxi‐ Can be Maxi‐ Print job/Script diagnos‐


ton" mized mized tics, screen window
"MCGUBackCo‐ VT_I4 Outgoing Un‐ Outgoing Un‐ Group display
lorOff" acknowl‐ acknowl‐
edged- Back‐ edged- Back‐
ground Color ground Color
Off Off
"MCGUBackCo‐ VT_I4 Outgoing Un‐ Outgoing Un‐ Group display
lorOn" acknowl‐ acknowl‐
edged- Back‐ edged- Back‐
ground Color ground Color
On On
"MCGUBack‐ VT_BOOL Outgoing Un‐ Outgoing Un‐ Group display
Flash" acknowledged acknowledged
- Background - Background
Flashing Flashing
"MCGUTextCo‐ VT_I4 Outgoing Un‐ Incoming - Group display
lorOff" acknowl‐ Background
edged- Text Color Off
Color Off
"MCGUTextCo‐ VT_I4 Outgoing Un‐ Incoming - Group display
lorOn" acknowl‐ Background
edged- Text Color On
Color On
"MCGUText‐ VT_BOOL Outgoing Un‐ Outgoing Un‐ Group display
Flash" acknowledged acknowledged
- Text Flashing - Background
Flashing
"MCKOBackCo‐ VT_I4 Incoming - Incoming - Group display
lorOff" Background Background
Color Off Color Off
"MCKOBackCo‐ VT_I4 Incoming - Incoming - Group display
lorOn" Background Background
Color On Color On
"MCKOBack‐ VT_BOOL Incoming - Incoming - Group display
Flash" Background Background
Flashing Flashing
"MCKOTextCo‐ VT_I4 Incoming - Incoming - Group display
lorOff" Text Color Off Text Color Off
"MCKOTextCo‐ VT_I4 Incoming - Incoming - Group display
lorOn" Text Color On Text Color On
"MCKOText‐ VT_BOOL Incoming - Incoming - Group display
Flash" Text Flashing Text Flashing
"MCKQBackCo‐ VT_I4 Incoming Ac‐ Incoming Ac‐ Group display
lorOff" knowledge - knowledge -
Background Background
Color Off Color Off
"MCKQBackCo‐ VT_I4 Incoming Ac‐ Incoming Ac‐ Group display
lorOn" knowledge - knowledge -
Background Background
Color On Color On

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 531
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"MCKQBack‐ VT_BOOL Incoming Ac‐ Incoming Ac‐ Group display


Flash" knowledge - knowledge -
Background Background
Flashing Flashing
"MCKQTextCo‐ VT_I4 Incoming Ac‐ Incoming Ac‐ Group display
lorOff" knowledge - knowledge -
Text Color Off Text Color Off
"MCKQTextCo‐ VT_I4 Incoming Ac‐ Incoming Ac‐ Group display
lorOn" knowledge - knowledge -
Text Color On Text Color On
"MCKQText‐ VT_BOOL Incoming Ac‐ Incoming Ac‐ Group display
Flash" knowledge - knowledge -
Text Flashing Text Flashing
"MCText" VT_BOOL Display Text Display Text Group display
"MessageClass" VT_I4 Message Type Message Type Group display
"Min" VT_R8 Minimum Val‐ Minimum Val‐ Group display
ue ue
"MinuteNeedle‐ VT_I4 OCX MinuteNeedle‐ MinuteNeedle‐ Group display
Height" Height Height
"MinuteNeedle‐ VT_I4 OCX MinuteNeedle‐ MinuteNeedle‐ Group display
Width" Width Width
"MsgFilter" VT_BSTR OCX MsgFilter
"MsgFilter2" VT_BSTR OCX MsgFilter2
"Moveable" VT_BOOL Moveable Moveable Print job/Script diagnos‐
tics, screen window
"NeedleColor" VT_UI4 OCX NeedleColor NeedleColor XGaugeCtrl
"NormalColor" VT_UI4 OCX NormalColor NormalColor XGaugeCtrl
"NumberLines" VT_I4 Number of visi‐ Number of visi‐ Text list
ble Lines ble Lines
"ObjectName" VT_BSTR Object Name Object name Button, ellipse, elliptical
arc, ellipse segment, cir‐
cle, circular arc, circle seg‐
ment, line, polygon, poly‐
line, rectangle, rounded
rectangle, static text, 3-D
bar, print job/script diag‐
nostics, I/O field, bar,
graphic object, group dis‐
play, text list, status dis‐
play, check box, radio box,
round button, slider object,
DAClockCtrl, XGaugeCtrl,
CCAlgWinCtrl, PBut‐
tonCtrl, SliderCtrl,
WTVctrlCtrl
"OffsetLeft" VT_I4 Picture Offset Picture Offset Screen window
X X
"OffsetTop" VT_I4 Picture Offset Picture Offset Screen window
Y Y
"OnTop" VT_BOOL Foreground Foreground Print job/Script diagnos‐
tics, screen window

WinCC Professional V13 SP2 – Programming reference


532 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"Operation" VT_BOOL Operator-Con‐ Operator-Con‐ Button, ellipse, elliptical


trol Enable trol Enable arc, ellipse segment, cir‐
cle, circular arc, circle seg‐
ment, line, polygon, poly‐
line, rectangle, rounded
rectangle, static text, 3-D
bar, I/O field, bar, graphic
object, group display, text
list, status display, check
box, radio box, round but‐
ton, slider object, DA‐
ClockCtrl, XGaugeCtrl,
CCAlgWinCtrl, PBut‐
tonCtrl, SliderCtrl,
WTVctrlCtrl
"OperationMes‐ VT_BOOL Operator Input Operator Input I/O field, text list, check
sage" Message Message box, radio box, slider object
"OperationRe‐ VT_BOOL Operator Ac‐ Operator Ac‐ I/O field, text list, slider ob‐
port" tions Report tions Report ject
"OperationSteps" Operation Operation Slider object
Steps Steps
"Orientation" VT_BOOL Text Orienta‐ Text Orienta‐ Static text, I/O field, text
tion tion list, check box, radio box
"OuterBevelOff‐ VT_I4 OCX OuterBevelOff‐ OuterBevelOff‐ SliderCtrl
set" set set
"OuterBevel‐ VT_I4 OCX OuterBevel‐ OuterBevel‐ SliderCtrl
Style" Style Style
"OuterBevel‐ VT_I4 OCX OuterBevel‐ OuterBevel‐ SliderCtrl
Width" Width Width
"Outline" VT_BOOL OCX Outline Outline PButtonCtrl
"OutputFormat" VT_BSTR Output Format Output Format I/O field
"OutputValue" VT_R8 Output Value Output Value I/O field, text list
"PasswordLevel" VT_UI4 User Level Password Button, ellipse, elliptical
arc, ellipse segment, cir‐
cle, circular arc, circle seg‐
ment, line, polygon, poly‐
line, rectangle, rounded
rectangle, static text, 3-D
bar, I/O field, bar, graphic
object, group display, text
list, status display, check
box, radio box, round but‐
ton, slider object
"PicDeactRefer‐ VT_BOOL Picture Deact. Picture Deact. Round button
enced" Referenced Referenced
"PicDeactTrans‐ VT_I4 Picture Deact. Picture Deact. Round button
parent" Transparent Transparent
Color Color
"PicDeactUse‐ VT_BOOL Picture Deact. Picture Deact. Round button
TransColor" Transparent Transparent
Color On Color On

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 533
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"PicDownRefer‐ VT_BOOL Picture On Ref‐ Picture On Ref‐ Round button


enced" erenced erenced
"PicDownTrans‐ VT_I4 Picture On Picture On Round button
parent" Transparent Transparent
Color Color
"PicDownUse‐ VT_BOOL Picture On Picture On Round button
TransColor" Transparent Transparent
Color On Color On
"PicReferenced" VT_BOOL Picture Refer‐ Picture Refer‐ Graphic object
enced enced
"PicTransColor" VT_I4 Picture Trans‐ Picture Trans‐ Graphic object
parent Color parent Color
"Picture" VT_USER OCX Picture Picture DAClockCtrl
DEFINED
"PictureBack" VT_USER OCX PictureBack PictureBack SliderCtrl
DEFINED
"PictureDeacti‐ VT_BSTR Picture Status Picture Status Round button
vated" Deactivated Deactivated
"PictureDown" VT_BSTR Picture Status Picture Status Button, round button
On On
"PictureName" VT_BSTR Picture Name Screen name Screen window, graphic
object
"PictureSelec‐ VT_USER OCX PictureSelec‐ PictureSelec‐ PButtonCtrl
ted" DEFINED ted ted
"PictureUnselec‐ VT_USER OCX Picture Unse‐ Picture Unse‐ PButtonCtrl
ted" DEFINED lected lected
"PictureObject‐
Path"
"PictureThumb" VT_USER PictureThumb PictureThumb SliderCtrl
DEFINED
"PictureUp" VT_BSTR Picture Status Picture Status Button, round button
Off Off
"PicUpRefer‐ VT_BOOL Picture Off Ref‐ Picture Off Ref‐ Round button
enced" erenced erenced
"PicUpTranspar‐ VT_I4 Picture Off Picture Off Round button
ent" Transparent Transparent
Color Color
"PicUpUse‐ VT_BOOL Picture Off Picture Off Round button
TransColor" Transparent Transparent
Color On Color On
"PicUseTrans‐ VT_BOOL Picture Trans‐ Transparent Graphic object
Color" parent Color Color On
On
"PointCount" VT_I4 Number of Cor‐ Number of Cor‐ Polygon, polyline
ners ners
"Position" VT_I4 OCX Positions Positions SliderCtrl
"PredefinedAn‐ VT_I4 BPC Angle Settings Angle Settings 3D bar
gles"
"Pressed" VT_BOOL Pressed Pressed Round button

WinCC Professional V13 SP2 – Programming reference


534 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"Process" VT_R8 Process Driver Process Driver 3D bar, slider object, bar
Connection Connection
"Process" VT_R8 Selected Box‐ Selected Box‐ Check box, radio box
es es
"ProfileName"
"ProjectName"
"ProjectPath" VT_BSTR OCX ProjectPath ProjectPath CCAlgWinCtrl
"Radius" VT_I4 Radius Radius Circle, circular arc, circle
segment, round button
"RadiusHeight" VT_I4 Y radius Y radius Ellipse, Elliptical arc, el‐
lipse segment
"RadiusWidth" VT_I4 X radius X radius Ellipse, Elliptical arc, el‐
lipse segment
"RangeMax" VT_I4 OCX RangeMax RangeMax SliderCtrl
"RangeMin" VT_I4 OCX RangeMin RangeMin SliderCtrl
"ReferenceMo‐
veLeft"
"ReferenceMo‐
veTop"
"ReferenceRota‐ VT_I4 Rotation Refer‐ Rotation Refer‐ Line, polygon, polyline
tionLeft" ence X ence X
"ReferenceRota‐ VT_I4 Rotation Refer‐ Rotation Refer‐ Line, polygon, polyline
tionTop" ence Y ence Y
"RefreshTimer‐ VT_I4 OCX RefreshTimer‐ RefreshTimer‐ WTVctrlCtrl
Period" Period Period
"Relevant" VT_BOOL Group Rele‐ Group Rele‐ Group display
vant vant
"RightComma" VT_I4 Digits to the Digits to the Bar
Right of the Right of the
Decimal Point Decimal Point
"RotationAngle" VT_I4 Rotation Angle Rotation Angle Line, polygon, polyline
"RoundCorner‐ VT_I4 Corner Radius Corner Radius Rounded rectangle
Height" Y Y
"RoundCorner‐ VT_I4 Corner Radius Corner Radius Rounded rectangle
Width" X X
"SameSize" VT_BOOL Same Size Same Size Group display
"ScaleColor" VT_I4 Scale Color Scale Color Bar
"ScaleTicks" VT_I4 Scale Marks Scale Marks Bar
"Scaling" VT_BOOL Scale Scale Bar
"ScalingType" VT_I4 Bar Scaling Bar Scaling Bar
"ScrollBars" VT_BOOL Scroll Bar Scroll Bar Screen window
"SecondNeedle‐ VT_I4 OCX SecondNee‐ SecondNee‐ DAClockCtrl
Height" dleHeight dleHeight
"SecondNeedle‐ VT_I4 OCX SecondNee‐ SecondNee‐ DAClockCtrl
Width" dleWidth dleWidth
"SelBGColor" VT_I4 Selection Selection Text list
Background Background
Color Color

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 535
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"SelectionMode" VT_I2 OCX SelectionMode SelectionMode CCAlgWinCtrl


"SelTextColor" VT_I4 Selection Font Selection Font Text list
Color Color
"ServerName" VT_BSTR Server Name Server Name DAClockCtrl, XGaugeCtrl,
CCAlgWinCtrl, PBut‐
tonCtrl, SliderCtrl,
WTVctrlCtrl
"Sign"
"Significant‐ VT_UI4 Bit Pattern Bit Pattern Group display
Mask" Group Display Group Display
"Sizeable" VT_BOOL Sizeable Sizeable Print job/Script diagnos‐
tics, screen window
"ShowBar" VT_BOOL OCX ShowBar ShowBar SliderCtrl
"ShowDanger" VT_BOOL OCX ShowDanger ShowDanger XGaugeCtrl
"ShowDecimal‐ VT_BOOL OCX ShowDecimal‐ ShowDecimal‐ XGaugeCtrl
Point" Point Point
"ShowNormal" VT_BOOL OCX ShowNormal ShowNormal XGaugeCtrl
"ShowPeak" VT_BOOL OCX ShowPeak ShowPeak XGaugeCtrl
"ShowPosition" VT_BOOL OCX ShowPosition ShowPosition SliderCtrl
"ShowThumb" VT_BOOL OCX ShowThumb ShowThumb SliderCtrl
"SmallWarning" VT_I4 SmallWarning Slider object
"StartAngle" VT_I4 Start Angle Start Angle Elliptical arc, ellipse seg‐
ment, circular arc, circle
segment
"TabOrderAlpha"
"TabOrderS‐
witch"
"Template" VT_BSTR Template Template Print job/Script diagnostics
"TemplateName" VT_BSTR OCX Template‐ Template‐ CCAlgWinCtrl
Name Name
"Text" VT_BSTR Text Text Button, static text, check
box, radio box
"ThumbBackCol‐ VT_UI4 OCX ThumbBack‐ ThumbBack‐ SliderCtrl
or" Color Color
"TicColor" VT_UI4 OCX TicColor TicColor XGaugeCtrl
"TicFont" VT_USER OCX TicFont TicFont XGaugeCtrl
DEFINED
"Ticks" VT_BOOL OCX Ticks Ticks DAClockCtrl
"TicksColor" VT_UI4 OCX TicksColor TicksColor DAClockCtrl
"TickStyle" VT_I4 OCX TickStyle TickStyle SliderCtrl
"TicOffset" VT_R8 OCX TicOffset TicOffset XGaugeCtrl
"TicTextColor" VT_UI4 OCX TicTextColor TicTextColor XGaugeCtrl
"TicTextOffset" VT_R8 OCX TicTextOffset TicTextOffset XGaugeCtrl
"TicWidth" VT_R8 OCX TicWidth TicWidth XGaugeCtrl
"TitleCut" VT_BOOL OCX TitleCut TitleCut CCAlgWinCtrl
"Toggle" VT_BOOL Latch Down Latch Down Round button
"ToleranceHigh" VT_R8 Limit TH Limit TH Bar

WinCC Professional V13 SP2 – Programming reference


536 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"ToleranceLow" VT_R8 Limit TL Limit TL Bar


"ToolTipText" VT_BSTR Tooltip Text Tooltip Text Button, ellipse, elliptical
arc, ellipse segment, cir‐
cle, circular arc, circle seg‐
ment, line, polygon, poly‐
line, rectangle, rounded
rectangle, static text, 3-D
bar, I/O field, bar, graphic
object, group display, text
list, status display, check
box, radio box, round but‐
ton, slider object, DA‐
ClockCtrl, XGaugeCtrl,
CCAlgWinCtrl, PBut‐
tonCtrl, SliderCtrl,
WTVctrlCtrl
"Top" VT_I4 Y position Y position Button, ellipse, elliptical
arc, ellipse segment, cir‐
cle, circular arc, circle seg‐
ment, line, polygon, poly‐
line, rectangle, rounded
rectangle, static text, 3-D
bar, print job/script diag‐
nostics, screen window, I/
O field, bar, graphic object,
group display, text list, sta‐
tus display, check box, ra‐
dio box, round button, slid‐
er object, DAClockCtrl,
XGaugeCtrl, CCAlg‐
WinCtrl, PButtonCtrl, Sli‐
derCtrl, WTVctrlCtrl
"Trend" VT_BOOL Trend Trend Bar
"TrendColor" VT_I4 Trend Color Trend Color Bar
"TypeAlarmHigh" VT_BOOL Type AH Type AH Bar
"TypeAlarmLow" VT_BOOL Type AL Type AL Bar
"TypeLimitHigh4" VT_BOOL Type RH4 Type RH4 Bar
"TypeLimitHigh5" VT_BOOL Type RH5 Type RH5 Bar
"TypeLimitLow4" VT_BOOL Type RL4 Type RL4 Bar
"TypeLimitLow5" VT_BOOL Type RL5 Type RL5 Bar
"TypeTolerance‐ VT_BOOL Type TH Type TH Bar
High"
"TypeTolerance‐ VT_BOOL Type TL Type TL Bar
Low"
"TypeWarning‐ VT_BOOL Type WH Type WH Bar
High"
"TypeWarnin‐ VT_UI4 Type WL Type WL Bar
gLow"
"UnitColor" VT_USER OCX UnitColor UnitColor XGaugeCtrl
DEFINED
"UnitFont" VT_BSTR OCX UnitFont UnitFont XGaugeCtrl
"UnitText" VT_BSTR OCX UnitText UnitText XGaugeCtrl

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 537
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"UnitOffset" VT_R8 OCX UnitOffset UnitOffset XGaugeCtrl


"UnselBGColor" VT_I4 List Back‐ List Back‐ Text list
ground Color ground Color
"UnselTextColor" VT_I4 List Font Color List Font Color Text list
"UpdateCycle" VT_I4 Update Cycle Update Cycle Screen window
"UseRefreshTim‐ VT_BOOL OCX UseRefresh‐ UseRefresh‐ WTVctrlCtrl
er" Timer Timer
"UserValue1" VT_UI4 User Value 1 User Value 1 Group display
"UserValue2" VT_UI4 User Value 2 User Value 2 Group display
"UserValue3" VT_UI4 User Value 3 User Value 3 Group display
"UserValue4" VT_UI4 User Value 4 User Value 4 Group display
"Value" VT_R4 OCX Value Value XGaugeCtrl
"ValueMax" VT_R4 OCX ValueMax ValueMax XGaugeCtrl
"ValueMin" VT_R4 OCX ValueMin ValueMin XGaugeCtrl
"VideoEnabled" VT_BOOL OCX VideoEnabled VideoEnabled WTVctrlCtrl
"VideoSource" VT_I2 OCX VideoSource VideoSource WTVctrlCtrl
"Visible" VT_BOOL Display Display Button, ellipse, elliptical
arc, ellipse segment, cir‐
cle, circular arc, circle seg‐
ment, line, polygon, poly‐
line, rectangle, rounded
rectangle, static text, 3-D
bar, print job/script diag‐
nostics, screen window, I/
O field, bar, graphic object,
group display, text list, sta‐
tus display, check box, ra‐
dio box, round button, slid‐
er object, DAClockCtrl,
XGaugeCtrl, CCAlg‐
WinCtrl, PButtonCtrl, Sli‐
derCtrl, WTVctrlCtrl
"Warning" VT_R4 OCX Warning Warning XGaugeCtrl
"WarningColor" VT_UI4 OCX WarningColor WarningColor XGaugeCtrl
"WarningHigh" VT_R8 Limit WH Limit WH Bar
"WarningLow" VT_R8 Limit WL Limit WL Bar

WinCC Professional V13 SP2 – Programming reference


538 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

"Width" VT_I4 Width Width Button, ellipse, elliptical


arc, ellipse segment, cir‐
cle, circular arc, circle seg‐
ment, line, polygon, poly‐
line, rectangle, rounded
rectangle, static text, 3-D
bar, print job/script diag‐
nostics, screen window, I/
O field, bar, graphic object,
group display, text list, sta‐
tus display, check box, ra‐
dio box, round button, slid‐
er object, DAClockCtrl,
XGaugeCtrl, CCAlg‐
WinCtrl, PButtonCtrl, Sli‐
derCtrl, WTVctrlCtrl
"WindowBorder" VT_BOOL Border Border Print job/Script diagnos‐
tics, screen window
"WindowsStyle" VT_BOOL Windows Style Windows Style Button, Slider object
"WindowType" VT_I2 OCX WindowType WindowType CCAlgWinCtrl
"WinTVInforma‐ VT_BSTR OCX WinTVInforma‐ WTVctrlCtrl
tion" tion
"WithAxes" VT_BOOL OCX WithAxes WithAxes SliderCtrl
"WithLabels" VT_BOOL OCX WithLabels WithLabels SliderCtrl
"ZeroLeading"
"ZeroPoint" VT_UI4 Zero Point Zero Point Bar
"ZeroPointValue" VT_R8 Zero Point Val‐ Zero Point Val‐ 3-D bar, bar
ue ue
Zoom VT_I4 Scaling Factor Scaling Factor Screen window

2.3.1.7 API calls to OCXs (RT Professional)

Overview
API was developed for uses in separate applications. However, problems may arise – including
possible deadlocks – when API calls are made to OCXs that are integrated into graphics
screens.
If use of an OCX in a graphics screen is absolutely necessary, always check to see if the task
could be also be handled with IndustrialX. This option is designed for purposes like this.
If it is determined that API must be used for the task, note the following:
The Runtime API functions of alarm logging and tag logging are especially affected by this.
One reason is that API requests data from WinCC programs during runtime via Window
Message and awaits the reply. If the OCX runs in the context of just such a WinCC program,
it cannot process the request because it hangs in the API call.
Solution:
When this happens, it is often sufficient to place the API call in a different thread.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 539
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

However, this solution should only be used when a problem actually exists. For example, some
other calls experience problems when they are not run in the main thread.

2.3.2 Structures (RT Professional)

2.3.2.1 LINKINFO (RT Professional)

Declaration

typedef struct {
LINKTYPE LinkType;
DWORD dwCycle;
TCHAR szLinkName[256];
}
LINKINFO;

Members

LinkType
Values for enum LinkType defined in the "trigger.h" file should be used for the LINKTYPE type.

enum LinkType Currently defined value Link


BUBRT_LT_NOLINK 0 (defined start value) No link
BUBRT_LT_VARIABLE_DIRECT 1 (sequence) Direct tag
BUBRT_LT_VARIABLE_INDIRECT 2 (sequence) Indirect tag
BUBRT_LT_ACTION 3 (sequence) C action
BUBRT_LT_ACTION_WIZARD 4 (sequence) Dynamic dialog
BUBRT_LT_DIRECT_CONNECTION 5 (sequence) Direct connection
BUBRT_LT_ACTION_WIZARD_INPROC 6 (sequence) Dynamic dialog

When PDLRTSetLink is used, only BUBRT_LT_VARIABLE_DIRECT and


BUBRT_LT_VARIABLE_INDIRECT may be used. All types of links can be used for
PDLRTGetLink.

Note
For subsequent extensions of the enum LinkType definition in trigger.h, new constants must
always be added at the end, otherwise the above listed values will be changed. Therefore, you
should always use the definition for enumerations and not the value.

WinCC Professional V13 SP2 – Programming reference


540 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

dwCycle
Cycle time for updating. dwCycle identifies the order within the list of update cycles.

"On change" Index: 0


"250ms" Index: 1
: :
"User cycle 5" Index: 15
"Window cycle" Index: 235
"Screen cycle" Index: 255

szLinkName
Name of the tag connection

Required files
pdlrtapi.h
trigger.h

API functions

PDLRTGetLink (Page 577) Query link between object property and tag
PDLRTSetLink (Page 579) Define link between object property and tag

See also
PDLRTGetLink (Page 577)
PDLRTSetLink (Page 579)

2.3.2.2 MULTILINK (RT Professional)

Declaration

typedef struct {
DWORD wArraySize;
LPMULTILINKINFO pLinkArray;
}
MULTILINK;

Members

wArraySize
Number of links (number of structures of the MULTILINKINFO type).

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 541
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

pLinkArray
Pointer to the first wArraySize structure of the MULTILINKINFO (Page 543) type with
information about the link between an object property and a tag.

Required files
pdlrtapi.h

API functions

PDLRTSetMultiLink (Page 581) Define link between object property and tag (multiple tags)

See also
PDLRTSetMultiLink (Page 581)
MULTILINKINFO (Page 543)

2.3.2.3 MULTILINKINFO (RT Professional)

Declaration

typedef struct {
char* pszObjectName,
char* pszPropertyName,
LINKTYPE LinkType;
DWORD dwCycle;
char* pszLinkName;
}
MULTILINKINFO;

Members

IpszObjectName
Pointer to the name of the object.

IpszPropertyName
Pointer to the name of the object property to be linked.

LinkType
Identifies the type of connection.

LT_VARIABLE_DIRECT Connect object property and tag directly


LT_VARIABLE_INDIRECT Connect object property and tag indirectly

WinCC Professional V13 SP2 – Programming reference


542 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

dwCycle
Cycle time for updating. dwCycle identifies the order within the list of update cycles.

"On change" Index: 0


"250ms" Index: 1
: :
"User cycle 5" Index: 15

pszLinkName
Pointer to name of the connection

Comments
The MULTILINKINFO structure is part of the MULTILINK (Page 541) structure.

Required files
pdlrtapi.h

See also
MULTILINK (Page 541)

2.3.2.4 FOCUSINFO (RT Professional)

Description
The screen object that has the runtime cursor is stored in the structure.

Declaration

typedef struct {
WCHAR szPicture[256];
WCHAR szObject[256];
}
FOCUSINFO;

Members

szPicture
Screen name

szObject
Object name

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 543
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

API functions

PDLRTGetFocus (Page 561) Query input focus

See also
PDLRTGetFocus (Page 561)

2.3.3 General functions (RT Professional)

2.3.3.1 PDLRTClosePicture (RT Professional)

Use
Closes a screen in runtime mode.

Declaration

BOOL PDLRTClosePicture(
ADRMODE adrMode,
LPCSTR lpszPictureName,
LPCSTR lpszWName,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );

Parameters

adrMode
The parameter is reserved for future development and must be preset to 0.

lpszPictureName
Pointer to the configured name of the screen, without path or extension.
The entry is case-sensitive.

lpszWName
Name of the window object to be closed.

pfn
Pointer to your callback function. This is called to notify you about the success or failure of the
request.

WinCC Professional V13 SP2 – Programming reference


544 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.

pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function, but is made available again in the callback function.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Screen closed.

FALSE
Error.

Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll

Related functions

PDLRT_CALLBACK (Page 557) Callback function of the runtime functions

See also
PDLRT_CALLBACK (Page 557)
Overview of the functions (Page 513)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 545
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

2.3.3.2 PDLRTDisableClosePicture (RT Professional)

Use
Blocks a screen from being closed in runtime mode. The function can be called multiple times.
The screen can only be closed again when the same number of calls to the
PDLRTEnableClosePicture function have been made.

Declaration

BOOL PDLRTDisableClosePicture(
ADRMODE adrMode,
LPCSTR lpszPictureName,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );

Parameters

adrMode
The parameter is reserved for future development and must be preset to 0.

lpszPictureName
Pointer to the configured name of the screen, without path or extension.
The entry is case-sensitive.

pfn
Pointer to your callback function. This is called to notify you about the success or failure of the
request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.

pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function, but is made available again in the callback function.

pError
Pointer to the data of the extended error message in the CMN_ERROR.structure. If an error
occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


546 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

Return value

TRUE
Function successfully completed.

FALSE
Error.

Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll

Related functions

PDLRT_CALLBACK (Page 557) Callback function of the runtime functions

See also
PDLRT_CALLBACK (Page 557)
Overview of the functions (Page 513)

2.3.3.3 PDLRTEnableClosePicture (RT Professional)

Use
Enables a screen to be closed in runtime mode.
The screen can only be closed, however, when the PDLRTEnableClosePicture function has
been called the same number of times as the PDLRTDisableClosePicture function.
Any PDLRTClosePicture made prior to this is noted and then performed later after the last
PDLRTEnableClosePicture.

Declaration

BOOL PDLRTEnableClosePicture(
ADRMODE adrMode,
LPCSTR lpszPictureName,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 547
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

Parameters

adrMode
The parameter is reserved for future development and must be preset to 0.

lpszPictureName
Pointer to the configured name of the screen, without path or extension.
The entry is case-sensitive.

pfn
Pointer to your callback function. This is called to notify you about the success or failure of the
request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.

pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function, but is made available again in the callback function.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Function successfully completed.

FALSE
Error.

Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll

Related functions

PDLRT_CALLBACK (Page 557) Callback function of the runtime functions

WinCC Professional V13 SP2 – Programming reference


548 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

See also
PDLRT_CALLBACK (Page 557)
Overview of the functions (Page 513)

2.3.3.4 PDLRTGotoPicture (RT Professional)

Use
Loads the specified screen.

Declaration

BOOL PDLRTGotoPicture (
PDLRTGotoPict nextPict,
PCMN_ERROR pError );

Parameters

nextPict
The function of this method is controlled with this parameter. The following values are possible:

PDLRTPictureHome Loads the start screen.


PDLRTPictureNext Loads the next screen in screen memory.
PDLRTPicturePrev Loads the previous screen in screen memory.
PDLRTPictureStored Loads the stored screen in screen memory.
PDLRTStorePicture Stores the current screen in screen memory.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Screen loaded.

FALSE
Error.

Error messages

PDLRT_NO_PIC Screen not selected

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 549
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll

Related functions

PDLRTPictureNavigation (Page 555) Enable and disable screen navigation

See also
PDLRTPictureNavigation (Page 555)
Overview of the functions (Page 513)

2.3.3.5 PDLRTInquireFreeArea (RT Professional)

Use
Determines whether a given rectangle can be placed on the screen without covering a
''protected area''. "Protected areas", for example, are other screens that are in the foreground.

Declaration

BOOL PDLRTInquireFreeArea(
LPRECT lpScreenRect,
DWORD dwModus,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );

Parameters

IpScreenRect
Pointer to a Windows-specific RECT type structure.

dwModus
Inquire mode: Several inquiry options are provided that can be ORed as desired:

PDLRT_IQ_ONLY (value: 0x01) Upon demand only with the result "matches / does
not match"
PDLRT_IQ_MODY_POSX (value: 0x02) If the given rectangle cannot be placed, the X position
of the rectangle can be modified so that it can be
placed.

WinCC Professional V13 SP2 – Programming reference


550 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

PDLRT_IQ_MODY_POSY (value: 0x04) If the given rectangle cannot be placed, the Y position
of the rectangle can be modified so that it can be
placed.
PDLRT_IQ_MODY_HEIGHT (value: 0x08) If the given rectangle cannot be placed, the height of
the rectangle can be modified so that it can be placed.
PDLRT_IQ_MODY_WIDTH (value: 0x10) If the given rectangle cannot be placed, the width of
the rectangle can be modified so that it can be placed.

pfn
Pointer to your callback function. This is called to notify you about the success or failure of the
request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.

pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function, but is made available again in the callback function.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Window area is free.

FALSE
Error.

Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll

Related functions

PDLRT_CALLBACK (Page 557) Callback function of the runtime functions

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 551
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

See also
PDLRT_CALLBACK (Page 557)
Overview of the functions (Page 513)

2.3.3.6 PDLRTOpenPicture (RT Professional)

Use
The function performs a start screen change in the runtime.

Declaration

BOOL PDLRTOpenPicture(
ADRMODE adrMode,
LPCSTR lpszPictureName,
LPCSTR lpszWName,
LPCSTR lpszPictureFileName,
DWORD dwWinStyle,
LONG lxPos,
LONG lyPos,
LONG lWitdh,
LONG lHeight,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );

Parameters

adrMode
Pointer to the configured name of the screen, without path or extension.
The entry is case-sensitive.

lpszWName
This parameter must be currently supplied with the screen name.

lpszPictureFileName
This parameter must be currently supplied with the screen name.

dwWinStyle
The parameter is reserved for future development and must be preset to 0.

lxPos
The parameter is reserved for future development and must be preset to 0.

WinCC Professional V13 SP2 – Programming reference


552 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

lyPos
The parameter is reserved for future development and must be preset to 0.

lWidth
The parameter is reserved for future development and must be preset to 0.

lHeigth
The parameter is reserved for future development and must be preset to 0.

pfn
Pointer to your callback function. This is called to notify you about the success or failure of the
request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.

pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function, but is made available again in the callback function.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Start screen change performed.

FALSE
Error.

Error messages

PDLRT_PICTURE_ALREADY_OPEN Screen is already open


PDLRT_NO_PIC Screen not selected
PDLRT_BAD_OLE_CONVERSION Error in conversion through OLE automation

Required files
pdlrtapi.h
pdlrt_s.lib

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 553
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

pdlrtapi.dll

Related functions

PDLRT_CALLBACK (Page 557) Callback function of the runtime functions

See also
PDLRT_CALLBACK (Page 557)
Overview of the functions (Page 513)

2.3.3.7 PDLRTPictureNavigation (RT Professional)

Use
Switches the screen navigation on and off. When switched off, no more screens are added to
the stack with a screen change; the old state is frozen.

Declaration

BOOL PDLRTPictureNavigation (
PDLRT_PNFLAGS flags,
PCMN_ERROR pError );

Parameters

flags
The function is controlled with this parameter. The following values are possible:

PDLRT_PNF_ENABLE Switches the screen navigation on.


PDLRT_PNF_DISABLE Switches the screen navigation off.
PDLRT_PNF_ENABLE_LOAD_LAST_PICTURE Switches the screen navigation on and loads the
last screen in the screen memory.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Function successfully completed.

WinCC Professional V13 SP2 – Programming reference


554 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

FALSE
Error.
Cause: Screen navigation was already switched on or off.

Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll

Related functions

PDLRTGotoPicture (Page 549) Load specified screen

See also
PDLRTGotoPicture (Page 549)
Overview of the functions (Page 513)

2.3.3.8 PDLRTShowApp (RT Professional)

Use
This function brings a runtime window that may be in the background to the foreground of the
desktop.

Declaration

BOOL PDLRTShowApp (
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );

Parameters

pfn
Pointer to your callback function. This is called to notify you about the success or failure of the
request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 555
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.

pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function, but is made available again in the callback function.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Runtime window in foreground.

FALSE
Error.

Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll

Related functions

PDLRT_CALLBACK (Page 557) Callback function

See also
PDLRT_CALLBACK (Page 557)
Overview of the functions (Page 513)

2.3.3.9 PDLRT_CALLBACK (RT Professional)

Description
If your application is to be informed asynchronously about the execution of API functions in
runtime, you must provide callback functions of the PDLRT_CALLBACK type.
This function is used by all of the PDLRT functions as a callback function.

WinCC Professional V13 SP2 – Programming reference


556 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

Declaration

void ( * PDLRT_CALLBACK ) (
LPVOID pvUser,
PCMN_ERROR pError );

Parameters

pvUser
Pointer to application-specific data. This pointer is made available as a parameter of the API
function and returned again here unchanged.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value
This callback has no return value.

Comments
If the API function is called without callback, i.e. with pfn = NULL , the call is synchronous. The
calling application is set as waiting until PDLRT reports failure or success. This type of call
should be preferentially used for mutually dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores. Without
synchronization there is also the risk that the asynchronous function will continue to write data
via a data pointer even when it is no longer valid, when the calling process has already finished
and left the range of validity, which will lead to exception handling.
It makes sense to use a separate callback for each API function.

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations
In rare cases, the callback may already be delivered before the function call has returned.

Required files
pdlrtapi.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 557
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

See also
PDLRTClosePicture (Page 544)
PDLRTDisableClosePicture (Page 546)
PDLRTEnableClosePicture (Page 547)
PDLRTInquireFreeArea (Page 550)
PDLRTOpenPicture (Page 552)
PDLRTShowApp (Page 555)
PDLRTSetLink (Page 579)
PDLRTSetMultiLink (Page 581)
PDLRTGetLink (Page 577)
PDLRTSetPropEx (Page 572)
PDLRTGetPropEx (Page 569)
PDLRTGetDefPropEx (Page 567)
PDLRTSetFocus (Page 565)
PDLRTSetCursorKeys (Page 563)
PDLRTGetFocus (Page 561)
PDLRTGetCursorKeys (Page 559)
Overview of the functions (Page 513)

2.3.4 Functions for affecting the runtime cursor (RT Professional)

2.3.4.1 PDLRTGetCursorKeys (RT Professional)

Use
This function queries the keys for cursor control that have been set with PDLRTSetCursorKeys.

WinCC Professional V13 SP2 – Programming reference


558 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

Declaration

BOOL PDLRTGetCursorKeys (
long* pKeyUp,
long* pKeyDown,
long* pKeyLeft,
long* pKeyRight,
long* pKeyState,
long* pTabMode,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );

Parameters

KeyUp
This pointer provides the virtual key code (VK_...) of the key that moves the cursor down.

pKeyDown
This pointer provides the virtual key code (VK_...) of the key that moves the cursor up.

pKeyLeft
This pointer provides the virtual key code (VK_...) of the key that moves the cursor to the left.

pKeyRight
This pointer provides the virtual key code (VK_...) of the key that moves the cursor to the right.

pKeyState
This pointer provides the keyboard status:

HOTKEYF_SHIFT (value: 0x01) "SHIFT" key pressed


HOTKEYF_CONTROL (value: 0x02) "CTRL" key pressed
HOTKEYF_ALT (value: 0x04) "ALT" key pressed

The values can be ORed as desired.

pTabMode
This pointer provides the TabMode, the object that gets the focus with the next activation of a
cursor control key:

O: xxScreenxx
1: xxScreenxx
10: xxScreenxx
xxScreenxx

pfn
Pointer to your callback function. This is called to notify you about the success or failure of the
request.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 559
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.

pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function, but is made available again in the callback function.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Cursor control keys determined.

FALSE
Error.

Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll

Related functions

PDLRTSetCursorKeys (Page 563) Set cursor control keys


PDLRT_CALLBACK (Page 556) Callback function

See also
PDLRTSetCursorKeys (Page 563)
PDLRT_CALLBACK (Page 556)
Overview of the functions (Page 513)

WinCC Professional V13 SP2 – Programming reference


560 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

2.3.4.2 PDLRTGetFocus (RT Professional)

Use
The function returns the screen and the object name of the object that has the input focus.

Declaration

BOOL PDLRTGetFocus(
ADRMODE adrMode,
LPFOCUSINFO pFocusInfo,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );

Parameters

adrMode
The adrMode parameter is used to set the addressing mode of the screen to be edited.

PDLRT_AM_DEFAULT o The addressing of screen and object is relative


PDLRT_AM_PICTABS 1 The addressing of the screen is absolute
PDLRT_AM_OBJABS 2 The addressing of the object is absolute

The PDLRT_AM_PICTABS and PDLRT_AM_OBJABS value can be ORed.

pFocusInfo
Pointer to the FOCUSINFO (Page 543) structure in which the results are stored.

pfn
Pointer to your callback function. This is called to notify you about the success or failure of the
request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.

pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function, but is made available again in the callback function.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 561
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

Return value

TRUE
Input focus determined.

FALSE
Error.

Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll

Related functions

PDLRTSetFocus (Page 565) Set input focus


PDLRT_CALLBACK (Page 556) Callback function

See also
FOCUSINFO (Page 543)
PDLRTSetFocus (Page 565)
PDLRT_CALLBACK (Page 556)
Overview of the functions (Page 513)

2.3.4.3 PDLRTSetCursorKeys (RT Professional)

Use
This function keys sets for the keys for cursor control.

Declaration

BOOL PDLRTSetCursorKeys (
long KeyUp,
long KeyDown,
long KeyLeft,
long KeyRight,
long KeyState,
long TabMode,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );

WinCC Professional V13 SP2 – Programming reference


562 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

Parameters

KeyUp
Virtual key code (VK_...) of the key that moves the cursor down.

KeyDown
Virtual key code (VK_...) of the key that moves the cursor up.

KeyLeft
Virtual key code (VK_...) of the key that moves the cursor to the left.

KeyRight
Virtual key code (VK_...) of the key that moves the cursor to the right.

KeyState
KeyState provides the keyboard status:

HOTKEYF_SHIFT (value: 0x01) "SHIFT" key pressed


HOTKEYF_CONTROL (value: 0x02) "CTRL" key pressed
HOTKEYF_ALT (value: 0x04) "ALT" key pressed

The values can be ORed as desired.

TabMode
TabMode specifies the object that gets the focus with the next activation of a cursor control
key:

0: xxScreenxx
1: xxScreenxx
10: xxScreenxx
xxScreenxx

pfn
Pointer to your callback function. This is called to notify you about the success or failure of the
request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.

pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function, but is made available again in the callback function.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 563
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Cursor control keys defined.

FALSE
Error.

Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll

Related functions

PDLRTGetCursorKeys (Page 558) Query cursor control keys


PDLRT_CALLBACK (Page 556) Callback function

See also
PDLRTGetCursorKeys (Page 558)
PDLRT_CALLBACK (Page 556)
Overview of the functions (Page 513)

2.3.4.4 PDLRTSetFocus (RT Professional)

Use
The function is used to set the input focus. The object is determined by lpszPictureName and
lpszObjectName.

WinCC Professional V13 SP2 – Programming reference


564 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

Declaration

BOOL PDLRTSetFocus (
ADRMODE adrMode,
LPCSTR lpszPictureName,
LPCSTR lpszObjectName,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );

Parameters

adrMode
The adrMode parameter is used to set the addressing mode of the screen to be edited.

PDLRT_AM_DEFAULT o The addressing of screen and object is relative


PDLRT_AM_PICTABS 1 The addressing of the screen is absolute
PDLRT_AM_OBJABS 2 The addressing of the object is absolute

The PDLRT_AM_PICTABS and PDLRT_AM_OBJABS value can be ORed.

IpszPictureName
Pointer to the configured name of the screen according to addressing mode defined by
adrMode without extension. The entry is case-sensitive.

lpszObjectName
Pointer to the configured object name according to addressing mode defined by adrMode.

pfn
Pointer to your callback function. This is called to notify you about the success or failure of the
request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.

pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function, but is made available again in the callback function.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 565
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

Return value

TRUE
Input focus set

FALSE
Error

Error messages

PDLRT_NO_PIC Screen not selected


PDLRT_NO_OBJ Cannot find object

Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll

Related functions

PDLRTGetFocus (Page 561) Query input focus


PDLRT_CALLBACK (Page 556) Callback function

See also
PDLRTGetFocus (Page 561)
PDLRT_CALLBACK (Page 556)
Overview of the functions (Page 513)

2.3.5 Functions for processing object properties (RT Professional)

2.3.5.1 PDLRTGetDefPropEx (RT Professional)

Use
Request a default property value. If the requested data type does not match the data type of
the property, the value is changed during the transfer into the pvProp user buffer in accordance
with the requested format, if this is possible.

WinCC Professional V13 SP2 – Programming reference


566 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

Declaration

BOOL PDLRTGetDefPropEx(
ADRMODE adrMode,
LPCSTR lpszPictureName,
LPCSTR lpszObjectName,
LPCSTR lpszPropName,
VARTYPE vt,
LPVOID pvProp,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
DWORD dwFlags,
LPVOID pData,
PCMN_ERROR pError );

Parameters

adrMode
The adrMode parameter is used to set the addressing mode of the screen to be edited.

PDLRT_AM_DEFAULT 0 The addressing of screen and object is relative


PDLRT_AM_PICTABS 0 The addressing of the screen is absolute
PDLRT_AM_OBJABS 2 The addressing of the object is absolute

The PDLRT_AM_PICTABS and PDLRT_AM_OBJABS value can be ORed.

lpszPictureName
Pointer to the configured name of the screen according to addressing mode defined by
adrMode. The entry is case-sensitive.

lpszObjectName
Pointer to the configured object name according to addressing mode defined by via adrMode .

lpszPropName
Pointer on the configured name of the object property.

vt
Data type of a value passed under pvProp. The allowed types are defined in the include oaidl.h"
and "wtypes.h" files of the compiler. You can use the WinCC include file, APLIB\Defines.h ,
for scripts.

pvProp
Pointer to a tag in which the property value is stored. The data type of the value is determined
by vt:

vt pvProp
VT_BSTR BSTR*
VT_LPSTR LPSTR*

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 567
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

VT_LPWSTR LPWSTR*
VT_UI4 LONG*
VT_xxxx pvProp must point to a buffer

For types with a buffer (for example, BSTR), the buffer is allocated by the function and must
be released again by the calling application.

pfn
Pointer to your callback function. This is called to notify you about the success or failure of the
request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.

pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function, but is made available again in the callback function.

dwFlags
The parameter is reserved for future development and must be preset to 0.

pData
The parameter is reserved for future upgrades and must be preset to NULL.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Default values of the object property determined.

FALSE
Error.

Comments
To release allocated memory areas, use the SysFreeString(...) Windows API function for
VT_BSTR and the LocalFree(...) Windows API function for VT_LPSTR, VT_LPWSTR .

WinCC Professional V13 SP2 – Programming reference


568 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

Error messages

PDLRT_NO_PROP Cannot find property


PDLRT_BAD_OLE_CONVERSION Error in conversion through OLE automation

Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll

Related functions

PDLRT_CALLBACK (Page 556) Callback function

See also
PDLRT_CALLBACK (Page 556)
Overview of the functions (Page 513)

2.3.5.2 PDLRTGetPropEx (RT Professional)

Use
Request a current property value. The source is determined by lpszPictureName,
lpszObjectName and lpszPropName.
If the requested data type does not match the data type of the property, the value is changed
during the transfer into the pvProp user buffer in accordance with the requested format, if this
is possible.

Declaration

BOOL PDLRTGetPropEx(
ADRMODE adrMode,
LPCSTR lpszPictureName,
LPCSTR lpszObjectName,
LPCSTR lpszPropName,
VARTYPE vt,
LPVOID pvProp,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
DWORD dwFlags,
LPVOID pData,
PCMN_ERROR pError );

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 569
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

Parameters

adrMode
The adrMode parameter is used to set the addressing mode of the screen to be edited.

PDLRT_AM_DEFAULT 0 The addressing of screen and object is relative


PDLRT_AM_PICTABS 0 The addressing of the screen is absolute
PDLRT_AM_OBJABS 2 The addressing of the object is absolute

The PDLRT_AM_PICTABS and PDLRT_AM_OBJABS value can be ORed.

lpszPictureName
Pointer to the configured name of the screen according to addressing mode defined by
adrMode. The entry is case-sensitive.

lpszObjectName
Pointer to the configured name of the object according to addressing mode defined by adrMode.

lpszPropName
Pointer on the configured name of the object property.

vt
Data type of a value passed under pvProp. The allowed types are defined in the include oaidl.h"
and "wtypes.h" files of the compiler. You can use the WinCC include file, APLIB\Defines.h ,
for scripts.

pvProp
Pointer to a tag in which the property value is stored. The data type of the value is determined
by vt:

vt pvProp
VT_BSTR BSTR*
VT_LPSTR LPSTR*
VT_LPWSTR LPWSTR*
VT_UI4 LONG*
VT_xxxx pvProp must point to a buffer

For types with a buffer (for example, BSTR), the buffer is allocated by the function and must
be released again by the calling application.

pfn
Pointer to your callback function. This is called to notify you about the success or failure of the
request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.

WinCC Professional V13 SP2 – Programming reference


570 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

It makes sense to use a separate callback for each API function.

pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function, but is made available again in the callback function.

dwFlags
The parameter is reserved for future development and must be preset to 0.

pData
The parameter is reserved for future upgrades and must be preset to NULL.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Object properties determined.

FALSE
Error.

Comments
To release allocated memory areas, use the, use the SysFreeString(...) Windows API function
for VT_BSTR and the LocalFree(...) Windows API function for VT_LPSTR, VT_LPWSTR .
No VT_DISPATCH or other reference may be used; only the normal types and a VT_VARIANT
at the most for an array property of a simple type.

Error messages

PDLRT_NO_PIC Screen not selected


PDLRT_BAD_OLE_CONVERSION Error in conversion through OLE automation
PDLRT_NO_PROP Cannot find property

Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 571
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

Related functions

PDLRTSetPropEx (Page 572) Set property


PDLRT_CALLBACK (Page 556) Callback function

See also
PDLRT_CALLBACK (Page 556)
PDLRTSetPropEx (Page 572)
Overview of the functions (Page 513)

2.3.5.3 PDLRTSetPropEx (RT Professional)

Use
Set a property. The target is determined by lpszPictureName, lpszObjectName and
lpszPropName. When the passed data type does not match the data type of the property, the
value is changed during the transfer to the property, if this is possible.
Only those properties that can also be made dynamic can be set.

Declaration

BOOL PDLRTSetPropEx(
ADRMODE adrMode,
LPCSTR lpszPictureName,
LPCSTR lpszObjectName,
LPCSTR lpszPropName,
VARTYPE vt,
LPVOID pvProp,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
DWORD dwFlags,
LPVOID pData,
PCMN_ERROR pError );

Parameters

adrMode
The adrMode parameter is used to set the addressing mode of the screen to be edited.

PDLRT_AM_DEFAULT 0 The addressing of screen and object is relative


PDLRT_AM_PICTABS 0 The addressing of the screen is absolute
PDLRT_AM_OBJABS 2 The addressing of the object is absolute

The PDLRT_AM_PICTABS and PDLRT_AM_OBJABS value can be ORed.

WinCC Professional V13 SP2 – Programming reference


572 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

lpszPictureName
Pointer to the configured name of the screen according to addressing mode defined by
adrMode. The entry is case-sensitive.

lpszObjectName
Pointer to the configured object name according to addressing mode defined by adrMode.

lpszPropName
Pointer on the configured name of the object property.

vt
Data type of a value passed under pvProp. The allowed types are defined in the include oaidl.h"
and "wtypes.h" files of the compiler. You can use the WinCC include file, APLIB\Defines.h ,
for scripts.

pvProp
Pointer to a buffer in which the property value is stored. The data type of the value is determined
by vt:

vt pvProp
VT_BSTR BSTR*
VT_LPSTR LPSTR*
VT_LPWSTR LPWSTR*
VT_UI4 LONG*
VT_xxxx pvProp must point to a buffer

pfn
Pointer to your callback function. This is called to notify you about the success or failure of the
request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.

pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function, but is made available again in the callback function.

dwFlags
The parameter is reserved for future development and must be preset to 0.

pData
The parameter is reserved for future development and must be preset to ZERO.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 573
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Object properties set.

FALSE
Error.

Comments
No VT_DISPATCH or other reference may be used; only the normal types and a VT_VARIANT
at the most for an array property of a simple type.

Error messages

PDLRT_NO_PIC Screen not selected


PDLRT_PICTURE_NOT_LOADED Cannot load screen file
PDLRT_FAILURE_PARAM Wrong parameter
PDLRT_NO_OBJ Cannot find object
PDLRT_NO_PROP Cannot find property
PDLRT_BAD_OLE_CONVERSION Error in conversion through OLE automation

Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll

Related functions

PDLRTGetPropEx (Page 569) Query property


PDLRT_CALLBACK (Page 556) Callback function

WinCC Professional V13 SP2 – Programming reference


574 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

Example

#pragma code("pdlrtapi.dll")

#include "apdefap.h"

#define CP_ACP 0
#define MB_PRECOMPOSED 1

void ButtonRT(char* text)


{
DM_DIRECTORY_INFO dirInfo;
CMN_ERROR error;
BOOL bRet;
char szProjectFile[222] = "";
WCHAR wstring[99];
BSTR bstrval;
WORD *pw = NULL;
int i;

printf("Function ButtonRT() with text '%s'\r\n", text);

bRet = DMGetRuntimeProject
(&szProjectFile[0],sizeof(szProjectFile),&error);
printf("DMGetRuntimeProject: %s\r\n", szProjectFile);

bRet = PDLRTOpenPicture(0,"Start.PDL",NULL,NULL,0,0,0,0,0,NULL,NULL,
&error);
printf("PDLRTOpenPicture: %s,%ld, %s\r\n", bRet?"TRUE":"FALSE",
error.dwError1,error.szErrorText);

bRet = PDLRTSetPropEx(0,"Start.PDL", "Button4", "Text",VT_LPSTR,


&text,NULL,NULL,0, NULL, &error);
printf("PDLRTSetPropEx: %s,%ld, %s\r\n", bRet?"TRUE":"FALSE",
error.dwError1,error.szErrorText);

SysFreeString( bstrval );
printf("SysFreeString done\r\n");
}

See also
PDLRT_CALLBACK (Page 556)
PDLRTGetPropEx (Page 569)
Overview of the functions (Page 513)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 575
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

2.3.6 Functions for processing dynamics (RT Professional)

2.3.6.1 PDLRTGetLink (RT Professional)

Use
Query a link from a property. If the property has an indirect tag connection, this is returned. If
the current active direct connection is desired for an indirect tag connection, this can be
requested by specifying
LinkType = BUBRT_LT_VARIABLE_DIRECT in the LINKINFO structure.

Declaration

BOOL PDLRTGetLink (
ADRMODE adrMode,
LPCSTR lpszPictureName,
LPCSTR lpszObjectName,
LPCSTR lpszPropName,
LPLINKINFO pLink,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );

Parameters

adrMode
The adrMode parameter is used to set the addressing mode of the screen to be edited.

PDLRT_AM_DEFAULT o The addressing of screen and object is relative


PDLRT_AM_PICTABS 1 The addressing of the screen is absolute
PDLRT_AM_OBJABS 2 The addressing of the object is absolute

The PDLRT_AM_PICTABS and PDLRT_AM_OBJABS value can be ORed.

lpszPictureName
Pointer to the configured name of the screen according to addressing mode defined by
adrMode without extension. The entry is case-sensitive.

lpszObjectName
Pointer to the configured object name according to addressing mode defined by adrMode.

lpszPropName
Pointer on the name of the object property.

pLink
Pointer to the LINKINFO (Page 540) structure in which the link information is stored.

WinCC Professional V13 SP2 – Programming reference


576 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

pfn
Pointer to your callback function. This is called to notify you about the success or failure of the
request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.

pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function, but is made available again in the callback function.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Link determined.

FALSE
Error.

Error messages

PDLRT_NO_LINK Property has no dynamics

Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll

Related functions

PDLRTSetLink (Page 579) Define link between object property and tag
PDLRT_CALLBACK (Page 556) Callback function

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 577
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

See also
PDLRTSetLink (Page 579)
PDLRT_CALLBACK (Page 556)
LINKINFO (Page 540)
Overview of the functions (Page 513)

2.3.6.2 PDLRTSetLink (RT Professional)

Use
Set a link between a property and a tag.

Declaration

BOOL PDLRTSetLink (
ADRMODE adrMode,
LPCSTR lpszPictureName,
LPCSTR lpszObjectName,
LPCSTR lpszPropName,
LPLINKINFO pLink,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );

Parameters

adrMode
The adrMode parameter is used to set the addressing mode of the screen to be edited.

PDLRT_AM_DEFAULT o The addressing of screen and object is relative


PDLRT_AM_PICTABS 1 The addressing of the screen is absolute
PDLRT_AM_OBJABS 2 The addressing of the object is absolute

The PDLRT_AM_PICTABS and PDLRT_AM_OBJABS value can be ORed.

lpszPictureName
Pointer to the configured name of the screen according to addressing mode defined by
adrMode without extension. The entry is case-sensitive.

lpszObjectName
Pointer to the configured object name according to addressing mode defined by adrMode.

lpszPropName
Pointer on the name of the object property.

WinCC Professional V13 SP2 – Programming reference


578 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

pLink
Pointer to the LINKINFO (Page 540) structure in which the link information is stored.
Only BUBRT_LT_VARIABLE_DIRECT and BUBRT_LT_VARIABLE_INDIRECT can be used
in LinkType, since only a link with tags is allowed here.

pfn
Pointer to your callback function. This is called to notify you about the success or failure of the
request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.

pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function, but is made available again in the callback function.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Link set

FALSE
Error

Error messages

PDLRT_FAILURE_PARAM Wrong parameter


PDLRT_NO_PIC Screen not selected
PDLRT_NO_OBJ Cannot find object
PDLRT_LINK_NOT_SET Cannot link property

Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 579
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

Related functions

PDLRTGetLink (Page 576) Determine link between object property and tag
PDLRTSetMultiLink (Page 581) Define link between object property and tag (multiple tags)
PDLRT_CALLBACK (Page 556) Callback function

See also
PDLRTGetLink (Page 576)
PDLRTSetMultiLink (Page 581)
PDLRT_CALLBACK (Page 556)
LINKINFO (Page 540)
Overview of the functions (Page 513)

2.3.6.3 PDLRTSetMultiLink (RT Professional)

Use
Set multiple links between a property and a tag.

Declaration

BOOL PDLRTSetMultiLink (
ADRMODE adrMode,
LPCSTR lpszPictureName,
LPMULTILINK pMultiLink,
PDLRT_CALLBACK pfn,
LPVOID pvUser,
PCMN_ERROR pError );

Parameters

adrMode
The adrMode parameter is used to set the addressing mode of the screen to be edited.

PDLRT_AM_DEFAULT o The addressing of screen and object is relative


PDLRT_AM_PICTABS 1 The addressing of the screen is absolute
PDLRT_AM_OBJABS 2 The addressing of the object is absolute

The PDLRT_AM_PICTABS and PDLRT_AM_OBJABS value can be ORed.

lpszPictureName
Pointer to the configured name of the screen according to addressing mode defined by
adrMode without extension. The entry is case-sensitive.

WinCC Professional V13 SP2 – Programming reference


580 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.3 Functions of the graphic system (RT Professional)

pMultiLink
Pointer to the MULTILINK (Page 541) structure in which a field with link information is stored.

pfn
Pointer to your callback function. This is called to notify you about the success or failure of the
request.
If pfn = NULL is passed, the call is synchronous. The calling application is set as waiting until
PDLRT reports failure or success. This type of call should be preferentially used for mutually
dependent call sequences.
If subsequent API calls require this function to be completed and this function is used
asynchronously with callback, the API calls should be synchronized with semaphores.
It makes sense to use a separate callback for each API function.

pvUser
Pointer to application-specific data that is passed to the callback function. This pointer is not
evaluated by the function, but is made available again in the callback function.

Return value

TRUE
The TRUE return value is only returned if all links were successfully set. Even if only one link
could not be set, FALSE is returned.

FALSE
Error.

Error messages

PDLRT_FAILURE_PARAM Wrong parameter


PDLRT_NO_PIC Screen not selected
PDLRT_NO_OBJ Cannot find object
PDLRT_LINK_NOT_SET Cannot link property

Required files
pdlrtapi.h
pdlrt_s.lib
pdlrtapi.dll

Related functions

PDLRTSetLink (Page 578) Define link between object property and tag
PDLRT_CALLBACK (Page 556) Callback function

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 581
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

See also
PDLRTSetLink (Page 578)
PDLRT_CALLBACK (Page 556)
MULTILINK (Page 541)
Overview of the functions (Page 513)

2.4 Scripting functions (RT Professional)

2.4.1 Basics (RT Professional)

2.4.1.1 Overview of the functions (RT Professional)

Overview

AP_RT_PROC (Page 598) Notification of runtime functions


APActive (Page 610) Activate action
APCompile (Page 601) Compile source code
APCompileEx (Page 603) Compile source code
APConnect (Page 593) Logon application
APDisconnect (Page 595) Logoff application
APEndAct (Page 612) Logon action in the application control
APFreeResultStruct (Page 613) Free action result memory
APInactive (Page 614) Deactivate actions
APSetLanguage (Page 597) Set language for error texts
APStart (Page 616) Start action
APTransact (Page 619) Logon actions for processing
GSCGenCompile (Page 606) Compile action
GSCGenCompileUserFunctions Compile user functions
(Page 607)
GSCGenGetActionStream (Page 609) Determine action stream

2.4.1.2 Overview of structures (RT Professional)

Overview

AP_ACT_KEY (Page 588) Action identification


AP_ACT_RESULT_STRUCT (Page 590) Action result
CREATE_USER_HEADER_FILE (Page 591) Create header file of user functions

WinCC Professional V13 SP2 – Programming reference


582 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

GENERATE_COMPILE (Page 592) Generate action


GET_ACTION_STREAM (Page 592) Determine action stream

2.4.1.3 Error messages (RT Professional)

Overview
The following error messages can be returned by the API functions in the CMN_ERROR error
structure:

General error messages

AP_ALREADY_CONNECTED 2 Application is already connected to the action con‐


trol
AP_NO_CONNECTION 3 Application cannot establish a connection to the
action control.
AP_ERROR_IPC_SEND 4 Error in communication with the action control. The
job could not be sent.
AP_FAILURE_UNKNOWN 5 Error not described in detail
AP_FAILURE_PARAM 6 Incorrect parameter assignment
AP_NO_ACT_PROGRAM 7 Action control could not be started
AP_TIMEOUT 8 Timeout, not yet implemented at present.
AP_ACT_QUIT 9 Action control has ended
AP_INSTALL_SERV_ERROR 10 Service channel could not be installed
AP_ENDACT_UNKNOWN_ORDER 11 An unknown job number was used for EndAct
AP_ACTION_FAILED 12 An action could not be executed without error. The
return results are invalid.
AP_FAILURE_IN_SERVER 13 Server is signaling an error.
AP_TO_MANY_CLIENTS 14 The maximum number of connections is reached.
No new connections possible.
AP_TRANSACTID_UNKNOWN 15 Invalid transaction ID. Error occurs when calling
AP_EndAct if an attempt is made to end a transac‐
tion that was not logged on beforehand.
AP_NO_MEMORY 16 There is no longer enough memory available for
this operation
AP_TRANSACT_ERROR 17 An error occurred within the transaction; action-re‐
lated error in dwerror of AP_ACT_KEY
AP_RESULT_TRANS_ERROR 18 Error occurred in the results.
AP_RESULT_START_ERROR 19 Error occurred in the results.
AP_NO_UPDATE_WRONG_FORMAT 50 Update option not available for the data format. Ac‐
tion contains no interpreter code.
AP_ERR_WRONG_FORMAT 202 Data format of action is incorrect.
AP_NO_VALID_FUNCTION_VALUE 203 Function return value cannot be converted to VAR‐
IANT data type.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 583
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

Errors
Errors that may occur when performing an action

AP_CISS_ERR_EXIT_OVERFLOW 1001 A stack overflow occurred in the action interpreter


during execution. Further execution of action is
cancelled.
AP_CISS_ERR_EXIT_DIVIDE0 1002 Division by 0 occurred while executing an action.
Canceling action.
AP_CISS_ERR_EXIT_UNRESOLVED 1003 While executing the action, a symbol was refer‐
enced that does not exist.
AP_CISS_ERR_EXIT_GPF 1004 While executing the action, memory was accessed
that is not defined.
AP_CISS_ERR_EXIT_BREAKPOINT 1005 The action interpreter stopped due to a breakpoint.
AP_CISS_ERR_EXIT_STEP 1006 The action interpreter was resumed in the next pro‐
cessing step.

Alarms
Alarms of the action interpreter

AP_CISS_ERR_CREATE_PCH_FROM_PCH 8001 A precompiled header file cannot be


generated from a precompiled head‐
er file.
AP_CISS_ERR_MODULE_IN_USE 8002 The action cannot be accessed.
Module is currently in use.
AP_CISS_ERR_INVALID_PROGRAM 8003 The program is invalid.
AP_CISS_ERR_INVALID_MODULE 8004 The action is invalid.
AP_CISS_ERR_CANNOT_CREATE_FILE 8005 File could not be created by the ac‐
tion control.
AP_CISS_ERR_CANNOT_NO_MEMORY 8006 The action interpreter no longer has
enough memory.
AP_CISS_ERR_INVALID_FILE_FORMAT 8007 File format is invalid for the action
control.
AP_CISS_ERR_CANNOT_OPEN_FILE 8008 File could not be opened by the ac‐
tion control.
AP_CISS_ERR_PROGRAM_IS_LOCKED 8009 Program is locked by the action con‐
trol at present.
AP_CISS_ERR_MODULE_ALREADY_INSERTED 8010 Action was already provided to the
action control for processing.
AP_CISS_ERR_CONFLICT_WITH_OTHER 8011 During the action, a conflict occurred
with another action.
AP_CISS_ERR_MODULE_NOT_FOUND 8013 Action was not found by the action
control.
AP_CISS_ERR_FUNCTION_NOT_FOUND 8014 Function was not found by the action
control.
AP_CISS_ERR_INVALID_LINE 8015 Specified line information is invalid.
AP_CISS_ERR_INVALID_SCOPE 8016 Specified symbol is outside the valid
range.

WinCC Professional V13 SP2 – Programming reference


584 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

AP_CISS_ERR_BUFFER_TOO_SMALL 8017 Transferred memory is too small for


the action interpreter.
AP_CISS_ERR_INVALID_TYPE 8018 The specified type is unknown to the
action interpreter.
AP_CISS_ERR_SYMBOL_NOT_FOUND 8019 The specified symbol was not found.

Notify codes

AP_NOTIFY_ERROR 0 An error occurred while performing the function.


AP_NOTIFY_DATA 1 No error occurred while performing the function.
AP_NOTIFY_CODE_TRANSACT 1 Confirmation of an AP_TransAct call
AP_NOTIFY_CODE_START 2 Confirmation of an AP_Start call
AP_NOTIFY_CODE_RESULT 3 Result of an action
AP_NOTIFY_CODE_DISCONNECT 6
AP_NOTIFY_CODE_ENDACT 7 Confirmation of an AP_EndAct call
AP_NOTIFY_CODE_ACTIVE 8 Confirmation of an AP_Active call
AP_NOTIFY_CODE_INACTIVE 9 Confirmation of an AP_Inactive call
AP_NOTIFY_ERROR_SERVER_QUITT 10 Notification that the action control has been closed.
AP_NOTIFY_CODE_TRANSRESULT 11 Notification of an erroneous result. Call of an AP‐
TransAct
AP_NOTIFY_CODE_STARTRESULT 12 Notification of an erroneous result. Call of an AP‐
Start.
AP_NOTIFY_CODE_RESULT_RT 13 Notification of cyclic results of an optimized call

2.4.1.4 Constants (RT Professional)

Function/Action IDs

GSC_AP_SFCT 0x00000011 Standard function


GSC_AP_PFCT 0x00000012 Project function
GSC_AP_GSC 0x00000014 GSC action

Limit values

AP_MAX_TRIG_NAME 21 Maximum length of the name of a trigger

Header types

CMHF_APDEFAP 0x00000001 Header of a project definition


CMHF_AP_PBIB 0x00000002 Header of a project function
CMHF_AP_GLOB 0x00000004 Header of a standard function
CMHF_AP_ICF 0x00000008 Header of an internal function

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 585
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

CMHF_AP_ALL CMHF_APDEFAP |
CMHF_AP_PBIB |
CMHF_AP_GLOB |
CMHF_AP_ICF
CMHF_AP_USER 0x00000010 Header of a user function

Trigger types

AP_TRIG_UNDEFINED 0 Trigger is not yet initialized.


AP_TRIG_VAR 1 Trigger is a tag.
AP_TRIG_TIMER 2 Trigger is a timer.
AP_TRIG_UNKNOWN 3 Trigger is unknown.
AP_TRIG_TRANSACT 4 Trigger is specified via a TransAct call.

Cycle types

AP_TRIG_CYCLE 1 Cyclic
AP_TRIG_NCYCLE 2 Acyclic

Cycle times

AP_TRIG_CYCLE_01 1 Reflects cycle time of 250 ms in the Control Center


AP_TRIG_CYCLE_02 2 Reflects cycle time of 500 ms in the Control Center
AP_TRIG_CYCLE_03 3 Reflects cycle time of 1 s in the Control Center
AP_TRIG_CYCLE_04 4 Reflects cycle time of 2 s in the Control Center
AP_TRIG_CYCLE_05 5 Reflects cycle time of s in the Control Center
AP_TRIG_CYCLE_06 6 Reflects cycle time of 10 s in the Control Center
AP_TRIG_CYCLE_07 7 Reflects cycle time of 1 min in the Control Center
AP_TRIG_CYCLE_08 8 Reflects cycle time of 5 min in the Control Center
AP_TRIG_CYCLE_09 9 Reflects cycle time of 10 min in the Control Center
AP_TRIG_CYCLE_10 10 Reflects cycle time of 1 h in the Control Center
AP_TRIG_CYCLE_11 11 Reflects cycle time of "User defined 1" in the Control Center
AP_TRIG_CYCLE_12 12 Reflects cycle time of "User defined 2" in the Control Center
AP_TRIG_CYCLE_13 13 Reflects cycle time of "User defined 3" in the Control Center
AP_TRIG_CYCLE_14 14 Reflects cycle time of "User defined 4" in the Control Center
AP_TRIG_CYCLE_15 15 Reflects cycle time of "User defined 5" in the Control Center

WinCC Professional V13 SP2 – Programming reference


586 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

2.4.2 Structures (RT Professional)

2.4.2.1 AP_ACT_KEY (RT Professional)

Declaration

typedef struct {
DWORD dwKeyType;
DWORD dwID;
CHAR szActionName[AP_MAX_ACTION_NAME + 1];
DWORD dwCycle;
VARIANT *pVariant;
DWORD dwVariantItem;
DWORD dwerror;
LPVOID lpvUser;
} AP_ACT_KEY ;

Members

dwKeyType
The key type determines whether the action is addressed by a name (szActionName) or by
an ID (dwID).

AP_ID_TYPE 0 Identification of the action by its ID


AP_NAME_TYPE 1 Identification of the action by its name

Project and standard functions which already exist in in the WinCC project are identified by
the name. User-defined functions that are first logged on with the APTransAct function are
identified by the ID.

dwID
In connection with dwKeyType = AP_ID_TYPE the action is started with dwID.
The ID of the action is assigned on calling the APTransAct function. On calling the APTransAct
function, dwID must be defaulted with 0.

szActionName
In connection with dwKeyType = AP_NAME_TYPE the action is started by szActionName.
Can be used when starting an action with APStart.

dwCycle
Cyclic starting of the action when addressing is by name. The update cycle is defined by the
index of the entries in the list of update cycles.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 587
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

pVariant
Pointer to field of VARIANT data type which describes the parameters of the action. The
following data types are supported as VARTYPES :

unsigned char VT_UI1


unsigned integer 2 Bytes VT_UI2 (WORD)
unsigned integer 4 Bytes VT_UI4 (DWORD)
short VT_I2
long VT_I4
float VT_R4
double VT_R8
VARIANT_BOOL VT_BOOL
SCODE VT_ERROR
CY VT_CY
DATE VT_DATE
BSTR VT_BSTR
BLOB VT_BLOB

The parameter descriptions of the actions and the return result are only possible in the form
of the VARIANT data type.
Transfer as a reference is not permitted.

dwVariantItem
Number of VARIANT data types which the action receives as parameters.

dwerror
Error number which can occur in the APTransAct.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

Description
The AP_ACT_KEY structure clearly identifies the action. This key is assigned as an ID with
the API call APTransAct. The action is started with this key.

Required files
ap_def.h

API functions

APActive (Page 610) Activate action


APInactive (Page 614) Deactivate actions

WinCC Professional V13 SP2 – Programming reference


588 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

APStart (Page 616) Start action


APTransact (Page 619) Logon actions for processing

See also
APActive (Page 610)
APInactive (Page 614)
APStart (Page 616)
APTransact (Page 619)

2.4.2.2 AP_ACT_RESULT_STRUCT (RT Professional)

Declaration

typedef struct {
VARIANT *ap_result;
AP_ACT_KEY apActKey;
CMN_ERROR error;
DWORD dwreserved;
} AP_ACT_RESULT_STRUCT ;

Members

*ap_result
Return result of the action in the form of a VARIANT data type.

apActKey
Key of the action for identification. The AP_ACT_KEY corresponds to the key with which the
action was started.

error
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

dwreserved
The parameter is reserved for later upgrades and must be defaulted with 0.

Required files
ap_def.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 589
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

API functions

APFreeResultStruct (Page 613) Free action result memory


APStart (Page 616) Start action

See also
APFreeResultStruct (Page 613)
APStart (Page 616)

2.4.2.3 CREATE_USER_HEADER_FILE (RT Professional)

Declaration

typedef struct {
char* pszStartDir;
char* pszHeaderFileName;
BOOL bShowDlg;
char* pszWindowText;
} CREATE_USER_HEADER_FILE ;

Members

pszStartDir
Pointer to the start directory at which the search for user functions begins with terminating "\"

pszHeaderFileName
Pointer to the name of the header file

bShowDlg
Show dialog with progress display

pszWindowText
Pointer to the dialog label Default:BROWSER

Required files
capigsc.h

API functions

GSCGenCompileUserFunctions (Page 607) Compile user functions

WinCC Professional V13 SP2 – Programming reference


590 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

See also
GSCGenCompileUserFunctions (Page 607)

2.4.2.4 GENERATE_COMPILE (RT Professional)

Declaration

typedef struct {
char* pszProjectName;
LPACTION pAction;
} GENERATE_COMPILE ;

Members

pszProjectName
Pointer to the project name

pAction
Pointer to valid action stream with source code

Required files
capigsc.h

Related functions

GSCGenCompile (Page 606) Compile action

See also
GSCGenCompile (Page 606)

2.4.2.5 GET_ACTION_STREAM (RT Professional)

Declaration

typedef struct {
char* pszPathName;
DWORD dwType;
} GET_ACTION_STREAM, *LPGET_ACTION_STREAM ;

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 591
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

Members

pszPathName
Full filename of the function or action

dwType
Permissible types:

GSC_AP_SFCT Default function


GSC_AP_PFCT Project function
GSC_AP_GSC Action

Required files
capigsc.h

API functions

GSCGenGetActionStream (Page 609) Determine action stream

See also
GSCGenGetActionStream (Page 609)

2.4.3 General functions (RT Professional)

2.4.3.1 APConnect (RT Professional)

Description
The function logs on in an application in the action control. If a callback function is specified
in fpAppBack, the function is performed asynchronously, in fpAppBack == NULL action is
carried out synchronously.

Declaration

BOOL APConnect (
LPCSTR lpszAppName,
AP_RT_PROC fpAppBack,
PDWORD pdwOrderId,
LPCVOID lpvUser,
PCMN_ERROR pError )

WinCC Professional V13 SP2 – Programming reference


592 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

Parameter

lpszAppName
Name of the application with which the application logged onto DMConnect. A DMConnect is
therefore necessary first. APConnect is only performed synchronously.
If functions of the script programming are called in actions, the "AktSteu" value (note exact
way of writing) must be specified for lpszAppName because the WinCC task has performed
the DMConnect with this name.

fpAppBack
Your callback function which receives messages. The message that the action control has
ended is reported by this function for example.
If a program logs on a Notify routine, it must empty a message queue regularly. Uncollected
messages can block WinCC notifications and thus the entire WinCC.

pdwOrderId
Job number which is assigned when calling the APTransAct function. In synchronous calling
pdwOrderID is not important, in an asynchronous job the job number is supplied in the callback
function.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.
If lpvUser is not used, it must be assigned with NULL.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Application logged on

FALSE
Error

Error messages

AP_NO_ERROR No error occurred


AP_NO_CONNECTION Application cannot establish a connection with the action control.
AP_ERROR_IPC_SEND Error in communication with the action control. The job could not
be sent.
AP_TIMEOUT Time-out not implemented yet at present.
AP_ALREADY_CONNECTED Application is already connected with the action control

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 593
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

AP_FAILURE_PARAM Faulty parameter supply


AP_TO_MANY_CLIENTS The maximum number of connections is reached. No new con‐
nections possible.
AP_FAILURE_UNKNOWN Error not described in detail
AP_ACT_QUIT Action control has ended

Required files
ap_def.h
apcli_S.lib
apclient.dll

Related functions

DMConnect (Page 275) Set up connection to the Data Manager


APDisconnect (Page 595) Disconnect connection to action control
APTransact (Page 619) Logon action for processing
AP_RT_PROC (Page 598) Callback function

Examples
Establish connection to script programming (Page 620)"AP01.cpp"

See also
DMConnect (Page 275)
APTransact (Page 619)
AP_RT_PROC (Page 598)
APDisconnect (Page 595)
Establish connection to script programming (Page 620)
Overview of the functions (Page 582)

2.4.3.2 APDisconnect (RT Professional)

Description
The function logs off an application in the action control.

WinCC Professional V13 SP2 – Programming reference


594 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

Declaration

BOOL APDisconnect (
AP_RT_PROC fpAppBack,
PDWORD pdwOrderId,
LPCVOID lpvUser,
PCMN_ERROR pError )

Parameter

fpAppBack
Your callback function which receives messages. The job is performed asynchronously when
using a callback function. With fpAppBack == NULL it takes place synchronously.
If a program logs on a Notify routine, it must empty a message queue regularly. Uncollected
messages can block WinCC notifications and thus the entire WinCC.

pdwOrderId
Job number which is assigned when calling the APTransAct function. In synchronous calling
pdwOrderID is not important, in an asynchronous job the job number is supplied in the callback
function.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Application logged off

FALSE
Error

Comment

Note
The call may not be used in the destructor of an application (EXE, DLL, OCX, ...). This may
lead to jamming of the call and thus the program due to Microsoft-specific mechanisms.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 595
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

Error messages

AP_NO_ERROR No error occurred


AP_NO_CONNECTION Application cannot establish a connection with the action control.
AP_ERROR_IPC_SEND Error in communication with the action control. The job could not
be sent.
AP_TIMEOUT Time-out not implemented yet at present.
AP_ALREADY_CONNECTED Application is already connected with the action control
AP_FAILURE_PARAM Faulty parameter supply
AP_TO_MANY_CLIENTS The maximum number of connections is reached. No new con‐
nections possible.
AP_FAILURE_UNKNOWN Error not described in detail
AP_ACT_QUIT Action control has ended

Required files
ap_def.h
apcli_S.lib
apclient.dll

Related functions

APConnect (Page 592) Set up connection to action control


APTransact (Page 619) Logon action for processing
AP_RT_PROC (Page 598) Callback function

Examples
Establish connection to script programming (Page 620)"AP01.cpp"

See also
APTransact (Page 619)
APConnect (Page 592)
AP_RT_PROC (Page 598)
Establish connection to script programming (Page 620)
Overview of the functions (Page 582)

2.4.3.3 APSetLanguage (RT Professional)

Description
The language in which the error texts are to be output is set with this function.

WinCC Professional V13 SP2 – Programming reference


596 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

Declaration

BOOL APSetLanguage (
const DWORD dwLanguageID )

Parameter

dwLanguageID
ID of the language according to the Windows language setting. The error texts are returned
according to the new set language. A default language is used if the language is not supported.

Return value

TRUE
Language of the error texts changed

FALSE
Error

Required files
ap_def.h
apcli_S.lib
apclient.dll

See also
Overview of the functions (Page 582)

2.4.3.4 AP_RT_PROC (RT Professional)

Description
If your application is to be informed about the execution of API functions in runtime, you must
provide callback functions of the AP_RT_PROC type.
This function is used by all functions of the action programming as a callback function.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 597
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

Declaration

BOOL ( * AP_RT_PROC) (
DWORD dwAP_Notify,
WORD dwAP_NotifyCode,
DWORD dwError,
LPVOID lpvData,
DWORD dwItems,
DWORD dwOrderId,
LPVOID lpvUser );

Parameters

dwAP_Notify
Describes the type of callback function. Possible values are AP_NOTIFY_ERROR and
AP_NOTIFY_DATA.

dwAP_NotifyCode
If dwAP_Notify == AP_NOTIFY_ERROR, lpvData points to a structure of the CMN_ERROR
type with the error description and dwAP_NotifyCode is NULL.
If dwAP_Notify == AP_NOTIFY_DATA, then dwAP_NotifyCode contains a more exact
specification of the callback function:

AP_NOTIFY_CODE_TRANSACT Confirmation of a call by APTransAct


AP_NOTIFY_CODE_START Confirmation of a call by APStart
AP_NOTIFY_CODE_RESULT Result of an action

dwError
Error number

lpvData
Pointer to provided data. The data structure depends on dwAP_Notify and dwAP_NotifyCode.

dwItems
Number of entries in lpvData.

dwOrderId
Job number which was assigned when calling the API function.

WinCC Professional V13 SP2 – Programming reference


598 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

Return value

TRUE
Function successful

FALSE
Error

Comment

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations
In rare cases, the callback may already be delivered before the function call has returned.

Required files
ap_def.h

Related functions

APActive (Page 610) Activate action


APConnect (Page 592) Logon application
APDisconnect (Page 594) Logoff application
APEndAct (Page 612) Logon action in the application control
APInactive (Page 614) Deactivate actions
APStart (Page 616) Start action
APTransact (Page 619) Logon actions for processing

Examples
Establish connection to script programming (Page 620)"AP01.cpp"

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 599
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

See also
APConnect (Page 592)
APDisconnect (Page 594)
APActive (Page 610)
APEndAct (Page 612)
APInactive (Page 614)
APStart (Page 616)
APTransact (Page 619)
Establish connection to script programming (Page 620)
Overview of the functions (Page 582)

2.4.4 Functions for processing Source Code (RT Professional)

2.4.4.1 APCompile (RT Professional)

Description
A source code saved in lpvScode is compiled and saved as a P-code in lpvPcode. The
application must provide the memory for the P-code.

Declaration

BOOL APCompile (
LPCSTR szProjectName,
PDWORD pdwOrderId,
LPCSTR lpvScode,
const DWORD dwScodeSize,
LPVOID *lpvPcode,
PDWORD dwPcodeSize,
const HWND hwndLog,
const DWORD dwDebugFlag,
PDWORD nErrors,
PDWORD nWarnings,
LPCVOID lpvUser,
PCMN_ERROR pError )

Parameter

szProjectName
Character string which contains a valid project path. The project path decides which Include
and Precompiled Header are used for compiling.

WinCC Professional V13 SP2 – Programming reference


600 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

pdwOrderId
Job number which is assigned when calling the APTransAct function. The job number must
be provided by the caller.

lpvScode
Pointer to the source code to be compiled.

dwScodeSize
Size of the source code in bytes.

lpvPcode
Address of a pointer which contains the P-code in successful compiling. The memory is created
by the APCompile function and must be freed by the caller again with the APFreePCode
function.

dwPcodeSize
Contains the size of the P-code in bytes after compiling.

hwndLog
Window handle with which the error messages can be output. The window handle may also
be NULL. When using a window for the output, a message is sent by the Windows function
WM_COPYDATA.

dwDebugFlag
This flag determines whether the P-code should also supply debug information (bit1 = 1 ) or
whether no debug information is to be supplied (bit1 = 0 ). "0" should normally be selected
based on the performance.
Bit2 = 1: Use server settings for Includes
Bit2 = 0: Use local settings for Includes

nErrors
Number of errors occurred. No P-code is returned for nErrors > 0.

nWarnings
Number of warnings occurred. The P-code is also generated for nWarnings > 0.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the Callback-Funktion.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 601
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

Return value

TRUE
Source code compiled successfully

FALSE
Error

Required files
ap_def.h
apcli_S.lib
apclient.dll

Related functions

APCompileEx (Page 603) Compile source code


APFreePCode Free source code memory

See also
APCompileEx (Page 603)
Overview of the functions (Page 582)

2.4.4.2 APCompileEx (RT Professional)

Description
Unlike the APCompile function, the source code to be compiled is divided into subsections.
In the source code void function {instructions} is divided into

void function { Start of the instruction


Instructions Base
} End of the instruction

A source code saved in the subsections lpvScodeProlog, lpvScodeBase and lpvScodeEpilog


is compiled and saved as a P-code in lpvPcode. The application must provide the memory for
the P-code.

WinCC Professional V13 SP2 – Programming reference


602 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

Declaration

BOOL APCompileEx (
LPCSTR szProjectName,
PDWORD pdwOrderId,
LPCSTR lpvScodeProlog,
const DWORD dwScodePrologSize,
LPCSTR lpvScodeBase,
const DWORD dwScodeBaseSize,
LPCSTR lpvScodeEpilog,
const DWORD dwScodeEpilogSize,
LPVOID *lpvPcode,
PDWORD dwPcodeSize,
const HWND hwndLog,
const DWORD dwDebugFlag,
PDWORD nErrors,
PDWORD nWarnings,
LPCVOID lpvUser,
PCMN_ERROR pError )

Parameters

szProjectName
Character string which contains a valid project path. The project path decides which Include
and Precompiled Header are used for compiling.

pdwOrderId
Job number which is assigned when calling the APTransAct function. The job number must
be provided by the caller.

szProjectName
Character string which contains a valid project path. The project path decides which Include
and Precompiled Header are used for compiling.

pdwOrderId
Job number which is assigned when calling the APTransAct function. The job number must
be provided by the caller.

lpvScodeProlog
Pointer to the prolog of the source code to be compiled.

dwScodePrologSize
Size of the prolog in bytes.

lpvScodeBase
Pointer to the base of the source code to be compiled.

dwScodeBaseSize
Size of the base in bytes.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 603
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

lpvScodeEpilog
Pointer to the epilog of the source code to be compiled.

dwScodeEpilogSize
Size of the epilog in bytes.

lpvPcode
Address of a pointer which contains the P-code in successful compiling. The memory is created
by the APCompile function and must be freed by the caller again with the APFreePCode
function.

dwPcodeSize
Contains the size of the P-code in bytes after compiling.

hwndLog
Window handle with which the error messages can be output. The window handle may also
be NULL. When using a window for the output, a message is sent by the Windows function
WM_COPYDATA.

dwDebugFlag
This flag determines whether the P-code should also supply debug information (bit1 = 1 ) or
whether no debug information is to be supplied (bit1 = 0 ). "0" should normally be selected
based on the performance.
Bit2 = 1: Use server settings for Includes
Bit2 = 0: Use local settings for Includes

nErrors
Number of errors occurred. No P-code is returned for nErrors > 0.

nWarnings
Number of warnings occurred. The P-code is also generated for nWarnings > 0.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the Callback-Funktion.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Source code compiled successfully

WinCC Professional V13 SP2 – Programming reference


604 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

FALSE
Error

Required files
ap_def.h
apcli_S.lib
apclient.dll

Related functions

APCompile (Page 600) Compile source code


APFreePCode Free source code memory

See also
APCompile (Page 600)
Overview of the functions (Page 582)

2.4.4.3 GSCGenCompile (RT Professional)

Description
The function compiles an action.

Declaration

LPACTION GSCGenCompile(
LPGENERATE_COMPILE lpGenCompile,
HWND hWndParent,
unsigned long* plErrors,
unsigned long* plWarnings,
AllocAppMem lpfnAllocAppMem,
LPCMN_ERROR lpdmError)

Parameter

lpGenCompile
Pointer to the structure GENERATE_COMPILE (Page 591).

hWndParent
Handle to the window in which the status outputs are to be made.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 605
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

plErrors
Pointer to variable for return of number of errors

plWarnings
Pointer to variable for return of number of warnings

lpfnAllocAppMem
Pointer to a function with which memory is to be allocated in the calling application

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value
Pointer to the compiled action stream. A new action stream is generated even if the compilation
is faulty. The success of the call must be checked based on the number of errors and warnings.

Comment
The compiled action is not available until the next time the runtime starts.

Required files
capigsc.h
gscgr_s.lib
gscgen.dll

See also
GENERATE_COMPILE (Page 591)
Overview of the functions (Page 582)

2.4.4.4 GSCGenCompileUserFunctions (RT Professional)

Description
The function recompiles all special user functions.

WinCC Professional V13 SP2 – Programming reference


606 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

Declaration

BOOL GSCGenCompileUserFunctions (
LPCREATE_USER_HEADER_FILE pGenCUHF,
HWND hWndParent,
LPCMN_ERROR lpdmError)

Parameter

pGenCUHF
Pointer to the structure CREATE_USER_HEADER_FILE (Page 590).

hWndParent
Handle to the window in which the status outputs are to be made.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
User functions compiled

FALSE
Error

Comment
For internal reasons this function always returns FALSE without an error message although
the functions are generated.
The compiled user functions are not available until the next time the runtime is started.

Required files
capigsc.h
gscgr_s.lib
gscgen.dll

See also
CREATE_USER_HEADER_FILE (Page 590)
Overview of the functions (Page 582)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 607
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

2.4.5 Functions for processing actions (RT Professional)

2.4.5.1 GSCGenGetActionStream (RT Professional)

Description
The function determines the action stream for a project function, a standard function or an
action.

Declaration

LPACTION GSCGenGetActionStream(
LPGET_ACTION_STREAM pGenGAS,
AllocAppMem lpfnAllocAppMem,
LPCMN_ERROR lpdmError)

Parameter

pGenGAS
Pointer to structure of the GET_ACTION_STREAM (Page 591) type with which the function or
action is specified.

lpfnAllocAppMem
Pointer to a function with which memory is to be allocated in the calling application.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value
Pointer to the action stream.

Required files
capigsc.h
gscgr_s.lib
gscgen.dll

See also
GET_ACTION_STREAM (Page 591)
Overview of the functions (Page 582)

WinCC Professional V13 SP2 – Programming reference


608 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

2.4.6 Functions of the action programming (RT Professional)

2.4.6.1 APActive (RT Professional)

Description
Actions which were deactivated with APInactive can only be reactivated with this function, i.e.
the appropriate triggers are monitored again or can be restarted with APStart.

Declaration

BOOL APActive (
PAP_ACT_KEY lpapActKey,
const DWORD dwItems,
AP_RT_PROC fpAppBack,
PDWORD pdwOrderId,
LPCVOID lpvUser,
PCMN_ERROR pError )

Parameter

lpapActKey
Pointer to a data structure with the following structure:

$3B$&7B.(<

$3B$&7B.(<


$3B$&7B.(<Q

$FWLRQVWUHDP


$FWLRQVWUHDP

$FWLRQVWUHDPQ

The data structure must be provided by the calling application.


The actions must be logged on with APTransAct first. The ID in AP_ACT_KEY decides whether
the action is to be started by the ID or the name.

dwItems
Number of actions, i.e. structures AP_ACT_KEY (Page 587).

fpAppBack
Your callback function for the asynchronous call. The call is performed synchronously when
using NULL.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 609
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

If a program logs on a Notify routine, it must empty a message queue regularly. Uncollected
messages can block WinCC notifications and thus the entire WinCC.

pdwOrderId
Job number which is assigned when calling the APTransAct function. In synchronous calling
pdwOrderID is not important, in an asynchronous job the job number is supplied in the callback
function.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Action activated

FALSE
Error

Required files
ap_def.h
apcli_S.lib
apclient.dll

Related functions

APInactive (Page 614) Deactivate actions


APTransact (Page 619) Logon action for processing
AP_RT_PROC (Page 597) Callback function

See also
AP_RT_PROC (Page 597)
AP_ACT_KEY (Page 587)
APInactive (Page 614)
APTransact (Page 619)
Overview of the functions (Page 582)

WinCC Professional V13 SP2 – Programming reference


610 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

2.4.6.2 APEndAct (RT Professional)

Description
The action logged on for processing is logged off in the action control.

Declaration

BOOL APEndAct (
AP_RT_PROC fpAppBack,
PDWORD pdwOrderId,
const PDWORD pdwOrderEnd,
LPCVOID lpvUser,
PCMN_ERROR pError )

Parameter

fpAppBack
Your callback function for the asynchronous call. The call is performed synchronously when
using NULL.
If a program logs on a Notify routine, it must empty a message queue regularly. Uncollected
messages can block WinCC notifications and thus the entire WinCC.

pdwOrderId
Job number which is assigned when calling the APTransAct function. In synchronous calling
pdwOrderID is not important, in an asynchronous job the job number is supplied in the callback
function.

pdwOrderEnd
Job number of the transaction which is to be ended.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Action logged off

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 611
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

FALSE
Error

Required files
ap_def.h
apcli_S.lib
apclient.dll

Related functions

APTransact (Page 619) Logon action for processing


AP_RT_PROC (Page 597) Callback function

See also
AP_RT_PROC (Page 597)
APTransact (Page 619)
Overview of the functions (Page 582)

2.4.6.3 APFreeResultStruct (RT Professional)

Description
In synchronous calling of the APStart function the action results are allocated in the form of
an array of structures of the AP_ACT_RESULT_STRUCT type. The memory allocated by
APStart must be freed again with the APFreeResultStruct function.

Declaration

BOOL APFreeResultStruct (
PAP_ACT_RESULT_STRUCT *lpapars,
const DWORD dwItems )

Parameter

lpvPcode
Pointer to the first of dwItems structures of the AP_ACT_RESULT_STRUCT (Page 589) type.

dwItems
Number of structures AP_ACT_RESULT_STRUCT.

WinCC Professional V13 SP2 – Programming reference


612 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

Return value

TRUE
Free memory.

FALSE
Error

Required files
ap_def.h
apcli_S.lib
apclient.dll

Related functions

APStart (Page 616) Processing of action started

See also
APStart (Page 616)
AP_ACT_RESULT_STRUCT (Page 589)
Overview of the functions (Page 582)

2.4.6.4 APInactive (RT Professional)

Description
Actions which have been logged on with APTransAct can be deactivated with APInactive. The
appropriate triggers are no longer monitored and the actions cannot be started with APStart.
The actions can be reactivated with APActive.

Declaration

BOOL APInactive (
PAP_ACT_KEY lpActKey,
const DWORD dwItems,
AP_RT_PROC fpAppBack,
PDWORD pdwOrderId,
LPCVOID lpvUser,
PCMN_ERROR pError )

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 613
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

Parameter

lpapActKey
Pointer to a data structure with the following structure:

$3B$&7B.(<

$3B$&7B.(<


$3B$&7B.(<Q

$FWLRQVWUHDP


$FWLRQVWUHDP

$FWLRQVWUHDPQ

The data structure must be provided by the calling application.


The actions must be logged on with APTransAct first. The ID in AP_ACT_KEY decides whether
the action is to be started by the ID or the name.

dwItems
Number of actions, i.e. structures AP_ACT_KEY (Page 587).

fpAppBack
Your callback function for the asynchronous call. The call is performed synchronously when
using NULL.
If a program logs on a Notify routine, it must empty a message queue regularly. Uncollected
messages can block WinCC notifications and thus the entire WinCC.

pdwOrderId
Job number which is assigned when calling the APTransAct function. In synchronous calling
pdwOrderID is not important, in an asynchronous job the job number is supplied in the callback
function.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Action deactivated

WinCC Professional V13 SP2 – Programming reference


614 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

FALSE
Error

Required files
ap_def.h
apcli_S.lib
apclient.dll

Related functions

APActive (Page 609) Activate actions


APTransact (Page 619) Logon action for processing
AP_RT_PROC (Page 597) Callback function

See also
AP_RT_PROC (Page 597)
APActive (Page 609)
AP_ACT_KEY (Page 587)
APTransact (Page 619)
Overview of the functions (Page 582)

2.4.6.5 APStart (RT Professional)

Description
The actions are started for processing. Simultaneous processing of several actions is possible.
The actions are described in the AP_ACT_KEY structure.

Declaration

BOOL APStart (
AP_ACT_KEY lpapActKey,
const DWORD dwItems,
AP_RT_PROC fpAppBack,
AP_RT_PROC fpAppResult,
PDWORD pdwOrderId,
PAP_ACT_RESULT_STRUCT *lpapars,
LPCVOID lpUser,
PCMN_ERROR pError )

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 615
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

Parameter

lpapActKey
Pointer to a data structure with the following structure:

$3B$&7B.(<

$3B$&7B.(<


$3B$&7B.(<Q

$FWLRQVWUHDP


$FWLRQVWUHDP

$FWLRQVWUHDPQ

The data structure must be provided by the calling application.


The actions must be logged on with APTransAct first. The ID in AP_ACT_KEY decides whether
the action is to be started by the ID or the name.

dwItems
Number of actions, i.e. structures AP_ACT_KEY (Page 587).

fpAppBack
Your callback function for the asynchronous call. The call is performed synchronously when
using NULL.
If a program logs on a Notify routine, it must empty a message queue regularly. Uncollected
messages can block WinCC notifications and thus the entire WinCC.

fAppResult
Your callback function for cyclic action results. The structures of the
AP_ACT_RESULT_STRUCT (Page 589) type are supplied in the callback function. In
synchronous call lpapars is assigned with the result.

pdwOrderId
Job number which is assigned when calling the APTransAct function. In synchronous calling
pdwOrderID is not important, in an asynchronous job the job number is supplied in the callback
function.

lpapars
Pointer to the action result in synchronous call. An array of structures of the
AP_ACT_RESULT_STRUCT (Page 589) type is returned according to the number of started
actions. The memory allocated by the function must be freed again with APFreeResultStruct.
In asynchronous use islpapars = NULL

WinCC Professional V13 SP2 – Programming reference


616 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

pError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Action started

FALSE
Error

Comment
With APStart only actions which were not previously deactivated with APInactive can be
started.

Required files
ap_def.h
apcli_S.lib
apclient.dll

Related functions

APFreeResultStruct (Page 612) Free memory


AP_RT_PROC (Page 597) Callback function

See also
AP_RT_PROC (Page 597)
APFreeResultStruct (Page 612)
AP_ACT_KEY (Page 587)
AP_ACT_RESULT_STRUCT (Page 589)
Overview of the functions (Page 582)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 617
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

2.4.6.6 APTransact (RT Professional)

Application

Declaration

Parameter

xxx

xxx

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
.

FALSE
Error

Comment

Required files
ap_def.h
apcli_S.lib
apclient.dll

Related functions

WinCC Professional V13 SP2 – Programming reference


618 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

Examples
Auto-Hotspot "DM01.cpp"

See also
APConnect (Page 592)
APDisconnect (Page 594)
AP_RT_PROC (Page 597)
APActive (Page 609)
APEndAct (Page 611)
APInactive (Page 613)
AP_ACT_KEY (Page 587)
Overview of the functions (Page 582)

2.4.7 Examples (RT Professional)

2.4.7.1 Establish connection to script programming (RT Professional)

Overview
//
====================================================================
=
// Filename:.......... ap01.c
//
====================================================================
=
// : Module with examples of AP_API
//
********************************************************************
*
// Copyright (C) 1995/96 SIEMENS AG, AUT 913 All rights reserved
//
********************************************************************
*
#include "stdafx.h"
#include "ap01.h" // if console application

//{{ODK_EXAMPLE}Establish connection to script programming (AP)}


//{{FUNCTION}APConnect (AP)}
//{{FUNCTION}APDisconnect (AP)}
//{{FUNCTION}AP_RT_PROC (AP)}
//{{FUNCTION}(END)}
// Establish connection to script programming (AP)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 619
Runtime API (RT Professional)
2.4 Scripting functions (RT Professional)

//
====================================================================
=
// Function: AprConnect(void) ODK AP CS
//
====================================================================
=
// short : Establish connection to script programming
// :
//
====================================================================
=
BOOL MyAPRTCallback(DWORD dwAP_Notify, DWORD dwAP_NotifyCode, DWORD
dwError,
LPVOID lpvData, DWORD dwItems, DWORD dwOrderID, LPVOID
lpvUser)
{
lpvUser;
dwOrderID;
lpvData;
TCHAR szText[255];
_sntprintf_s( szText,_countof(szText), _TRUNCATE,
_T("AprNotCon:: AP= %d ;
dwAP_Notify, dwAP_NotifyCode, dwError, dwItems);
ODKTrace(szText);
return(TRUE );
}

void MyApConnect(void)
{
TCHAR szText[255];
CMN_ERROR Error;
BOOL ret = FALSE;
DWORD dwOrderID = 0;
TCHAR szApp[255];
VOID* pUser = NULL;
_tcsncpy_s(szApp, _countof(szApp), _T("MyODKApp_23"),
_TRUNCATE); // must be the same AppName as by DMConnect
memset(&Error, 0, sizeof(CMN_ERROR));
ret = APConnect(szApp, MyAPRTCallback, &dwOrderID, pUser, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error
in APConnect: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE,
_T("APConnect"));
}
ODKTrace(szText);

WinCC Professional V13 SP2 – Programming reference


620 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

//printf("%s\r\n"szText);
void MyAPDisconnect()
VOID* pUser = NULL;
CMN_ERROR Error;
TCHAR szText[255];
BOOL ret = FALSE;
DWORD dwOrderID = 0;
memset(&Error, 0, sizeof(CMN_ERROR));
ret = APDisconnect(NULL, &dwOrderID, pUser, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error
in APDisconnect: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE,
_T("APDisconnect"));
}
ODKTrace(szText);
}
//
--------------------------------------------------------------------
//{{ODK_EXAMPLE}(END)}

See also
APConnect (Page 592)
APDisconnect (Page 594)
AP_RT_PROC (Page 597)

2.5 Functions of the user administration (RT Professional)

2.5.1 Basics (RT Professional)

2.5.1.1 Overview of the functions (RT Professional)

Overview

PWGEN_ENUM_GROUPS_CALLBACK List user groups (callback)


(Page 644)
PWGEN_ENUM_LEVELS_CALLBACK List authorization levels (callback)
(Page 651)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 621
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

PWGEN_ENUM_USERS_CALLBACK (Page 640) List users (callback)


PWGENAddGroup (Page 641) Create user group
PWGENAddPermLevel (Page 645) Create authorization level
PWGENAddUser (Page 630) Create user
PWGENAddUserEx (Page 632) Create user
PWGENChangePassword (Page 634) Change password
PWGENCheckPermission (Page 647) Verify user authorizations of a user
PWGENCheckUser (Page 635) Check user
PWGENConnect (Page 627) Establish connection to the database.
PWGENDeletePermLevel (Page 648) Delete authorization level
PWGENDeleteUser (Page 637) Delete user/delete user group
PWGENDisconnect (Page 629) Terminate connection to the database
PWGENEnumGroups (Page 643) List user groups
PWGENEnumPermLevels (Page 649) List authorization levels
PWGENEnumUsers (Page 638) List users
PWGENReadUserPerm (Page 652) Determine user authorizations
PWRTCheckPermission (Page 653) Check area authorization
PWRTCheckPermissionOnPicture (Page 654) Check authorization level
PWRTGetCurrentUser (Page 659) Determine login name
PWRTGetLoginPriority (Page 660) GetLoginPriority
PWRTIsLoggedInByCard (Page 661) Login via chip card
PWRTLogin (Page 662) Login via dialog
PWRTLogout (Page 663) Logout
PWRTLogoutEx (Page 664) Logout
PWRTPermissionLevelDialog (Page 655) Select authorization level
PWRTPermissionLevelDialogEx (Page 656) Select authorization level
PWRTPermissionToString (Page 657) Determine authorization level for text description
PWRTSilentLogin (Page 665) Login
PWRTSilentLoginEx (Page 666) Login

2.5.1.2 Overview of structures (RT Professional)

Overview

PWGEN_GROUPINFO (Page 625) User group information


PWGEN_LEVELINFO (Page 626) Authorization level information
PWGEN_USERINFO (Page 627) User information

WinCC Professional V13 SP2 – Programming reference


622 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

2.5.1.3 Error messages (RT Professional)

Overview
The following error messages can be returned by the API functions in the CMN_ERROR error
structure:

Error messages for RT:

PWRT_CAP_SHMERROR 1 Shared memory error


PWRT_CAP_NOLOGIN 2 No user is logged on
PWRT_CAP_NOPERM 3 User does not have authorization.
PWRT_CAP_NOAREA 4 The area could not be found.
PWRT_GPA_SHMERROR 1 Shared memory error
PWRT_GPA_NOLOGIN 2 No user is logged on

Error messages for CS V5.0 and higher:

PWGEN_API_ERR_SUPPLY 0x10000001L An unspecified error has occurred.


PWGEN_API_NO_MEMORY 0x10000001L Not enough memory.
PWGEN_API_NOT_SUPPORTED 0x10000003L This function is not supported
PWGEN_API_INVALID_PARAM 0x10000004L A function parameter is incorrect or missing.
PWGEN_API_NO_INTERFACE 0x10000005L No connection to the UserAdminASO-Inter‐
face.
PWGEN_API_I_ENUM 0x10000006L Error while enumerating
PWGEN_API_I_READ 0x10000007L Error while reading
PWGEN_API_I_CREATE 0x10000008L Error while creating new data
PWGEN_API_I_MODIFY 0x10000009L Error while modifying data
PWGEN_API_I_DELETE 0x1000000AL Error while deleting data
PWGEN_API_TERMINATED 0x1000000FL Processing was cancelled prematurely.
PWGEN_API_NO_CONNECTION 0x10000010L PWGENConnect not yet executed.
PWGEN_API_IS_CONNECTED 0x10000011L PWGENConnect has already been execu‐
ted.
PWGEN_API_NO_USER 0x10000020L User not found
PWGEN_API_MAX_USER 0x10000021L The maximum number of users has been
reached (~ 128).
PWGEN_API_EXIST_USER 0x10000022L The selected user already exists.
PWGEN_API_NO_GROUP 0x10000030L User group was not found.
PWGEN_API_MAX_GROUP 0x10000031L The maximum number of user groups has
been reached (~ 10).
PWGEN_API_EXIST_GROUP 0x10000032L The selected user group already exists.
PWGEN_API_NO_LEVEL 0x10000040L Authorization level not found.
PWGEN_API_MAX_LEVEL 0x10000041L The maximum number of authorization lev‐
els has been reached (~ 1000).

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 623
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

PWGEN_API_EXIST_LEVEL 0x10000042L The selected authorization level already ex‐


ists.
PWGEN_API_NO_PERM 0x10000050L No authorization assigned.
PWGEN_API_MAX_PERM 0x10000051L
PWGEN_API_EXIST_PERM 0x10000052L The authorization already exists.
PWGEN_API_NO_AREA 0x10000060L No range was assigned.
PWGEN_API_MAX_AREA 0x10000061L The maximum number of areas has been
reached (~ 32).
PWGEN_API_EXIST_AREA 0x10000062L The area already exists.
PWGEN_API_NO_PASSWORD 0x10000070L No password, or password is invalid.
PWGEN_API_MAX_PASSWORD 0x10000071L
PWGEN_API_EXIST_PASSWORD 0x10000072L

2.5.1.4 Constants (RT Professional)

String and array sizes

MAX_LOGIN 25
MAX_PASS 25
MAX_LEVEL 70

2.5.2 Structures (RT Professional)

2.5.2.1 PWGEN_GROUPINFO (RT Professional)

Declaration

typedef struct {
TCHAR name[MAX_LOGIN];
int expiration_time;
}
PWGEN_GROUPINFO;

Members

name
Name of the user group

expiration_time
automatic logout time in minutes

WinCC Professional V13 SP2 – Programming reference


624 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Required files
usegenap.h

API functions

PWGEN_ENUM_GROUPS_CALLBACK List user groups


(Page 644)

See also
PWGEN_ENUM_GROUPS_CALLBACK (Page 644)

2.5.2.2 PWGEN_LEVELINFO (RT Professional)

Declaration

typedef struct {
int levelNumber;
DWORD dwTextID;
}
PWGEN_LEVELINFO;

Members

levelNumber
Number of the authorization

dwTextID
ID which identifies the description of authorization.

Required files
usegenap.h

API functions

PWGEN_ENUM_LEVELS_CALLBACK List authorization levels


(Page 651)

See also
PWGEN_ENUM_LEVELS_CALLBACK (Page 651)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 625
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

2.5.2.3 PWGEN_USERINFO (RT Professional)

Declaration

typedef struct {
TCHAR login[MAX_LOGIN];
TCHAR group[MAX_LOGIN];
int expiration_time;
}
PWGEN_USERINFO;

Members

login
Logon name of the user

group
Name of the group to which the user belongs

expiration_time
automatic logout time in minutes

Required files
usegenap.h

API functions

PWGEN_ENUM_USERS_CALLBACK (Page 640) List users

See also
PWGEN_ENUM_USERS_CALLBACK (Page 640)

2.5.3 General functions (RT Professional)

2.5.3.1 PWGENConnect (RT Professional)

Description
The function connects to the database of the currently open project.

WinCC Professional V13 SP2 – Programming reference


626 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Declaration

BOOL PWGENConnect (
LPCTSTR DSNName,
LPCMN_ERROR err)

Parameters

DSNName
DataSource name of the project. The DSNName parameter is not evaluated. An empty string
can be passed but not ZERO. The database of the currently open project is always used.

err
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Connection established

FALSE
Error

Comment
Each application can perform only one Connect. With a repeated Connect, the
PWGEN_API_IS_CONNECTED error message is returned.

Error messages

PWGEN_API_INVALID_PARAM A function parameter is incorrect or missing.


PWGEN_API_ERR_SUPPLY An unspecified error has occurred.
PWGEN_API_NO_INTERFACE No connection to the UserAdminASO interface.
PWGEN_API_NO_CONNECTION No PWGENConnect has been executed.
PWGEN_API_IS_CONNECTED PWGENConnect has already been executed.

Required files
usegenap.h
usegen.lib
usegen.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 627
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Related functions

PWGENDisconnect (Page 629) Terminate connection to the database

See also
PWGENDisconnect (Page 629)
Overview of the functions (Page 621)

2.5.3.2 PWGENDisconnect (RT Professional)

Description
The connection to the database of the currently open project is terminated.

Declaration

BOOL PWGENDisconnect (
LPCMN_ERROR err)

Parameters

err
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Connection terminated

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


628 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Comment
A PWGENDisconnect before the application is closed, otherwise the internally used
UserAdminASO interfaces will no longer be enabled.

Note
The call may not be used in the destructor of an application (EXE, DLL, OCX, etc.). Due to
Microsoft-specific mechanisms, this may cause the call to freeze and thereby crash the
program.

Error messages

PWGEN_API_ERR_SUPPLY An unspecified error has occurred.


PWGEN_API_NO_INTERFACE No connection to the UserAdminASO interface.
PWGEN_API_NO_CONNECTION No PWGENConnect has been executed.

Required files
usegenap.h
usegen.lib
usegen.dll

Related functions

PWGENConnect (Page 626) Make connection to the database.

See also
PWGENConnect (Page 626)
Overview of the functions (Page 621)

2.5.4 Functions for processing users (RT Professional)

2.5.4.1 PWGENAddUser (RT Professional)

Description
The function creates a new user, including an empty user authorization matrix. You can use
the PWGENAddUserEx function to transfer the authorizations of the group to the users to be
created.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 629
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Declaration

BOOL PWGENAddUser (
LPCTSTR username,
LPCTSTR password,
LPCTSTR group,
int expiration_time,
LPCMN_ERROR error )

Parameters

username
Logon name of the user

password
Password of the user

group
Group to which the user should be added

expiration_time
Automatic logout time in minutes. If the selected expiration_time is outside the permitted range,
it is set to 0.

error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Users created

FALSE
Error

Error messages

PWGEN_API_INVALID_PARAM A function parameter is incorrect or missing.


PWGEN_API_ERR_SUPPLY An unspecified error has occurred.
PWGEN_API_NO_INTERFACE No connection to the UserAdminASO interface.
PWGEN_API_NO_CONNECTION No PWGENConnect has been executed.
PWGEN_API_NO_MEMORY Not enough memory.
PWGEN_API_I_ENUM Error in enumeration.
PWGEN_API_EXIST_USER The selected user already exists.

WinCC Professional V13 SP2 – Programming reference


630 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

PWGEN_API_MAX_USER The maximum number of users has been reached (~ 128).


PWGEN_API_NO_GROUP Cannot find user group.
PWGEN_API_I_CREATE Error creating new data.

Required files
usegenap.h
usegen.lib
usegen.dll

Related functions

PWGENAddUserEx (Page 632) Creating users

See also
PWGENAddUserEx (Page 632)
Overview of the functions (Page 621)

2.5.4.2 PWGENAddUserEx (RT Professional)

Description
The function creates a new user. Depending on the copy_group_protection parameter, you
can transfer the authorizations of the group to the users to be created.

Declaration

BOOL PWGENAddUserEx (
LPCTSTR username,
LPCTSTR password,
LPCTSTR group,
int expiration_time,
BOOL copy_group_permissions,
LPCMN_ERROR error )

Parameters

username
Logon name of the user

password
Password of the user

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 631
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

group
Group to which the user should be added

expiration_time
Automatic logout time in minutes. If the selected expiration_time is outside the permitted range,
it is set to 0.

copy_group_permissions
If copy_group_permission = TRUE, the user authorizations of the group to the newly created
user will be transferred.

error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Users created

FALSE
Error

Error messages

PWGEN_API_INVALID_PARAM A function parameter is incorrect or missing.


PWGEN_API_ERR_SUPPLY An unspecified error has occurred.
PWGEN_API_NO_INTERFACE No connection to the UserAdminASO interface.
PWGEN_API_NO_CONNECTION No PWGENConnect has been executed.
PWGEN_API_NO_MEMORY Not enough memory.
PWGEN_API_I_ENUM Error in enumeration.
PWGEN_API_EXIST_USER The selected user already exists.
PWGEN_API_MAX_USER The maximum number of users has been reached (~ 128).
PWGEN_API_NO_GROUP Cannot find user group.
PWGEN_API_I_CREATE Error creating new data.

Required files
usegenap.h
usegen.lib
usegen.dll

WinCC Professional V13 SP2 – Programming reference


632 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Related functions

PWGENAddUser (Page 629) Creating users

See also
PWGENAddUser (Page 629)
Overview of the functions (Page 621)

2.5.4.3 PWGENChangePassword (RT Professional)

Description
This function can be used to change the password of the user specified by the user name.

Declaration

BOOL PWGENChangePassword (
LPCTSTR username,
LPCTSTR oldpassword,
LPCTSTR newpassword,
LPCMN_ERROR error )

Parameters

username
Logon name of the user

oldpassword
Old password of the user

newpassword
New password of the user

error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Password changed

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 633
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

FALSE
Error

Error messages

PWGEN_API_INVALID_PARAM A function parameter is incorrect or missing.


PWGEN_API_NO_PASSWORD No or no valid password.
PWGEN_API_ERR_SUPPLY An unspecified error has occurred.
PWGEN_API_NO_INTERFACE No connection to the UserAdminASO interface.
PWGEN_API_NO_CONNECTION No PWGENConnect has been executed.
PWGEN_API_NO_MEMORY Not enough memory.
PWGEN_API_I_ENUM Error in enumeration.
PWGEN_API_NO_USER Cannot find user.
PWGEN_API_I_READ Error reading.
PWGEN_API_I_MODIFY Error changing data.

Required files
usegenap.h
usegen.lib
usegen.dll

See also
Overview of the functions (Page 621)

2.5.4.4 PWGENCheckUser (RT Professional)

Description
This checks whether the specified user exists in the current WinCC project and whether the
given password is correct.

Declaration

BOOL PWGENCheckUser (
LPCTSTR username,
LPCTSTR password,
LPCMN_ERROR error )

WinCC Professional V13 SP2 – Programming reference


634 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Parameters

username
Name of the user.

password
The password that belongs to the specified user.

error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
User exists and the password is correct.

FALSE
Error

Error messages

PWGEN_API_INVALID_PARAM A function parameter is incorrect or missing.


PWGEN_API_ERR_SUPPLY An unspecified error has occurred.
PWGEN_API_NO_INTERFACE No connection to the UserAdminASO interface.
PWGEN_API_NO_CONNECTION No PWGENConnect has been executed.
PWGEN_API_I_ENUM Error in enumeration.
PWGEN_API_NO_USER Cannot find user.
PWGEN_API_NO_PASSWORD No or no valid password.

Required files
usegenap.h
usegen.lib
usegen.dll

See also
Overview of the functions (Page 621)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 635
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

2.5.4.5 PWGENDeleteUser (RT Professional)

Description
The specified user or user group is deleted, including the authorization data.

Declaration

BOOL PWGENDeleteUser (
LPCTSTR username,
BOOL is_user,
LPCMN_ERROR error )

Parameters

username
Number of the user to be
deleted.

is_user
The is_user parameter is used to distinguish whether a user or a user group is to be deleted.

TRUE A user should be deleted.


FALSE A user group should be deleted.

error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
User or user groups deleted

FALSE
Error

Comment
If you attempt to delete the administrator, the function returns the PWGEN_API_EXIST_USER
error.

WinCC Professional V13 SP2 – Programming reference


636 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Error messages

PWGEN_API_INVALID_PARAM A function parameter is incorrect or missing.


PWGEN_API_ERR_SUPPLY An unspecified error has occurred.
PWGEN_API_NO_INTERFACE No connection to the UserAdminASO interface.
PWGEN_API_NO_CONNECTION No PWGENConnect has been executed.
PWGEN_API_I_ENUM Error in enumeration.
PWGEN_API_I_DELETE Error deleting data.
PWGEN_API_NO_USER Cannot find user.
PWGEN_API_NO_GROUP Cannot find user group.
PWGEN_API_EXIST_USER The selected user already exists.
PWGEN_API_NO_MEMORY Not enough memory.

Required files
usegenap.h
usegen.lib
usegen.dll

See also
Overview of the functions (Page 621)

2.5.4.6 PWGENEnumUsers (RT Professional)

Description
The function reads the configured users, calls the callback function for each user and returns
the number of users in dwCount.

Declaration

BOOL PWGENEnumUsers (
LPDWORD dwCount,
PWGEN_ENUM_USERS_CALLBACK cfn,
PVOID userdata,
LPCMN_ERROR error )

Parameters

dwCount
Pointer to the location where the number of users should be stored.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 637
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

cfn
Your callback function that receives the information. If cfn == NULL, only users are counted.

userdata
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Users listed

FALSE
Error

Error messages

PWGEN_API_INVALID_PARAM A function parameter is incorrect or missing.


PWGEN_API_ERR_SUPPLY An unspecified error has occurred.
PWGEN_API_NO_INTERFACE No connection to the UserAdminASO interface.
PWGEN_API_NO_CONNECTION No PWGENConnect has been executed.
PWGEN_API_I_ENUM Error in enumeration.
PWGEN_API_NO_MEMORY Not enough memory.

Required files
usegenap.h
usegen.lib
usegen.dll

Related functions

PWGEN_ENUM_USERS_CALLBACK (Page 640) List users (callback)

See also
PWGEN_ENUM_USERS_CALLBACK (Page 640)
Overview of the functions (Page 621)

WinCC Professional V13 SP2 – Programming reference


638 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

2.5.4.7 PWGEN_ENUM_USERS_CALLBACK (RT Professional)

Description
In order to evaluate the user information listed by the system, you must provide a
PWGEN_ENUM_USERS_CALLBACK type callback function.

Declaration

BOOL ( * PWGEN_ENUM_USERS_CALLBACK) (
LPWGEN_USERINFO lpUserInfo,
PVOID lpUser);

Parameters

lpUserInfo
Pointer to a PWGEN_USERINFO (Page 626) type structure with the data of a user.

lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
Users listed

FALSE
Error

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
usegenap.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 639
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Related functions

PWGENEnumUsers (Page 637) List users

See also
PWGENEnumUsers (Page 637)
PWGEN_USERINFO (Page 626)
Overview of the functions (Page 621)

2.5.5 Functions for processing user groups (RT Professional)

2.5.5.1 PWGENAddGroup (RT Professional)

Description
The function creates a new user group, including an empty user authorization matrix.

Declaration

BOOL PWGENAddGroup (
LPCTSTR username,
int expiration_time,
LPCMN_ERROR error )

Parameters

username
Name of the group to be created

expiration_time
Automatic logout time. If the selected expiration_time is outside the permitted range, it is set
to 0.

error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


640 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Return value

TRUE
User group created

FALSE
User group already exists

Comment
Use the PWGENDeleteUser function to delete an existing user group.

Error messages

PWGEN_API_INVALID_PARAM A function parameter is incorrect or missing.


PWGEN_API_ERR_SUPPLY An unspecified error has occurred.
PWGEN_API_NO_INTERFACE No connection to the UserAdminASO interface.
PWGEN_API_NO_CONNECTION No PWGENConnect has been executed.
PWGEN_API_I_ENUM Error in enumeration.
PWGEN_API_EXIST_GROUP The selected user group already exists.
PWGEN_API_MAX_GROUP The maximum number of user groups has been reached (~ 10).
PWGEN_API_NO_MEMORY Not enough memory.
PWGEN_API_I_CREATE Error creating new data.

Required files
usegenap.h
usegen.lib
usegen.dll

Related functions

PWGENDeleteUser (Page 636) Creating users

See also
PWGENDeleteUser (Page 636)
Overview of the functions (Page 621)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 641
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

2.5.5.2 PWGENEnumGroups (RT Professional)

Description
The function reads the configured user groups, calls the callback function for each group and
returns the number of groups in dwCount.

Declaration

BOOL PWGENEnumGroups (
LPDWORD dwCount,
PWGEN_ENUM_GROUPS_CALLBACK cfn,
PVOID userdata,
LPCMN_ERROR error )

Parameters

dwCount
Pointer to the location where the number of user groups should be stored.

cfn
Your callback function that receives the information. If cfn == NULL, only user groups are
counted.

userdata
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
User groups listed

FALSE
Error

Error messages

PWGEN_API_INVALID_PARAM A function parameter is incorrect or missing.


PWGEN_API_ERR_SUPPLY An unspecified error has occurred.

WinCC Professional V13 SP2 – Programming reference


642 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

PWGEN_API_NO_INTERFACE No connection to the UserAdminASO interface.


PWGEN_API_NO_CONNECTION No PWGENConnect has been executed.
PWGEN_API_I_ENUM Error in enumeration.
PWGEN_API_NO_MEMORY Not enough memory.

Required files
usegenap.h
usegen.lib
usegen.dll

Related functions

PWGEN_ENUM_GROUPS_CALLBACK List user groups (callback)


(Page 644)

See also
PWGEN_ENUM_GROUPS_CALLBACK (Page 644)
Overview of the functions (Page 621)

2.5.5.3 PWGEN_ENUM_GROUPS_CALLBACK (RT Professional)

Description
In order to evaluate the information of user groups listed by the system, you must provide a
PWGEN_ENUM_GROUPS_CALLBACK type callback function.

Declaration

BOOL ( * PWGEN_ENUM_GROUPS_CALLBACK) (
LPWGEN_GROUPINFO lpGroupInfo,
PVOID lpUser);

Parameters

lpUserInfo
Pointer to a PWGEN_GROUPINFO (Page 624) type structure with the data of a user group.

lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 643
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Return value

TRUE
User groups listed

FALSE
Error

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
usegenap.h

Related functions

PWGENEnumGroups (Page 642) List user groups

See also
PWGENEnumGroups (Page 642)
PWGEN_GROUPINFO (Page 624)
Overview of the functions (Page 621)

2.5.6 Functions for processing authorizations (RT Professional)

2.5.6.1 PWGENAddPermLevel (RT Professional)

Description
Creates a new authorization for all users.

WinCC Professional V13 SP2 – Programming reference


644 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Declaration

BOOL PWGENAddPermLevel (
DWORD txtID,
int number,
LPCMN_ERROR error )

Parameters

txtID
Text ID of the text for the authorization.

number
Number of the authorization to be created

error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Authorization level created

FALSE
Error

Error messages

PWGEN_API_INVALID_PARAM A function parameter is incorrect or missing.


PWGEN_API_ERR_SUPPLY An unspecified error has occurred.
PWGEN_API_NO_INTERFACE No connection to the UserAdminASO interface.
PWGEN_API_NO_CONNECTION No PWGENConnect has been executed.
PWGEN_API_I_ENUM Error in enumeration.
PWGEN_API_NO_MEMORY Not enough memory.
PWGEN_API_MAX_LEVEL The maximum number of authorization levels has been
reached (1000).
PWGEN_API_EXIST_LEVEL The selected authorization level already exists.
PWGEN_API_I_CREATE Error creating new data.

Required files
usegenap.h
usegen.lib

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 645
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

usegen.dll

See also
Overview of the functions (Page 621)

2.5.6.2 PWGENCheckPermission (RT Professional)

Description
The function checks whether the user has the operator authorizations for the specified
authorization level.

Declaration

BOOL PWGENCheckPermission(
LPCTSTR username,
DWORD permlevel,
LPCMN_ERROR error )

Parameters

username
Name of the user

permlevel
Number of the authorization to be checked

error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
The operator authorization for the authorization level of the user is available.

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


646 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Error messages

PWGEN_API_INVALID_PARAM A function parameter is incorrect or missing.


PWGEN_API_ERR_SUPPLY An unspecified error has occurred.
PWGEN_API_NO_INTERFACE No connection to the UserAdminASO interface.
PWGEN_API_NO_CONNECTION No PWGENConnect has been executed.
PWGEN_API_I_ENUM Error in enumeration.
PWGEN_API_NO_MEMORY Not enough memory.
PWGEN_API_NO_LEVEL Cannot find authorization level.
PWGEN_API_I_READ Error reading.
PWGEN_API_NO_PERM No authorization granted.

Required files
usegenap.h
usegen.lib
usegen.dll

See also
Overview of the functions (Page 621)

2.5.6.3 PWGENDeletePermLevel (RT Professional)

Description
Deletes the authorization level specified by levelNumber from the user authorization matrix.

Declaration

BOOL PWGENDeletePermLevel (
int levelNumber,
LPCMN_ERROR error )

Parameters

levelNumber
Number of the authorization to be deleted

error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 647
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Return value

TRUE
Authorization level deleted

FALSE
Error

Error messages

PWGEN_API_INVALID_PARAM A function parameter is incorrect or missing.


PWGEN_API_ERR_SUPPLY An unspecified error has occurred.
PWGEN_API_NO_INTERFACE No connection to the UserAdminASO interface.
PWGEN_API_NO_CONNECTION No PWGENConnect has been executed.
PWGEN_API_I_ENUM Error in enumeration.
PWGEN_API_NO_MEMORY Not enough memory.
PWGEN_API_NO_LEVEL Cannot find authorization level.
PWGEN_API_I_DELETE Error deleting data.

Required files
usegenap.h
usegen.lib
usegen.dll

See also
Overview of the functions (Page 621)

2.5.6.4 PWGENEnumPermLevels (RT Professional)

Description
The function reads the configured authorization levels, calls the callback function for each level
and returns the number of authorization levels in dwCount.

Declaration

BOOL PWGENEnumPermLevels (
LPDWORD dwCount,
PWGEN_ENUM_LEVELS_CALLBACK cfn,
PVOID userdata,
LPCMN_ERROR error )

WinCC Professional V13 SP2 – Programming reference


648 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Parameters

dwCount
Pointer to the location where the number of authorization levels should be stored.

cfn
Your callback function that receives the information. If cfn == NULL, only authorizations are
counted.

userdata
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

error
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Authorization levels listed

FALSE
Error

Error messages

PWGEN_API_INVALID_PARAM A function parameter is incorrect or missing.


PWGEN_API_ERR_SUPPLY An unspecified error has occurred.
PWGEN_API_NO_INTERFACE No connection to the UserAdminASO interface.
PWGEN_API_NO_CONNECTION No PWGENConnect has been executed.
PWGEN_API_I_ENUM Error in enumeration.
PWGEN_API_NO_MEMORY Not enough memory.

Required files
usegenap.h
usegen.lib
usegen.dll

Related functions

PWGEN_ENUM_LEVELS_CALLBACK List authorizations (callback)


(Page 651)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 649
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

See also
PWGEN_ENUM_LEVELS_CALLBACK (Page 651)
Overview of the functions (Page 621)

2.5.6.5 PWGEN_ENUM_LEVELS_CALLBACK (RT Professional)

Description
In order to evaluate the authorization levels listed by the system, you must provide a
PWGEN_ENUM_LEVELS_CALLBACK type callback function.

Declaration

BOOL ( * PWGEN_ENUM_LEVELS_CALLBACK) (
LPWGEN_LEVELINFO lpLevelInfo,
PVOID lpUser);

Parameters

lpLevelInfo
Pointer to a PWGEN_LEVELINFO (Page 625) type structure with the data of the authorization
level.

lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
Authorization levels listed

FALSE
Error

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

WinCC Professional V13 SP2 – Programming reference


650 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Required files
usegenap.h

Related functions

PWGENEnumPermLevels (Page 648) List authorization levels

See also
PWGENEnumPermLevels (Page 648)
PWGEN_LEVELINFO (Page 625)
Overview of the functions (Page 621)

2.5.6.6 PWGENReadUserPerm (RT Professional)

Description
You can use this function to determine the area for which a user has operator authorizations
on a certain authorization level.

Declaration

BOOL PWGENReadUserPerm(
LPCTSTR username,
BOOL is_user,
int levelnumber,
LPBYTE freigabe,
LPDWORD areaperms )

Parameters

username
Name of the user or user group

is_user
is_user indicates whether username involves a user of a user group.

TRUE User
FALSE User group

levelnumber
Number of the authorization to be read

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 651
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

freigabe
If freigabe = 1, the user has operator authorization for all areas on this authorization level.

areaperms
The areas are characterized with the 32 bits of areaperm. If a user has authorization for an
area, the corresponding bit is set. The least significant bit corresponds to to the first area.

Return value

TRUE
Operator authorizations determined

FALSE
Error

Required files
usegenap.h
usegen.lib
usegen.dll

See also
Overview of the functions (Page 621)

2.5.6.7 PWRTCheckPermission (RT Professional)

Description
Checks whether the logged-on user has operator authorization for the given authorization.

Declaration

BOOL PWRTCheckPermission (
DWORD permlevel,
DWORD suppress_messagebox )

Parameters

permlevel
Number of the authorization level to be checked

WinCC Professional V13 SP2 – Programming reference


652 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

suppress_messagebox
No dialog is displayed with suppress_messagebox != 0.

Return value

TRUE
Authorization granted

FALSE
Authorization not granted

Required files
pwrt_api.h
pass_s.lib
useadmin.dll

Examples
PWRT check permission (Page 669)"PWRTBunch.cpp"

See also
PWRT check permission (Page 669)
Overview of the functions (Page 621)

2.5.6.8 PWRTCheckPermissionOnPicture (RT Professional)

Description
Checks whether the logged-on user has operator authorization for the given authorization.

Declaration

BOOL PWRTCheckPermissionOnPicture (
DWORD permlevel,
LPCTSTR picture_name,
DWORD suppress_messagebox,
LPCMN_ERROR lperr )

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 653
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Parameters

permlevel
Number of the authorization to be checked.

picture_name
Name of the screen that contains the object to be tested.

suppress_messagebox
No dialog is displayed with suppress_messagebox != 0.

lperr
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Authorization granted

FALSE
Authorization not granted

Required files
pwrt_api.h
pass_s.lib
useadmin.dll

Examples
Checks admission of a certain level for a screen (Page 670)"PWRTBunch.cpp"

See also
Checks admission of a certain level for a screen (Page 670)
Overview of the functions (Page 621)

2.5.6.9 PWRTPermissionLevelDialog (RT Professional)

Description
You should open the dialog for selecting authorizations using the
PWRTPermisssionLevelDialogEx function, because then a redraw is performed when you
move the dialog window.

WinCC Professional V13 SP2 – Programming reference


654 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Declaration

LONG PWRTPermissionLevelDialog (
)

Parameters
None

Related functions

PWRTPermissionLevelDialogEx (Page 656) Select authorization for via dialog

Examples
Authorization level query through a dialog with specifying a possible error
(Page 672)"PWRTBunch.cpp"

See also
Authorization level query through a dialog with specifying a possible error (Page 672)
PWRTPermissionLevelDialogEx (Page 656)
PWRTPermissionToString (Page 657)
Overview of the functions (Page 621)

2.5.6.10 PWRTPermissionLevelDialogEx (RT Professional)

Description
Protecting the usability of objects made in WinCC through dialogue to select a rating.
PWRTPermissionLevelDialogEx displays a corresponding dialog that offers the available
authorizations for selection.

Declaration

LONG PWRTPermissionLevelDialogEx (
HWND hParentWnd,
CMN_ERROR *lpErr)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 655
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Parameters

hParentWnd
Handle to the parent of the dialog box.

lpErr
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value
0-999: Authorization level
-1: Dialog closed with Cancel.

Required files
pwrt_api.h
pass_s.lib
useadmin.dll

Example
Authorization level query through a dialog with specifying a possible error
(Page 672)"PWRTBunch.cpp"

See also
PWRTPermissionLevelDialog (Page 654)
Authorization level query through a dialog with specifying a possible error (Page 672)
Overview of the functions (Page 621)

2.5.6.11 PWRTPermissionToString (RT Professional)

Description
Determines the description associated with an authorization level.

Declaration

BOOL PWRTPermissionToString (
LONG perm,
LPTSTR string,
int bufsize )

WinCC Professional V13 SP2 – Programming reference


656 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Parameters

perm
Authorization level whose description is to be determined.

string
Pointer to the buffer for recording the description.

bufsize
Size of the buffer

Return value

TRUE
Description successfully transferred.

FALSE
Description could not be determined.

Required files
pwrt_api.h
pass_s.lib
useadmin.dll

Related functions

PWRTPermissionLevelDialog (Page 654) Select authorization level

Examples
Gets a string associated with the permission number (Page 671). "PWRTBunch.cpp"

See also
PWRTPermissionLevelDialog (Page 654)
Gets a string associated with the permission number (Page 671)
Overview of the functions (Page 621)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 657
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

2.5.7 Functions for logon, logoff (RT Professional)

2.5.7.1 PWRTGetCurrentUser (RT Professional)

Description
Determines the user name of the current logged-on user.

Declaration

BOOL PWRTGetCurrentUser (
LPTSTR dest,
int bufsize )

Parameters

dest
Data buffer for receiving the user name

bufsize
Size of the data buffer in bytes

Return value

TRUE
User name successfully transferred

FALSE
No user is logged on

Required files
pwrt_api.h
pass_s.lib
useadmin.dll

Examples
Return the name of the current user (Page 673)"PWRTBunch.cpp"

WinCC Professional V13 SP2 – Programming reference


658 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

See also
Return the name of the current user (Page 673)
Overview of the functions (Page 621)

2.5.7.2 PWRTGetLoginPriority (RT Professional)

Description
Logon check without dialog.

Declaration

LONG PWRTGetLoginPriority (
)

Parameters
None

Return value
Priority level:

LOGIN_STANDARD (value: 0)
LOGIN_CARD (value: 1)
LOGIN_KEYSWITCH (value: 2)

Required files
pwrt_api.h
pass_s.lib
useadmin.dll

Examples
Queries the current logon priority (Page 674)"PWRTBunch.cpp"

See also
Queries the current logon priority (Page 674)
Overview of the functions (Page 621)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 659
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

2.5.7.3 PWRTIsLoggedInByCard (RT Professional)

Description
Determines whether the user is logged on via smart card.

Declaration

BOOL PWRTIsLoggedInByCard (
)

Parameters
None

Return value

TRUE
User logged on with smart card

FALSE
Users not logged on with smart card or not logged on

Required files
pwrt_api.h
pass_s.lib
useadmin.dll

Examples
Checks if the user has been logged on by card (Page 674)"PWRTBunch.cpp"

See also
Checks if the user has been logged on by card (Page 674)
Overview of the functions (Page 621)

WinCC Professional V13 SP2 – Programming reference


660 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

2.5.7.4 PWRTLogin (RT Professional)

Description
Displays the logon dialog and loads the user data into the shared memory when logon is
successful.

Declaration

BOOL PWRTLogin (
TCHAR monitor )

Parameters

monitor
Monitor on which the dialog is shown. The value is not numeric; it is specified in TCHAR format,
i.e. '1' for Monitor 1.

Return value

TRUE
Dialog open. The function does not wait for the dialog to close.

FALSE
Dialog not open

Comment
In addition to manually entering the logon data, you can also log on with a smart card. The
card reader is connected directly to the OS. If no valid card is connected when the function is
executed, the logon dialog automatically disappears.

Required files
pwrt_api.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 661
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

pass_s.lib
useadmin.dll

Related functions

PWRTSilentLogin (Page 665) Logon

Examples
PWRT login - dialog provided by WinCC itself (Page 675)"PWRTBunch.cpp"

See also
PWRTSilentLogin (Page 665)
PWRT login - dialog provided by WinCC itself (Page 675)
PWRTSilentLoginEx (Page 666)
Overview of the functions (Page 621)

2.5.7.5 PWRTLogout (RT Professional)

Description
The function causes a flag to be set at logoff in the shared memory.

Declaration

BOOL PWRTLogout (
)

Parameters
None

Return value

TRUE
Logoff successfully passed to PassDBRT.

FALSE
Logoff rejected (for example, PassDBRT not available, ServiceMode, etc.).

WinCC Professional V13 SP2 – Programming reference


662 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Required files
pwrt_api.h
pass_s.lib
useadmin.dll

Related functions

PWRTLogoutEx (Page 664) Log off user with priority level

Examples
PWRT logoff (Page 676)"PWRTBunch.cpp"

See also
PWRT logoff (Page 676)
PWRTLogoutEx (Page 664)
Overview of the functions (Page 621)

2.5.7.6 PWRTLogoutEx (RT Professional)

Description
The function causes a flag to be set at logoff in the shared memory, unless the specified priority
level is too low.

Declaration

BOOL PWRTLogoutEx (
int nLevel
)

Parameters

nLevel
Priority level of the user.

Return value

TRUE
Logoff successfully passed to PassDBRT.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 663
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

FALSE
Logoff rejected (for example, PassDBRT not available, ServiceMode, etc.).

Required files
pwrt_api.h
pass_s.lib
useadmin.dll

Related functions

PWRTLogout (Page 662) User logoff

Examples
Silent logoff with priority level (Page 677)"PWRTBunch.cpp"

See also
Silent logoff with priority level (Page 677)
PWRTLogout (Page 662)
Overview of the functions (Page 621)

2.5.7.7 PWRTSilentLogin (RT Professional)

Description
In contrast to PWRTLogin, logon is not performed in a dialog. The data for the user, user name
and password are passed directly to the function.

Declaration

BOOL PWRTSilentLogin (
LPCTSTR login,
LPCTSTR password )

Parameters

login
Name of the user.

WinCC Professional V13 SP2 – Programming reference


664 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

password
Password of the user

Return value

TRUE
Logon successful

FALSE
Logon rejected

Comment
If no valid smart card is connected when the function is executed, the logon is rejected.

Required files
pwrt_api.h
pass_s.lib
useadmin.dll

Related functions

PWRTLogin (Page 661) Logon via dialog


PWRTSilentLoginEx (Page 666) Logon with priority level

Examples
Logon without using a dialog (Page 678)"PWRTBunch.cpp"

See also
PWRTLogin (Page 661)
PWRTSilentLoginEx (Page 666)
Logon without using a dialog (Page 678)
Overview of the functions (Page 621)

2.5.7.8 PWRTSilentLoginEx (RT Professional)

Description
In contrast to PWRTLogin, logon is not performed in a dialog. The data for the user (user name,
password and priority level) are passed directly to the function.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 665
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

Declaration

BOOL PWRTSilentLoginEx (
LPCTSTR login,
LPCTSTR password,
int nLevel)

Parameters

login
Name of the user.

password
Password of the user

nLevel
Priority level of the user

Return value

TRUE
Logon successful

FALSE
Logon rejected

Comment
If no valid smart card is connected when the function is executed, the logon is rejected.

Required files
pwrt_api.h
pass_s.lib
useadmin.dll

Related functions

PWRTLogin (Page 661) Logon via dialog


PWRTSilentLogin (Page 664) Logon without dialog

Examples
Silent logon with priority level (Page 679)"PWRTBunch.cpp"

WinCC Professional V13 SP2 – Programming reference


666 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

See also
PWRTSilentLogin (Page 664)
Silent logon with priority level (Page 679)
PWRTLogin (Page 661)
Overview of the functions (Page 621)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 667
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

2.5.8 Examples (RT Professional)

2.5.8.1 PWRT check permission (RT Professional)

Example

//{{ODK_EXAMPLE}PWRT check permission. (USE)}


//{{FUNCTION}PWRTCheckPermission (USE)}
//{{FUNCTION}(END)}
void CPWRTBunch::Pwrtcheckpermission()
{
BOOL bRet;
CString csOut;
CString csPermLevName;
CGetText l_PermissionLevel("Insert the permission level number:");
if(l_PermissionLevel.DoModal()==IDOK)
{
///////////////////////////////////////////////////////////////////////////////////
//////
bRet = PWRTCheckPermission( l_PermissionLevel.m_lNumber, 0L ); // 0 = show the
message box
///////////////////////////////////////////////////////////////////////////////////
//////
///////////////////////////////////////////////////////////////////////////////////
//////
bRet &= PWRTPermissionToString(l_PermissionLevel.m_lNumber,
csPermLevName.GetBuffer(1024), 1024);
///////////////////////////////////////////////////////////////////////////////////
//////
if(!bRet)
{
m_pView->Print("ERROR: ", FSIZE_FUNCMARK);
m_pView->Print("PWRTCheckPermission.\n", FSIZE_PARAMMARK, FALSE, TRUE);
csOut.Format("Level = %ld (\"%s\") - Access denied.\n",
l_PermissionLevel.m_lNumber,
csPermLevName);
m_pView->Print(csOut, FSIZE_SUBMARK);
m_pView->Print("\n");
return;
}
else
{
csOut.Format("Level = %ld (\"%s\")\n",
l_PermissionLevel.m_lNumber,
csPermLevName);
m_pView->Print("PWRTCheckPermission\n", FSIZE_FUNCMARK, TRUE);
m_pView->Print("Access approved:\n", FSIZE_PARAMMARK, FALSE, TRUE);
m_pView->Print(csOut, FSIZE_SUBMARK);
m_pView->Print("\n");
}
}
}

WinCC Professional V13 SP2 – Programming reference


668 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

//{{ODK_EXAMPLE}(END)}

See also
PWRTCheckPermission (Page 652)

2.5.8.2 Checks admission of a certain level for a screen (RT Professional)

Example

//{{ODK_EXAMPLE}Checks admission of a certain level for a screen. (USE)}


//{{FUNCTION}PWRTCheckPermissionOnPicture (USE)}
//{{FUNCTION}(END)}
void CPWRTBunch::Pwrtcheckpermissiononpicture()
{
BOOL bRet;
CMN_ERROR err;
CString csOut;
CGetText l_PermissionLevel("Enter the permission level:");
CGetText l_PictureName("Enter the picture name:", FALSE);
if(l_PermissionLevel.DoModal()==IDCANCEL)
{
return;
}
if(l_PictureName.DoModal()==IDCANCEL)
{
return;
}
///////////////////////////////////////////////////////////////////////////////////////
//
bRet=PWRTCheckPermissionOnPicture(l_PermissionLevel.m_lNumber, l_PictureName.m_csText,
0, &err);
///////////////////////////////////////////////////////////////////////////////////////
//
if(bRet)
{
csOut.Format("Picture: \"%s\"\nLevel = %ld\n",
l_PictureName.m_csText,
l_PermissionLevel.m_lNumber);
m_pView->Print("PWRTCheckPermissionOnPicture\n", FSIZE_FUNCMARK, TRUE);
m_pView->Print("Access approved:\n", FSIZE_PARAMMARK, FALSE, TRUE);
m_pView->Print(csOut, FSIZE_SUBMARK);
m_pView->Print("\n");
}
else
{
m_pView->PrintError(&err, "PWRTCheckPermissionOnPicture");
m_pView->PrintError("Access denied", "PWRTCheckPermissionOnPicture");
}
}
//{{ODK_EXAMPLE}(END)}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 669
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

See also
PWRTCheckPermissionOnPicture (Page 653)

2.5.8.3 Gets a string associated with the permission number (RT Professional)

Overview
//{{ODK_EXAMPLE}Gets a string associated with the permission number.
(USE)}
//{{FUNCTION}PWRTPermissionToString (USE)}
//{{FUNCTION}(END)}
void CPWRTBunch::Pwrtpermissiontostring()
{
BOOL bRet;
CString csOut;
CString csPermLevName;
CGetText l_PermissionLevel("Insert the permission level
number:");
if(l_PermissionLevel.DoModal()==IDOK)
{
////////////////////////////////////////////////////////////
/////////////////////////////
bRet=PWRTPermissionToString(l_PermissionLevel.m_lNumber,
csPermLevName.GetBuffer(1024), 1024);
////////////////////////////////////////////////////////////
/////////////////////////////
if(!bRet)
{
m_pView->Print("ERROR: ", FSIZE_FUNCMARK);
m_pView->Print("PWRTPermissionToString.\n",
FSIZE_PARAMMARK, FALSE, TRUE);
m_pView->Print("\n");
return;
}
csOut.Format("PWRTPermissionToString( %ld, buffer )\n",
l_PermissionLevel.m_lNumber);
m_pView->Print(csOut, FSIZE_FUNCMARK, TRUE);
m_pView->Print("Permission level name:\n", FSIZE_PARAMMARK,
FALSE, TRUE);
csOut.Format("buffer = \"%s\"\n", csPermLevName);
m_pView->Print(csOut, FSIZE_SUBMARK);
m_pView->Print("\n");
}
}
//{{ODK_EXAMPLE}(END)}

See also
PWRTPermissionToString (Page 656)

WinCC Professional V13 SP2 – Programming reference


670 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

2.5.8.4 Authorization level query through a dialog with specifying a possible error (RT
Professional)

Example

//{{ODK_EXAMPLE}Authorization level query through a dialog with specifying a possible


error. (USE)}
//{{FUNCTION}PWRTPermissionLevelDialogEx (USE)}
//{{FUNCTION}(END)}
void CPWRTBunch::PWRTxPermissionLevelDialogEx()
{
long lLevel;
CMN_ERROR err;
CString csOut;
///////////////////////////////////////////////////////////////////////////////////////
//
lLevel=PWRTPermissionLevelDialogEx(*m_pView, &err);
///////////////////////////////////////////////////////////////////////////////////////
//
if(m_pView->PrintError(&err, "PWRTPermissionLevelDialogEx"))
{
m_pView->Print("lLevel = PWRTPermissionLevelDialogEx(...)\n", FSIZE_FUNCMARK, TRUE);
m_pView->Print("Permission level number chosen:\n", FSIZE_PARAMMARK, FALSE, TRUE);
csOut.Format("lLevel = %ld\n", lLevel);
m_pView->Print(csOut, FSIZE_SUBMARK);
m_pView->Print("\n");
}
}
//{{ODK_EXAMPLE}(END)}

See also
PWRTPermissionLevelDialog (Page 654)
PWRTPermissionLevelDialogEx (Page 655)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 671
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

2.5.8.5 Return the name of the current user (RT Professional)

Example

//{{ODK_EXAMPLE}Return the name of the current user. (USE)}


//{{FUNCTION}PWRTGetCurrentUser (USE)}
//{{FUNCTION}(END)}
void CPWRTBunch::Pwrtgetcurrentuser()
{
BOOL bRet;
CString csUsername;
CString csOut;
///////////////////////////////////////////////////////////////////////////////////////
//
bRet=PWRTGetCurrentUser(csUsername.GetBuffer(1024), 1023);
///////////////////////////////////////////////////////////////////////////////////////
//
if(!bRet)
{
m_pView->Print("ERROR: ", FSIZE_FUNCMARK, TRUE);
m_pView->Print("PWRTGetCurrentUser.\n", FSIZE_PARAMMARK, FALSE, TRUE);
m_pView->Print("Failed to get current user's name.\n", FSIZE_SUBMARK);
m_pView->Print("\n");
return;
}
m_pView->Print("PWRTGetCurrentUser\n", FSIZE_FUNCMARK, TRUE);
m_pView->Print("Current user's name:\n", FSIZE_PARAMMARK, FALSE, TRUE);
csOut.Format("Name = \"%s\"\n", csUsername);
m_pView->Print(csOut, FSIZE_SUBMARK);
m_pView->Print("\n");
}
//{{ODK_EXAMPLE}(END)}

See also
PWRTGetCurrentUser (Page 658)

WinCC Professional V13 SP2 – Programming reference


672 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

2.5.8.6 Queries the current logon priority (RT Professional)

Example

//{{ODK_EXAMPLE}Queries the current logon priority. (USE)}


//{{FUNCTION}PWRTGetLoginPriority (USE)}
//{{FUNCTION}(END)}
void CPWRTBunch::Pwrtgetloginpriority()
{
long lPriority;
CString csOut;
CMap<long, LONG, CString, CString> l_map(3);
l_map[LOGIN_STANDARD]=CString("LOGIN_STANDARD");
l_map[LOGIN_CARD]=CString("LOGIN_CARD");
l_map[LOGIN_KEYSWITCH]=CString("LOGIN_KEYSWITCH");
///////////////////////////////////////////////////////////////////////////////////////
//
lPriority=PWRTGetLoginPriority();
///////////////////////////////////////////////////////////////////////////////////////
//
if(lPriority!=-1)
{
m_pView->Print("PWRTGetLoginPriority\n", FSIZE_FUNCMARK, TRUE);
m_pView->Print("Priority returned:\n", FSIZE_PARAMMARK, FALSE, TRUE);
csOut.Format("Priority level = %s\n", l_map[lPriority]);
m_pView->Print(csOut, FSIZE_SUBMARK);
m_pView->Print("\n");
}
}
//{{ODK_EXAMPLE}(END)}

See also
PWRTGetLoginPriority (Page 659)

2.5.8.7 Checks if the user has been logged on by card (RT Professional)

Overview

//{{ODK_EXAMPLE}Checks if the user has been logged on by card. (USE)}


//{{FUNCTION}PWRTIsLoggedInByCard (USE)}
//{{FUNCTION}(END)}
void CPWRTBunch::Pwrtisloggedinbycard()
{
BOOL bRet;
CString csOut;
////////////////////////////////////////////////////////////////
/////////////////////////
bRet=PWRTIsLoggedInByCard();

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 673
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

////////////////////////////////////////////////////////////////
/////////////////////////
if(bRet)
{
m_pView->Print("PWRTIsLoggedInByCard\n", FSIZE_FUNCMARK,
TRUE);
m_pView->Print("User detected logged on by card.\n",
FSIZE_PARAMMARK, FALSE, TRUE);
}
else
{
m_pView->PrintError(_T("No user logged on by card or no user
logged on."),
_T("PWRTIsLoggedInByCard()"));
}
}
//{{ODK_EXAMPLE}(END)}

See also
PWRTIsLoggedInByCard (Page 660)

2.5.8.8 PWRT login - dialog provided by WinCC itself (RT Professional)

Example

//{{ODK_EXAMPLE} PWRT logon dialog provided by WinCC itself. (USE)}


//{{FUNCTION}PWRTLogin (USE)}
//{{FUNCTION}(END)}
void CPWRTBunch::PWRTxLogin()
{
BOOL bRet;
///////////////////////////////////////////////////////////////////////////////////////
//
bRet=PWRTLogin(_T('1')); // it always appears on the first screen
///////////////////////////////////////////////////////////////////////////////////////
//
if(!bRet)
{
m_pView->Print("ERROR: ", FSIZE_FUNCMARK, TRUE);
m_pView->Print("PWRTLogin.\n", FSIZE_PARAMMARK, FALSE, TRUE);
m_pView->Print("General function failure.\n", FSIZE_SUBMARK);
m_pView->Print("\n");
return;
}
m_pView->Print("PWRTLogin\n", FSIZE_FUNCMARK, TRUE);
m_pView->Print("Logging on...\n", FSIZE_PARAMMARK, FALSE, TRUE);
m_pView->Print("\n");
}
//{{ODK_EXAMPLE}(END)}

WinCC Professional V13 SP2 – Programming reference


674 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

See also
PWRTLogin (Page 661)

2.5.8.9 PWRT logoff (RT Professional)

Example

//{{ODK_EXAMPLE}PWRT logoff. (USE)}


//{{FUNCTION}PWRTLogout (USE)}
//{{FUNCTION}(END)}
void CPWRTBunch::Pwrtlogout()
{
BOOL bRet;
///////////////////////////////////////////////////////////////////////////////////////
//
bRet=PWRTLogout(); // it appears on the first screen
///////////////////////////////////////////////////////////////////////////////////////
//
if(!bRet)
{
m_pView->Print("ERROR: ", FSIZE_FUNCMARK, TRUE);
m_pView->Print("PWRTLogout.\n", FSIZE_PARAMMARK, FALSE, TRUE);
m_pView->Print("General function failure.\n", FSIZE_SUBMARK);
m_pView->Print("\n");
return;
}
m_pView->Print("PWRTLogout\n", FSIZE_FUNCMARK, TRUE);
m_pView->Print("Logging off...\n", FSIZE_PARAMMARK, FALSE, TRUE);
m_pView->Print("\n");
}
//{{ODK_EXAMPLE}(END)}

See also
PWRTLogout (Page 662)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 675
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

2.5.8.10 Silent logoff with priority level (RT Professional)

Example

//{{ODK_EXAMPLE}Silent logoff with priority level. (USE)}


//{{FUNCTION}PWRTLogoutEx (USE)}
//{{FUNCTION}(END)}
void CPWRTBunch::PWRTxLogoutEx()
{
BOOL bRet;
CString csOut;
CGetText l_PriorityLevel("The priority level:");
if(l_PriorityLevel.DoModal()==IDCANCEL)
{
return;
}
///////////////////////////////////////////////////////////////////////////////////////
//
bRet=PWRTLogoutEx( l_PriorityLevel.m_lNumber);
///////////////////////////////////////////////////////////////////////////////////////
//
if(!bRet)
{
m_pView->PrintError( _T("Cannot logoff."),
_T("PWRTLogoutEx"));
}
else
{
m_pView->Print("PWRTLogoutEx\n", FSIZE_FUNCMARK, TRUE);
m_pView->Print("Logging off...\n", FSIZE_PARAMMARK, FALSE, TRUE);
csOut.Format("Priority level = %ld\n", l_PriorityLevel.m_lNumber);
m_pView->Print(csOut, FSIZE_SUBMARK);
m_pView->Print("\n");
}
}
//{{ODK_EXAMPLE}(END)}

See also
PWRTLogoutEx (Page 663)

WinCC Professional V13 SP2 – Programming reference


676 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

2.5.8.11 Logon without using a dialog (RT Professional)

Example

//{{ODK_EXAMPLE}Logs on without using a dialog. (USE)}


//{{FUNCTION}PWRTSilentLogin (USE)}
//{{FUNCTION}(END)}
void CPWRTBunch::Pwrtsilentlogin()
{
BOOL bRet;
CPassdlg l_Password("Enter name and password:");
if(l_Password.DoModal() == IDCANCEL)
{
return;
}
///////////////////////////////////////////////////////////////////////////////////////
//
bRet=PWRTSilentLogin(l_Password.m_csUsername,
l_Password.m_csPassword);
///////////////////////////////////////////////////////////////////////////////////////
//
if(!bRet)
{
m_pView->PrintError( _T("Access denied or no runtime project open."),
_T("PWRTSilentLogin"));
}
else
{
m_pView->Print("PWRTSilentLogin\n", FSIZE_FUNCMARK, TRUE);
m_pView->Print("Access approved:\n", FSIZE_PARAMMARK, FALSE, TRUE);
}
}
//{{ODK_EXAMPLE}(END)}

See also
PWRTSilentLogin (Page 664)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 677
Runtime API (RT Professional)
2.5 Functions of the user administration (RT Professional)

2.5.8.12 Silent logon with priority level (RT Professional)

Example

//{{ODK_EXAMPLE}Silent logon with priority level. (USE)}


//{{FUNCTION}PWRTSilentLoginEx (USE)}
//{{FUNCTION}(END)}
void CPWRTBunch::Pwrtsilentloginex()
{
BOOL bRet;
CString csOut;
CPassdlg l_Password("Enter name and password:");
CGetText l_PriorityLevel("Enter priority level:");
if(l_Password.DoModal() == IDCANCEL)
{
return;
}
if(l_PriorityLevel.DoModal()==IDCANCEL)
{
return;
}
///////////////////////////////////////////////////////////////////////////////////////
//
bRet=PWRTSilentLoginEx(l_Password.m_csUsername, l_Password.m_csPassword,
l_PriorityLevel.m_lNumber);
///////////////////////////////////////////////////////////////////////////////////////
//
if(!bRet)
{
m_pView->PrintError( _T("Access denied or no runtime project open."),
_T("PWRTSilentLogin"));
}
else
{
m_pView->Print("PWRTSilentLogin\n", FSIZE_FUNCMARK, TRUE);
m_pView->Print("Access approved:\n", FSIZE_PARAMMARK, FALSE, TRUE);
csOut.Format("Priority level = %ld\n", l_PriorityLevel.m_lNumber);
m_pView->Print(csOut, FSIZE_SUBMARK);
m_pView->Print("\n");
}
}
//{{ODK_EXAMPLE}(END)}

See also
PWRTSilentLoginEx (Page 665)

WinCC Professional V13 SP2 – Programming reference


678 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

2.6 Functions of the text system (RT Professional)

2.6.1 Basics (RT Professional)

2.6.1.1 Overview of the functions (RT Professional)

Declaration

TXT_ENUM_INFOTEXTS_PROC (Page 692) List info texts (callback)


TXT_ENUM_LANGUAGES_PROC (Page 699) List configured languages (callback)
TXTCloseProject (Page 683) Close text library
TXTEnumInfoText (Page 690) List info texts
TXTEnumLanguages (Page 698) List configured languages
TXTGetFont (Page 701) Determine character set of a language
TXTGetMaxTextID (Page 685) Determine text ID (maximum)
TXTOpenProject (Page 686) Open text library
TXTRTConnect (Page 687) Keep connection to text server
TXTRTDisconnect (Page 688) Connection to the text server released
TXTRTGetInfoText (Page 694) Read info texts
TXTRTGetInfoTextMC (Page 696) Read info texts from text server
TXTRTGetLanguageID (Page 704) Determine activated language
TXTRTSetLanguage (Page 705) Language switch for error message texts
TXTShowLanguagesDialog (Page 702) Display languages (installed)
TXTUpdateRuntime (Page 693) Update info texts in runtime

2.6.1.2 Error messages (RT Professional)

Overview
The following error messages can be returned by the API functions in the CMN_ERROR error
structure:

TXT_SYS_ERROR (value: 0x10000000) If this bit is set in dwError1 of er‐


ror structure CMN_ERROR,
then dwError2 contains the sys‐
tem error code.
TXT_OK (value: 0x00000000) No error occurred.
TXT_NO_CONNECT (value: 0x00000001) The database is not yet open.
TXT_CONNECT (value: 0x00000002) Error while connecting to the da‐
tabase.
TXT_UPDATE (value: 0x00000003) Error while writing to the data‐
base.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 679
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

TXT_CREATE_KEY (value: 0x00000004) The TextID could not be created.


TXT_KEY_NOT_FOUND (value: 0x00000005) The specified TextID could not
be found.
TXT_LAN‐ (value: 0x00000006) The specified language could
GUAGE_NOT_FOUND not be found.
TXT_NO_NEW_RECORD (value: 0x00000007) A new record could not be cre‐
ated (AddRecord generated an
error)
TXT_FONT_NOT_FOUND (value: 0x00000008) Font not found
TXT_TABLE_NOT_FOUND (value: 0x00000009) A database table was not found.
The dwError2 field contains
more detailed information:
TXTVERSIONINFO (value: 0x00000001) Version info table was not found.
TXTLANGUAGES (value: 0x00000002) Language table was not found.
TXTTABLE (value: 0x00000003) Text table was not found.
TXT_WRONG_PROJECT (value: 0x00000010) Wrong project name
TXT_OPEN (value: 0x00000011) Database could not be loaded.
TXT_PARAM (value: 0x00000012) Invalid parameter
TXT_DISCONNECT (value: 0x00000013) Error logging off of the database
TXT_CALLBACK (value: 0x00000014) Callback returned FALSE
TXT_ALREADY_FOUND (value: 0x00000015) Text already exists
TXT_CREATE (value: 0x00000016) Database tables could not be
created.
TXT_UPDATE_RUNTIME (value: 0x00000017) Runtime not found, or SendMes‐
sage returned NULL.
TXT_ALREADY_EXIST (value: 0x00000018) Language already exists
TXT_NO_LANGUAGE (value: 0x00000019) Invalid language specified
TXT_TEXT_LIBRARY_RUN‐ (value: 0x00000020) TEXTBIB.EXE already running;
NING opening not allowed
TXT_TABLES_ALREADY_EX‐ (value: 0x00000021) Database tables already exist.
IST Creating no longer allowed.

Text Library RT

TXT_RT_OK (value: 0x00000000) No error


TXT_RT_OPEN_MMF (value: 0x00000001) Error while opening the memory
mapped file
TXT_RT_CREATE_SERV‐ (value: 0x00000002) Error while creating the service
ICE_WINDOW window
TXT_RT_KEY_NOT_FOUND (value: 0x00000003) TextID not found
TXT_RT_NO_READ_ACCESS (value: 0x00000004) Read access to the memory
mapped file denied
TXT_RT_NO_LAN‐ (value: 0x00000005) No language found
GUAGE_FOUND
TXT_RT_LAN‐ (value: 0x00000006) Language not found
GUAGE_NOT_FOUND
TXT_RT_INTERNAL_ERROR (value: 0x00000007) Internal fault

WinCC Professional V13 SP2 – Programming reference


680 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

TXT_RT_INVALIDPARAM (value: 0x00000008) Parameter error


TXT_RT_NODEFAULTSERVER (value: 0x00000011) No default server is configured.
TXT_RT_NOLOCALSERVER (value: 0x00000012) No local server is available.
TXT_RT_NOSERVER (value: 0x00000013) No default server is configured,
and no local server is available.
TXT_RT_NOMC (value: 0x00000014) This is not a multiclient project
(not used here)
TXT_RT_NOMCDEFAULT‐ (value: 0x00000015) This is not a multiclient project,
SERVER but "@default" was given as a
server prefix.

2.6.1.3 Language codes (RT Professional)

Language codes of the text system


Only the SUBLANG_DEFAULT languages of Windows are supported in WinCC. As a result,
the the following values can be assigned to the dwLocaleID parameter:

LANG_ARABIC 0x0401
LANG_AFRIKAANS 0x0436
LANG_ALBANIAN 0x041C
LANG_BASQUE 0x042D
LANG_BULGARIAN 0x0402
LANG_BELARUSIAN 0x0423
LANG_CATALAN 0x0403
LANG_CHINESE 0x0804
LANG_CROATIAN 0x041A
LANG_CZECH 0x0405
LANG_DANISH 0x0406
LANG_DUTCH 0x0413
LANG_ENGLISH 0x0409
LANG_ESTONIAN 0x0425
LANG_FAEROESE 0x0438
LANG_FARSI 0x0429
LANG_FINNISH 0x040B
LANG_FRENCH 0x040C
LANG_GERMAN 0x0407
LANG_GREEK 0x0408
LANG_HEBREW 0x040D
LANG_HUNGARIAN 0x040E
LANG_ICELANDIC 0x040F
LANG_INDONESIAN 0x0421
LANG_ITALIAN 0x0410
LANG_JAPANESE 0x0411
LANG_KOREAN 0x0412

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 681
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

LANG_LATVIAN 0x0426
LANG_LITHUANIAN 0x0427
LANG_NORWEGIAN 0x0414
LANG_POLISH 0x0415
LANG_PORTUGUESE 0x0416
LANG_ROMANIAN 0x0418
LANG_RUSSIAN 0x0419
LANG_SLOVAK 0x041B
LANG_SLOVENIAN 0x0424
LANG_SPANISH 0x040A
LANG_SWEDISH 0x041D
LANG_THAI 0x041E
LANG_TURKISH 0x041F
LANG_UKRAINIAN 0x0422

Here, the upper 4 bytes (0x04..) designate the language as SUBLANG_DEFAULT language

2.6.2 General functions (RT Professional)

2.6.2.1 TXTCloseProject (RT Professional)

Description
Closes the project database upon successful execution.

Declaration

BOOL TXTCloseProject (
LPCTSTR lpszProjectFile,
LPCMN_ERROR lpdmError );

Parameters

lpszProjectFile
Pointer to the name of the project file including path and extension.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


682 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

Return value

TRUE
Text library closed.

FALSE
Error

Comment
The TXTOpenProject function increments an internal reference counter with each call. This
counter is decremented with call of TXTCloseProject. The text library is closed only when the
reference counter returns to 0.
Therefore, the same number of TXTCloseProject must always be called, otherwise an
exception error will occur when the application closes.

Note
The call may not be used in the destructor of an application (EXE, DLL, OCX, etc.). Due to
Microsoft-specific mechanisms, this can cause the call to freeze and thereby crash the
program.

Error messages

TXT_DISCONNECT Error logging off of the database

Required files
text_cs.h
text_cs.lib
text_cs.dll

Related functions

TXTOpenProject (Page 686) Opens the text library

Examples
Get infotext (Page 707)"TX01.cpp"
Enumerate infotexts (Page 709)"TX01.cpp"

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 683
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

See also
TXTOpenProject (Page 686)
Get infotext (Page 707)
Enumerate infotexts (Page 709)
Overview of the functions (Page 679)

2.6.2.2 TXTGetMaxTextID (RT Professional)

Description
Records the highest text ID that is kept in the DLL.

Declaration

BOOL TXTGetMaxTextID (
LPLONG lplMaxTextID,
LPCMN_ERROR lpdmError );

Parameters

lplMaxTextID
Pointer to the buffer in which the text ID should be stored.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Maximum text ID determined

FALSE
Error

Required files
text_cs.h
text_cs.lib
text_cs.dll

WinCC Professional V13 SP2 – Programming reference


684 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

See also
Overview of the functions (Page 679)

2.6.2.3 TXTOpenProject (RT Professional)

Description
Opens the database upon successful execution.

Declaration

BOOL TXTOpenProject (
LPCTSTR lpszProjectFile,
LPCTSTR lpszDSNName,
BOOL fExclusive,
LPCMN_ERROR lpdmError );

Parameters

lpszProjectFile
Pointer to the name of the project file including path and extension.

lpszDSNName
Pointer on the name of the data source.

fExclusive
If TRUE, TEXTBIB.EXE cannot be started, because another program is accessing the text
library, for example. If TEXTBIB.EXE has already started, the call is rejected.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Database open

FALSE
Error

Comment
If no text library tables are available, they are generated new.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 685
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

Each time the function called a reference counter is incremented. The same number as
TXTCloseProject must be present to close. Otherwise, an exception error can occur when the
application closes.

Error messages

TXT_CONNECT Error connecting to the database.


TXT_TABLE_NOT_FOUND A database table was not found. The dwError2 field contains
more detailed information:
TXT_TEXT_LIBRARY_RUNNING TEXTBIB.EXE has already started
TXT_WRONG_PROJECT Wrong project name

Required files
text_cs.h
text_cs.lib
text_cs.dll

Related functions

TXTCloseProject (Page 682) Closes the text library

Examples
Get infotext (Page 707)"TX01.cpp"
Enumerate infotexts (Page 709)"TX01.cpp"

See also
TXTCloseProject (Page 682)
Get infotext (Page 707)
Enumerate infotexts (Page 709)
Overview of the functions (Page 679)

2.6.2.4 TXTRTConnect (RT Professional)

Description
Establishes a connection to the text server. This function accelerates the execution of TXTRT
functions. The connection to the text server is then not made for each call and closed again
at the end.

WinCC Professional V13 SP2 – Programming reference


686 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

Declaration

BOOL TXTRTConnect ( );

Parameters
None

Return value

TRUE
Connects to the text server established

FALSE
Error

Comment
Before closing the application, the connection must always be closed with TXTRTDisconnect
to avoid subsequent malfunction in the system.

Required files
text_rt.h
text_rt.lib
text_rt.dll

Related functions

TXTRTDisconnect (Page 688) Connection to the text server released

See also
TXTRTDisconnect (Page 688)
Overview of the functions (Page 679)

2.6.2.5 TXTRTDisconnect (RT Professional)

Description
Closes a connection to the text server that was made with TXTRTConnect.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 687
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

Declaration

BOOL TXTRTDisconnect ( );

Parameters
None

Return value

TRUE
Connects to the text server established

Comment
This function stops the acceleration provided by the TXTRT functions and always returns
TRUE.
Subsequently called TXTRT functions then establish a new connection to the text server for
each call and then close it.
If TXTRTConnect is used and no TXTRTDisconnect is executed before closing the application,
a malfunction may subsequently occur in the system.

Note
The call may not be used in the destructor of an application (EXE, DLL, OCX, etc.). Due to
Microsoft-specific mechanisms, this can cause the call to freeze and thereby crash the
program.

Required files
text_rt.h
text_rt.lib
text_rt.dll

Related functions

TXTRTConnect (Page 686) Keep connection to text server

See also
TXTRTConnect (Page 686)
Overview of the functions (Page 679)

WinCC Professional V13 SP2 – Programming reference


688 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

2.6.3 Functions for processing infotext (RT Professional)

2.6.3.1 TXTEnumInfoText (RT Professional)

Description
Lists all infotext that meets the filter criterion in lpszFilter.

Declaration

BOOL TXTEnumInfoText (
LPCTSTR lpszProjectFile,
DWORD dwLocale,
LPDWORD lpdwItems,
LPCTSTR lpszFilter,
TXT_ENUM_INFOTEXTS_PROC lpfnEnum,
LPVOID lpvUser,
LPCMN_ERROR lpdmError );

Parameters

lpszProjectFile
Pointer to the name of the project file including path and extension.

dwLocale
Language code of the language, the infotext of which should be enumerated.

lpdwItems
Pointer to a double word of the application, which contains the number of enumerated infotexts
after the call.

lpszFilter
Pointer to the condition of an SQL statement for the LIKE operator.

lpfnEnum
Your callback function that receives the infotext.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 689
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

Return value

TRUE
Infotext listed

FALSE
Error

Comment
If lpszFilter == NULL or an empty string is passed, all infotexts of the language are enumerated.
Empty, unassigned info texts can also be enumerated and included using lpdwItems.

Error messages

TXT_CALLBACK Callback returns FALSE


TXT_LANGUAGE_NOT_FOUND The specified language could not be found.
TXT_NO_CONNECT The database is not yet open.
TXT_NO_LANGUAGE Invalid language specified
TXT_WRONG_PROJECT Wrong project name

Required files
text_cs.h
text_cs.lib
text_cs.dll

Related functions

TXT_ENUM_INFOTEXTS_PROC (Page 692) List infotext (callback)

Examples
Enumerate infotexts (Page 709)"TX01.cpp"

See also
TXT_ENUM_INFOTEXTS_PROC (Page 692)
Enumerate infotexts (Page 709)
Overview of the functions (Page 679)

WinCC Professional V13 SP2 – Programming reference


690 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

2.6.3.2 TXT_ENUM_INFOTEXTS_PROC (RT Professional)

Description
In order to evaluate the listed tool tips, you must provide a TXT_ENUM_INFOTEXTS_PROC
type callback function.

Declaration

BOOL ( * TXT_ENUM_INFOTEXTS_PROC) (
DWORD dwTextID,
LPCTSTR lpszInfoText,
LPVOID lpvUser );

Parameters

dwTextID
ID of the text to which lpszInfotext refers.

lpszInfoText
Pointer to the tool tip that was transferred by the calling function.

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
The enumeration is continued

FALSE
The enumeration is cancelled

Comment

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 691
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

Required files
text_cs.h
text_cs.lib
text_cs.dll

Related functions

TXTEnumInfoText (Page 689) List infotext

Examples
Enumerate infotexts (Page 709)"TX01.cpp"

See also
TXTEnumInfoText (Page 689)
Enumerate infotexts (Page 709)
Overview of the functions (Page 679)

2.6.3.3 TXTUpdateRuntime (RT Professional)

Description
The text from the text library are reloaded in runtime.

Declaration

BOOL TXTUpdateRuntime (
LPCTSTR lpszProjectFile,
HWND hwndParent,
LPCMN_ERROR lpdmError );

Parameters

lpszProjectFile
Pointer to the name of the project file including path and extension.

hwndParent
Handle to the parent window

WinCC Professional V13 SP2 – Programming reference


692 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Infotext updated

Comment
No update is performed for text reference tags. The function always returns TRUE.

Required files
text_cs.h
text_cs.lib
text_cs.dll

See also
Overview of the functions (Page 679)

2.6.3.4 TXTRTGetInfoText (RT Professional)

Description
Upon successful execution, this function fills the buffer passed to lpszBuffer with the text
described by dwTextID. If the passed buffer is smaller than the text length (buffer length in
characters in pdwSize), the text is accordingly truncated. The return value is still TRUE. If NULL
is passed in lpszBuffer, the function determines the required buffer size and stores it in pdwSize.

Declaration

BOOL TXTRTGetInfoText (
DWORD dwTextID,
LPTSTR lpszBuffer,
LPDWORD pdwSize,
LPCMN_ERROR lpdmError );

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 693
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

Parameters

dwTextID
ID of the text to be read

lpszBuffer
Pointer to a buffer in which the infotext should be stored.

pdwSize
Pointer to the DWORD, which contains the buffer size

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information to this structure if an error occurs.

Return value

TRUE
Infotext determined

FALSE
Error

Comment

Error messages

TXT_RT_OPEN_MMF Error while opening the memory mapped file


TXT_RT_CREATE_SERVICE_WINDOW Error while creating the service window
TXT_KEY_NOT_FOUND The specified TextID could not be found.
TXT_RT_NO_READ_ACCESS Read access to the memory mapped file denied

Required files
text_rt.h
text_rt.lib
text_rt.dll

Related functions

AUTOHOTSPOT Read tool tips from the text server

WinCC Professional V13 SP2 – Programming reference


694 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

Examples
Get infotext (Page 707) "TX01.cpp"

See also
Get infotext (Page 707)
Overview of the functions (Page 679)

2.6.3.5 TXTRTGetInfoTextMC (RT Professional)

Description
Fetches a text, for example, a tooltip from the specified text server or from the C text list. Upon
successful execution, this function fills the buffer passed to lpszBuffer with the text described
by dwTextID. If the passed buffer is smaller than the text length (buffer length in characters in
pdwSize), the text is accordingly truncated. The return value is still TRUE. If NULL is passed
in lpszBuffer, the function determines the required buffer size and stores it in pdwSize.

Declaration

BOOL TXTRTGetInfoTextMC (
DWORD dwTextID,
LPTSTR lpszBuffer,
LPDWORD pdwSize,
LPTSTR lpszServer,
LPCMN_ERROR lpdmError );

Parameter

dwTextID
ID of the text to be read

lpszBuffer
Pointer to a buffer in which the infotext should be stored.

pdwSize
Pointer to the DWORD, which contains the buffer size

lpszServer
Pointer to the symbolic name of the text server (without server delimiter, :: )

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information to this structure if an error occurs.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 695
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

Return value

TRUE
Infotext determined

FALSE
Error

Comment
This function only works with multiclient projects

Error messages

TXT_RT_OPEN_MMF Error while opening the memory mapped file


TXT_RT_CREATE_SERVICE_WINDOW Error while creating the service window
TXT_KEY_NOT_FOUND The specified TextID could not be found.
TXT_RT_NO_READ_ACCESS Read access to the memory mapped file denied
TXT_RT_NODEFAULTSERVER No default server is configured.
TXT_RT_NOLOCALSERVER No local server is available.
TXT_RT_NOSERVER No default server is configured and no local server is
available.
TXT_RT_NOMCDEFAULTSERVER This is not a multiclient project, but "@default" was given
as a server prefix.

Required files
text_rt.h
text_rt.lib
text_rt.dll

Related functions

AUTOHOTSPOT Read tool tips

See also
Overview of the functions (Page 679)

WinCC Professional V13 SP2 – Programming reference


696 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

2.6.4 Functions for processing languages (RT Professional)

2.6.4.1 TXTEnumLanguages (RT Professional)

Description
Calls the passed callback function for all configured languages.

Declaration

BOOL TXTEnumLanguages (
LPCTSTR lpszProjectFile,
LPDWORD lpdwItems,
TXT_ENUM_LANGUAGES_PROC lpfnEnum,
LPVOID lpvUser,
LPCMN_ERROR lpdmError );

Parameters

lpszProjectFile
Pointer to the name of the project file including path and extension.

lpdwItems
Pointer to a double word of the application, which contains the number of enumerated
languages after the call.

lpfnEnum
Your callback function that receives the configured languages.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function, but is made
available again in the callback function.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Configured languages listed

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 697
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

Error messages

TXT_CALLBACK Callback returns FALSE


TXT_NO_CONNECT The database is not yet open.
TXT_WRONG_PROJECT Wrong project name

Required files
text_cs.h
text_cs.lib
text_cs.dll

Related functions

TXT_ENUM_LANGUAGES_PROC (Page 699) List configured languages (callback)

Examples
Enumerate infotexts (Page 709)"TX01.cpp"

See also
TXT_ENUM_LANGUAGES_PROC (Page 699)
Enumerate infotexts (Page 709)
Overview of the functions (Page 679)

2.6.4.2 TXT_ENUM_LANGUAGES_PROC (RT Professional)

Description
In order to evaluate the listed languages, you must provide a
TXT_ENUM_LANGUAGES_PROC type callback function.

Declaration

BOOL ( * TXT_ENUM_LANGUAGES_PROC) (
DWORD dwLocaleID,
LPCTSTR lpszName,
LPVOID lpvUser );

WinCC Professional V13 SP2 – Programming reference


698 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

Parameters

dwLocaleID
Language code

lpszName
Pointer to the name of the language.

lpvUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
The enumeration is continued.

FALSE
The enumeration is cancelled.

Comment

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or stack overflows:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
text_cs.h

Related functions

TXTEnumLanguages (Page 697) List configured languages

Examples
Enumerate infotexts (Page 709)"TX01.cpp"

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 699
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

See also
TXTEnumLanguages (Page 697)
Enumerate infotexts (Page 709)
Overview of the functions (Page 679)

2.6.4.3 TXTGetFont (RT Professional)

Description
Upon successful execution, fills the LOGFONT structure passed in lplf with the font set for the
desired language.

Declaration

BOOL TXTGetFont (
LPCTSTR lpszProjectFile,
DWORD dwLocale,
LPLOGFONT lplf,
LPCMN_ERROR lpdmError );

Parameters

lpszProjectFile
Pointer to the name of the project file including path and extension.

dwLocale
Language code of the language, the font of which should be fetched

lplf
Pointer to a Windows-specific LOGFONT type structure with information about a character set.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Character set determined

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


700 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

Error messages

TXT_NO_CONNECT The database is not yet open.


TXT_NO_LANGUAGE Invalid language specified
TXT_LANGUAGE_NOT_FOUND The specified language could not be found.
TXT_WRONG_PROJECT Wrong project name

Required files
text_cs.h
text_cs.lib
text_cs.dll

See also
Overview of the functions (Page 679)

2.6.4.4 TXTShowLanguagesDialog (RT Professional)

Description
Opens a dialog with the available languages. If the dialog is closed with "OK", the selected
language is stored in lpdwLocale. In addition, the corresponding font is passed in the
LOGFONT structure.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 701
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

Declaration

BOOL TXTShowLanguagesDialog (
LPCTSTR lpszProjectFile,
HWND hwndParent,
LPDWORD lpdwLocale,
LPLOGFONT lplf,
LPCMN_ERROR lpdmError );

Parameters

lpszProjectFile
Pointer to the name of the project file including path and extension.

hwndParent
Handle to the parent window of the dialog box. The parameter is set to NULL by default.

dwLocale
Pointer to the code of the language to be installed.

lplf
Pointer to a Windows-specific LOGFONT type structure with information about a character set.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Language selected

FALSE
Error or close dialog with "Cancel"

Comment
In order to offer the installed languages in the dialog box, the languages in the database are
enumerated by the function. If an error occurs, the TXT_CALLBACK error message is stored
in the error structure.

WinCC Professional V13 SP2 – Programming reference


702 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

Error messages

TXT_CALLBACK Callback returns FALSE


TXT_NO_CONNECT The database is not yet open.
TXT_WRONG_PROJECT Wrong project name

Required files
text_cs.h
text_cs.lib
text_cs.dll

See also
Overview of the functions (Page 679)

2.6.4.5 TXTRTGetLanguageID (RT Professional)

Description
Upon successful executions, fills the buffer passed in lpchLanguageID with the primary
language ID loaded in the memory mapped file.

Declaration

BOOL TXTRTGetLanguageID (
LPBYTE lpchLanguageID,
LPCMN_ERROR lpdmError );

Parameters

lpchLanguageID
Pointer to a buffer, in which the primary language ID should be stored.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Activated language determined

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 703
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

FALSE
Error

Error messages

TXT_RT_OPEN_MMF Error opening the memory mapped files


TXT_RT_CREATE_SERVICE_WINDOW Error creating the service window
TXT_RT_NO_LANGUAGE_FOUND No language found

Required files
text_rt.h
text_rt.lib
text_rt.dll

See also
Overview of the functions (Page 679)

2.6.4.6 TXTRTSetLanguage (RT Professional)

Description
Sets the language for error messages. If the language is not available, the default language
(German) is set and FALSE is returned.
This function is no longer supported and always returns the value, TRUE.

Declaration

BOOL TXTRTSetLanguage (
DWORD dwLocaleID,
LPCMN_ERROR lpdmError );

Parameters

dwLocaleID
Language code of the language to be set.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


704 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

Return value

TRUE
Language of error messages switched

Required files
text_rt.h
text_rt.lib
text_rt.dll

See also
Overview of the functions (Page 679)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 705
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

2.6.5 Examples (RT Professional)

2.6.5.1 Get infotext (RT Professional)

Example

//{{ODK_EXAMPLE}Insert new Infotext (TXT)}


//{{FUNCTION}TXTOpenProject (TXT)}
//{{FUNCTION}TXTNewInfoText (TXT)}
//{{FUNCTION}TXTSetInfoText (TXT)}
//{{FUNCTION}TXTCloseProject (TXT)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: MyTxtSetInfotext(void) ODK DM CS
// =====================================================================
// Abst. : Insert New Text
// =====================================================================
void MyTxtNewInfotext(void)
{
TCHAR szText[255];
CMN_ERROR Error;
BOOL ret = FALSE;
DWORD dwLocale = 0x0407; // german
TCHAR szFilter[]="S%"; // all texts with 'S'
DWORD dwSize =254;
DWORD dwTextID = 0;
ret = MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile and
g_szDSNName
if(TRUE == ret)
{
memset(&Error, 0, sizeof(CMN_ERROR));
ret = TXTOpenProject(g_szProjectFile, g_szDSNName, FALSE, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TXTOpenProject:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TXTOpenProject"));
ODKTrace(szText);
dwTextID = 380;
dwLocale = 0x0407; // german
_tcsncpy_s(szText, _countof(szText), _T("NewInfoText_ODK"), _TRUNCATE);
memset(&Error, 0, sizeof(CMN_ERROR));
ret = TXTGetInfoText(g_szProjectFile, dwTextID, dwLocale, szText, &dwSize,
&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TXTNewInfoText: E1= 0x%08lx ; E2= 0x%08lx ; %s"),

WinCC Professional V13 SP2 – Programming reference


706 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

Error.dwError1, Error.dwError2, Error.szErrorText);


}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TXTNewInfoText"));
}
ODKTrace(szText);
dwLocale=0x0409; // english
//dwTextID = 380; // use ID from TXTNewInfoText
_tcsncpy_s(szText, _countof(szText), _T("InfoText_ODK"), _TRUNCATE);
memset(&Error, 0, sizeof(CMN_ERROR));
ret = TXTSetInfoText(g_szProjectFile, NULL, dwTextID, dwLocale, szText, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TXTSetInfoText: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TXTSetInfoText"));
}
ODKTrace(szText);
memset(&Error, 0, sizeof(CMN_ERROR));
ret = TXTCloseProject(g_szProjectFile, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TXTCloseProject: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TXTCloseProject"));

ODKTrace(szText);
}
}
}
}
//{{ODK_EXAMPLE}(END)}

See also
TXTCloseProject (Page 682)
TXTOpenProject (Page 685)
TXTRTGetInfoText (Page 693)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 707
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

2.6.5.2 Enumerate infotexts (RT Professional)

Example

//{{ODK_EXAMPLE}Enumerate texts (TXT)}


//{{FUNCTION}TXTOpenProject (TXT)}
//{{FUNCTION}TXTCloseProject (TXT)}
//{{FUNCTION}TXTEnumLanguages (TXT)}
//{{FUNCTION}TXT_ENUM_LANGUAGES_PROC (TXT)}
//{{FUNCTION}TXTEnumInfoText (TXT)}
//{{FUNCTION}TXT_ENUM_INFOTEXTS_PROC (TXT)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: MyTxtEnums(void) ODK DM CS
// =====================================================================
// Abst. : Enumerate Texts
// =====================================================================

BOOL MyTXTEnumLanguagesCallback (DWORD dwLocID, LPCTSTR lpszName, LPVOID lpvUser)


{
lpvUser;
TCHAR szText[255];
BOOL ret = TRUE;
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" InfoLang: ID=%x ;
ODKTrace(szText);
return(ret);
}

BOOL MyTXTEnumInfotextsCallback(DWORD dwTextID, LPCTSTR lpszInfoText, LPVOID lpvUser)


{
lpvUser;
TCHAR szText[255];
BOOL ret = TRUE;
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" InfoText: ID=%.4d ; Tx=%s "),
dwTextID, lpszInfoText);
ODKTrace(szText);
return(ret);
}

void MyTxtEnums(void)
{
TCHAR szText[255];
CMN_ERROR Error;
BOOL ret = FALSE;
DWORD dwLocale = 0x0407; // german
DWORD dwItems = 0;
DWORD dwUser = 0;
TCHAR szFilter[]="S%"; // all texts with 'S'
//DWORD dwSize =254;
ret = MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile and
g_szDSNName
if(TRUE == ret)
{
memset(&Error, 0, sizeof(CMN_ERROR));

WinCC Professional V13 SP2 – Programming reference


708 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.6 Functions of the text system (RT Professional)

ret = TXTOpenProject(g_szProjectFile, g_szDSNName, FALSE, &Error);


if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TXTOpenProject:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TXTOpenProject"));
ODKTrace(szText);
dwItems = 0;
memset(&Error, 0, sizeof(CMN_ERROR));
ret = TXTEnumLanguages(g_szProjectFile, &dwItems, MyTXTEnumLanguagesCallback,
&dwUser, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TXTOpenProject: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
dwItems = 0;
memset(&Error, 0, sizeof(CMN_ERROR));
ret = TXTEnumInfoText(g_szProjectFile, dwLocale, &dwItems, szFilter,
MyTXTEnumInfotextsCallback, &dwUser, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TXTEnumInfoText: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TXTEnumInfoText: NItems=
%d ; LANG=%x ; Filter=%s "),
dwItems, dwLocale, szFilter);
ODKTrace(szText);
memset(&Error, 0, sizeof(CMN_ERROR));
ret = TXTCloseProject(g_szProjectFile, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TXTCloseProject: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
}
}
}
//{{ODK_EXAMPLE}(END)}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 709
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

See also
TXTCloseProject (Page 682)
TXTOpenProject (Page 685)
TXTEnumInfoText (Page 689)
TXT_ENUM_INFOTEXTS_PROC (Page 691)
TXT_ENUM_LANGUAGES_PROC (Page 698)
TXTEnumLanguages (Page 697)

2.7 Report system functions (RT Professional)

2.7.1 Basics (RT Professional)

2.7.1.1 Overview of the functions (RT Professional)

Overview

RPJAttach (Page 723) Establish connection


RPJCallJobMethod (Page 746) Call print job method
RPJCreateJob (Page 733) Create a print job
RPJCreatePropertyHandle (Page 736) Create handle of a print job property
RPJDeleteJob (Page 734) Delete print job
RPJDeletePropertyHandle (Page 737) Delete handle of a print job property
RPJDetach (Page 724) Disconnect connection
RPJGetJobMethodAt (Page 747) Determine name of print job method
RPJGetJobNameAt (Page 739) Determine name of print job
RPJGetJobPropertyAt (Page 749) Determine name of print job properties
RPJGetJobProps (Page 751) Determine print job properties
RPJGetNumJobMethods (Page 748) Determine number of print job methods
RPJGetNumJobProperties (Page 752) Determine number of print job properties
RPJGetNumJobs (Page 740) Determine number of print jobs
RPJGetNumProjectProperties (Page 726) Determine number of properties in the project
RPJGetProjectPropertyAt (Page 727) Determine property name and type in the project
using an index
RPJGetProjectProperty (Page 728) Determine value of the property in the project
RPJGetProperty (Page 753) Determine print job property
RPJJobLock (Page 741) Lock print job against other accesses
RPJJobUnlockAll (Page 744) Remove all print job locks
RPJJobUnlock (Page 743) Remove a print job lock
RPJMemFree (Page 725) Free memory

WinCC Professional V13 SP2 – Programming reference


710 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

RPJProjectLock (Page 729) Lock access to the print job list in the project
RPJProjectUnlockAll (Page 732) Remove all print job list locks in the project
RPJProjectUnlock (Page 731) Remove a print job list lock in the project
RPJPropertyClear (Page 756) Delete handle of a print job property
RPJSetProperty (Page 757) Specify print job properties

2.7.1.2 Constants (RT Professional)

Properties for layouts (CS)


Root
● ObjectName
● Context
Geometry
● Left
● Top
● Width
● Height
● RoundCornerWidth
● RoundCornerHeight
● StartAngle
● EndAngle
● Radius
● RadiusWidth
● RadiusHeight
● Columns
● Index
● PointCount
● ActualPointLeft
● ActualPointTop
● PaperSize
● Orientation
● DynMarginLeft
● DynMarginRight
● DynMarginTop
● DynMarginBottom
● PrintMarginLeft

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 711
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

● PrintMarginRight
● PrintMarginTop
● PrintMarginBottom
Styles
● BorderStyle
● BorderWidth
● FillStyle
Colors
● BorderBackColor
● BorderColor
● BackColor
● FillColor
● ForeColor
Characters
● FontName
● FontSize
● FontBold
● FontItalic
● FontUnderline
● Text
● AlignmentLeft
● AlignmentTop
● WordWrap
Miscellaneous
● FirstPage
● LastPage
● MetaFileName
● LayoutFileName
● Format
● List
● Tag
● DataType
● OutFormat
● Calculation
● PageBreak

WinCC Professional V13 SP2 – Programming reference


712 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Properties for print jobs

AbsoluteSelectionFrom
AbsoluteSelectionTo
CycleSpan
DestinationFile
EnableCycle
EnableStart
EndPage This information enables you to end the printout
of the report at a particular page.
JobName The name of the print job must be unique within
a project and conform to the Windows conventions.
LayoutName You can assign the print job a layout using the
layout name.
PrinterName 1 Here, you specify the printer to which the printout
is initially sent.
PrinterName 2 Here, you specify the printer to be used if the first
printer is not available.
PrinterName 3 Here, you specify the printer to be used if the first
two printers are not available.
RelativeSelectionCount
RelativeSelectionRange
StartPage This information enables you to start the printout
of the report at a particular page.
StartTime
UseRelative
UseOutputFile
UseOutputPrinter

2.7.1.3 Error messages (RT Professional)

Overview
The following error messages can be returned by the API functions in the CMN_ERROR error
structure:

Error messages of CS

ERR_NOERROR 0 No error
ERR_ILLEGALPROJECT 1 Invalid project name/project path
ERR_NOMEMORY 2 Memory error
ERR_UNKNOWNERROR 3 Unknown error
ERR_THREADNOTINITIALIZED 4 The utilized thread is not initialized.
ERR_OLEEXCEPTION 5 Error in conjunction with the MFC and OLE
ERR_NOOLESERVERAVAIL 6 No OLE-Server available

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 713
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Error messages of RT

ERR_NOERROR 0 No error
ERR_ILLEGALPROJECT 1 Invalid project name/project path
ERR_NOMEMORY 2 Memory error
ERR_UNKNOWNERROR 3 Unknown error
ERR_NULLHANDLE 4 Handle could not be created.
ERR_ILLEGALPOINTER 5 Pointer is incorrect or invalid
ERR_ILLEGALJOBINDEX 6 Print job index is incorrect
ERR_UNKNOWNPROPERTY 7 Print job property is unknown
ERR_UNKNOWNMETHOD 8 Print job method is unknown

2.7.1.4 List of object properties (RT Professional)

Properties for all objects

Note
The property names along with a basic description can also be obtained via the context-
sensitive help. To access this, right-click inside the properties box for the relevant object in the
Report Designer.

Property name Data type


"Width" VT_I4
"Height" VT_I4
"ObjectName" VT_BSTR
"PageBreak" VT_I4
"BorderStyle" VT_I4

"BorderWidth" VT_I4
"BorderBackColor" VT_I4
"BorderColor" VT_I4
"Left" VT_I4
"Top" VT_I4

Properties for all "2-dimensional objects":

"FillStyle" VT_I4
"BackColor" VT_I4
"FillColor" VT_I4

WinCC Professional V13 SP2 – Programming reference


714 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Properties for "dynamic objects":

"DataLink" VT_BSTR

The following properties are object-specific!

Properties for all "system" objects:

Property name Data type


"FontName" VT_BSTR
"FontSize" VT_I4
"FontBold" VT_I4
"FontItalic" VT_I4
"FontUnderline" VT_I4
"Format" VT_BSTR
"AlignmentLeft" VT_I4
"AlignmentTop" VT_I4
"WordWrap" VT_I4

Properties for "dynamic tables":

"FontName" VT_BSTR
"FontSize" VT_I4
"FontBold" VT_I4
"FontItalic" VT_I4
"FontUnderline" VT_I4
"Orientation" VT_I4
"Columns" VT_BSTR
"ForeColor" VT_I4
"List" VT_I4

Properties for "dynamic texts":

"FontName" VT_BSTR
"FontSize" VT_I4
"FontBold" VT_I4
"FontItalic" VT_I4
"FontUnderline" VT_I4
"Orientation" VT_I4
"AlignmentLeft" VT_I4
"AlignmentTop" VT_I4

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 715
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

"WordWrap" VT_I4
"ForeColor" VT_I4

Properties for "dynamic picture":

"DynHeight" VT_I4

Properties for "circular arc":

"Radius" VT_I4
"StartAngle" VT_I4
"EndAngle" VT_I4

Properties for "elliptical arc":

"StartAngle" VT_I4
"EndAngle" VT_I4
"RadiusWidth" VT_I4
"RadiusHeight" VT_I4

Properties for "circles":

"Radius" VT_I4

Properties for "ellipses":

"RadiusWidth" VT_I4
"RadiusHeight" VT_I4

Properties for "polygons":

"Polyline" VT_BSTR
"PointCount" VT_I4
"Index" VT_I4
"ActualPointLeft" VT_I4
"ActualPointTop" VT_I4

WinCC Professional V13 SP2 – Programming reference


716 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Properties for "circle segments":

"Radius" VT_I4
"StartAngle" VT_I4
"EndAngle" VT_I4

Properties for "ellipse segments":

"StartAngle" VT_I4
"EndAngle" VT_I4
"RadiusWidth" VT_I4
"RadiusHeight" VT_I4

Properties for "polyline":

"Polyline" VT_BSTR
"PointCount" VT_I4
"Index" VT_I4
"ActualPointLeft" VT_I4
"ActualPointTop" VT_I4

Properties for "rounded rectangle":

"RoundCornerWidth" VT_I4
"RoundCornerHeight" VT_I4

Properties for "text objects":

"FontName" VT_BSTR
"FontSize" VT_I4
"FontBold" VT_I4
"FontItalic" VT_I4
"FontUnderline" VT_I4
"Orientation" VT_I4
"Text" VT_BSTR
"AlignmentLeft" VT_I4
"AlignmentTop" VT_I4
"WordWrap" VT_I4
"ForeColor" VT_I4

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 717
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Properties for "inserted layouts":

"LayoutFileName" VT_BSTR

Properties for "layouts":

"PrintMarginLeft" VT_I4
"PrintMarginRight" VT_I4
"PrintMarginTop" VT_I4
"PrintMarginBottom" VT_I4
"PaperSize" VT_BSTR
"FirstPage" VT_I4
"LastPage" VT_I4
"Orientation" VT_I4
"Printer1" VT_BSTR
"Printer2" VT_BSTR
"Printer3" VT_BSTR
"BackColor" VT_I4
"BorderColor" VT_I4
"FillColor" VT_I4
"DynMarginLeft" VT_I4
"DynMarginRight" VT_I4
"DynMarginTop" VT_I4
"DynMarginBottom" VT_I4
"Context" VT_BSTR

Properties for "MetaFiles":

"MetaFileName" VT_BSTR

Properties for "tag" objects:

"Tag" VT_BSTR
"FontSize" VT_I4
"FontName" VT_BSTR
"FontBold" VT_I4
"FontItalic" VT_I4
"FontUnderline" VT_I4
"AlignmentLeft" VT_I4
"AlignmentTop" VT_I4
"WordWrap" VT_I4
"ForeColor" VT_I4
"OutFormat" VT_BSTR

WinCC Professional V13 SP2 – Programming reference


718 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

"DataType" VT_I4
"Calculation" VT_VARIANT

2.7.1.5 General procedure for processing print job properties (Report Designer) (RT
Professional)

Establishing and initializing connection to RPJAPI.DLL


RPJAttach.

Creating a handle for print job properties


To process the properties of a print job, a print job handle must be created. This handle is used
to identify a memory area through which the print job properties can be addressed.
Function: RPJCreatePropertyHandle.

Reading print job properties


The properties of the print jobs are stored in the project database. To edit the properties, they
must be loaded from the database to the area specified by the handle.
Function: RPJGetJobProps.

Determining print job properties


A certain print job property is referenced using its name. To determine the value of a property,
it must be read.
Function: RPJGetProperty.

Specifying print job properties


A certain print job property is referenced using its name. To set the property, the
RPJSetProperty function is called.

Storing print job properties


The modified print job properties are stored in the project database. The name of the print job
to be stored must be specified.
Function: RPJSetJobProps.

Reinitializing a print job property


The memory area referenced by the handle is reinitialized without freeing the handle.
Function: RPJPropertyClear.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 719
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Specifying print job properties


A certain print job property is referenced using its name. The property is set by calling a function.
Function: RPJSetProperty.

Storing print job properties


The modified print job properties are stored in the project database. The name of the print job
to be stored must be specified.
Function: RPJSetJobProps.

Deleting a handle
A print job property handle is deleted. Delete each handle created with
RPJCreatePropertyHandle when it is no longer needed.
Function: RPJDeletePropertyHandle.

Terminating connection to RPJAPI.DLL


RPJDetach.

Example: Starting a print job in Print Preview

General
To process the properties of a print job, a print job handle must be provided. This handle is
used to identify a memory area through which the print job properties can be addressed.

Establishing and initializing connection to RPJAPI.DLL


RPJAttach.

Creating a handle: Function


RPJCreatePropertyHandle.

Reading in properties of the print job


The properties of the print job: "Control Center Redocumentation" are loaded from the
database to the area specified by the hProp.
Function: RPJGetJobProps.

Initiating print job method


The print job is initiated by specifying the PREVIEW method. The print job itself is specified
by the hProp.
Function: RPJCallJobMethod.

Deleting a handle
A print job property handle is deleted. Each handle created with RPJCreatePropertyHandle
should be deleted when it is no longer needed.

WinCC Professional V13 SP2 – Programming reference


720 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Function: RPJDeletePropertyHandle.

Terminating connection to RPJAPI.DLL


RPJDetach.

Example

void PrintJob(void)
{
CMN_ERROR err; //error structure
BOOL ret;
HPROPERTIES hProp;
char jobname[200];
char method[200];
LPCSTR szProjectName = "c:\\rest\\test.mcp"; //name of project
strcpy(method, "PREVIEW");
strcpy(jobname, "Backdokumentation Control Center");
ret = RPJAttach(&err);
if (TRUE == ret)
{
hProp = RPJCreatePropertyHandle(szProjectName. &err);
if (NULL == hProp)
{
ErrMsg("Error RPJCreatePropertyHandle", &err);
}
else
{
ret = RPJGetJobProps(hProp, jobname, &err);
if (FALSE == ret)
{
ErrMsg("Error RPJGetJobProbs", &err);
}
else
{
ret = RPJCallJobMethod(hProp, method, &err);
if (FALSE == ret)
{
ErrMsg("Error executing RPJCallJobMethod", &err);
}
else
{
Msg("Print job started.");
}
}
RPJDeletePropertyHandle(hProp, &err);
}
RPJDetach(&err);
}
else
{
Msg("No connection to report designer DLL");
}
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 721
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

2.7.2 Functions for establishing connections (RT Professional)

2.7.2.1 RPJAttach (RT Professional)

Description
This function is used to established and initialized a connection to RPJAPI.DLL.

Declaration

BOOL RPJAttach (
CMN_ERROR* pcmnerror );

Parameters

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Connection established.

FALSE
Error

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

Related functions

RPJDetach (Page 724) Close connection

See also
RPJDetach (Page 724)
Overview of the functions (Page 710)

WinCC Professional V13 SP2 – Programming reference


722 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

2.7.2.2 RPJDetach (RT Professional)

Description
This function is used to close an established connection to RPJAPI.DLL.

Declaration

BOOL RPJDetach (
CMN_ERROR* pcmnerror );

Parameters

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Connection is closed again.

FALSE
Error

Comment

Note
The call may not be used in the destructor of an application (EXE, DLL, OCX, etc.). Due to
Microsoft-specific mechanisms, this may cause the call to freeze and thereby crash the
program.

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

Related functions

RPJAttach (Page 722) Establish connection

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 723
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

See also
RPJAttach (Page 722)
Overview of the functions (Page 710)

2.7.2.3 RPJMemFree (RT Professional)

Description
This function is used to close an established connection to RPJAPI.DLL and release the
allocated memory.

Declaration

BOOL RPJMemFree (
const PVOID pvMemBlock,
CMN_ERROR* pcmnerror );

Parameters

pvMemBlock
Pointer to a released memory area that was previously allocated by a RPJ function.
If pvMemBlock = NULL, nothing happens.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
The memory was released.

FALSE
Error

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

WinCC Professional V13 SP2 – Programming reference


724 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

See also
Overview of the functions (Page 710)

2.7.3 Functions for processing project properties (RT Professional)

2.7.3.1 RPJGetNumProjectProperties (RT Professional)

Description
The function determines the number of properties for the project.

Declaration

BOOL RPJGetNumProjectProperties (
LPCSTR pszReserved,
DWORD* pdwNumProperties
CMN_ERROR* pcmnerror );

Parameters

pszReserved
The parameter is reserved for future development.

pdwNumProperties
Pointer to a DWORD tag, in which the number of properties is returned.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
The number of properties was determined.

FALSE
Error

Required files
rpjapi.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 725
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

rpjapi.lib
rpjapi.dll

See also
Overview of the functions (Page 710)

2.7.3.2 RPJGetProjectPropertyAt (RT Professional)

Description
The function determines the name and type of a property based on the index in the project.

Declaration

BOOL RPJGetProjectPropertyAt (
LPCSTR pszReserved,
DWORD dwPropIndex,
LPSTR pszBuffer,
DWORD dwCharMax,
DWORD* pdwPrpType,
CMN_ERROR* pcmnerror );

Parameters

pszReserved
The parameter is reserved for future development.

dwPropIndex
Index of the property in the project, from which the information is to be returned.

pszBuffer
Pointer to a buffer in which the name of the property should be returned. The size of the buffer
is specified with dwCharMax.

dwCharMax
Maximum size of the buffer specified with pszBuffer

pdwPropType
Pointer to a DWORD tag, in which the type of the property in the project is returned.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


726 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Return value

TRUE
The name and type of property in the project was determined.

FALSE
Error

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

See also
Overview of the functions (Page 710)

2.7.3.3 RPJGetProjectProperty (RT Professional)

Description
The function determines the value of a property. The project name and the property name
must be passed.

Declaration

BOOL RPJGetProjectProperty (
LPCSTR pszProjectName,
LPCSTR pszPropName,
PVOID pvPropValue,
VARTYPE vtPropType,
DWORD dwBufferSize,
CMN_ERROR* pcmnerror );

Parameters

pszProjectName
Pointer to the name of the project, consisting of the path, project name, and extension.

pszPropName
Name of the property in the project.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 727
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

pvPropValue
Pointer to a buffer in which the value of the property should be returned. The size of the buffer
in pvPropValue is specified with dwBufferSize.

vtPropType
Type in which the value of the property in the pvPropValue buffer is expected.

VT_I4 Integer or Boolean


VT_LPSTR Text in ANSI format
VT_LPWSTR Text in UNICODE format
VT_DATE Date/time

dwBufferSize
Size of the buffer in pvPropValue to which the value of the property should be returned. The
size may only be specified in BYTE and not in CHAR.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
The value of property was determined.

FALSE
Error

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

See also
Overview of the functions (Page 710)

2.7.3.4 RPJProjectLock (RT Professional)

Description
Access to the print job list in the project is locked to others. The name of the locking party must
be specified in pszLockerNameNew. If an access conflict occurs, the name of the locking party
is returned via ppszLockerNameCur.

WinCC Professional V13 SP2 – Programming reference


728 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Declaration

BOOL RPJProjectLock (
LPCSTR pszProjectName,
BOOL fWriteLock,
BOOL fDoNotWait,
LPCSTR pszLockerNameNew,
LPSTR* ppszLockerNameCur,
CMN_ERROR* pcmnerror );

Parameters

pszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.

fWriteLock
Specifies the type of locking.

TRUE Locks writing and reading.


FALSE Locks reading only.

fDoNotWait

TRUE An error is immediately reported if a lock exits


FALSE If a lock exists, it is checked cyclically at first. After a few seconds, the
check stops with a timeout error.

pszLockerNameNew
Contains the name of the locking party. If an access conflict occurs, the name is returned via
ppszLockerNameCur.

ppszLockerNameCur
If an access conflict occurs, the name of the current locking party is returned in
ppszLockerNameCur.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Print job list is locked.

FALSE
An access conflict has occurred. The print job list of the project is already locked. The name
of the locking party is returned via ppszLockerNameCur.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 729
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

Related functions

RPJProjectUnlock (Page 731) Removing a lock


RPJProjectUnlockAll (Page 732) Removing all locks

See also
RPJProjectUnlock (Page 731)
RPJProjectUnlockAll (Page 732)
Overview of the functions (Page 710)

2.7.3.5 RPJProjectUnlock (RT Professional)

Description
The lock of a print job list is removed.

Declaration

BOOL RPJProjectUnlock (
LPCSTR pszProjectName,
CMN_ERROR* pcmnerror );

Parameters

pszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
The lock of the print job list was removed.

WinCC Professional V13 SP2 – Programming reference


730 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

FALSE
An access conflict has occurred.

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

Related functions

RPJProjectLock (Page 728) Creating a lock


RPJProjectUnlockAll (Page 732) Removing all locks

See also
RPJProjectLock (Page 728)
RPJProjectUnlockAll (Page 732)
Overview of the functions (Page 710)

2.7.3.6 RPJProjectUnlockAll (RT Professional)

Description
All locks of a print job list are removed.

Declaration

BOOL RPJProjectUnlockAll (
LPCSTR pszProjectName,
CMN_ERROR* pcmnerror );

Parameters

pszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 731
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Return value

TRUE
All locks of the print job list were removed.

FALSE
An access conflict has occurred.

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

Related functions

RPJProjectLock (Page 728) Creating a lock


RPJProjectUnlock (Page 730) Removing a lock

See also
RPJProjectLock (Page 728)
RPJProjectUnlock (Page 730)
Overview of the functions (Page 710)

2.7.4 Functions for processing print jobs (RT Professional)

2.7.4.1 RPJCreateJob (RT Professional)

Description
Creates a new print job.

Declaration

BOOL RPJCreateJob (
LPCSTR pszProjectName,
LPCSTR pszJobName,
CMN_ERROR* pcmnerror );

WinCC Professional V13 SP2 – Programming reference


732 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Parameters

pszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.

pszJobName
Pointer to the name of the print job to be created.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Print job created.

FALSE
Error

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

Related functions

RPJDeleteJob (Page 734) Delete print job

See also
RPJDeleteJob (Page 734)
Overview of the functions (Page 710)

2.7.4.2 RPJDeleteJob (RT Professional)

Description
A print job specified by pszJobName is deleted.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 733
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Declaration

BOOL RPJDeleteJob (
LPCSTR pszProjectName,
LPCSTR pszJobName,
CMN_ERROR* pcmnerror );

Parameters

pszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.

pszJobName
Pointer to the name of the print job to be deleted.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Print job deleted.

FALSE
Error

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

Related functions

RPJCreateJob (Page 732) Create a print job

See also
RPJCreateJob (Page 732)
Overview of the functions (Page 710)

WinCC Professional V13 SP2 – Programming reference


734 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

2.7.4.3 RPJCreatePropertyHandle (RT Professional)

Description
To edit the properties of a print job, you first have configure a handle on the job using this
function. You get the handle in the return value.

Declaration

HPROPERTIES RPJCreatePropertyHandle (
LPCSTR pszProjectName,
CMN_ERROR* pcmnerror );

Parameters

pszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value
Handle on the print job property.
If an error occurs, the return value is ZERO.

Comment
The handle provided here is required by the RPJGetJobProps, RPJGetProperty and
RPJSetProperty functions, for example.

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

Related functions

RPJDeletePropertyHandle (Page 737) Delete handle


RPJPropertyClear (Page 756) Initialize memory area
RPJGetJobProps (Page 751) Determine print job properties

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 735
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

RPJGetProperty (Page 753) Determine print job property


RPJSetProperty (Page 757) Specify print job properties

Examples
Show print job preview (Page 775)"RD02.cpp"
Modify print job properties (Page 770)"RD02.cpp"
Get print job names (Page 764)"RD02.cpp"
Get print job method name (Page 761)"RD02.cpp"
Get print job properties (Page 767)"RD02.cpp"

See also
Get print job method name (Page 761)
Get print job names (Page 764)
Get print job properties (Page 767)
Modify print job properties (Page 770)
Show print job preview (Page 775)
RPJDeletePropertyHandle (Page 737)
RPJGetProperty (Page 753)
RPJGetJobProps (Page 751)
RPJSetProperty (Page 757)
RPJPropertyClear (Page 756)
Overview of the functions (Page 710)

2.7.4.4 RPJDeletePropertyHandle (RT Professional)

Description
Each handle created with RPJCreatePropertyHandle, is deleted with this function when it is
no longer needed.

Declaration

BOOL RPJDeletePropertyHandle (
HPROPERTIES hproperties,
CMN_ERROR* pcmnerror );

WinCC Professional V13 SP2 – Programming reference


736 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Parameters

hproperties
The handle of the print job property is created by the RPJCreatePropertyHandle function.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Handle deleted

FALSE
Error

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

Related functions

RPJCreatePropertyHandle (Page 735) Create handle

Examples
Show print job preview (Page 775)"RD02.cpp"
Modify print job properties (Page 770)"RD02.cpp"
Get print job names (Page 764)"RD02.cpp"
Get print job method name (Page 761)"RD02.cpp"
Get print job properties (Page 767)"RD02.cpp"

See also
RPJCreatePropertyHandle (Page 735)
Get print job method name (Page 761)
Get print job names (Page 764)
Get print job properties (Page 767)
Modify print job properties (Page 770)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 737
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Show print job preview (Page 775)


Overview of the functions (Page 710)

2.7.4.5 RPJGetJobNameAt (RT Professional)

Description
Determines the name of a print job specified by dwJobIndex.

Declaration

BOOL RPJGetJobNameAt (
LPCSTR pszProjectName,
DWORD dwJobIndex,
LPSTR pszBuffer,
DWORD dwCharMax,
CMN_ERROR* pcmnerror );

Parameters

PszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.

dwJobIndex
Index of the print job, the name of which should be determined.

pszBuffer
Pointer to a receive buffer in which the name of the print job should be returned.

dwCharMax
Size of the receive buffer in number of characters including the zero termination. This value
must be greater than 1.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Name of the print job determined.

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


738 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Comment
An index error indicated by RPJGetJobNameAt may be due to the fact that the number of jobs
changed after the RPJGetNumJobs was called.

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

Examples
Get print job names (Page 764)"RD02.cpp"

See also
Get print job names (Page 764)
Overview of the functions (Page 710)

2.7.4.6 RPJGetNumJobs (RT Professional)

Description
Determines the number of currently pending print jobs. After the function is called, the number
may change due to deletion or addition of print jobs.

Declaration

BOOL RPJGetNumJobs (
LPCSTR pszProjectName,
DWORD* pdwNumJobs,
CMN_ERROR* pcmnerror );

Parameters

pszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.

pdwNumJobs
Pointer to the location where the number of print jobs should be stored.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 739
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Number of print jobs determined.

FALSE
Error

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

Examples
Get print job names (Page 764)"RD02.cpp"

See also
Get print job names (Page 764)
Overview of the functions (Page 710)

2.7.4.7 RPJJobLock (RT Professional)

Description
Access to the specified print job is locked to others. The name of the locking party must be
specified in pszLockerNameNew. If an access conflict occurs, the name of the locking party
is returned via ppszLockerNameCur.

WinCC Professional V13 SP2 – Programming reference


740 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Declaration

BOOL RPJJobLock (
LPCSTR pszProjectName,
LPCSTR pszJobName,
BOOL fWriteLock,
BOOL fDoNotWait,
LPCSTR pszLockerNameNew,
LPSTR* ppszLockerNameCur,
CMN_ERROR* pcmnerror );

Parameters

pszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.

pszJobName
Pointer to the name of the print job to be locked.

fWriteLock
Specifies the type of locking.

TRUE Locks writing and reading.


FALSE Locks reading only.

fDoNotWait

TRUE An error is immediately reported if a lock exits


FALSE If a lock exists, it is checked cyclically at first. After a few seconds, the check
stops with a timeout error.

pszLockerNameNew
Contains the name of the locking party. If an access conflict occurs, the name is returned via
ppszLockerNameCur.

ppszLockerNameCur
If an access conflict occurs, the name of the current locking party is returned in
ppszLockerNameCur.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Print job is locked.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 741
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

FALSE
An access conflict has occurred. The print job list of the project is already locked. The name
of the locking party is returned via ppszLockerNameCur.

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

Related functions

RPJJobUnlock (Page 743) Removing a lock


RPJJobUnlockAll (Page 744) Removing all locks

See also
RPJJobUnlockAll (Page 744)
RPJJobUnlock (Page 743)
Overview of the functions (Page 710)

2.7.4.8 RPJJobUnlock (RT Professional)

Description
The lock of a print job is removed.

Declaration

BOOL RPJJobUnlock (
LPCSTR pszProjectName,
LPCSTR pszJobName,
CMN_ERROR* pcmnerror );

Parameters

pszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.

pszJobName
Pointer to the name of the print job.

WinCC Professional V13 SP2 – Programming reference


742 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
The lock of the print job was removed.

FALSE
An access conflict has occurred.

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

Related functions

RPJJobLock (Page 740) Creating a lock


RPJJobUnlockAll (Page 744) Removing all locks

See also
RPJJobUnlockAll (Page 744)
RPJJobLock (Page 740)
Overview of the functions (Page 710)

2.7.4.9 RPJJobUnlockAll (RT Professional)

Description
All locks of a print job are removed.

Declaration

BOOL RPJJobUnlockAll (
LPCSTR pszProjectName,
LPCSTR pszJobName,
CMN_ERROR* pcmnerror );

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 743
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Parameters

pszProjectName
Pointer to the name of the project file consisting of the path, project name and extension.

pszJobName
Pointer to the name of the print job.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
All locks of the specified print job are removed.

FALSE
An access conflict has occurred

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

Related functions

RPJJobLock (Page 740) Creating a lock


RPJJobUnlock (Page 742) Removing a lock

See also
RPJJobUnlock (Page 742)
RPJJobLock (Page 740)
Overview of the functions (Page 710)

WinCC Professional V13 SP2 – Programming reference


744 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

2.7.5 Functions for processing print job methods (RT Professional)

2.7.5.1 RPJCallJobMethod (RT Professional)

Description
This function allows you to specify a specific job method. Currently, there are two methods:
PrintJob and PreviewJob.

Declaration

RPJCallJobMethod (
HPROPERTIES hproperties,
LPCSTR pszMethodName
CMN_ERROR* pcmnerror );

Parameters

hproperties
The handle of the print job property is created by the RPJCreatePropertyHandle function.

pszMethodName
Pointer to the name of the job method to be used.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Print job method specified

FALSE
Error

Comment
In order to specify a print job method with RPJCallJobMethod, you first need to execute the
RPJGetJobProps function.

Required files
rpjapi.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 745
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

rpjapi.lib
rpjapi.dll

Examples
Show print job preview (Page 775)"RD02.cpp"

See also
Show print job preview (Page 775)
Overview of the functions (Page 710)

2.7.5.2 RPJGetJobMethodAt (RT Professional)

Description
The function determines the name of the printing method specified in dwMethodIndex.

Declaration

BOOL RPJGetJobMethodAt (
DWORD dwMethodIndex,
LPSTR pszBuffer,
DWORD dwCharMax,
CMN_ERROR* pcmnerror );

Parameters

dwMethodIndex
Index of the printing method whose name is determined.

pszBuffer
Pointer to a buffer in which the name of the printing method should be returned.

dwCharMax
Size of the buffer for receiving the name in number of characters including the zero termination.
This value must be greater than 1.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


746 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Return value

TRUE
Name of the print job method determined

FALSE
Error

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

Examples
Get print job method name (Page 761)"RD02.cpp"

See also
Get print job method name (Page 761)
Overview of the functions (Page 710)

2.7.5.3 RPJGetNumJobMethods (RT Professional)

Description
The function determines how many print job methods are currently available.

Declaration

BOOL RPJGetNumJobMethods (
DWORD* pdwNumMethods,
CMN_ERROR* pcmnerror );

Parameters

pdwNumMethods
Pointer to the location where the number of print job methods should be stored.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 747
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Return value

TRUE
Number of print job methods determined

FALSE
Error

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

Examples
Get print job method name (Page 761)"RD02.cpp"

See also
Get print job method name (Page 761)
Overview of the functions (Page 710)

2.7.6 Functions for processing print job methods (RT Professional)

2.7.6.1 RPJGetJobPropertyAt (RT Professional)

Description
Determines the name and type of job property specified in dwPropindex.

Declaration

BOOL RPJGetJobPropertyAt (
DWORD dwPropIndex,
LPSTR pszBuffer,
DWORD dwCharMax,
DWORD* pdwPropType,
CMN_ERROR* pcmnerror );

WinCC Professional V13 SP2 – Programming reference


748 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Parameters

dwPropIndex
Index of the print job property, the name of which should be determined.

pszBuffer
Pointer to a buffer that receives the name of the job property.

dwCharMax
Size of the receive buffer in number of characters including the zero termination. This value
must be greater than 1.

pdwPropType
Pointer to the location where the type of job property should be stored.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Name of the print job property determined

FALSE
Error

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

Examples
Get print job properties (Page 767)"RD02.cpp"

See also
Get print job properties (Page 767)
Overview of the functions (Page 710)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 749
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

2.7.6.2 RPJGetJobProps (RT Professional)

Description
The function determines the properties of a print job and stores it in the internal hProps buffer.

Declaration

BOOL RPJGetJobProps (
HPROPERTIES hproperties,
LPCSTR pszJobName,
CMN_ERROR* pcmnerror );

Parameters

hproperties
The handle of the print job property is created by the RPJCreatePropertyHandle function.

pszJobName
Pointer to the name of the print job.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Comment
This function is a prerequisite for functions such as RPJGetProperty and RPJSetProperty.

Return value

TRUE
Print job properties determined

FALSE
Error

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

WinCC Professional V13 SP2 – Programming reference


750 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Related functions

RPJCreatePropertyHandle (Page 735) Create handle


RPJGetProperty (Page 753) Determine print job property
RPJSetProperty (Page 757) Specify print job properties

Examples
Show print job preview (Page 775)"RD02.cpp"
Modify print job properties (Page 770)"RD02.cpp"

See also
RPJGetProperty (Page 753)
RPJSetProperty (Page 757)
Modify print job properties (Page 770)
Show print job preview (Page 775)
RPJCreatePropertyHandle (Page 735)
Overview of the functions (Page 710)

2.7.6.3 RPJGetNumJobProperties (RT Professional)

Description
Determines the number of available print job properties.

Declaration

BOOL RPJGetNumJobProperties (
DWORD* pdwNumProperties,
CMN_ERROR* pcmnerror );

Parameters

pdwNumProperties
Pointer to the location where the number of print job properties should be stored.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 751
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Return value

TRUE
Number of print job properties determined

FALSE
Error

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

Examples
Get print job properties (Page 767)"RD02.cpp"

See also
Get print job properties (Page 767)
Overview of the functions (Page 710)

2.7.6.4 RPJGetProperty (RT Professional)

Description
Before you can use RPJGetProperty to determine the value of the print job property specified
by pszPropName, you first need to use RPJGetJobProps to store the job properties in the
internal hProp buffer.

Declaration

BOOL RPJGetProperty (
HPROPERTIES hproperties,
LPCSTR pszPropName,
PVOID pvPropValue,
VARTYPE vtPropType,
DWORD dwBufferSize,
CMN_ERROR* pcmnerror );

WinCC Professional V13 SP2 – Programming reference


752 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Parameters

hproperties
The handle of the print job property is created by the RPJCreatePropertyHandle function.

pszPropName
Pointer to the name of the print job property:

AbsoluteSelectionFrom
AbsoluteSelectionTo
CycleSpan
DestinationFile
EnableCycle
EnableStart
EndPage This information enables you can to stop the printout of the report at
a particular page.
JobName The name of the print job must be unique within a project and conform
to the Windows conventions.
LayoutName You can assign the print job a layout using the layout name.
PrinterName 1 Here, you specify the printer to which the printout is initially sent.
PrinterName 2 This specifies the printer to be used if the first printer is not available.
PrinterName 3 This specifies the printer to be used if the first two printers are not
available.
RelativeSelectionCount
RelativeSelectionRange
StartPage This information enables you can to start the printout of the report at
a particular page.
StartTime
UseRelative
UseOutputFile
UseOutputPrinter

pvPropValue
Pointer to a buffer that should receive the name.

vtPropType
The type of the object property depends on pszPropName:

AbsoluteSelectionFrom VT_DATE
AbsoluteSelectionTo VT_DATE
CycleSpan VT_I4
DestinationFile VT_LPSTR
EnableCycle VT_I4
EnableStart VT_I4
EndPage VT_I4
JobName VT_LPSTR / VT_LPWSTR

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 753
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

LayoutName VT_LPSTR / VT_LPWSTR


PrinterName VT_LPSTR / VT_LPWSTR
PrinterName2 VT_LPSTR / VT_LPWSTR
PrinterName3 VT_LPSTR / VT_LPWSTR
RelativeSelectionCount VT_I4
RelativeSelectionRange VT_I4
StartPage VT_I4
StartTime VT_DATE
UseRelative VT_I4
UseOutputFile VT_I4
UseOutputPrinter VT_I4

If you want to change a string and your application is compiled in Unicode, you must use
vtPropVT_LPWSTR as the data type. Otherwise, vtProp has a VT_LPTSTR data type.
If vtProp has a VT_DATE data type, the prop parameter must refer to a SYSTEMTIME structure.

dwBufferSize
Size of the buffer to which prop refers in number of bytes.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Print job property determined

FALSE
Error

Comment
If the buffer for receiving the job property is configured too small, which can happen with job
name and layout name, for example, the buffer is filled but the function returns the
ERR_UNKNOWNERROR error message.

Error messages

ERR_UNKNOWNERROR Unknown error

Required files
rpjapi.h
rpjapi.lib

WinCC Professional V13 SP2 – Programming reference


754 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

rpjapi.dll

Related functions

RPJCreatePropertyHandle (Page 735) Create handle


RPJGetJobProps (Page 750) Determine print job properties
RPJSetProperty (Page 757) Specify print job properties

Examples
Modify print job properties (Page 770)"RD02.cpp"

See also
RPJGetJobProps (Page 750)
RPJSetProperty (Page 757)
RPJCreatePropertyHandle (Page 735)
Modify print job properties (Page 770)
Overview of the functions (Page 710)

2.7.6.5 RPJPropertyClear (RT Professional)

Description
This function is useful if you want to initialize a memory area referenced by a handle without
deleting the handle.

Declaration

BOOL RPJPropertyClear (
HPROPERTIES hproperties,
CMN_ERROR* pcmnerror );

Parameters

hproperties
The handle of the print job property is created by the RPJCreatePropertyHandle function.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 755
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Return value

TRUE
Memory initialized.

FALSE
Error

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

Related functions

RPJCreatePropertyHandle (Page 735) Create handle

See also
RPJCreatePropertyHandle (Page 735)
Overview of the functions (Page 710)

2.7.6.6 RPJSetProperty (RT Professional)

Description
This function allows you to temporarily change individual print job properties.
Before you can use RPJSetProperty to reset the value of the print job property specified by
pszPropName, you first need to use RPJGetJobProps to store the job properties in the internal
hProp buffer.

Declaration

BOOL RPJSetProperty (
HPROPERTIES hproperties,
LPCSTR pszPropName,
PVOID pvPropValue,
VARTYPE vtPropType,
DWORD dwReserved,
CMN_ERROR* pcmnerror );

WinCC Professional V13 SP2 – Programming reference


756 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Parameters

hproperties
Handle of the print job properties. The handle is created by the RPJCreatePropertyHandle
function.

pszPropName
Pointer to the name of the print job property:

AbsoluteSelectionFrom
AbsoluteSelectionTo
CycleSpan
DestinationFile
EnableCycle
EnableStart
EndPage This information enables you can to stop the printout of the report at
a particular page.
JobName The name of the print job must be unique within a project and conform
to the Windows conventions.
LayoutName You can assign the print job a layout using the layout name.
PrinterName 1 Here, you specify the printer to which the printout is initially sent.
PrinterName 2 This specifies the printer to be used if the first printer is not available.
PrinterName 3 This specifies the printer to be used if the first two printers are not
available.
RelativeSelectionCount
RelativeSelectionRange
StartPage This information enables you can to start the printout of the report at
a particular page.
StartTime
UseRelative
UseOutputFile
UseOutputPrinter

pvPropValue
Pointer on the value of the object property.

vtPropType
The type of the object property depends on pszPropName:

AbsoluteSelectionFrom VT_DATE
AbsoluteSelectionTo VT_DATE
CycleSpan VT_I4
DestinationFile VT_LPSTR
EnableCycle VT_I4
EnableStart VT_I4
EndPage VT_I4

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 757
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

JobName VT_LPSTR / VT_LPWSTR


LayoutName VT_LPSTR / VT_LPWSTR
PrinterName VT_LPSTR / VT_LPWSTR
PrinterName2 VT_LPSTR / VT_LPWSTR
PrinterName3 VT_LPSTR / VT_LPWSTR
RelativeSelectionCount VT_I4
RelativeSelectionRange VT_I4
StartPage VT_I4
StartTime VT_DATE
UseRelative VT_I4
UseOutputFile VT_I4
UseOutputPrinter VT_I4

If you want to change a string and your application is compiled in Unicode, you must use
vtPropVT_LPWSTR as the data type. Otherwise, vtProp has a VT_LPTSTR data type.
If vtProp has a VT_DATE data type, the prop parameter must refer to a SYSTEMTIME structure.

dwReserved
The parameter is reserved for future development.

pcmnerror
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information into this structure.

Return value

TRUE
Print job property temporarily changed

FALSE
Error

Comment
All available print job properties can be determined with the RPJGetNumJobProperties and
RPJGetJobPropertyAt functions.

Required files
rpjapi.h
rpjapi.lib
rpjapi.dll

WinCC Professional V13 SP2 – Programming reference


758 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Related functions

RPJCreatePropertyHandle (Page 735) Create handle


RPJGetJobProps (Page 750) Determine print job properties
RPJGetProperty (Page 752) Determine print job property

Examples
Modify print job properties (Page 770)"RD02.cpp"

See also
RPJGetJobProps (Page 750)
RPJGetProperty (Page 752)
RPJCreatePropertyHandle (Page 735)
Modify print job properties (Page 770)
Overview of the functions (Page 710)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 759
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

2.7.7 Examples (RT Professional)

2.7.7.1 Get print job method name (RT Professional)

Example

//{{ODK_EXAMPLE}Get print job methodname (RPT)}


//{{FUNCTION}RPJCreatePropertyHandle (RPT)}
//{{FUNCTION}RPJDeletePropertyHandle (RPT)}
//{{FUNCTION}RPJGetNumJobMethods (RPT)}
//{{FUNCTION}RPJGetJobMethodAt (RPT)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: MyPrintJobPropertyInquire( void ) ODK RD RT
// =====================================================================
// : Get print job methodname (Enum) !
// =====================================================================
void MyRPJGetJobMethodAt(void)
{
// #define PROJ_PATH "C:\\siemens\\odk\\samples\\projects\\demo\\odk.mcp"
BOOL ret = FALSE;
CMN_ERROR Error;
HPROPERTIES hProp = NULL;
TCHAR jobname[255];
TCHAR szText[255];
DWORD d = 0L;
DWORD i = 0L;
char buf[500+1];
DWORD dwBufsize = 500L;
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("--------------------"));
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("MyRPJGetJobMethodAt:"));
ODKTrace(szText);
MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile
memset(&Error, 0, sizeof(CMN_ERROR));
ret = RPJAttach(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJAttach: E1= 0x
%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
return;
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJAttach"));
ODKTrace(szText);
}
_tcsncpy_s(jobname, _countof(jobname), _T("ODK_PRINTJOB"), _TRUNCATE); // print job
memset(&Error, 0, sizeof(CMN_ERROR));
hProp = RPJCreatePropertyHandle (/*PROJ_PATH*/g_szProjectFile, &Error);
if(NULL == hProp)

WinCC Professional V13 SP2 – Programming reference


760 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJCreatePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
ret = RPJDetach(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDetach"));
}
ODKTrace(szText);
return;
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJCreatePropertyHandle = 0x
%08lx"), hProp);
ODKTrace(szText);
}
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJGetNumJobMethods(&d, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJGetNumJobMethods:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
for (i = 0; i < d; i++)
{
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJGetJobMethodAt(i, buf, dwBufsize, &Error);
if (ret == FALSE)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJDeletePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" %d PrintJobMethod=
%s"),i+1,buf);
}
ODKTrace(szText);
}
}
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJDeletePropertyHandle(hProp, &Error);

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 761
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJDeletePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDeletePropertyHandle"));
}
ODKTrace(szText);
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJDetach(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1= 0x
%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDetach"));
}
ODKTrace(szText);
}
//{{ODK_EXAMPLE}(END)}

See also
RPJCreatePropertyHandle (Page 735)
RPJDeletePropertyHandle (Page 736)
RPJGetJobMethodAt (Page 746)
RPJGetNumJobMethods (Page 747)

WinCC Professional V13 SP2 – Programming reference


762 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

2.7.7.2 Get print job names (RT Professional)

Example

//{{ODK_EXAMPLE}Get print job names (RPT)}


//{{FUNCTION}RPJCreatePropertyHandle (RPT)}
//{{FUNCTION}RPJDeletePropertyHandle (RPT)}
//{{FUNCTION}RPJGetNumJobs (RPT)}
//{{FUNCTION}RPJGetJobNameAt (RPT)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: MyRPJGetJobNameAt( void ) ODK RD RT
// =====================================================================
// : Get all print job names (Enum) !
// =====================================================================
void MyRPJGetJobNameAt(void)
{
// #define PROJ_PATH "C:\\siemens\\odk\\samples\\projects\\demo\\odk.mcp"
BOOL ret = FALSE;
CMN_ERROR Error;
HPROPERTIES hProp = NULL;
TCHAR jobname[255];
TCHAR szText[255];
DWORD d = 0L;
DWORD i = 0L;
char buf[500+1];
DWORD dwBufsize = 500;
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("--------------------"));
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("MyRPJGetJobNameAt:"));
ODKTrace(szText);
MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile
memset(&Error, 0, sizeof(CMN_ERROR));
ret = RPJAttach(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJAttach: E1= 0x
%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
return;
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJAttach"));
ODKTrace(szText);
}
_tcsncpy_s(jobname, _countof(jobname), _T("ODK_PRINTJOB"), _TRUNCATE); // print job
memset(&Error, 0, sizeof(CMN_ERROR));
hProp = RPJCreatePropertyHandle (/*PROJ_PATH*/g_szProjectFile, &Error);
if(NULL == hProp)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJCreatePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 763
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

Error.dwError1, Error.dwError2, Error.szErrorText);


ODKTrace(szText);
ret = RPJDetach(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDetach"));
}
ODKTrace(szText);
return;
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJCreatePropertyHandle = 0x
%08lx"), hProp);
ODKTrace(szText);
}
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJGetNumJobs(/*PROJ_PATH*/g_szProjectFile, &d, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJGetNumJobs: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
for (i = 0; i < d; i++)
{
memset(&Error,0,sizeof(CMN_ERROR));
ret = FALSE;
ret = RPJGetJobNameAt(/*PROJ_PATH*/g_szProjectFile, i, buf, dwBufsize, &Error);
if (ret == FALSE)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJDeletePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" %d PrintJobName=
%s"),i+1, buf);
}
ODKTrace(szText);
}
}
memset(&Error,0,sizeof(CMN_ERROR));
ret = FALSE;
ret = RPJDeletePropertyHandle(hProp, &Error);
if (ret == FALSE)

WinCC Professional V13 SP2 – Programming reference


764 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJDeletePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDeletePropertyHandle"));
}
ODKTrace(szText);
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJDetach(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1= 0x
%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDetach"));
}
ODKTrace(szText);
}
//{{ODK_EXAMPLE}(END)}

See also
RPJCreatePropertyHandle (Page 735)
RPJDeletePropertyHandle (Page 736)
RPJGetJobNameAt (Page 738)
RPJGetNumJobs (Page 739)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 765
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

2.7.7.3 Get print job properties (RT Professional)

Example

//{{ODK_EXAMPLE}Get print job properties (RPT)}


//{{FUNCTION}RPJCreatePropertyHandle (RPT)}
//{{FUNCTION}RPJDeletePropertyHandle (RPT)}
//{{FUNCTION}RPJGetNumJobProperties (RPT)}
//{{FUNCTION}RPJGetJobPropertyAt (RPT)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: MyRPJGetJobPropertyAt( void ) ODK RD RT
// =====================================================================
// : Inquire print job properties (Enum) !
// =====================================================================
void MyRPJGetJobPropertyAt(void)
{
// #define PROJ_PATH "C:\\siemens\\odk\\samples\\projects\\demo\\odk.mcp"
BOOL ret = FALSE;
CMN_ERROR Error;
HPROPERTIES hProp = NULL;
TCHAR jobname[255];
TCHAR szText[255];
DWORD d = 0L;
DWORD f = 0L;
DWORD i = 0L;
char buf[500+1];
DWORD dwBufsize = 500L;
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("--------------------"));
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("MyRPJGetJobPropertyAt:"));
ODKTrace(szText);
MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile
memset(&Error, 0, sizeof(CMN_ERROR));
ret = RPJAttach(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJAttach: E1= 0x
%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
return;
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJAttach"));
ODKTrace(szText);
}
_tcsncpy_s(jobname, _countof(jobname), _T("ODK_PRINTJOB"), _TRUNCATE); // print job
memset(&Error, 0, sizeof(CMN_ERROR));
hProp = RPJCreatePropertyHandle (/*PROJ_PATH*/g_szProjectFile, &Error);
if(NULL == hProp)
{

WinCC Professional V13 SP2 – Programming reference


766 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in


RPJCreatePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
ret = RPJDetach(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDetach"));
}
ODKTrace(szText);
return;
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJCreatePropertyHandle = 0x
%08lx"), hProp);
ODKTrace(szText);
}
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJGetNumJobProperties(&d, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJGetNumJobProperties: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
for (i = 0; i < d; i++)
{
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJGetJobPropertyAt(i, buf, dwBufsize, &f, &Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJGetJobPropertyAt: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" %d PrintJobProperty=
%s"),i+1, buf);
}
ODKTrace(szText);
}
}
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJDeletePropertyHandle(hProp, &Error);
if (FALSE == ret)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 767
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJDeletePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDeletePropertyHandle"));
}
ODKTrace(szText);
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJDetach(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1= 0x
%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDetach"));
}
ODKTrace(szText);
}
//{{ODK_EXAMPLE}(END)}

See also
RPJCreatePropertyHandle (Page 735)
RPJDeletePropertyHandle (Page 736)
RPJGetJobPropertyAt (Page 748)
RPJGetNumJobProperties (Page 751)

WinCC Professional V13 SP2 – Programming reference


768 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

2.7.7.4 Modify print job properties (RT Professional)

Example

//{{ODK_EXAMPLE}Modify print job properties (RPT)}


//{{FUNCTION}RPJCreatePropertyHandle (RPT)}
//{{FUNCTION}RPJDeletePropertyHandle (RPT)}
//{{FUNCTION}RPJGetJobProps (RPT)}
//{{FUNCTION}RPJGetProperty (RPT)}
//{{FUNCTION}RPJSetJobProps (RPT)}
//{{FUNCTION}RPJSetProperty (RPT)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: MyModifyPrintJob( void ) ODK RD RT
// =====================================================================
// : Modify print job properties (change starttime) !
// =====================================================================
void MyModifyPrintJob(void)
{
// #define PROJ_PATH "C:\\siemens\\odk\\samples\\projects\\demo\\odk.mcp"
BOOL ret = FALSE;
CMN_ERROR Error;
TCHAR szText[255];
HPROPERTIES hProp = NULL;
SYSTEMTIME st;
LPVOID ptr;
DWORD typ;
TCHAR jobname[200];
TCHAR propname[200];
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("--------------------"));
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("MyModifyPrintJob:"));
ODKTrace(szText);
MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile
memset(&Error, 0, sizeof(CMN_ERROR));
ret = RPJAttach(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJAttach: E1= 0x
%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
return;
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJAttach"));
ODKTrace(szText);
}
// read properties
memset(&Error, 0, sizeof(CMN_ERROR));
hProp = RPJCreatePropertyHandle (/*PROJ_PATH*/g_szProjectFile, &Error);
if(NULL == hProp)
{

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 769
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in


RPJCreatePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
ret = RPJDetach(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDetach"));
}
ODKTrace(szText);
return;
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJCreatePropertyHandle = 0x
%08lx"), hProp);
ODKTrace(szText);
}
_tcsncpy_s(jobname, _countof(jobname), _T("ODK_PRINTJOB"), _TRUNCATE);
memset(&Error, 0, sizeof(CMN_ERROR));
ret = RPJGetJobProps (hProp, jobname, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJGetJobProps: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
ret = RPJDeletePropertyHandle(hProp, &Error);
if (ret == FALSE)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJDeletePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDeletePropertyHandle"));
}
ODKTrace(szText);
ret = RPJDetach(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDetach"));
}

WinCC Professional V13 SP2 – Programming reference


770 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

ODKTrace(szText);
return;
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" RPJGetJobProps"));
ODKTrace(szText);
}
typ = VT_DATE;
_tcsncpy_s(jobname, _countof(jobname), _T("ODK_PRINTJOB"), _TRUNCATE);
_tcsncpy_s(propname, _countof(propname), _T("STARTTIME"), _TRUNCATE);
memset(&st, 0, sizeof(SYSTEMTIME));
ptr = (LPVOID)&st;
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJGetProperty (hProp, propname, ptr, (VARTYPE)typ, 16, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJGetProperty: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" RPJGetProperty"));
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" Jobname=%s Propname=
%s"),jobname,propname);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" %02d.%02d.%04d %02d:
%02d:%02d"),
(WORD)st.wDay,
(WORD)st.wMonth,
(WORD)st.wYear,
(WORD)st.wHour,
(WORD)st.wMinute,
(WORD)st.wSecond);
}
ODKTrace(szText);
// write properties
st.wHour = 11;
st.wMinute = 12;
st.wSecond = 13;
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJSetProperty (hProp, propname, ptr, (VARTYPE) typ, 16, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJSetProperty: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" RPJSetProperty"));
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" Jobname=%s ;Propname=
%s"),jobname,propname);

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 771
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" %02d.%02d.%04d %02d:
%02d:%02d"),
(WORD)st.wDay,
(WORD)st.wMonth,
(WORD)st.wYear,
(WORD)st.wHour,
(WORD)st.wMinute,
(WORD)st.wSecond);
}
ODKTrace(szText);
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJSetJobProps (hProp, jobname, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJSetJobProps: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" RPJSetJobProps"));
}
ODKTrace(szText);
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJDeletePropertyHandle(hProp, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJDeletePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDeletePropertyHandle"));
}
ODKTrace(szText);
memset(&Error,0,sizeof(CMN_ERROR));
ret = RPJDetach(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1= 0x
%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE,
_T("RPJDeletePropertyHandle")); }
ODKTrace(szText);
}
//{{ODK_EXAMPLE}(END)}

WinCC Professional V13 SP2 – Programming reference


772 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

See also
RPJCreatePropertyHandle (Page 735)
RPJDeletePropertyHandle (Page 736)
RPJGetJobProps (Page 750)
RPJGetProperty (Page 752)
RPJSetProperty (Page 756)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 773
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

2.7.7.5 Show print job preview (RT Professional)

Example

// =====================================================================
// =====================================================================
// : Module with examples of Report Designer
// *********************************************************************
// Copyright (C) 1995-99 SIEMENS AG, A&D PT1 D2 All rights reserved
// *********************************************************************
#include "stdafx.h" // if MFC classes
#include "RD02.h"
#include "DM01.h"

//{{ODK_EXAMPLE}Show print job preview (RPT)}


//{{FUNCTION}RPJCreatePropertyHandle (RPT)}
//{{FUNCTION}RPJDeletePropertyHandle (RPT)}
//{{FUNCTION}RPJGetJobProps (RPT)}
//{{FUNCTION}RPJCallJobMethod (RPT)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: MyShowPrintJobPreview( void ) ODK RD RT
// =====================================================================
// : Show print job preview
// =====================================================================
void MyShowPrintJobPreview(void)
{
// #define PROJ_PATH "C:\\siemens\\odk\\samples\\projects\\demo\\odk.mcp"
BOOL ret = FALSE;
TCHAR szText[255];
CMN_ERROR Error;
HPROPERTIES hProp = NULL;
TCHAR jobname[200];
TCHAR methode[200];
_tcsncpy_s(jobname, _countof(jobname), _T("ODK_PRINTJOB"), _TRUNCATE); // print job
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("--------------------"));
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("MyShowPrintJobPreview:"));
ODKTrace(szText);
MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile
memset(&Error, 0, sizeof(CMN_ERROR));
ret = RPJAttach(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJAttach: E1= 0x
%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
return;
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJAttach"));
ODKTrace(szText);

WinCC Professional V13 SP2 – Programming reference


774 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

}
memset(&Error, 0, sizeof(CMN_ERROR));
hProp = RPJCreatePropertyHandle (/*PROJ_PATH*/g_szProjectFile, &Error);
if(NULL == hProp)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJCreatePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
ret = RPJDetach(&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDetach"));
}
ODKTrace(szText);
return;
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJCreatePropertyHandle = 0x
%08lx"), hProp);
ODKTrace(szText);
}
memset(&Error, 0, sizeof(CMN_ERROR));
ret = RPJGetJobProps (hProp, jobname, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJGetJobProps: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
ret = RPJDeletePropertyHandle(hProp, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJDeletePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDeletePropertyHandle"));
}
ODKTrace(szText);
ret = RPJDetach(&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 775
Runtime API (RT Professional)
2.7 Report system functions (RT Professional)

else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDetach"));
}
ODKTrace(szText);
return;
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" RPJGetJobProps"));
ODKTrace(szText);
}
_tcsncpy_s(methode, _countof(methode), _T("PREVIEW"), _TRUNCATE); // preview
// _tcsncpy_s(methode, _countof(methode), _T("PRINTJOB"), _TRUNCATE); // print
// _tcsncpy_s(methode, _countof(methode), _T("SETSELECTIONALLPAGES"), _TRUNCATE);
memset(&Error, 0, sizeof(CMN_ERROR));
ret = RPJCallJobMethod (hProp, methode, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJGetJobProps: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" RPJCallJobMethod"));
}
ODKTrace(szText);
memset(&Error, 0, sizeof(CMN_ERROR));
ret = RPJDeletePropertyHandle(hProp, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
RPJDeletePropertyHandle: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDeletePropertyHandle"));
}
ODKTrace(szText);
memset(&Error, 0, sizeof(CMN_ERROR));
ret = RPJDetach(&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in RPJDetach: E1= 0x
%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("RPJDetach"));
}
ODKTrace(szText);
}
//{{ODK_EXAMPLE}(END)}

WinCC Professional V13 SP2 – Programming reference


776 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

See also
RPJCreatePropertyHandle (Page 735)
RPJDeletePropertyHandle (Page 736)
RPJCallJobMethod (Page 745)
RPJGetJobProps (Page 750)

2.8 Tag and log functions (RT Professional)

2.8.1 Basics (RT Professional)

2.8.1.1 Overview of the functions (RT Professional)

Overview

TLG_ENUM_ARCHIV_CALLBACK (Page 852) List logs (callback)


TLG_ENUM_PROJECT_NAME_CALLBACK List projects (callback)
(Page 843)
AUTOHOTSPOT List entries in trend templates (callback)
TLG_ENUM_TIME_NAME_CALLBACK List time objects (callback)
(Page 888)
TLG_ENUM_VARIABLE_NAME_CALLBACK List tags (callback)
(Page 845)
TLG_ENUMBACKUP_ENTRIES (Page 895) List backups (callback)
TLG_ENUMTABLES (Page 859) List logs (callback)
TLG_ENUMTIMES_CALLBACK (Page 891) List time objects (callback)
TLG_ENUMVARIABLES (Page 848) List tags (callback)
TLG_GETARCHIVDATA_CALLBACK (Page 864) Read out data of a log (callback)
TLGChangeLanguage (Page 834) Language switching
TLGCloseProject (Page 838) Close project
TLGCloseWindow (Page 879) Close print job/script diagnostics
TLGConnect (Page 835) Establish connection to Tag Logging RT
TLGCSConnectEx (Page 832) Establish connection to Tag Logging CS
TLGCSConnect (Page 830) Establish connection to Tag Logging CS
TLGDisconnect (Page 837) Terminate connection to Tag Logging RT
TLGDrawCurvesInDC (Page 880) Show trends
TLGEnumArchives (Page 851) List logs
TLGEnumArchivsEx (Page 856) List logs
TLGEnumArchivs (Page 854) List logs
TLGEnumArchivsSel (Page 857) List logs
TLGEnumBackupEntries (Page 894) List backups

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 777
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

TLGEnumProject (Page 842) List projects


TLGEnumTime (Page 887) List time objects
TLGEnumTimes (Page 889) List time objects
TLGEnumVariablesEx (Page 846) List tags
TLGEnumVariables (Page 844) List tags
TLGExport (Page 897) Export log
TLGFreeMemory (Page 861) Free memory
TLGGetArchivDataEx (Page 866) Read out data of a log
TLGGetArchivData (Page 862) Read out data of a log
TLGGetBackupSize (Page 898) Determine size of an exported data record
TLGGetClosestTimeEx (Page 870) Determine logging time
TLGGetClosestTime (Page 868) Determine logging time
TLGInsertArchivData (Page 872) Insert data in a log
TLGInsertTemplateItem (Page 881) Write entries to trend window templates, write en‐
tries to table window templates
TLGLockArchiv (Page 874) Enable log, lock log
TLGLockVariable (Page 876) Enable tag, lock tag
TLGOpenProject (Page 840) Open project
TLGPressToolbarButton (Page 882) Activate buttons in the toolbar
TLGReadArchiv (Page 877) Read log parameters
TLGReadTime (Page 892) Determine time object parameters
TLGReadVariable (Page 849) Determine tag parameters
TLGSetRulerWindowVisible (Page 884) Also display reading line window
TLGShowWindow (Page 885) Display print job/script diagnostics

2.8.1.2 Overview of structures (RT Professional)

Overview

TLG_ARCHIV_STR (Page 791) Log parameters


TLG_ARCHIVDATARAW (Page 794) Log data
TLG_BACKUP_TABLE_INFO (Page 797) Information on export table
TLG_CURVESCALEX (Page 799) Scaling of the x-axis
TLG_CURVESCALEY (Page 804) Scaling of the y-axis
TLG_GETARCHIVDATA (Page 808) Log data of process value logs, log data of com‐
pressed logs
TLG_IO_BACKUP_SELECT (Page 809) Selection criteria for backup functions
TLG_PROT_CURVE_INFOS (Page 810) Report structure of trends
TLG_TABLE_INFO (Page 813) Report structure of tables
TLG_SCAL_STR (Page 812) Tag limits
TLG_TABLESCALE (Page 814) Table column (properties)
TLG_TEMPLATEITEM_INFO (Page 817) Trend (properties) Table column (properties)
TLG_TIME_STR (Page 819) Time object

WinCC Professional V13 SP2 – Programming reference


778 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

TLG_TIMEDATA (Page 820) Time object


TLG_TPLITEM_CURVE (Page 821) Trend (properties)
TLG_TPLITEM_INFO (Page 822) Trend (properties) Table column (properties)
TLG_TPLITEM_TABLE (Page 823) Table column (properties)
TLG_VAR_STR (Page 824) Tag (properties)
TLG_VARIABLE_INFO (Page 829) Tag

2.8.1.3 Error messages (RT Professional)

Overview
The following error messages can be returned by the API functions in the CMN_ERROR error
structure:

TLG_API_ERROR 0x10000000 Unspecified error


TLG_API_NO_TIME_EXIST 0x10000001 No time object exists
TLG_API_TIME_NAME_EXIST 0x10000002 A time object with this name al‐
ready exists
TLG_API_TIME_NAME_NOT_EXIST 0x10000003 A time object with this name was
not found
TLG_API_NO_ARCHIV_EXIST 0x10000004 No log available
TLG_API_ARCHIV_NAME_EXIST 0x10000005 A log with this name already ex‐
ists
TLG_API_ARCHIV_NAME_NOT_EXIST 0x10000006 A log with this name was not
found
TLG_API_INVALID_ARCHIV_TYP 0x10000007 Invalid log type
TLG_API_NO_VARIABLE_EXIST 0x10000008 No tags exist
TLG_API_VARIABLE_NAME_EXIST 0x10000009 A tag with this name already ex‐
ists
TLG_API_VARIABLE_NAME_NOT_EXIST 0x1000000A A tag with this name was not
found
TLG_API_VARTYPE_MISMATCH 0x1000000B Incorrect tag type
TLG_API_SRC_NO_VARIABLE_EXIST 0x1000000C SRC: no tags exist
TLG_API_SRC_VARIABLE_NAME_NOT_EXIST 0x1000000D SRC: a tag with this name was
not found
TLG_API_SRC_ARCHIV_NOT_EXIST 0x1000000E SRC: log not found
TLG_API_NO_FIELD_EXIST 0x1000000F No fields are available
TLG_API_FIELD_NAME_EXIST 0x10000010 A field with this name already ex‐
ists
TLG_API_FIELD_NAME_NOT_EXIST 0x10000011 A field with this name was not
found
TLG_API_NO_PROJECT_EXIST 0x10000012 No project exists
TLG_API_PROJECT_NAME_NOT_EXIST 0x10000013 Project name was not found
TLG_API_PROJECT_IS_ACTIVE 0x20000014 Project is activated
TLG_API_NO_CONNECTION 0x10000015 No connection to an activated
project

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 779
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

TLG_API_RENAME_NAME_EXIST 0x10000016 Assigned name already exists


TLG_API_NAME_WRONG_CHAR 0x10000017 Name contains incorrect charac‐
ter
TLG_API_NAME_TOLONG 0x10000018 Name is too long
TLG_API_ERR_ARCHIVSTYLE 0x10000019 Error in log design
TLG_API_NO_TYP_CHANGE_ALLOWED 0x1000001A Type change is not allowed
TLG_API_ERR_SUPPLY 0x1000001B An error has occurred
TLG_API_INVALID_PARAM 0x1000001C Invalid/incorrect parameter as‐
signment
TLG_API_NOT_SUPPORTED 0x1000001D This function is not supported
TLG_API_NO_INTERFACE 0x1000001E Access to lower level COM inter‐
faces failed
TLG_API_NODEFAULTSERVER 0x10000021 No default server configured
TLG_API_NOLOCALSERVER 0x10000022 No local server available
TLG_API_NOSERVER 0x10000023 No default server configured and
no local server available
TLG_API_NOMC 0x10000024 No multiclient project (not used
here)
TLG_API_NOMCDEFAULTSERVER 0x10000025 No multiclient project, but "@de‐
fault::" specified as server prefix
(is not used here)
TLG_API_UNKNOWN_ERROR 0x10000030 Unknown callback error
(WinCC V6.2 and higher)
TLG_API_ASYNC_TIMEOUT 0x10000031 Asynchronous function canceled
with timeout
(WinCC V6.2 and higher)
TLG_API_EXPORT_NO_WRITE 0x10000032 Export file was not written
(WinCC V6.2 and higher)
TLG_API_CORRUPT_DATA 0x10000033 Data unusable/defective
(WinCC V6.2 and higher)
IDS_API_ERROR_CREATING_CLIENT_WND 30001 Client window could not be gen‐
erated
IDS_API_ERROR_WINDOW_NOT_FOUND 30002 Button (window) could not be
found

2.8.1.4 Constants (RT Professional)

Runtime window

TLG_CURVE_WINDOW 0x00000001 Trend window


TLG_TABLE_WINDOW 0x00000002 Table window
TLG_CTRL_WINDOW 0x00000004 TLGRT control window

WinCC Professional V13 SP2 – Programming reference


780 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Export functions

TLG_BACKUP_EXPORT 0x00000001 Export without deletion of source data.


TLG_BACKUP_EVACUATE 0x00000002 Export with deletion of source data.
TLG_BACKUP_DELETE 0x00000004 Deletion of data records without export.
TLG_BACKUP_RAW 0x00000008 Do not handle log on change separately.

Export/import formats

TLG_BAKFMT_CSV 0x00000001 CSV format (comma separated value)

Import functions

TLG_RESTORE_OVERWRITE 0x00000001 Import with overwriting.


TLG_RESTORE_MERGE 0x00000002 Import with check, error via callback.
TLG_RESTORE_BREAK 0x00000004 Import - canceled due to error

Log types

TLG_ARCTYP_USER 0x00000001 User log


(no longer supported in WinCC V5.0 and higher)
TLG_ARCTYP_PROCESS 0x00000002 Process value log
TLG_ARCTYP_COMPRESS 0x00000004 Compressed log

Log types

TLG_ARCTYP_ALL 0x00000000 Circular or sequential log


TLG_ARCTYP_CIRCULAR 0x00010000 Circular log
TLG_ARCTYP_FOLLOW 0x00020000 Sequential log

Log flags

TLG_API_FLG_FAST_INSERT 0x00000001 WinCC V6.0 SP1 and higher: Fast insertion of data
in SQL Server with TLGInsertArchivData

Window templates

TLG_TEMPLATE_ALL 0x00000000 All window templates


TLG_TEMPLATE_CURVE 0x00000001 Trend window template
TLG_TEMPLATE_TABLE 0x00000002 Table window template
TLG_TYP_TEMPLATE_CURVE 0x00800001 Trend window template
TLG_TYP_TEMPLATE_TABLE 0x00800002 Table window template

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 781
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Templates

TLG_TEMPLATEITEM_ALL 0x00000000 All template items


TLG_TEMPLATEITEM_CURVE 0x00000001 Trend template items
TLG_TEMPLATEITEM_TABLE 0x00000002 Table template items

Modify templates items

TLG_TI_ACTION_COLOR 0x00000001 Change color


TLG_TI_ACTION_SCALE_X 0x00000002 Change X-scaling
TLG_TI_ACTION_SCALE_Y 0x00000004 Change Y-scaling
TLG_TI_ACTION_VISIBLE 0x00000005 Make visible/invisible
TLG_TI_ACTION_RANGE_X 0x00000006 Display range X-axis
TLG_TI_ACTION_RANGE_Y 0x00000007 Display range Y-axis

Limit values

TLG_MAX_SQL_SELECT 512 Maximum length of an SQL command


TLG_MAX_TEMPLATE_NAME 32 Maximum length of the name of a trend or table
window template
TLG_MAX_TEMPLATEITEM_NAME 32 Maximum length of the name of a trend or table
template
TLG_MAX_FUNCTION_NAME 32 Maximum length of the name of an action or
function
TLG_MAX_DLL_NAME 32 Maximum length of the name of a DLL
TLG_MAX_STD_TEXT_NAME 32 TLGSetTemplateData
TLG_SETDATA_DEFAULT 0x00000000 y=f(x)
TLG_SETDATA_RESET 0x00000001 The trend buffer is cleared.
TLG_SETDATA_TIME_RANGE_X 0x00000002 The x-values must be interpreted as a time
range: y=f(t).
TLG_SETDATA_TIME_RANGE_Y 0x00000004 The y-values must be interpreted as a time
range: x=f(t).

Trend shape

TLG_CURVEFORM_STEP 0x00000011 Representation of the tag values as a step


trend
TLG_CURVEFORM_POINTS 0x00000012 Representation of the tag values as single
points.
TLG_CURVEFORM_DIRECT 0x00000014 Linear interpolation of tag values
TLG_CURVEFORM_ DIRFILL 0x00000021
TLG_CURVEFORM_ STEPFILL 0x00000022

WinCC Professional V13 SP2 – Programming reference


782 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Data range types

TLG_DATATYP_TIMERANGE 0x00000001
TLG_DATATYP_USERARCHIV 0x00000002
TLG_DATATYP_BLOCKDATA 0x00000004

Time ranges

TLG_TR_MINUTE 1
TLG_TR_HOUR 2
TLG_TR_DAY 3
TLG_TR_WEEK 4
TLG_TR_MONTH 5
TLG_TR_YEAR 6

Axes

TLG_AXIS_X_TOP 0x00000001
TLG_AXIS_X_MIDDLE 0x00000002
TLG_AXIS_X_BOTTOM 0x00000004
TLG_AXIS_Y_LEFT 0x00000001
TLG_AXIS_Y_MIDDLE 0x00000002
TLG_AXIS_Y_RIGHT 0x00000004

Protocol connection

TLG_PROTFLG_TIME_RANGE 0x00000001
TLG_PROTFLG_DATA_RANGE 0x00000002
TLG_PROTFLG_DATA 0x00000001
TLG_PROTFLG_TITLE 0x00000002
TLG_PROTFLG_TIMEFIELD 0x00000004
TLG_PROTFLG_DATACOUNT 0x00000008
TLG_PROTFLG_DATEFIELD 0x00000010
TAG_PROT_CURVE_FORM_STEP 0x00000001
TAG_PROT_CURVE_FORM_POINTS 0x00000002
TAG_PROT_CURVE_FORM_DIRECT 0x00000003
TAG_PROT_CURVE_FORM_AREA 0x00000004
TLG_PROTFLG_FIRST_COL 0x00000000
TLG_PROTFLG_FIRST_COL_TIME 0x00000001
TLG_PROTFLG_FIRST_COL_DATA 0x00000002
TLG_PROTFLG_FIRST_COL_DATE 0x00000004

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 783
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Read log data

TLG_DATA_FROM_POS 0x00000000
TLG_DATA_FROM_BEGIN 0x00000001
TLG_DATA_FROM_END 0x00000002
TLG_DATA_FROM_ACTUAL 0x00000004
TLG_DATA_FROM_LEFT_ABS 0x00000008
TLG_DATA_FROM_RIGHT_ABS 0x00000010

Buttons on the Runtime toolbar

Buttons for trends and tables

TLG_BASIC_BTN_HELP 0x00000001 Identification of the button for calling on‐


line help.
TLG_BASIC_BTN_DLG 0x00000002 Identification of the button for opening the
parameter assignment dialog for trend
and table window templates.
TLG_BASIC_BTN_FIRST 0x00000004 Identification of the button for displaying
the first data records of a log.
TLG_BASIC_BTN_PREV 0x00000008 Identification of the button for scrolling
back in the log.
TLG_BASIC_BTN_NEXT 0x00000010 Identification of the button for scrolling
ahead in the log.
TLG_BASIC_BTN_LAST 0x00000020 Identification of the button for displaying
the last data records of a log.
TLG_BASIC_BTN_STARTSTOP 0x00000040 Identification of the button for pausing or
resuming the updated trend or table dis‐
play.
TLG_BASIC_BTN_PREV_ITEM 0x00000800 Previous trend in the foreground or table
column first.
TLG_BASIC_BTN_NEXT_ITEM 0x00001000 Next trend in the foreground or table col‐
umn first.
TLG_BASIC_BTN_ARC_VAR_SELECT 0x00000100 Opens the log tag selection dialog.
TLG_BASIC_BTN_ITEM_SELECT 0x00000200 Opens the selection dialog for trends or
table columns.
TLG_BASIC_BTN_TIME_SELECT 0x00000400 Opens the selection dialog for the display
time range.

Buttons for trends

TLG_CURVE_BTN_ZOOMIN 0x01000000 Identification of the button for activating the zoom


function for the area to be zoomed. The size of
the zoom segment can only be defined using the
mouse!
TLG_CURVE_BTN_ZOOMOUT 0x02000000 Identification of the button for deactivating the
zoom function. This does not result in switching
back to the normal view.

WinCC Professional V13 SP2 – Programming reference


784 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

TLG_CURVE_BTN_LINEAL 0x04000000 Identification of the button for activating and de‐


activating the ruler for determining the coordi‐
nates of a measuring point.
TLG_CURVE_BTN_1_TO_1 0x08000000 Identification of the button for switching to normal
trend view.

Buttons for tables

TLG_TABLE_BTN_EDIT 0x00040000 Identification of the button for activating and de‐


activating the editing function.

Field definitions for structures

PDE_DB_PRJ_PROJNAME_MAX_LENGHT 128
TLG_DB_PRJ_PROJNAME_MAX_LENGHT
PDE_DB_PRJ_COMMENT_MAX_LENGHT 200
TLG_DB_PRJ_COMMENT_MAX_LENGHT
PDE_DB_PRJ_USERDATE_MAX_LENGHT 12
TLG_DB_PRJ_USERDATE_MAX_LENGHT
PDE_DB_PRJ_USERNAME_MAX_LENGHT 30
TLG_DB_PRJ_USERNAME_MAX_LENGHT
PDE_DB_ARC_NAME_MAX_LENGHT 32
TLG_DB_ARC_NAME_MAX_LENGHT
PDE_DB_ARC_NAME_MAX_LENGHT 32
TLG_DB_ARC_NAME_MAX_LENGHT
TLG_DB_ARC_USER_NAME_MAX_LENGHT 8
PDE_DB_ARC_SERVERNAME_MAX_LENGHT 50
TLG_DB_ARC_SERVERNAME_MAX_LENGHT
PDE_DB_ARC_COMMENT_MAX_LENGHT 100
TLG_DB_ARC_COMMENT_MAX_LENGHT
PDE_DB_ARC_ACTIONNAME_MAX_LENGHT 30
TLG_DB_ARC_ACTIONNAME_MAX_LENGHT
PDE_DB_VAR_NAME_MAX_LENGHT 64
TLG_DB_VAR_NAME_MAX_LENGHT
TLG_DB6_VAR_NAME_MAX_LENGHT 128
TLG_DB_MCP_VAR_MAME_MAX_LENGTH 128
PDE_DB_VAR_COMMENT_MAX_LENGHT 100
TLG_DB_VAR_COMMENT_MAX_LENGHT
PDE_DB_VAR_WRITEBACK_MAX_LENGHT 64
TLG_DB_VAR_WRITEBACK_MAX_LENGHT
TLG_DB6_VAR_WRITEBACK_MAX_LENGHT 128
PDE_DB_VAR_CYCLENAME_MAX_LENGHT 30
TLG_DB_VAR_CYCLENAME_MAX_LENGHT
PDE_DB_VAR_SIGNALTEX_MAX_LENGHT 30
TLG_DB_VAR_SIGNALTEX_MAX_LENGHT

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 785
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

PDE_DB_VAR_DLLNAME_MAX_LENGHT 30
TLG_DB_VAR_DLLNAME_MAX_LENGHT
PDE_DB_VAR_FUNCNAME_MAX_LENGHT 30
TLG_DB_VAR_FUNCNAME_MAX_LENGHT
PDE_DB_VAR_UNITDIR_MAX_LENGHT 30
TLG_DB_VAR_UNITDIR_MAX_LENGHT
PDE_DB_VAR_UNITSTR_MAX_LENGHT 64
TLG_DB_VAR_UNITSTR_MAX_LENGHT
TLG_DB6_VAR_UNITSTR_MAX_LENGHT 128
PDE_DB_FUNCNAME_MAX_LENGHT 30
TLG_DB_FUNCNAME_MAX_LENGHT
PDE_DB_DLLNAME_MAX_LENGHT 30
TLG_DB_DLLNAME_MAX_LENGHT
PDE_DB_SCALE_MAX_LENGHT 30
TLG_DB_SCALE_MAX_LENGHT
PDE_DB_TIMENAME_MAX_LENGHT 30
TLG_DB_TIMENAME_MAX_LENGHT
PDE_DB_FIELDNAME_MAX_LENGHT 64
TLG_DB_FIELDNAME_MAX_LENGHT
PDE_DB_STRUCTNAME_MAX_LENGHT 30
TLG_DB_STRUCTNAME_MAX_LENGHT

Field definitions of VARIANT record for log tag


For TLGCSCreateTagMulti, TLGCSReadTagMulti, and TLGCSModifyTagMulti
see Include file pde_typ.h
These functions are available starting with WinCC V6.2.

Definition in Field index Associated type Type Comments/ limita‐


ENUM_TLG_TAG definition tions
_FIELDINDEX
ENUM_TLG_TAG 0 VT_TLG_TAG_EN VT_I4 Set internally (val‐
_ENUMTYPE UMTYPE ue >= 8), cannot
be changed
ENUM_TLG_TAG 1 VT_TLG_TAG_VE VT_I4 Set internally (val‐
_VERSION RSION ue >= 1), cannot
be changed
ENUM_TLG_TAG 2 VT_TLG_TAG_CR VT_I4
_CREATORID EATORID
ENUM_TLG_TAG 3 VT_TLG_TAG_NA VT_BSTR Required for Cre‐
_NAME ME ate
ENUM_TLG_TAG 4 VT_TLG_TAG_AR VT_BSTR Required for Cre‐
_ARCHIVNAME CHIVNAME ate
ENUM_TLG_TAG 5 VT_TLG_TAG_TY VT_I4 Required for Cre‐
_TYPE PE ate

WinCC Professional V13 SP2 – Programming reference


786 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Definition in Field index Associated type Type Comments/ limita‐


ENUM_TLG_TAG definition tions
_FIELDINDEX
ENUM_TLG_TAG 6 VT_TLG_TAG_W VT_BSTR
_WRITEBACK‐ RITEBACKNAME
NAME
ENUM_TLG_TAG 7 VT_TLG_TAG_CO VT_BSTR
_COMMENT MMENT
ENUM_TLG_TAG 8 VT_TLG_TAG_AR VT_I4
_ARCTYPE CTYPE
ENUM_TLG_TAG 9 VT_TLG_TAG_SU VT_I4
_SUPPLYTYPE PPLYTYPE
ENUM_TLG_TAG 10 VT_TLG_TAG_LO VT_I4
_LOCKED CKED
ENUM_TLG_TAG 11 VT_TLG_TAG_SC VT_BSTR Required for Cre‐
_SCANTIME ANTIME ate
NUM_TLG_TAG_ 12 VT_TLG_TAG_AR VT_BSTR Required for Cre‐
ARCTIME CTIME ate
ENUM_TLG_TAG 13 VT_TLG_TAG_AR VT_I4 Required for Cre‐
_ARCFACTOR CFACTOR ate
ENUM_TLG_TAG 14 VT_TLG_TAG_VA VT_I4
_VARCOUNT‐ RCOUNTFOR‐
FORWARD WARD
ENUM_TLG_TAG 15 VT_TLG_TAG_VA VT_I4
_VARCOUNT‐ RCOUNTBACK‐
BACKWARD WARD
ENUM_TLG_TAG 16 VT_TLG_TAG_SA VT_I4
_SAVEBYFAULT VEBYFAULT
ENUM_TLG_TAG 17 VT_TLG_TAG_AR VT_I4 Required for Cre‐
_ARCTRIGGER CTRIGGER ate
ENUM_TLG_TAG 18 VT_TLG_TAG_ST VT_BSTR
_STATETEX‐ ATETEXTHIGH
THIGH
ENUM_TLG_TAG 19 VT_TLG_TAG_ST VT_BSTR
_STATETEXT‐ ATETEXTLOW
LOW
ENUM_TLG_TAG 20 VT_TLG_TAG_VA VT_I4
_VARPRO RPRO
ENUM_TLG_TAG 21 VT_TLG_TAG_FU VT_BSTR
_FUNCVALPRO NCVALPRO
ENUM_TLG_TAG 22 VT_TLG_TAG_DL VT_BSTR
_DLLVARPRO LVARPRO
ENUM_TLG_TAG 23 VT_TLG_TAG_FU VT_BSTR
_FUNCSTARTE‐ NCSTARTEVENT
VENT
ENUM_TLG_TAG 24 VT_TLG_TAG_DL VT_BSTR
_DLLSTARTE‐ LSTARTEVENT
VENT
ENUM_TLG_TAG 25 VT_TLG_TAG_FU VT_BSTR
_FUNCSTOPE‐ NCSTOPEVENT
VENT

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 787
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Definition in Field index Associated type Type Comments/ limita‐


ENUM_TLG_TAG definition tions
_FIELDINDEX
ENUM_TLG_TAG 26 VT_TLG_TAG_DL VT_BSTR
_DLLSTOPE‐ LSTOPEVENT
VENT
ENUM_TLG_TAG 27 VT_TLG_TAG_FU VT_BSTR
_FUNCDYNAMIC NCDYNAMIC
ENUM_TLG_TAG 28 VT_TLG_TAG_DL VT_BSTR
_DLLDYNAMIC LDYNAMIC
ENUM_TLG_TAG 29 VT_TLG_TAG_UN VT_BSTR
_UNITDIRECT ITDIRECT
ENUM_TLG_TAG 30 VT_TLG_TAG_NA VT_BSTR
_NAMEUNIT‐ MEUNITSTRUCT
STRUCT
ENUM_TLG_TAG 31 VT_TLG_TAG_UN VT_I4
_UNITINDEX ITINDEX
ENUM_TLG_TAG 32 VT_TLG_TAG_VA VT_R8
_VARUPPER RUPPER
ENUM_TLG_TAG 33 VT_TLG_TAG_VA VT_R8
_VARLOWER RLOWER
ENUM_TLG_TAG 34 VT_TLG_TAG_AR VT_R8
_ARCUPPER CUPPER
ENUM_TLG_TAG 35 VT_TLG_TAG_AR VT_R8
_ARCLOWER CLOWER
ENUM_TLG_TAG 36 VT_TLG_TAG_NA VT_BSTR
_NAMESCALE MESCALE
ENUM_TLG_TAG 37 VT_TLG_TAG_NA VT_BSTR
_NAMESOUR‐ MESOURCEARC
CEARC
ENUM_TLG_TAG 38 VT_TLG_TAG_NA VT_BSTR
_NAMESOURCE‐ MESOURCEVAR
VAR
ENUM_TLG_TAG 39 VT_TLG_TAG_NA VT_BSTR
_NAMERAWVAR MERAWVAR
ENUM_TLG_TAG 40 VT_TLG_TAG_CO VT_BSTR
_CONVDLL NVDLL
ENUM_TLG_TAG 41 VT_TLG_TAG_PR VT_BSTR Required for Cre‐
_PROCVARNAME OCVARNAME ate
ENUM_TLG_TAG 42 VT_TLG_TAG_TI VT_BSTR Set internally (new
_TIMEMODIFY MEMODIFY time stamp for Cre‐
ate and Modify),
cannot be
changed
ENUM_TLG_TAG 43 VT_TLG_TAG_AR VT_I4
_ARCON‐ CONCHANGE
CHANGE
ENUM_TLG_TAG 44 VT_TLG_TAG_AR VT_R8
_ARCONHYS‐ CONHYSTERESE
TERESE

WinCC Professional V13 SP2 – Programming reference


788 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Definition in Field index Associated type Type Comments/ limita‐


ENUM_TLG_TAG definition tions
_FIELDINDEX
ENUM_TLG_TAG 45 VT_TLG_TAG_FL VT_I4
_FLAGS AGS
ENUM_TLG_TAG 46 VT_TLG_TAG_ALI VT_BSTR
_ALIAS AS
ENUM_TLG_TAG 47 VT_TLG_TAG_VA VT_BSTR
_VARSTARTE‐ RSTARTEVENT
VENT
ENUM_TLG_TAG 48 VT_TLG_TAG_VA VT_BSTR
_VARSTOPE‐ RSTOPEVENT
VENT
ENUM_TLG_TAG 49 VT_TLG_TAG_PR VT_BSTR
_PRECISION ECISION
ENUM_TLG_TAG 50 VT_TLG_TAG_TA VT_I4 Set internally, can‐
_TAGID GID not be changed

Flags for log tags


see Include-Datei pde_typ.h ENUM_TLG_TAG_FLAGVALUES WinCC V6.2 and higher

ENUM_TLG_TAG_FLAGVALUE_NOFLAGS 0 Default
ENUM_TLG_TAG_FLAGVALUE_LONG‐ 1
TERM_DISABLE
ENUM_TLG_TAG_FLAGVALUE_ARCHIV‐ 2
ING_ON_SEGMENTCHANGE

Selection flags for TLGCSReadTagMulti and TLGCSModifyTagMulti


These functions are available starting with WinCC V6.2.

TLG_TAG_SELECTION_BY_NAME 1 Selection with log name and tag


name in each case.
--- --- ---
TLG_TAG_DEFAULT_SELECTION TLG_TAG_SELEC‐ Preferred selection type.
TION_BY_NAME
TLG_TAG_SELECTION_FLAGS_MASK 0x0000000FL Masking of the selection in the
flags.
TLG_TAG_SELECTION_FLAGS_OFFSET 0x0L Value offset of the selection after
masking in the flags.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 789
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.2 Structures (RT Professional)

2.8.2.1 TLG_ARCHIV_STR (RT Professional)

Declaration

typedef struct {
TCHAR szName[
PDE_DB_ARC_NAME_MAX_LENGTH+1];
TCHAR szComment[
PDE_DB_ARC_COMMENT_MAX_LENGTH+1];
TCHAR szServername[
PDE_DB_ARC_SERVERNAME_MAX_LENGTH +1];
DWORD dwType;
DWORD dwAccessRead;
DWORD dwAccessWrite;
TCHAR szArchiveAction[
PDE_DB_ARC_ACTIONNAME_MAX_LENGTH+1];
BOOL fLocked;
DWORD dwRecordType;
DWORD dwFillMessage;
DWORD dwRecordSize;
DWORD dwStorage;
TCHAR szCircularAction[
PDE_DB_ARC_ACTIONNAME_MAX_LENGTH+1];
TCHAR szCompressTime[
PDE_DB_TIMENAME_MAX_LENGTH+1];
DWORD dwSourceProcess;
TCHAR szRawDatVar[
PDE_DB_VAR_NAME_MAX_LENGTH+1];
TCHAR szSendAct[
PDE_DB_ARC_ACTIONNAME_MAX_LENGTH+1];
TCHAR szRecAct[
PDE_DB_ARC_ACTIONNAME_MAX_LENGTH+1];
DWORD dwRecItems;
}
TLG_ARCHIV_STR;

Members

szName
Gobal parameter for the name of the log

szComment
Global parameter for the comment on the project

szServername
Global parameter reserved for future upgrades

WinCC Professional V13 SP2 – Programming reference


790 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

dwTyp
Global parameter which identifies the log type.

TLG_ARCHIV_TYP_PROCESS Process value log


TLG_ARCHIV_TYP_COMPRESS Compressed log

dwAccessRead
Global parameter which identifies the authorization stage for read access (0...999).

dwAccessWrite
Global parameter which identifies the authorization stage for write access (0...999).

szArchivAction
Global parameter with the name of the action for general log processing.

fLocked
Global parameters which identifies a log as freed or locked.

dwRecordTyp
Parameter for circular and sequential logs which identifies the log type.

TLG_RECORD_TYP_CIRCULAR Circular log


TLG_RECORD_TYP_FOLLOW Sequential log

dwFillMessage
Parameter for circular, sequential and compressed logs which identifies when a filling level
message is to be sent. Max. two filling level messages can be configured with a logic OR
operation.
e.g.: 100% || 50%-90%)

TLG_FILL_MESSAGE_NO No filling level message


TLG_FILL_MESSAGE_50 Filling level message at 50%
TLG_FILL_MESSAGE_60 Filling level message at 60%
TLG_FILL_MESSAGE_70 Filling level message at 70%
TLG_FILL_MESSAGE_80 Filling level message at 80%
TLG_FILL_MESSAGE_90 Filling level message at 90%
TLG_FILL_MESSAGE_100 Filling level message at 100%

dwRecordSize
Parameter for circular logs which defines the size of the cyclic buffer in data records.

dwStorage
Parameter for circular logs which identifies the log location.

TLG_STORAGE_MEMORY Circular log in the main memory


TLG_STORAGE_HD Circular log on hard disk

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 791
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

szCircularAction
Parameter for circular logs, name of the action for exporting the data of a circular log.

szCompressTime
Parameter for compressed logs, name of the timer object which specifies the compression
time period.

dwSourceProcess
Parameter for compressed logs which identifies the processing type of the source log.

PDE_COMPSRC_CALC Calculate
PDE_COMPSRC_CALCCOPY Calculate and copy
PDE_COMPSRC_CALCDEL Calculate and delete
PDE_COMPSRC_CALCCOPYDEL Calculate, copy and delete

szRawDatVar
The parameter is reserved for later upgrades and must be defaulted with 0.

szSendAct
The parameter is reserved for later upgrades and must be defaulted with 0.

szRecAct
The parameter is reserved for later upgrades and must be defaulted with 0.

dwRecItems
The parameter is reserved for later upgrades and must be defaulted with 0.

Comment
The parameters of the TLG_ARCHIV_STR structure depend on the log type (process log or
compressed log) and the type of logging (circular or sequential log).

Required files
pde_def.h

API functions

TLGReadArchiv (Page 877) Read log parameters

See also
TLGReadArchiv (Page 877)

WinCC Professional V13 SP2 – Programming reference


792 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.2.2 TLG_ARCHIVDATARAW (RT Professional)

Declaration

typedef struct {
SYSTEMTIME stTime;
double doValue;
DWORD dwFlags;
}
TLG_ARCHIVDATARAW;

Members

stTime
stTime contains the logging time.

doValue
doValue contains the existing value at the time stTime.

dwFlags
The Tag Logging sets flags for every value which is written into the log which provides
information about the state of the tags.
The value must be converted to hexadecimal format for analysis of the flags. Whereby
● the left word (HighWord) contains flags from the Data Manager
● the left word (HighWord) quality codes, if PDE_RT_QUALITYCODE is set
● the right word (LowWord) status flags from the Tag Logging

Tag Logging status flags (LowWord):


PDE_RT_DAYLIGHT 0x0001 summer time, status can be determined with GetTimeZo‐
meInformation)
PDE_RT_SUBSTITUTION 0x0002 Substitute value
PDE_RT_TIME_BEVOR_JUMP 0x0004 Value prior to time jump
PDE_RT_TIME_BEHIND_JUMP 0x0008 Value after time jump
PDE_RT_TIME_OVERLAPPED 0x0010 Values during time overlap
PDE_RT_LOAD_SYSTEM 0x0020 For the first time after creating the log archived value
PDE_RT_RELOAD_SYSTEM 0x0040 First value after activating runtime
PDE_RT_CMPCOPY 0x0080 Compressed value
PDE_RT_TIME_CHANGED 0x0100 Time change took place
PDE_RT_HAND 0x0200 Manual tag supply
PDE_RT_ONCHANGEBACKUPVALUESTART 0x0400
PDE_RT_ONCHANGEBACKUPVALUESTOP 0x0800
PDE_RT_QUALITYCODE 0x1000

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 793
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Data Manager status flags (HighWord)


DM_VARSTATE_NOT_ESTABLISHED 0x0001 Connection to partner not established
DM_VARSTATE_HANDSHAKE_ERROR 0x0002 Handshake error
DM_VARSTATE_HARDWARE_ERROR 0x0004 Network module defective
DM_VARSTATE_MAX_LIMIT 0x0008 Planned maximum limit exceeded
DM_VARSTATE_MIN_LIMIT 0x0010 Planned minimum limit dropped below
DM_VARSTATE_MAX_RANGE 0x0020 Format limit exceeded
DM_VARSTATE_MIN_RANGE 0x0040 Format limit dropped below
DM_VARSTATE_CONVERSION_ERROR 0x0080 Display conversion error in connection with MAX/
MIN_RANGE
DM_VARSTATE_STARTUP_VALUE 0x0100 Tag startup value
DM_VARSTATE_DEFAULT_VALUE 0x0200 Tag default value
DM_VARSTATE_ADDRESS_ERROR 0x0400 Addressing error in the channel
DM_VARSTATE_INVALID_KEY 0x0800 Tag not found or does not exist
DM_VARSTATE_ACCESS_FAULT 0x1000 Access to tag not allowed
DM_VARSTATE_TIMEOUT 0x2000 Timeout no feedback from channel
DM_VARSTATE_SERVERDOWN 0x4000 Connection to server interrupted or server run down

WinCC tag status Quality code according to Profibus PA/OPC


DM_VARSTATE_SERVERDOWN Server is down Bad, out of service, 0x1C
(0x4000)
DM_VARSTATE_HARDWARE_ERROR Network module defective Bad, device failure, 0x0C
(0x0004)
DM_VARSTATE_NOT_ESTABLISHED Connection to partner not es‐ Bad, not connected, 0x08
(0x0001) tablished
DM_VARSTATE_TIMEOUT Timeout no feedback from Uncertain, last usable value, 0x44
(0x2000) channel
DM_VARSTATE_HANDSHAKE_ERROR Handshake error Bad, no communication (no usable value),
(0x0002) 0x18
DM_VARSTATE_ADDRESS_ERROR Addressing error in the channel Bad, configuration error, value not accep‐
(0x0400) ted, 0x04
DM_VARSTATE_INVALID_KEY Tag not found or does not exist Bad, configuration error, value not accep‐
(0x0800) ted, 0x04
DM_VARSTATE_ACCESS_FAULT Access to tag not allowed Bad, configuration error, value not accep‐
(0x1000) ted, 0x04
DM_VARSTATE_MAX_RANGE Format limit exceeded Uncertain, engineering unit range violation,
(0x0020) high limit set, 0x56
DM_VARSTATE_MIN_RANGE Format limit dropped below Uncertain, engineering unit range violation,
(0x0040) low limit set, 0x55
DM_VARSTATE_CONVERSION_ERROR Display conversion error Uncertain, engineering unit range violation,
(0x0080) set without limits, 0x54
DM_VARSTATE_MAX_LIMIT Planned maximum limit excee‐ Oring simulation to the limit bit HIGH, 0x01
(0x0008) ded with the other tag status, e.g. gives "good
(cascade), ok" 0xC2

WinCC Professional V13 SP2 – Programming reference


794 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

WinCC tag status Quality code according to Profibus PA/OPC


DM_VARSTATE_MIN_LIMIT Planned minimum limit drop‐ Oring simulation to the limit bitLOW, 0x02
(0x0010) ped below with the other tag status, e.g. gives "good
(cascade), ok"0xC1
DM_VARSTATE_STARTUP_VALUE Tag startup value Uncertain, initial value, 0x4C
(0x0100)
DM_VARSTATE_DEFAULT_VALUE Tag default value Uncertain, substitute-set, 0x48
(0x0200)

Comment
If the current timer for transferring a SYSTEMTIME parameter is required, the GetLocalTime
must be used and not GetSystemTime. There is usually a considerable time difference
between these two functions.
Set the PDE_RT_DAYLIGHT flag if the appropriate time falls in summer time. You can
determine the status of the flag with the GetTimeZoneInformation system function
(TIME_ZONE_ID_DAYLIGHT).

Required files
pdertdef.h
pdert.h
dmdefs.h

API functions

TLGGetArchivDataEx (Page 866) Read out data of a log

See also
TLGGetArchivDataEx (Page 866)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 795
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.2.3 TLG_BACKUP_TABLE_INFO (RT Professional)

Declaration

typedef struct {
TCHAR szArchivName[ _MAX_PATH + 1 ];
TCHAR szFileName[ _MAX_PATH + 1 ];
TCHAR szComment[ _MAX_PATH + 1 ];
DWORD dwFormatFlags;
DWORD dwJobFlags;
DWORD dwSize;
SYSTEMTIME sysFrom;
SYSTEMTIME sysTo;
DWORD dwUserData;
}
TLG_BACKUP_TABLE_INFO;

Members

szArchivName
Name of the log from which the data is to be exported.

szFileName
Name of the export file with path and extension

szComment
Text of comment for export

dwFormatFlags
Format specifier:

TLG_BAKFMT_CSV: CSV format (Comma Separated Value)

dwJobFlags
Job-specific identification, following are possible:

TLG_BACKUP_EXPORT: Simple backup without deleting the source data


TLG_BACKUP_EVACUATE: Export with deletion of the sources

dwSize
Size of the data to be exported

sysFrom
Start time from which the data is to be exported

sysTo
End time up to which the data is to be exported

WinCC Professional V13 SP2 – Programming reference


796 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

dwUserData
Application-specific data

Required files
pdertdef.h

API functions

TLG_ENUMBACKUP_ENTRIES (Page 895) List backups (callback)

See also
TLG_ENUMBACKUP_ENTRIES (Page 895)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 797
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.2.4 TLG_CURVESCALEX (RT Professional)

Declaration

typedef struct {
DWORD dwDataTyp;
DWORD dwBufferSize;
DWORD dwRangeTyp;
DWORD dwAxisLocation;
BOOL fActualize;
BOOL fAutoRange;
BOOL fGridLinesBig;
BOOL fGridLinesFine;
BOOL fGridLinesBigVisible;
BOOL fGridLinesFineVisible;
BOOL fPercent;
BOOL fLimitRange;
BOOL fSubstitute;
SYSTEMTIME stFrom;
SYSTEMTIME stTo;
double doFrom;
double doTo;
double doGridBig;
double doGridFine;
double doShowDigits;
double doLimitUpper1;
double doLimitUpper2;
double doLimitUpper3;
double doLimitLower1;
double doLimitLower2;
double doLimitLower3;
double doDisplayRangeFrom;
double doDisplayRangeTo;
double doLimitRangeFrom;
double doLimitRangeTo;
COLORREF crColor;
COLORREF crColorTimeOverlapped;
COLORREF crColorTimeJump;
COLORREF crColorLimitUpper1;
COLORREF crColorLimitUpper2;
COLORREF crColorLimitUpper3;
COLORREF crColorLimitLower1;
COLORREF crColorLimitLower2;
COLORREF crColorLimitLower3;
TCHAR szSelectSQL[ TLG_MAX_SQL_SELECT ];
TCHAR szText[ TLG_MAX_STD_TEXT_NAME ];
TCHAR szFunction[ TLG_MAX_FUNCTION_NAME ];
TCHAR szDLL[ TLG_MAX_DLL_NAME ];
}
TLG_CURVESCALEX;

WinCC Professional V13 SP2 – Programming reference


798 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Members

dwDataTyp
With dwDataTyp it is determined which data type the trend is based on:

TLG_DATATYP_TIME‐ 0x00000001 for time range:


RANGE The data originate from a time-controlled log (e.g.: process value log).
The values specified in stFrom and stTo are valid. The fAutoRange flag
then has no effect.
Otherwise it applies:
The data originate from a data-controlled log (e.g.: user log). The values
specified in doFrom and doTo are valid.
TLG_DATATYP_USER‐ 0x00000002 irrelevant for trends:
ARCHIV The data originate from a data-controlled user log. The values specified
in doFrom and doTo are valid.
TLG_DATATYP_BLOCKDA‐ 0x00000004 Data are set by TLGSetTemplateData:
TA The values in stFrom, stTo, doFrom and doTo are then irrelevant.

dwBufferSize
dwBufferSize corresponds to the number of measuring points of the trend and determines the
size of the trend data buffer.

dwRangeTyp
The parameter is reserved for later upgrades and must be defaulted with 0.

dwAxisLocation
The parameter is reserved for later upgrades and must be defaulted with 0.

fActualize
The trend is displayed dynamically when fActualize = TRUE. Otherwise it is static.

fAutoRange
Autoscaling is activated if fAutoRange = TRUE.
If a time-controlled log exists (dwDataTyp = TLG_DATATYP_TIMERANGE), fAutoRange has
no effect and the values specified in stFrom and stTo are valid.

fGridLinesBig
The parameter is reserved for later upgrades and must be defaulted with 0.

fGridLinesFine
The parameter is reserved for later upgrades and must be defaulted with 0.

fGridLinesBigVisible
The parameter is reserved for later upgrades and must be defaulted with 0.

fGridLinesFineVisible
The parameter is reserved for later upgrades and must be defaulted with 0.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 799
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

fPercent
The parameter is reserved for later upgrades and must be defaulted with 0.

fLimitRange
The parameter is reserved for later upgrades and must be defaulted with 0.

fSubstitute
The parameter is reserved for later upgrades and must be defaulted with 0.

stFrom
Start time of the display range. The parameter is only evaluated if
dwDataTy = TLG_TIME_RANGE.

stTo
End time of the display range. The parameter is only evaluated if
dwDataTyp = TLG_TIME_RANGE.
If the current timer for transferring a SYSTEMTIME parameter is required, the GetLocalTime
must be used and not GetSystemTime. There is usually a considerable time difference
between these two functions.

doFrom
Start value of the display range. The parameter is only evaluated if
dwDataTyp = TLG_DATA_RANGE.

doTo
End value of the display range. The parameter is only evaluated if in
dwDataTyp = TLG_DATA_RANGE.

doGridBig
The parameter is reserved for later upgrades and must be defaulted with 0.

doGridFine
The parameter is reserved for later upgrades and must be defaulted with 0.

doShowDigits
Number of decimal places

doLimitUpper1
The parameter is reserved for later upgrades and must be defaulted with 0.

doLimitUpper2
The parameter is reserved for later upgrades and must be defaulted with 0.

doLimitUpper3
The parameter is reserved for later upgrades and must be defaulted with 0.

WinCC Professional V13 SP2 – Programming reference


800 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

doLimitLower1
The parameter is reserved for later upgrades and must be defaulted with 0.

doLimitLower2
The parameter is reserved for later upgrades and must be defaulted with 0.

doLimitLower3
The parameter is reserved for later upgrades and must be defaulted with 0.

doDisplayRangeFrom
Indicates from which value a data-controlled display is to be made.

doDisplayRangeTo
Indicates up to which value a data-controlled display is to be made.

doLimitRangeFrom
The parameter is reserved for later upgrades and must be defaulted with 0.

doLimitRangeTo
The parameter is reserved for later upgrades and must be defaulted with 0.

crColor
The Windows-specific 32-bit value crColor determines the color in which the trend is to be
displayed.

crColorTimeOverlapped
The parameter is reserved for later upgrades.

crColorTimeJump
The parameter is reserved for later upgrades.

crColorLimitUpper1
The parameter is reserved for later upgrades.

crColorLimitUpper2
The parameter is reserved for later upgrades.

crColorLimitUpper3
The parameter is reserved for later upgrades.

crColorLimitLower1
The parameter is reserved for later upgrades.

crColorLimitLower2
The parameter is reserved for later upgrades.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 801
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

crColorLimitLower3
The parameter is reserved for later upgrades.

szSelectSQL
The parameter is reserved for later upgrades and must be defaulted with NULL.

szText;
Labeling of the x-axis

szFunction
The parameter is reserved for later upgrades and must be defaulted with NULL.

szDLL
The parameter is reserved for later upgrades and must be defaulted with NULL.

Comment
TLG_CURVESCALEX is used by the TLG_TPLITEM_CURVE (Page 821) structure.

Required files
pdertdef.h

See also
TLG_TPLITEM_CURVE (Page 821)

WinCC Professional V13 SP2 – Programming reference


802 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.2.5 TLG_CURVESCALEY (RT Professional)

Declaration

typedef struct {
DWORD dwDataTyp;
DWORD dwRangeTyp;
DWORD dwAxisLocation;
DWORD dwCurveForm;
BOOL fAutoRange;
BOOL fGridLinesBig;
BOOL fGridLinesFine;
BOOL fGridLinesBigVisible;
BOOL fGridLinesFineVisible;
BOOL fPercent;
BOOL fLimitRange;
BOOL fSubstitute;
SYSTEMTIME stFrom;
SYSTEMTIME stTo;
double doFrom;
double doTo;
double doGridBig;
double doGridFine;
double doShowDigitsF;
double doShowDigitsB;
double doLimitUpper1;
double doLimitUpper2;
double doLimitUpper3;
double doLimitLower1;
double doLimitLower2;
double doLimitLower3;
double doDisplayRangeFrom;
double doDisplayRangeTo;
double doLimitRangeFrom;
double doLimitRangeTo;
COLORREF crColor;
COLORREF crColorTimeOverlapped;
COLORREF crColorTimeJump;
COLORREF crColorLimitUpper1;
COLORREF crColorLimitUpper2;
COLORREF crColorLimitUpper3;
COLORREF crColorLimitLower1;
COLORREF crColorLimitLower2;
COLORREF crColorLimitLower3;
TCHAR szSelectSQL[ TLG_MAX_SQL_SELECT ];
TCHAR szText[ TLG_MAX_STD_TEXT_NAME ];
}
TLG_CURVESCALEY;

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 803
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Members

dwDataTyp
The data type (time/user/block data) has no significance here.

dwRangeTyp
The parameter is reserved for later upgrades and must be defaulted with 0.

dwAxisLocation
The parameter is reserved for later upgrades and must be defaulted with 0.

dwCurveForm
The appearance of the trend is defined by dwCurveForm

TLG_CURVEFORM_STEP View of the trend as a step trend


TLG_CURVEFORM_POINTS View of the trend as a single point
TLG_CURVEFORM_DIRECT Connect points of the trend linearly

fAutoRange
fAutoRange = TRUE adapts the display range automatically.

fGridLinesBig
fgridLinesBig = TRUE activates big grid lines.

fGridLinesFine
fgridLinesFine = TRUE activates fine grid lines.

fGridLinesBigVisible
If fgridLinesBigVisible = TRUE, the big grid lines are displayed.

fGridLinesFineVisible
If fgridLinesFineVisible = TRUE, the fine grid lines are displayed.

fPercent
The parameter is reserved for later upgrades and must be defaulted with 0.

fLimitRange
The parameter is reserved for later upgrades and must be defaulted with 0.

fSubstitute
The parameter is reserved for later upgrades and must be defaulted with 0.

stFrom
The parameter is reserved for later upgrades.

stTo
The parameter is reserved for later upgrades.

WinCC Professional V13 SP2 – Programming reference


804 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

doFrom
Lower limit of the display range on the y-axis.

doTo
Upper limit of the display range on the y-axis.

doGridBig
Spacing of the big grid lines.

doGridFine
Spacing of the fine grid lines.

doShowDigitsF
Places in display of values (before decimal point)

doShowDigitsB
Determines the number of decimal places

doLimitUpper1
The parameter is reserved for later upgrades and must be defaulted with 0.

doLimitUpper2
The parameter is reserved for later upgrades and must be defaulted with 0.

doLimitUpper3
The parameter is reserved for later upgrades and must be defaulted with 0.

doLimitLower1
The parameter is reserved for later upgrades and must be defaulted with 0.

doLimitLower2
The parameter is reserved for later upgrades and must be defaulted with 0.

doLimitLower3
The parameter is reserved for later upgrades and must be defaulted with 0.

doDisplayRangeFrom
Determines the value from which the display range begins.

doDisplayRangeTo
Determines the value up to which the display range extends.

doLimitRangeFrom
The parameter is reserved for later upgrades and must be defaulted with 0.

doLimitRangeTo
The parameter is reserved for later upgrades and must be defaulted with 0.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 805
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

crColor
The Windows-specific 32-bit value crColor determines the color in which the trend is to be
displayed.

crColorTimeOverlapped
The parameter is reserved for later upgrades.

crColorTimeJump
The parameter is reserved for later upgrades.

crColorLimitUpper1
The parameter is reserved for later upgrades.

crColorLimitUpper2
The parameter is reserved for later upgrades.

crColorLimitUpper3
The parameter is reserved for later upgrades.

crColorLimitLower1
The parameter is reserved for later upgrades.

crColorLimitLower2
The parameter is reserved for later upgrades.

crColorLimitLower3
The parameter is reserved for later upgrades.

szSelectSQL[ TLG_MAX_SQL_SELECT ];
The parameter is reserved for later upgrades and must be defaulted with ZERO.

szText[ TLG_MAX_STD_TEXT_NAME ];
Labeling of the y-axis

Comment
TLG_CURVESCALEY is used by the AUTOHOTSPOT structure.

Required files
pdertdef.h

See also
TLG_TPLITEM_CURVE (Page 821)

WinCC Professional V13 SP2 – Programming reference


806 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.2.6 TLG_GETARCHIVDATA (RT Professional)

Declaration

typedef struct {
LPTSTR lpszArchivName;
LPTSTR lpszVarName;
SYSTEMTIME stTime;
double doValue;
DWORD dwFlags;
}
TLG_GETARCHIVDATA;

Members

lpszArchivName
Pointer to the log name from which the data are to be read out.

lpszVarName
Pointer to the tag name whose values are to be read out.

stTime
x-value of the log value

doValue
y-value of the log value

dwFlags
The parameter is reserved for later upgrades and must be defaulted with 0.

Required files
pdertdef.h

API functions

TLG_GETARCHIVDATA_CALLBACK (Page 864) Read out data of a log (callback)

See also
TLG_GETARCHIVDATA_CALLBACK (Page 864)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 807
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.2.7 TLG_IO_BACKUP_SELECT (RT Professional)

Declaration

typedef struct {
SYSTEMTIME sysFrom;
SYSTEMTIME sysTo;
LPTSTR lpszSqlString;
}
TLG_IO_BACKUP_SELECT;

Members

sysFrom
System time of the first data record to be selected

sysTo
System time of the last data record to be selected

lpszSqlString
The parameter is reserved for later upgrades and must be defaulted with NULL.

Required files
pdertdef.h

API functions

TLGGetBackupSize (Page 898) Determine size of an exported data record


TLGExport (Page 897) Export log data

See also
TLGGetBackupSize (Page 898)
TLGExport (Page 897)

WinCC Professional V13 SP2 – Programming reference


808 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.2.8 TLG_PROT_CURVE_INFOS (RT Professional)

Declaration

typedef struct {
TCHAR szArchivName[ 128 + 1 ];
TCHAR szVariableName[ 128 + 1 ];
TCHAR szTextX[ 128 + 1 ];
TCHAR szTextY[ 128 + 1 ];
SYSTEMTIME stFrom;
SYSTEMTIME stTo;
double doFrom;
double doTo;
DWORD dwFlags;
DWORD dwCurveForm;
}
TLG_PROT_CURVE_INFOS;

Members

szArchivName
Name of the log from which the data to be logged originate.

szVariableName
Name of the log tag whose values are to be logged.

szTextX
Labeling of the x-axis

szTextY
Labeling of the y-axis

stFrom
Start time from which logging starts The parameter is only evaluated if dwFlagshas
TLG_PROTFLG_TIME_RANGE set.

stTo
End time up to which logging takes place. The parameter is only evaluated if dwFlagshas
TLG_PROTFLG_TIME_RANGE set.
If a current timer for transferring a SYSTEMTIME parameter is required, the GetLocalTime
function must be used and not GetSystemTime. There is usually a considerable time difference
between these two functions.

doFrom
Start time from which logging is to take place. The parameter is only evaluated if dwFlags has
TLG_PROTFLG_DATA_RANGE set.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 809
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

doTo
End time up to which logging is to take place. The parameter is only evaluated if dwFlagshas
TLG_PROTFLG_DATA_RANGE set.

dwFlags
With dwFlags it is determined data type the trend is based on:

TLG_PROTFLG_TIME_RANGE The data originate from a time-controlled log (e.g.: process value
log). The values specified in stFrom and stTo are valid.
TLG_PROTFLG_DATA_RANGE The data originate from a data-controlled log (e.g.: user log). The
values specified in doFrom and doTo are valid.

dwCurveForm
The appearance of the trend is defined by dwCurveForm

TLG_CURVEFORM_STEP View of the trend as a step trend


TLG_CURVEFORM_POINTS View of the trend as a single point
TLG_CURVEFORM_DIRECT Connect points of the trend linearly

Comment
TLG_PROT_CURVE_INFOS is used by the structures TLG_TABLESCALE (Page 814) and
TLG_TPLITEM_INFO (Page 822).

Required files
pdertdef.h

API functions

TLGDrawCurvesInDC (Page 880) Show trends

See also
TLGDrawCurvesInDC (Page 880)
TLG_TABLESCALE (Page 814)
TLG_TPLITEM_INFO (Page 822)

WinCC Professional V13 SP2 – Programming reference


810 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.2.9 TLG_SCAL_STR (RT Professional)

Declaration

typedef struct {
double doScalVarUpper;
double doScalVarLower;
double doScalArcUpper;
double doScalArcLower;
TCHAR szStructName[PDE_DB_SCALE_MAX_LENGHT];
}
TLG_SCAL_STR;

Members

doScalVarLower
Lower limit of the tag value

doScalVarUpper
Upper limit of the tag value

doScalArcLower
The parameter is reserved for later upgrades and must be defaulted with 0.

doScalArcUpper
The parameter is reserved for later upgrades and must be defaulted with 0.

szStructName
Name of the scaling structure for the tag limit values

Comment
The TLG_SCAL_STR structure is used within the TLG_VAR_STR (Page 824) structure and
is provided for later upgrades.

Required files
pde_def.h

See also
TLG_VAR_STR (Page 824)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 811
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.2.10 TLG_TABLE_INFO (RT Professional)

Declaration

typedef struct {
DWORD dwArchivTyp;
TCHAR szArchivName[ _MAX_PATH + 1 ];
DWORD dwSaveTyp;
}
TLG_TABLE_INFO;

Members

dwArchivTyp
dwArchivTyp identifies the log type:

TLG_ARCTYP_USER User log


TLG_ARCTYP_PROCESS Process value log
TLG_ARCTYP_COMPRESS Compressed log

szArchivName
In what form the name of the log is provided depends on the functions which use
TLG_TABLE_INFO.
The enumeration of the logs by TLGEnumArchivs and TLGEnumArchivsSel supplies the log
name as a table name, i.e. in the form "UA#ARCHIV#Archivname" for user logs and
"PDE#HD#Archivname#Variablenname" respectively because a table entry for every tag
exists here. Therefore every tag is enumerated.
The enumeration by TLGEnumArchivsEx supplies the "pure" log name.

dwSaveTyp
dwSaveTyp identifies the type of log:

TLG_ARCTYP_CIRCULAR Circular log


TLG_ARCTYP_FOLLOW Sequential log

Required files
pdertdef.h

API functions

TLG_ENUMTABLES (Page 859) List logs (callback)

WinCC Professional V13 SP2 – Programming reference


812 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

See also
TLG_ENUMTABLES (Page 859)

2.8.2.11 TLG_TABLESCALE (RT Professional)

Declaration

typedef struct {
BOOL fActualize;
BOOL fVisible;
BOOL fModify;
BOOL fCommon;
DWORD dwDataTyp;
SYSTEMTIME stFrom;
SYSTEMTIME stTo;
double doFrom;
double doTo;
double doShowDigits;
double doLimitUpper1;
double doLimitUpper2;
double doLimitUpper3;
double doLimitLower1;
double doLimitLower2;
double doLimitLower3;
COLORREF crColor;
COLORREF crColorTimeOverlapped;
COLORREF crColorTimeJump;
COLORREF crColorLimitUpper1;
COLORREF crColorLimitUpper2;
COLORREF crColorLimitUpper3;
COLORREF crColorLimitLower1;
COLORREF crColorLimitLower2;
COLORREF crColorLimitLower3;
TCHAR szSelectSQL[ TLG_MAX_SQL_SELECT ];
}
TLG_TABLESCALE;

Members

fActualize

TRUE The trend view is dynamic.


FALSE The trend view is static.

fVisible

TRUE The column is visible.


FALSE The column is invisible.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 813
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

fModify

TRUE The entries in the column can be edited.


FALSE The entries in the column cannot be edited.

fCommon

TRUE All columns of the table have a common time column.


FALSE The columns of the table have no common time column.

dwDataTyp
The parameter is reserved for later upgrades and must be defaulted with 0.

stFrom
Start time of the display range.

stTo
End time of the display range.
If a current timer for transferring a SYSTEMTIME parameter is required, the GetLocalTime
function must be used and not GetSystemTime. There is usually a considerable time difference
between these two functions.

doFrom
The parameter is reserved for later upgrades and must be defaulted with 0.

doTo
The parameter is reserved for later upgrades and must be defaulted with 0.

doShowDigits
Number of decimal places to be output.

doLimitUpper1
The parameter is reserved for later upgrades and must be defaulted with 0.

doLimitUpper2
The parameter is reserved for later upgrades and must be defaulted with 0.

dpoLimitUper3
The parameter is reserved for later upgrades and must be defaulted with 0.

doLimitLower1
The parameter is reserved for later upgrades and must be defaulted with 0.

doLimitLower2
The parameter is reserved for later upgrades and must be defaulted with 0.

WinCC Professional V13 SP2 – Programming reference


814 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

doLimitLower3
The parameter is reserved for later upgrades and must be defaulted with 0.

crColor
The Windows-specific 32-bit value crColor defines the color used in the table column.

crColorTimeOverlapped
The parameter is reserved for later upgrades.

crColorTimeJump
The parameter is reserved for later upgrades.

crColorLimitUpper1
The parameter is reserved for later upgrades.

crColorLimitUpper2
The parameter is reserved for later upgrades.

crColorLimitUpper3
The parameter is reserved for later upgrades.

crColorLimitLower1
The parameter is reserved for later upgrades.

crColorLimitLower2
The parameter is reserved for later upgrades.

crColorLimitLower3
The parameter is reserved for later upgrades.

szSelectSQL
The parameter is reserved for later upgrades and must be defaulted with ZERO.

Comment
TLG_TABLESCALE is used by the TLG_TEMPLATEITEM_INFO (Page 817) structure.

Required files
pdertdef.h

See also
TLG_PROT_CURVE_INFOS (Page 809)
TLG_TPLITEM_INFO (Page 822)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 815
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

TLG_TEMPLATEITEM_INFO (Page 817)


TLG_TPLITEM_TABLE (Page 823)

2.8.2.12 TLG_TEMPLATEITEM_INFO (RT Professional)

Declaration

typedef struct {
TCHAR szTemplateItemName[
TLG_MAX_TEMPLATEITEM_NAME+1 ];
TCHAR szTemplateName[
TLG_MAX_TEMPLATE_NAME + 1 ];
TCHAR szArchivName[ 128 + 1 ];
TCHAR szVariableName[ 128 + 1 ];
TCHAR szDMVariableName[ 128 + 1 ];
DWORD dwReadAccessLevel;
DWORD dwWriteAccessLevel;
DWORD dwArchivTyp;
TCHAR szTimeNameRange[ 128 + 1 ];
DWORD dwTemplateItemTyp;
DWORD dwTemplateTyp;
BOOL fVisible;
TLG_TPLITEM_INFO tplInfo;
}
TLG_TEMPLATEITEM_INFO;

Members

szTemplateItemName
Name of the trend or column

szTemplateName
Name of the trend or table window template

szArchivName
Name of the log in which the log tag linked with the curve or column is logged.

szVariableName
Name of the log tag linked with the trend or column

szDMVariableName
Name of the Data Manager tag

dwReadAccessLevel
In the enumeration of trends or columns dwReadAccesLevel contains the user authorization
level for read access.

WinCC Professional V13 SP2 – Programming reference


816 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

dwWriteAccessLevel
In the enumeration of trends or columns dwWriteAccesLevel contains the user authorization
level for write access.

dwArchivTyp
dwArchivTyp identifies the log type:

TLG_ARCTYP_USER User log


TLG_ARCTYP_PROCESS Process value log
TLG_ARCTYP_COMPRESS Compressed log

szTimeNameRange
Name of the time object which is to be used to determine a time range from a start time.

dwTemplateItemTyp
dwTemplateItemTyp must correspond to the value specified in dwTemplateTyp:

TLG_TEMPLATEITEM_ALL Trend and table templates


TLG_TEMPLATEITEM_CURVE Trend template
TLG_TEMPLATEITEM_TABLE Table template

dwTemplateTyp
dwTemplateTyp identifies the type of window template

TLG_TEMPLATE_CURVE Trend window template


TLG_TEMPLATE_TABLE Table window template

fVisible

TRUE The column or trend is visible.


FALSE The column or trend is invisible.

tplInfo
Structure of the TLG_TPLITEM_INFO (Page 822) type with the properties of a trend or column
template.

Required files
pdertdef.h

API functions

TLG_TABLESCALE (Page 813) Table column (properties) (structure)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 817
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

See also
TLG_TPLITEM_INFO (Page 822)
TLG_TABLESCALE (Page 813)
TLGInsertTemplateItem (Page 881)

2.8.2.13 TLG_TIME_STR (RT Professional)

Declaration

typedef struct {
DWORD dwBasis;
DWORD dwFactor;
TCHAR szTimeName[
PDE_DB_TIMENAME_MAX_LENGTH + 1 ];
}
TLG_TIME_STR;

Members

dwBasis
Timebase The cycle time is given by multiplying the time factor and timebase.

TLG_TBASE_500MS 500ms
TLG_TBASE_SEC 1 second
TLG_TBASE_MIN 1 minute
TLG_TBASE_HOUR 1 hour
TLG_TBASE_DAY 1 day

dwFactor
Time factor The cycle time is given by multiplying the time factor and timebase.

szTimeName
Name of the time object

Comment
Times are to be understood as acquisition and logging cycles which can be freely assigned.
A time object can be used simultaneously as an acquisition cycle and a logging cycle.

Required files
pde_def.h

WinCC Professional V13 SP2 – Programming reference


818 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

API functions

TLGReadTime (Page 892) Determine time object parameter

See also
TLGReadTime (Page 892)

2.8.2.14 TLG_TIMEDATA (RT Professional)

Declaration

typedef struct {
TCHAR szTimeName[ _MAX_PATH + 1 ];
DWORD dwTimeBase;
DWORD dwTimeValue;
}
TLG_TIMEDATA;

Members

szTimeName
Name of the time object

dwTimeBase
Timebase The cycle time is given by multiplying the time factor and timebase.

TLG_TBASE_500MS 500ms
TLG_TBASE_SEC 1 second
TLG_TBASE_MIN 1 minute
TLG_TBASE_HOUR 1 hour
TLG_TBASE_DAY 1 day

dwTimeValue
Time factor The cycle time is given by multiplying the time factor and timebase.

Required files
pdertdef.h

API functions

TLG_ENUMTIMES_CALLBACK (Page 891) List time objects (callback)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 819
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

See also
TLG_ENUMTIMES_CALLBACK (Page 891)

2.8.2.15 TLG_TPLITEM_CURVE (RT Professional)

Declaration

typedef struct {
TLG_CURVESCALEX csx;
TLG_CURVESCALEY csy;
}
TLG_TPLITEM_CURVE;

Members

csx
The TLG_CURVESCALEX (Page 798) structure contains the data for scaling the X-axis of a
trend.

csy
The TLG_CURVESCALEY (Page 803) structure contains the data for scaling the Y-axis of a
trend.

Description
TLG_TPLITEM_CURVE is used by the TLG_TPLITEM_INFO (Page 822) structure.

Required files
pdertdef.h

See also
TLG_TPLITEM_INFO (Page 822)
TLG_CURVESCALEX (Page 798)
TLG_CURVESCALEY (Page 803)

WinCC Professional V13 SP2 – Programming reference


820 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.2.16 TLG_TPLITEM_INFO (RT Professional)

Declaration

typedef union {
TLG_TPLITEM_CURVE tplCurve;
TLG_TPLITEM_TABLE tplTable;
}
TLG_TPLITEM_INFO;

Members

tplCurve
The properties of a trend are read from the TLG_TPLITEM_CURVE (Page 820) structure.

tplTable
The properties of a column are read from the TLG_TPLITEM_TABLE (Page 823) structure.

Comment
TLG_TPLITEM_INFO is used by the TLG_TEMPLATEITEM_INFO (Page 816) structure.
Since a tag can be displayed both in a trend and in a table, both structures
TLG_TPLITEM_CURVE and TLG_TPLITEM_TABLE can be assigned values.

Required files
pdertdef.h

See also
TLG_PROT_CURVE_INFOS (Page 809)
TLG_TABLESCALE (Page 813)
TLG_TEMPLATEITEM_INFO (Page 816)
TLG_TPLITEM_CURVE (Page 820)
TLG_TPLITEM_TABLE (Page 823)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 821
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.2.17 TLG_TPLITEM_TABLE (RT Professional)

Declaration

typedef struct {
TLG_TABLESCALE ts;
}
TLG_TPLITEM_TABLE;

Members

ts
TLG_TABLESCALE (Page 813) with the properties of a table column.

Description
TLG_TPLITEM_TABLE is used by the TLG_TPLITEM_INFO (Page 821) structure.
For organizational reasons, TLG_TABLESCALE cannot be used directly in the
TLG_TPLITEM_INFO structure.

Required files
pdertdef.h

See also
TLG_TPLITEM_INFO (Page 821)
TLG_TABLESCALE (Page 813)

WinCC Professional V13 SP2 – Programming reference


822 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.2.18 TLG_VAR_STR (RT Professional)

Declaration

typedef struct {
TCHAR szVarName [PDE_DB_VAR_NAME_MAX_LENGTH + 1];
TCHAR szProcName [PDE_DB_VAR_NAME_MAX_LENGTH + 1];
DWORD dwVarType;
DWORD dwArchivStyle;
TCHAR szWriteBackTo [PDE_DB_VAR_WRITEBACK_MAX_LENGTH + 1];
DWORD dwSupply;
BOOL fLocked;
TCHAR szComment [PDE_DB_VAR_COMMENT_MAX_LENGTH + 1];
TCHAR szRecordCycle [PDE_DB_VAR_CYCLENAME_MAX_LENGTH + 1];
TCHAR szArchivCycle [PDE_DB_VAR_CYCLENAME_MAX_LENGTH + 1];
DWORD dwMultiple;
DWORD dwValueFlow;
DWORD dwValueFollow;
DWORD dwSaveByFault;
DWORD dwArchivTrigger;
TCHAR szTextHighSignal [PDE_DB_VAR_SIGNALTEX_MAX_LENGTH + 1];
TCHAR szTextLowSignal [PDE_DB_VAR_SIGNALTEX_MAX_LENGTH + 1];
DWORD dwValProcess;
TCHAR szFuncValProcess [PDE_DB_VAR_FUNCNAME_MAX_LENGTH + 1];
TCHAR szDLLValProcess [PDE_DB_VAR_DLLNAME_MAX_LENGTH + 1];
TCHAR szFuncStartEvent [PDE_DB_VAR_FUNCNAME_MAX_LENGTH + 1];
TCHAR szDLLStartEvent [PDE_DB_VAR_DLLNAME_MAX_LENGTH + 1];
TCHAR szFuncStopEvent [PDE_DB_VAR_FUNCNAME_MAX_LENGTH + 1];
TCHAR szDLLStopEvent [PDE_DB_VAR_DLLNAME_MAX_LENGTH + 1];
TCHAR szFuncDynamic [PDE_DB_VAR_FUNCNAME_MAX_LENGTH + 1];
TCHAR szDLLDynamic [PDE_DB_VAR_DLLNAME_MAX_LENGTH + 1];
TCHAR szUnitDirect [PDE_DB_VAR_UNITDIR_MAX_LENGTH + 1];
TCHAR szUnitStruct [PDE_DB_VAR_UNITSTR_MAX_LENGTH + 1];
DWORD dwRecItems;
TCHAR szSourceArchiv [PDE_DB_ARC_NAME_MAX_LENGTH + 1];
TCHAR szSourceVarName [PDE_DB_VAR_NAME_MAX_LENGTH + 1];
TCHAR szRawdataName [PDE_DB_VAR_NAME_MAX_LENGTH + 1];
TCHAR szRawConvDLLName [TLG_DB_DLLNAME_MAX_LENGTH + 1];
DWORD dwRawDataIndex;
DWORD dwRawDataFormat;
TLG_SCAL_STR ScaleStruct;
TLG_RECORD_STR RecordStruct;
} TLG_VAR_STR;

Comment
The assignment of the parameters of the TLG_VAR_STR structure depends on the logging
type (acyclic, cyclic-selective or cyclic-continuous) and the tag type (binary or analog).

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 823
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Members

szVarName
Global parameter for the name of the log tag or the tag group
The characters : ? " ' \ * % and blank may not be used in log tag names otherwise the error
TLG_API_NAME_WRONG_CHAR is output.

szProcName
Gobal parameter for the name of the process tag

dwVarType
Global parameter which identifies the log tag type.

TLG_VAR_TYP_ANALOG 0x00010001 analog tag:


dwArchivTrigger is set internally to 0L (irrelevant)
TLG_VAR_TYP_BIN 0x00010002 binary tag:
dwValProcess is set internally to 0L (irrelevant)
TLG_VAR_TYP_COMPRESS 0x00010004 Tag for compressed logs:
dwSuppy is set internally to TLG_SUPPLY_BY_SYSTEM
dwSaveByFault is set internally to TLG_SAVE_LAST_VALUE
TLG_VAR_TYP_PROCESS 0x00010008 process-controlled tag
invalid value Error message: TLG_API_VARTYPE_MISMATCH

dwArchivStyle
Global parameter which identifies the logging type.

TLG_STY_ACYCLIC 0x00800001 Acyclic logging


TLG_STY_CYCLIC_CON 0x00800002 Cyclic-continuous logging
TLG_STY_ CYCLIC_SEL 0x00800004 Cyclic-selective logging
TLG_STY_ON_CHANGE 0x00800008 Detection for change
invalid value Error message TLG_API_ERR_ARCHIVSTYLE

szWriteBackTo
Global parameter into which the name of the log tag is to be written back.

dwSupply
Global parameter which identifies the tag supply type.

TLG_SUPPLY_BY_HAND 0L - FALSE Manual tag input


TLG_SUPPLY_BY_SYSTEM 1L - TRUE Supply from system (process coupling or internal tag)
invalid value Error message TLG_API_INVALID_PARAM

If dwVarType = TLG_VAR_TYP_COMPRESS, TLG_SUPPLY_BY_SYSTEM is always set


internally.

WinCC Professional V13 SP2 – Programming reference


824 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

fLocked
Global parameter which identifies the handling of the logging at system start.

TRUE disabled
FALSE enabled

szComment
Global parameter for the comment on the log tag

szRecordCycle
Name of the time object (e.g.: "1 minute") which specifies the acquisition cycle.
The parameter is relevant for the cyclic-selective, cyclic-continuous acquisition of analog and
binary tags.

szArchivCycle
Name of the time object (e.g.: "1 minute") which specifies the logging cycle. The logging cycle
is given by multiplying dwMultiple by szArchivCycle.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags.

dwMultiple
Identifies the multiplication factor. The logging cycle is given by multiplying dwMultiple by
szArchivCycle.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags.

dwValueFlow
Identifies the number of flow values
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags.

dwValueFollow
Identifies the number of return values.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags.

dwSaveByFault
Identifies the memory behavior in case of a fault.
The parameter is relevant for analog and binary tags of all logging types.

TLG_SAVE_LAST_VALUE 1L Save last valid value


TLG_SAVE_SUBST_VALUE 2L Save substitute value
invalid value Error message TLG_API_INVALID_PARAM

If dwVarType = TLG_VAR_TYP_COMPRESS, TLG_SAVE_LAST_VALUE is always set


internally.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 825
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

dwArchivTrigger
Identifies the trigger behavior of the logging
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of binary tags.

TLG_TRIG_CHANGE 1L Logging for every signal change


TLG_TRIG_CHANGE_01 2L Logging for signal change 0 -> 1
TLG_TRIG_CHANGE_10 3L Logging for signal change 1 -> 0
TLG_TRIG_ALLWAYS 4L The value is logged in every logging cycle even without a signal
change.
invalid value Error message TLG_API_INVALID_PARAM

If dwVarType = TLG_VAR_TYP_ANALOG, 0L is always set internally (irrelevant).

szTextHighSignal
Text for signal state 1.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of binary tags.

szTextLowSignal
Text for signal state 0.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of binary tags.

dwValProcess
Identifies the processing of the log value to be saved over the acquired values within the logging
cycle.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog tags.

TLG_VAL_ACTUAL 1L Actual value


TLG_VAL_AVERAGE 2L Average value
TLG_VAL_SUM 3L Sum
TLG_VAL_MIN 4L Minimum value
TLG_VAL_MAX 5L Maximum value
TLG_VAL_DLL 6L Function or DLL
invalid value Error message TLG_API_INVALID_PARAM

If dwVarType = TLG_VAR_TYP_BIN , 0L is always set internally (irrelevant).

szFuncValProcess
Name of the action or the DLL function which specifies the processing of the log value to be
saved.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags and only relevant ifdwValProcess = TLG_VAL_DLL.

szDLLValProcess
Name of the DLL
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags and only relevant if dwValProcess = TLG_VAL_DLL.

WinCC Professional V13 SP2 – Programming reference


826 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

szFuncStartEvent
Name of the action or the DLL function which specifies the start event.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags.

szDLLStartEvent
Name of the DLL.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags.

szFuncStopEvent
Name of the action or the DLL function which specifies the stop event.
The parameter is relevant for the cyclic-selective logging of analog and binary tags.

szDLLStopEvent
Name of the DLL
The parameter is relevant for the cyclic-selective logging of analog and binary tags.

szFuncDynamic
Name of the action or the DLL function which specifies the dynamic switching of the detection
and/or logging cycle.
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags.

szDLLDynamic
Name of the DLL
The parameter is relevant for the cyclic-selective, cyclic-continuous logging of analog and
binary tags.

szUnitDirect
Identifies the unit of the log tag.
The parameter is relevant for analog tags of all logging types.

szUnitStruct
Name of the structure that contains the unit of the log tag. NULL if the unit is configured directly
in szUnitDirect.
The parameter is relevant for analog tags of all logging types.

dwRecItems
The parameter is reserved for future development and must be preassigned with 0.

szSourceArchiv
Name of the source archive.
The parameter is relevant for the cyclic-continuous logging.

szSourceVarName
Name of the log tag in the source log
The parameter is relevant for the cyclic-continuous logging.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 827
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

szRawdataName
Name of the raw data tag
The parameter is relevant for process-controlled tags.

szRawConvDLLName
Name of the normalization DLL
The parameter is relevant for process-controlled tags.

dwRawDataIndex
The number of the raw data tag corresponds to the log ID of the PLC in connection with S7PMC.
The parameter is relevant for process-controlled variables.

dwRawDataFormat
Format of the raw data tag
The parameter is relevant for process-controlled tags.

ScaleStruct
TLG_SCAL_STR (Page 811) structure with the limits of the tag.

RecordStruct
The parameter is reserved for later upgrades.

Required files
pde_def.h

API functions

TLGReadVariable (Page 849) Determine tag parameter

See also
TLGReadVariable (Page 849)
TLG_SCAL_STR (Page 811)

2.8.2.19 TLG_VARIABLE_INFO (RT Professional)

Declaration

typedef struct {
DWORD dwVariableTyp;
TCHAR szVariableName[ _MAX_PATH + 1 ];
}
TLG_VARIABLE_INFO;

WinCC Professional V13 SP2 – Programming reference


828 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Members

dwVariableTyp
dwVariableTyp identifies the type of tag. Possible values are:

TLG_VAR_TYP_ANALOG analog tag


TLG_VAR_TYP_BIN binary tag
TLG_VAR_TYP_COMPRESS tag for compressed logs
TLG_VAR_TYP_PROCESS process-controlled tag

szVariableName
Name of the tag

Required files
pdertdef.h
pde_typ.h

API functions

TLG_ENUMVARIABLES (Page 848) List tags (callback)

See also
TLG_ENUMVARIABLES (Page 848)

2.8.3 General functions (RT Professional)

2.8.3.1 TLGCSConnect (RT Professional)

Description
The function establishes a connection with the WinCC project database.

Declaration

BOOL TLGCSConnect (
HWND hwndParent,
LPCMN_ERROR lpError );

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 829
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Parameter

hwndParent
Window handle of the parent window

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Connection established

FALSE
Error

Required files
pdecscli.h
pdecscli.lib
pdecscli.dll

Related functions

TLGCSConnectEx (Page 832) Set up connection to project database


TLGCSDisConnect (Page 833) Set up connection to project database

Examples
Enum all acquisition and logging times (Page 904) "TL01.cpp"
Read parameters of time object (Page 918) "TL01.cpp"
Enum logs (Page 907) "TL01.cpp"
Read log (Page 914) "TL01.cpp"

See also
TLGCSConnectEx (Page 832)
Enum logs (Page 907)
TLGOpenProject (Page 840)
Read parameters of time object (Page 918)
Enum all acquisition and logging times (Page 904)

WinCC Professional V13 SP2 – Programming reference


830 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Read log (Page 914)


TLGCSDisConnect (Page 833)

2.8.3.2 TLGCSConnectEx (RT Professional)

Description
The function establishes a connection with the WinCC project database.

Declaration

BOOL TLGCSConnectEx (
HWND hwndParent,
DWORD dwMode,
LPCMN_ERROR lpError );

Parameter

hwndParent
The parameter is reserved for later upgrades and must be defaulted with ZERO.

dwMode
The parameter is reserved for later upgrades.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Connection established

FALSE
Error

Required files
pdecscli.h
pdecscli.lib
pdecscli.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 831
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Related functions

TLGCSConnect (Page 829) Set up connection to project database

See also
TLGCSConnect (Page 829)
TLGOpenProject (Page 840)

2.8.3.3 TLGCSDisConnect (RT Professional)

Description
The function terminates an established connection to the WinCC project database. The call is
required so that the DLL can be cleanly unloaded again.

Note
The call may not be used in the destructor of an application (EXE, DLL, OCX etc.) because
this can lead to a frozen call and subsequent program crash due to specific Microsoft-based
mechanisms.

Declaration

BOOL TLGCSDisConnect (
LPCMN_ERROR lpError );

Parameter

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Connection terminated.

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


832 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Required files
pdecscli.h
pdecscli.lib
pdecscli.dll

Related functions

TLGCSConnect (Page 829) Set up connection to project database

Examples
Enum all acquisition and logging times (Page 904) "TL01.cpp"
Read parameters of time object (Page 918) "TL01.cpp"
Enum logs (Page 907) "TL01.cpp"
Read log (Page 914) "TL01.cpp"

See also
TLGCSConnect (Page 829)
Enum all acquisition and logging times (Page 904)
Enum logs (Page 907)
Read log (Page 914)
Read parameters of time object (Page 918)

2.8.3.4 TLGChangeLanguage (RT Professional)

Description
The currently used data language can be switched with this function.

Declaration

BOOL TLGChangeLanguage (
DWORD dwLanguage,
PCMN_ERROR lpError );

Parameter

dwLanguage
Code of the language to be used in future

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 833
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Data language switched

FALSE
Error

Error messages

TLG_API_INVALID_PARAM invalid/wrong parameter supply


TLG_API_NO_INTERFACE Access to lower level COM interfaces failed
TLG_API_NO_CONNECTION No connection established with an activated project
TLG_API_ERR_SUPPLY An error has occurred

Required files
pdertcli.h
pde_glob.h
pdertcli.lib
pdertcli.dll

2.8.3.5 TLGConnect (RT Professional)

Description
The function initializes the log system and establishes a connection with the Tag Logging
Runtime.

Declaration

BOOL TLGConnect (
HWND hwndParent,
PCMN_ERROR lpError );

WinCC Professional V13 SP2 – Programming reference


834 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Parameter

hwndParent
The parameter is reserved for later upgrades and must be defaulted with NULL.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Connection established

FALSE
Error

Comment
The call generates an invisible window for the communication which is only deleted with the
TLGDisconnect function. This may be important when Windows functions are also used.

Error messages

TLG_API_NO_CONNECTION No connection established with an activated project


TLG_API_NO_INTERFACE Access to lower level COM interfaces failed

Required files
pdertcli.h
pde_glob.h
pdertcli.lib
pdertcli.dll

Related functions

TLGDisconnect (Page 837) Disconnect connection

Examples
Enumerate logs (Page 912)"TL02.cpp"

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 835
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

See also
Enumerate logs (Page 912)
TLGDisconnect (Page 837)
Edit curve template - Example 1 (Page 901)

2.8.3.6 TLGDisconnect (RT Professional)

Description
An existing connection to the Tag Logging Runtime is disconnected with this function.

Declaration

BOOL TLGDisconnect (
PCMN_ERROR lpError );

Parameter

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Connection disconnected

FALSE
Error

Comment

Note
The call may not be used in the destructor of an application (EXE, DLL, OCX...) because this
can lead to jamming of the call and thus the program due to specific Microsoft-based
mechanisms.

WinCC Professional V13 SP2 – Programming reference


836 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Error messages

TLG_API_NO_CONNECTION No connection established with an activated project


TLG_API_NO_INTERFACE Access to lower level COM interfaces failed

Required files
pdertcli.h
pde_glob.h
pdertcli.lib
pdertcli.dll

Related functions

TLGConnect (Page 834) Establish connection

Examples
Enumerate logs (Page 912)"TL02.cpp"

See also
Enumerate logs (Page 912)
TLGConnect (Page 834)
Edit curve template - Example 1 (Page 901)
Enum all acquisition and logging times (Page 904)

2.8.4 Project management functions (RT Professional)

2.8.4.1 TLGCloseProject (RT Professional)

Description
Closes the current project. All the data objects belonging to this project are closed.
The function is not longer significant and always supplies TRUE as a return value.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 837
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Declaration

BOOL TLGCloseProject(
HANDLE hProject,
LPCMN_ERROR lpoes );

Parameter

hProject
Handle of a project opened with TLGOpenProject.

lpoes
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Project closed

FALSE
Error

Required files
pdecscli.h
pdecscli.lib
pdecscli.dll

Examples
Read parameters of time object (Page 918)"TL01.cpp"
Enum logs (Page 907)"TL01.cpp"
Read log (Page 914)"TL01.cpp"

See also
Read parameters of time object (Page 918)
Enum logs (Page 907)
Read log (Page 914)

WinCC Professional V13 SP2 – Programming reference


838 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.4.2 TLGOpenProject (RT Professional)

Description
Establishes a connection with the WinCC project database.

Declaration

BOOL TLGOpenProject (
HANDLE* lphProject,
LPTSTR lpszProjectName,
HWND hwndParent,
LPCMN_ERROR lpoes );

Parameters

lphProject
Address of a memory area in which the handle is to be saved.

lpszProjectName
Name of the project to be opened.
The project path to be specified here can be determined with one of the following API functions:
● DMEnumOpenedProjects
● DMGetRuntimeProject
● TLGEnumProject
If a different project path than the currently open project is specified the
TLG_API_PROJECT_NAME_NOT_EXIST error is returned. The
TLG_API_NO_PROJECT_EXIST error is returned if no project is open.

hwndParent
Handle of the parent window

lpoes
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Project opened

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 839
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Comment
If no connection was established with the WinCC project data base by TLGCSConnect first,
the connection error TLG_API_NO_CONNECTION is returned.

Error messages

TLG_API_INVALID_PARAM invalid/wrong parameter supply


TLG_API_NO_INTERFACE Access to lower level COM interfaces failed
TLG_API_NO_CONNECTION No connection established with an activated
project
TLG_API_ERR_SUPPLY An error has occurred
TLG_API_NO_PROJECT_EXIST No project exists
TLG_API_PROJECT_NAME_NOT_EXIST Project name not found

Required files
pdecscli.h
pdecscli.lib
pdecscli.dll

Related functions

TLGCSConnect (Page 829) Set up connection to project database


TLGCSConnectEx (Page 831) Set up connection to project database
TLGEnumProject (Page 842) List projects

Examples
Read parameters of time object (Page 918)"TL01.cpp"
Enum logs (Page 907)"TL01.cpp"
Read log (Page 914)"TL01.cpp"
Enum tags of a log (Page 910)"TL02.cpp"

See also
TLGEnumProject (Page 842)
TLGCSConnect (Page 829)
TLGCSConnectEx (Page 831)
Read parameters of time object (Page 918)
Enum logs (Page 907)

WinCC Professional V13 SP2 – Programming reference


840 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Read log (Page 914)


Enum tags of a log (Page 910)

2.8.4.3 TLGEnumProject (RT Professional)

Description
The function determines the names of the open projects.

Declaration

BOOL TLGEnumProject (
TLG_ENUM_PROJECT_NAME_CALLBACK lpCallbackFunc,
PVOID lpUser,
LPCMN_ERROR lpoes );

Parameter

lpCallbackFunc
Pointer to your callback function which is called for every open project.

lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

lpoes
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Projects listed

FALSE
Error

Required files
pdecscli.h
pdecscli.lib
pdecscli.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 841
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Related functions

TLG_ENUM_PROJECT_NAME_CALLBACK List projects (callback)


(Page 843)

See also
TLG_ENUM_PROJECT_NAME_CALLBACK (Page 843)
TLGOpenProject (Page 839)

2.8.4.4 TLG_ENUM_PROJECT_NAME_CALLBACK (RT Professional)

Description
In order to be able to evaluate the projects listed by the system, you must provide a callback
function of the TLG_ENUM_PROJECT_NAME_CALLBACK type.

Declaration

BOOL ( * TLG_ENUM_PROJECT_NAME_CALLBACK) (
LPTSTR lpszName,
PVOID lpUser );

Parameters

lpszName
The lpszName pointer refers to the name of the first project.

lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value
The return values depend on your implementation.

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

WinCC Professional V13 SP2 – Programming reference


842 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Required files
pdecscli.h

Related functions

TLGEnumProject (Page 841) List projects

See also
TLGEnumProject (Page 841)

2.8.5 Functions for processing tags (RT Professional)

2.8.5.1 TLGEnumVariables (RT Professional)

Description
The function determines all the tag names of a log.

Declaration

BOOL TLGEnumVariables (
HANDLE hProject,
LPTSTR lpszArchivName,
TLG_ENUM_VARIABLE_NAME_CALLBACK lpCallbackFunc,
PVOID lpUser,
LPCMN_ERROR lpoes );

Parameter

hProject
Handle of the project in which the log is located.

lpszArchivName
Pointer to the name of the log

lpCallbackFunc
Pointer to your callback function which is called for every tag entry in the log.

lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 843
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

lpoes
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Log tags listed

FALSE
Error

Required files
pdecscli.h
pdecscli.lib
pdecscli.dll

Related functions

TLG_ENUM_VARIABLE_NAME_CALLBACK List tags (callback)


(Page 845)

See also
TLG_ENUM_VARIABLE_NAME_CALLBACK (Page 845)
TLGReadVariable (Page 849)

2.8.5.2 TLG_ENUM_VARIABLE_NAME_CALLBACK (RT Professional)

Description
In order to be able to evaluate the tags listed by the system, you must provide a callback
function of the TLG_ENUM_VARIABLE_NAME_CALLBACK type.

Declaration

BOOL ( * TLG_ENUM_VARIABLE_NAME_CALLBACK) (
LPTSTR lpszName,
PVOID lpUser );

WinCC Professional V13 SP2 – Programming reference


844 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Parameters

lpszName
The lpszName pointer refers to the name of the first tag.

lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
The enumeration is continued.

FALSE
The enumeration is cancelled.

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
pdecscli.h

Related functions

TLGEnumVariables (Page 843) List tags

See also
TLGEnumVariables (Page 843)

2.8.5.3 TLGEnumVariablesEx (RT Professional)

Description
The function determines all the tag names of a log.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 845
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Declaration

BOOL TLGEnumVariablesEx (
LPCTSTR lpszArchiveName,
TLG_ENUMVARIABLES lpfnCallback,
LPVOID lpUser,
PCMN_ERROR lpError );

Parameter

lpszArchiveName
Pointer to the name of the log whose tags are to be listed.

lpfnCallback
Pointer to your callback function which is called for every tag of the log.

lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Tags listed

FALSE
Error

Error messages

TLG_API_ERR_SUPPLY An error has occurred


TLG_API_INVALID_PARAM invalid/wrong parameter supply
TLG_API_NO_INTERFACE Access to lower level COM interfaces failed
TLG_API_NO_CONNECTION No connection established with an activated project

Required files
pdecscli.h
pdecscli.lib
pdecscli.dll

WinCC Professional V13 SP2 – Programming reference


846 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

pdertcli.h
pdertcli.lib
pdertcli.dll

Related functions

TLG_ENUMVARIABLES (Page 848) List tags (callback)

Examples
Enum tags of a log (Page 910) "TL02.cpp"

See also
TLG_ENUMVARIABLES (Page 848)
Enum tags of a log (Page 910)

2.8.5.4 TLG_ENUMVARIABLES (RT Professional)

Description
In order to be able to evaluate the data of a tag listed by the system, you must provide a callback
function of the TLG_ENUMVARIABLES type.

Declaration

BOOL ( * TLG_ENUMVARIABLES) (
PTLG_VARIABLE_INFO lpvi,
LPVOID lpUser );

Parameters

lpvi
Address of a structure of TLG_VARIABLE_INFO (Page 828) type with the data of a tag.

lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 847
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Return value

TRUE
The enumeration is continued.

FALSE
The enumeration is cancelled.

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
pdertcli.h
pde_glob.h
pdertdef.h

Related functions

TLGEnumVariablesEx (Page 845) List tags

Examples
Enum tags of a log (Page 910)"TL02.cpp"

See also
TLGEnumVariablesEx (Page 845)
TLG_VARIABLE_INFO (Page 828)
Enum tags of a log (Page 910)
TLGEnumArchivsEx (Page 856)

2.8.5.5 TLGReadVariable (RT Professional)

Description
Read the parameters of a tag

WinCC Professional V13 SP2 – Programming reference


848 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Declaration

BOOL TLGReadVariable (
HANDLE hProject,
LPTSTR lpszArchivName,
LPTSTR lpszVariableName,
PTLG_VAR_STR lpVariable,
LPCMN_ERROR lpoes );

Parameter

hProject
Handle of the project in which the tag to be processed is located.

lpszArchivName
Pointer to the name of the log

lpszVariableName
Pointer to the name of a tag of the log

lpVariable
Address of the TLG_VAR_STR (Page 823) structure from which the data of the tag are read
out.

lpoes
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Parameters read

FALSE
Error

Required files
pdecscli.h
pdecscli.lib
pdecscli.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 849
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Related functions

TLGEnumVariables (Page 843) List tags


TLGReadVariable6 Determine tag parameter

Examples
Read log (Page 914)"TL01.cpp"

See also
TLG_VAR_STR (Page 823)
TLGEnumVariables (Page 843)
Read log (Page 914)

2.8.6 Functions for processing logs (RT Professional)

2.8.6.1 TLGEnumArchives (RT Professional)

Description
The function determines the names of all logs in the project hproject. All types of logs can be
processed with this function.

Declaration

BOOL TLGEnumArchives (
HANDLE hProject,
TLG_ENUM_ARCHIV_CALLBACK lpCallbackFunc,
PVOID lpUser,
LPCMN_ERROR lpoes );

Parameter

hProject
Handle of the project in which the logs are located.

lpCallbackFunc
Pointer to your callback function which is called for every log.

WinCC Professional V13 SP2 – Programming reference


850 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

lpoes
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Logs listed

FALSE
Error

Required files
pdecscli.h
pdecscli.lib
pdecscli.dll

Related functions

TLGReadArchiv (Page 877) Read log parameters


TLG_ENUM_ARCHIV_CALLBACK (Page 852) List logs (callback)

Examples
Enum logs (Page 907)"TL01.cpp"

See also
TLG_ENUM_ARCHIV_CALLBACK (Page 852)
Enum logs (Page 907)
TLGReadArchiv (Page 877)

2.8.6.2 TLG_ENUM_ARCHIV_CALLBACK (RT Professional)

Description
In order to be able to evaluate the logs listed by the system, you must provide a callback
function of the TLG_ENUM_ARCHIV_CALLBACK type.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 851
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Declaration

BOOL ( * TLG_ENUM_ARCHIV_CALLBACK) (
LPTSTR lpszName,
PVOID lpUser );

Parameters

lpszName
The lpszName pointer refers to the name of the log.

lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
The enumeration is continued.

FALSE
The enumeration is cancelled.

Comment

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
pdecscli.h

Related functions

TLGEnumArchives (Page 850) List logs

WinCC Professional V13 SP2 – Programming reference


852 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Examples
Enum logs (Page 907)"TL01.cpp"

See also
TLGEnumArchives (Page 850)
Enum logs (Page 907)

2.8.6.3 TLGEnumArchivs (RT Professional)

Description
Enumerates the existing logs Unlike TLGEnumArchivsSel the logs to be listed can only be
limited by the log type.
The information of a log is provided in structures of the TLG_TABLE_INFO type with the
callback function. The log name is transferred here as a table name, i.e. in the form
"UA#ARCHIV#ArchivName" or "PDE#HD#Archivname#Variablenname".

Declaration

BOOL TLGEnumArchivs (
DWORD dwArchivTyp,
TLG_ENUMTABLES lpfnCallback,
LPVOID lpUser,
PCMN_ERROR lpError );

Parameter

dwArchivTyp
dwArchivTyp identifies the log type:

TLG_ARCTYP_USER User log


TLG_ARCTYP_PROCESS Process value log
TLG_ARCTYP_COMPRESS Compressed log
NULL All logs are enumerated.

lpfnCallback
Pointer to your callback function which is called for every log.

lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 853
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Logs listed

FALSE
Error

Error messages

TLG_API_ERR_SUPPLY An error has occurred


TLG_API_INVALID_PARAM invalid/wrong parameter supply
TLG_API_NO_INTERFACE Access to lower level COM interfaces failed
TLG_API_NO_CONNECTION No connection established with an activated project
TLG_API_ERR_SUPPLY An error has occurred

Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll

Related functions

TLGEnumArchivsEx (Page 856) List logs


TLGEnumArchivsSel (Page 857) List logs
TLG_ENUMTABLES (Page 859) List logs (callback)

Examples
Enumerate logs (Page 912)"TL02.cpp"

See also
TLGEnumArchivsEx (Page 856)
TLGEnumArchivsSel (Page 857)

WinCC Professional V13 SP2 – Programming reference


854 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

TLG_ENUMTABLES (Page 859)


Enumerate logs (Page 912)

2.8.6.4 TLGEnumArchivsEx (RT Professional)

Description
Enumerates the existing logs. Unlike TLGEnumArchivsSel the logs to be listed can only be
limited by the log type (user, process value, compressed log).
The information of a log is provided in structures of the TLG_TABLE_INFO type with the
callback function. Unlike TLGEnumArchivs not the table name of the log but the "pure" log
name is transferred.

Declaration

BOOL TLGEnumArchivsEx (
DWORD dwArchivTyp,
TLG_ENUMTABLES lpfnCallback,
LPVOID lpUser,
PCMN_ERROR lpError );

Parameter

dwArchivTyp
dwArchivTyp identifies the log type:

TLG_ARCTYP_U_USER User log


TLG_ARCTYP_PROCESS Process value log
TLG_ARCTYP_COMPRESS Compressed log
NULL All logs are enumerated.

lpfnCallback
Pointer to your callback function which is called for every log.

lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 855
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Return value

TRUE
Logs are listed

FALSE
Error

Error messages

TLG_API_ERR_SUPPLY An error has occurred


TLG_API_INVALID_PARAM invalid/wrong parameter supply
TLG_API_NO_INTERFACE Access to lower level COM interfaces failed
TLG_API_NO_CONNECTION No connection established with an activated
project

Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll

Related functions

TLG_ENUMTABLES (Page 859) List logs (callback)


TLGEnumArchivs (Page 853) List logs
TLGEnumArchivsSel (Page 857) List logs

See also
TLGEnumArchivsSel (Page 857)
TLGEnumArchivs (Page 853)
TLG_ENUMTABLES (Page 859)

2.8.6.5 TLGEnumArchivsSel (RT Professional)

Description
The function enumerates the existing log types. Unlike TLGEnumArchivs the logs to be listed
can be limited by the logging type (circular log, sequential log) in addition to by the log type.

WinCC Professional V13 SP2 – Programming reference


856 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

The information of a log is provided in structures of the TLG_TABLE_INFO type with the
callback function. The log name is transferred here as a table name, i.e. in the form
"UA#ARCHIV#ArchivName" or "PDE#HD#Archivname#Variablenname". All tags of the log
are enumerated. This form is required for example in TLGBackup.

Declaration

BOOL TLGEnumArchivsSel (
DWORD dwArchivTyp,
DWORD dwSaveTyp,
TLG_ENUMTABLES lpfnCallback,
LPVOID lpUser,
PCMN_ERROR lpError );

Parameter

dwArchivTyp
dwArchivTyp identifies the log type:

TLG_ARCTYP_USER User log


TLG_ARCTYP_PROCESS Process value log
TLG_ARCTYP_COMPRESS Compressed log
NULL All logs are enumerated.

dwSaveTyp
dwSaveTyp identifies the type of log:

TLG_ARCTYP_ALL Circular and sequential logs


TLG_ARCTYP_CIRCULAR Circular logs
TLG_ARCTYP_FOLLOW Sequential logs

lpfnCallback
Pointer to your callback function which is called for every log.

lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 857
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Return value

TRUE
The logs are listed.

FALSE
Error

Error messages

TLG_API_ERR_SUPPLY An error has occurred


TLG_API_INVALID_PARAM invalid or wrong parameter supply
TLG_API_NO_INTERFACE Access to lower level COM interfaces failed
TLG_API_NO_CONNECTION No connection established with an activated project

Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll

Related functions

TLG_ENUMTABLES (Page 859) List logs (callback)


AUTOHOTSPOT List logs

See also
TLGEnumArchivsEx (Page 855)
TLGEnumArchivs (Page 853)
TLG_ENUMTABLES (Page 859)
TLG_TABLE_INFO (Page 812)

2.8.6.6 TLG_ENUMTABLES (RT Professional)

Description
In order to be able to evaluate the logs listed by the system, you must provide a callback
function of the TLG_ENUMTABLES type.

WinCC Professional V13 SP2 – Programming reference


858 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Declaration

BOOL TLG_ENUMTABLES (
LPTSTR lpTableName,
PTLG_TABLE_INFO lpti,
PVOID lpUser );

Parameters

lpTableName
Pointer to the name of the log

lpti
Information about the database table is contained in the TLG_TABLE_INFO (Page 812)
structure.

lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
The enumeration is continued.

FALSE
The enumeration is cancelled.

Comment

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
pdertcli.h
pde_glob.h
pdertdef.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 859
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

pdertcli.lib
pdertcli.dll

Related functions

TLGEnumArchivs (Page 853) List logs


TLGEnumArchivsSel (Page 856) List logs

Examples
Enumerate archives "TL02.cpp"

See also
TLGEnumArchivs (Page 853)
TLGEnumArchivsSel (Page 856)
TLG_TABLE_INFO (Page 812)
TLGEnumArchivsEx (Page 855)

2.8.6.7 TLGFreeMemory (RT Professional)

Description
A memory area allocated by TLGGetArchivDataEx is freed with this function.

Declaration

BOOL TLGFreeMemory (
LPVOID lpMemory );

Parameter

lpMemory
You get the pointer to the memory area to be freed when calling the TLGGetArchivDataEx
function in the ppTLGData parameter.

Note
The pointer must be initialized before calling TLGGetArchivDataEx() with NULL and checked
before calling TLGFreeMemory() for not equal to NULL.

WinCC Professional V13 SP2 – Programming reference


860 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Return value

TRUE
Memory is freed

FALSE
Error

Note
The pointer must be initialized before calling TLGGetArchivDataEx() with NULL and checked
before calling TLGFreeMemory() for not equal to NULL.

Required files
pdertcli.h
pdertcli.lib
pdertcli.dll

Related functions

TLGGetArchivDataEx (Page 866) Read out data of a log

See also
TLGGetArchivDataEx (Page 866)

2.8.6.8 TLGGetArchivData (RT Professional)

Description
The function reads out the data from a log between two times. Unlike TLGGetArchivDataEx
the values of the log tags are provided by a callback function.
A maximum 10,000 data records can be read with one call. If there are more data records
between start time and end time, you only get the first 10,000.
You get the following data records by adding a millisecond to the time of the last data record
and using this as a start time in a new call for TLGGetArchivData.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 861
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Declaration

BOOL TLGGetArchivData (
LPTSTR lpszArchivName,
LPTSTR lpszVarName,
SYSTEMTIME stStart,
SYSTEMTIME stStop,
TLG_GETARCHIVDATA_CALLBACK lpfnCallback,
PVOID lpUser,
DWORD dwFlags,
PCMN_ERROR lpError );

Parameter

lpszArchivName
Pointer to the name of the log from which data is to be read.

lpszVarName
Pointer to the name of the log tag whose values are to be read.

stStart
Start time from which data should be read.

stStop
End time up to which the data should be read

lpfnCallback
Pointer to your callback function which is called for every measuring point to be read out.

lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

dwFlags
The parameter is reserved for later upgrades and must be defaulted with 0.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Log data determined

WinCC Professional V13 SP2 – Programming reference


862 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

FALSE
Error

Error messages

TLG_API_ERR_SUPPLY An error has occurred


TLG_API_INVALID_PARAM invalid/wrong parameter supply
TLG_API_NO_INTERFACE Access to lower level COM interfaces failed
TLG_API_NO_CONNECTION No connection established with an activated project
TLG_API_NODEFAULTSERVER No standard server configured
TLG_API_NOSERVER No standard server configured and no local server available

Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll

Related functions

TLG_GETARCHIVDATA_CALLBACK Read out data of a log (callback)


(Page 864)
TLGGetArchivDataEx (Page 866) Read out data of a log

See also
TLG_GETARCHIVDATA_CALLBACK (Page 864)
TLGGetArchivDataEx (Page 866)

2.8.6.9 TLG_GETARCHIVDATA_CALLBACK (RT Professional)

Description
In order to evaluate the log data listed by the system, you must provide a callback function of
the TLG_GETARCHIVDATA_CALLBACK type.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 863
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Declaration

BOOL ( * TLG_GETARCHIVDATA_CALLBACK) (
PTLG_GETARCHIVDATA lpGAD,
PVOID lpUser );

Parameter

lpGAD
The system reserves temporary storage of the length of the TLG_GETARCHIVDATA structure
per log. The lpGAD pointer refers to the beginning of the first element.

lpUser
Pointer to application-specific data. This pointer is provided in the callback function.

Return value

TRUE
The enumeration is continued.

FALSE
The enumeration is cancelled.

Note
Only move data if possible. The following types of function calls within the callback can lead
to deadlocks or stack overflow:
● Functions in which a message loop is accessed, e.g. GetMessage
● Runtime API functions from the same DLL
● Enumerations which call other enumerations

Required files
pdertcli.h
pde_glob.h
pdertdef.h

Related functions

TLGGetArchivData (Page 861) Read out data of a log


TLG_GETARCHIVDATA Log data of process value logs (structure) Log data of com‐
(Page 807) pressed logs (structure)

WinCC Professional V13 SP2 – Programming reference


864 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

See also
TLGGetArchivData (Page 861)
TLG_GETARCHIVDATA (Page 807)

2.8.6.10 TLGGetArchivDataEx (RT Professional)

Description
Reads out the data from a log between two times. Unlike TLGGetArchivData the values of the
log tags are saved in the memory.

Note
The assigned memory in ppTlgData must be freed by TLGFreeMemory.

Declaration

BOOL TLGGetArchivDataEx (
LPCTSTR lpszArchivName,
LPCTSTR lpszVarName,
SYSTEMTIME* pstStart,
SYSTEMTIME* pstStop,
PTLG_ARCHIVDATARAW* ppTlgData,
DWORD* pdwNumberOfData,
DWORD* pdwFlags,
PCMN_ERROR lpError );

Parameter

lpszArchivName
Pointer to the log name from which the data are read out.

lpszVarName
Pointer to the name of the log tag whose values are read.

stStart
Start time from which data are read.

stStop
End time up to which the data are read
If a current timer for transferring a SYSTEMTIME parameter is required, use the GetLocalTime
function and not GetSystemTime. There is usually a considerable time difference between
these two functions.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 865
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

ppTlgData
Address of a pointer in which the address of the data of the log tag is stored. The data field is
allocated by TLGGetArchivDataEx and gets structures of the TLG_ARCHIVDATARAW
(Page 793) type.

Note
The assigned memory must be freed again by TLGFreeMemory.
The pointer must be initialized before calling TLGGetArchivDataEx() with NULL and checked
before calling TLGFreeMemory() for not equal to NULL.

pdwNumberOfData
Pointer to number of data records
● Before the call: Maximum number of data records to be read
● After the call: Number of read data records with the values of the log tags (of structures of
the TLG_ARCHIVDATARAW type).
Maximum 10,000 data records can be read with a call. If there are more data records between
the start time and end time, you only get the first 10,000. You get the next ones by adding a
millisecond to the time of the last data record and using this as a start time in a new call for
TLGGetArchivDataEx.

dwFlags
The parameter is reserved for later upgrades and must be defaulted with 0.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Log data determined

FALSE
Error

Note
The memory assigned by TLGGetArchivDataEx in ppTlgData must be freed again by
TLGFreeMemory.
The pointer must be initialized before calling TLGGetArchivDataEx() with NULL and checked
before calling TLGFreeMemory() for not equal to NULL.

WinCC Professional V13 SP2 – Programming reference


866 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Error messages

TLG_API_ERR_SUPPLY An error has occurred


TLG_API_INVALID_PARAM invalid/wrong parameter supply
TLG_API_NO_INTERFACE Access to lower level COM interfaces failed
TLG_API_NO_CONNECTION No connection established with an activated
project
TLG_API_NODEFAULTSERVER No standard server configured
TLG_API_NOSERVER No standard server configured and no local server
available

Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll

Related functions

TLGGetArchivData (Page 861) Read out data of a log


TLGFreeMemory (Page 860) Free memory

See also
TLGFreeMemory (Page 860)
TLGGetArchivData (Page 861)
TLG_ARCHIVDATARAW (Page 793)

2.8.6.11 TLGGetClosestTime (RT Professional)

Description
The function determines the adjacent logging times at a given time.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 867
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Declaration

BOOL TLGGetClosestTime (
LPCTSTR lpszArchivName,
LPCTSTR lpszVarName,
SYSTEMTIME* pstTime,
BOOL bPrevious,
PCMN_ERROR lpError );

Parameter

lpszArchivName
Pointer to the name of the log

lpszVarName
Pointer to the name of the tag

pstTime
pstTime is used as an input and output parameter. When calling TLGGetClosestTime , pstTime
contains the system time for which the adjacent logging times are to be determined. After the
successful function call, pstTime contains the closest logging time.

bPrevious
bPrevious identifies whether a previous or next logging time is to be determined at the
transferred system time.

TRUE A previous logging time is determined.


FALSE A next logging time is determined.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
pstTime contains an adjacent logging time.

FALSE
Error or no adjacent logging time could be determined.

Comment
If bPrevious is specified as TRUE and pstTime contains an existing value, exactly this time
may be returned and not the previous time. If bPrevious is specified as FALSE, the next time
is always supplied.

WinCC Professional V13 SP2 – Programming reference


868 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Error messages

TLG_API_INVALID_PARAM invalid/wrong parameter supply


TLG_API_ERR_SUPPLY An error has occurred
TLG_API_NO_INTERFACE Access to lower level COM interfaces failed
TLG_API_NO_CONNECTION No connection established with an activated
project
TLG_API_VARIABLE_NAME_NOT_EXIST No tag of this name found
TLG_API_TIME_NAME_NOT_EXIST No time object of this name found
TLG_API_NO_TIME_EXIST No time object exists

Required files
pdertcli.h
pde_glob.h
pdertcli.lib
pdertcli.dll

Related functions

TLGGetClosestTimeEx (Page 870) Determine logging time

See also
TLGGetClosestTimeEx (Page 870)

2.8.6.12 TLGGetClosestTimeEx (RT Professional)

Description
The function determines the adjacent logging times at a given time.

Declaration

BOOL TLGGetClosestTimeEx (
LPCTSTR lpszArchivName,
LPCTSTR lpszVarName,
SYSTEMTIME* pstTime,
BOOL bPrevious,
BOOL bIgnoreInvalid,
PCMN_ERROR lpError );

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 869
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Parameter

lpszArchivName
Pointer to the name of the log

lpszVarName
Pointer to the name of the tag

pstTime
pstTime is used as an input and output parameter. When calling TLGGetClosestTime ,
pstTime contains the system time for which the adjacent logging times are determined. After
the successful function call, pstTime contains the closest logging time.

bPrevious
bPrevious identifies whether a previous or next logging time is to be determined at the
transferred system time.

TRUE A previous logging time is determined.


FALSE A next logging time is determined.

bIgnoreInvalid
Indicates whether values with the connection fault flag are to be ignored in the time
determination.

TRUE The values with connection fault are ignored and skipped.
FALSE All values are used for the time determination so that the same function exists as in
TLGGetClosestTime().

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
pstTime contains an adjacent logging time.

FALSE
Error or no adjacent logging time could be determined.

Comment
If bPrevious is specified as TRUE and pstTime contains an existing value, exactly this time
may be returned and not the previous time. If bPrevious is specified as FALSE, the next time
is always supplied.

WinCC Professional V13 SP2 – Programming reference


870 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Error messages

TLG_API_INVALID_PARAM invalid/wrong parameter supply


TLG_API_ERR_SUPPLY An error has occurred
TLG_API_NO_INTERFACE Access to lower level COM interfaces failed
TLG_API_NO_CONNECTION No connection established with an activated project
TLG_API_VARIABLE_NAME_NOT_EXIST No tag of this name found
TLG_API_TIME_NAME_NOT_EXIST No time object of this name found
TLG_API_NO_TIME_EXIST No time object exists

Required files
pdertcli.h
pde_glob.h
pdertcli.lib
pdertcli.dll

Related functions

TLGGetClosestTime (Page 867) Determine logging time

See also
TLGGetClosestTime (Page 867)

2.8.6.13 TLGInsertArchivData (RT Professional)

Description
The function offers the possibility of inserting any data in an existing log on the hard disk.
If you perform TlgInsertArchivData for values which were created during summer time, you
have to allow for the time shift. Set the PDE_RT_DAYLIGHT flag when calling these values.
Without this flag, reading calls, e.g. TLGGetArchivData or TLGGetClosestTime return the
default time.

Note
Since the correctness of the data to be inserted is not checked, there is a danger of the log
being destroyed.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 871
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Declaration

BOOL TLGInsertArchivData (
LPCTSTR lpszArchivName,
LPCTSTR lpszVarName,
PTLG_ARCHIVDATARAW pTlgData,
DWORD dwNumberOfData,
DWORD dwFlags,
PCMN_ERROR lpError );

Parameters

lpszArchivName
Pointer to the name of the log

lpszVarName
Pointer to the name of the tag

pTlgData
Pointer to the first of the structures of the TLG_ARCHIVDATARAW type with the tag values
to be inserted in the log.

dwNumberOfData
Number of tag values (of the TLG_ARCHIVDATARAW structures) to be inserted.

dwFlags
The parameter is reserved for future development and must be preassigned with 0. Here, the
TLG_API_FLG_FAST_INSERT flag can be specified.
If this flag is set, the data are written much faster in optimized mode.
However, a prerequisite for using this performance optimization is that the timestamps of the
written data records are sorted chronologically and are always more up to date than the data
records already in the log.
When inserting older data records between existing data records, this flag may not be used.
If values are inserted which are older than existing ones or ones which are not sorted
chronologically, the older values are rejected without error messages.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Tag values inserted in log

WinCC Professional V13 SP2 – Programming reference


872 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

FALSE
Error

Comment
If a log which is located in the main memory is specified under lpszArchivName, an error
message TLG_API_ERR_SUPPLY is output.
Only logs on the hard disk can be addressed with this function. If write errors occurred for
individual values, a more exact error description is returned in CMN_ERROR . Due to the
limited length of the CMN_ERR.szErrorText the number of detail errors is limited to max. 57.

dwError1 TLG_API_ERR_SUPPLY
dwError2 0
dwError3 Line number in the source code
dwError4 Number of errors (max. 57)
dwError5 Number of data to be written (dwNumberOfData)
szErrorText TLG-API: an error occurred, line xxx; Pos:0=0xXX,1=0xXX,2=0xXX, ... (,
56=0xXX)

Error messages

TLG_API_INVALID_PARAM invalid/wrong parameter supply


TLG_API_ERR_SUPPLY An error has occurred
TLG_API_NO_INTERFACE Access to lower level COM interfaces failed
TLG_API_NO_CONNECTION No connection established with an activated project
TLG_API_NODEFAULTSERVER No standard server configured
TLG_API_NOSERVER No standard server configured and no local server available

Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll

2.8.6.14 TLGLockArchiv (RT Professional)

Description
Locks or frees a complete log. New data are not logged if a log is locked.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 873
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Declaration

BOOL TLGLockArchiv (
HWND hwnd,
LPTSTR lpszArchivName,
BOOL fLocked,
PCMN_ERROR lpError );

Parameter

hwnd
Window handle of the PDE runtime window

lpszArchivName
Pointer to the name of the log

fLocked

TRUE: Lock log


FALSE: Free log

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Log locked/freed

FALSE
Error

Error messages

TLG_API_INVALID_PARAM invalid/wrong parameter supply


TLG_API_ERR_SUPPLY An error has occurred
TLG_API_NO_INTERFACE Access to lower level COM interfaces failed
TLG_API_NO_CONNECTION No connection established with an activated project
TLG_API_NO_ARCHIV_EXIST No log available
TLG_API_NODEFAULTSERVER No standard server configured
TLG_API_NOSERVER No standard server configured and no local server available

WinCC Professional V13 SP2 – Programming reference


874 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Required files
pdertcli.h
pde_glob.h
pdertcli.lib
pdertcli.dll

2.8.6.15 TLGLockVariable (RT Professional)

Description
Locks or frees a tag. A locked tag is no longer updated and no longer logged.

Declaration

BOOL TLGLockVariable (
HWND hwnd,
LPTSTR lpszArchivName,
LPTSTR lpszVarName,
BOOL fLocked,
PCMN_ERROR lpError );

Parameter

hwnd
Window handle of the PDE runtime window

lpszArchivName
Pointer to the name of the log
To select a certain server the "ServerPrefix::" can be prefixed to the log name.

lpszVarName
Pointer to the name of the tag

fLocked

TRUE: Lock tag


FALSE: Free tag

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 875
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Return value

TRUE
Tag freed / locked

FALSE
Error

Error messages

TLG_API_INVALID_PARAM invalid/wrong parameter supply


TLG_API_ERR_SUPPLY An error has occurred
TLG_API_NO_INTERFACE Access to lower level COM interfaces failed
TLG_API_NO_CONNECTION No connection established with an activated project
TLG_API_NO_ARCHIV_EXIST No log available
TLG_API_NODEFAULTSERVER No standard server configured
TLG_API_NOSERVER No standard server configured and no local server available

Required files
pdertcli.h
pde_glob.h
pdertcli.lib
pdertcli.dll

2.8.6.16 TLGReadArchiv (RT Professional)

Description
Read the parameters of an existing log in the hProject project. All types of logs can be
processed with this function.

Declaration

BOOL TLGReadArchiv (
HANDLE hProject,
LPTSTR lpszArchivName,
PTLG_ARCHIV_STR lpArchiv,
LPCMN_ERROR lpoes );

WinCC Professional V13 SP2 – Programming reference


876 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Parameter

hProject
Handle of the project in which the log to be processed is located.

lpszArchivName
Name of the log to be processed.

lpArchiv
Address of the TLG_ARCHIV_STR (Page 790) structure in which the paraneters of the log are
to be saved.

lpoes
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Log contents read

FALSE
Error

Required files
pdecscli.h
pdecscli.lib
pdecscli.dll

Related functions

TLGEnumArchives (Page 850) List logs


TLGReadArchiv6 Read log parameters

Examples
Read log (Page 914)"TL01.cpp"

See also
TLGEnumArchives (Page 850)
Read log (Page 914)
TLG_ARCHIV_STR (Page 790)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 877
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.7 Functions for trend and table views (RT Professional)

2.8.7.1 TLGCloseWindow (RT Professional)

Description
An application window is closed with the function.

Declaration

BOOL TLGCloseWindow (
HWND hwnd,
PCMN_ERROR lpError );

Parameter

hwnd
Handle to the parent window of the application to be closed.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Application window closed

FALSE
Error

Error messages

TLG_API_ERR_SUPPLY An error has occurred


TLG_API_INVALID_PARAM invalid/wrong parameter supply

Required files
pdertcli.h
pde_glob.h
pdertcli.lib
pdertcli.dll

WinCC Professional V13 SP2 – Programming reference


878 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.7.2 TLGDrawCurvesInDC (RT Professional)

Description
Trends can be shown in an application window with this function.

Declaration

BOOL TLGDrawCurvesInDC (
HDC hDC,
PRECT lprect,
PTLG_PROT_CURVE_INFOS lpci,
DWORD dwNumberOfCurves,
LPCMN_ERROR lpError );

Parameter

hDC
Handle to the parent window in which the trend is to be output

lprect
Pointer to the Windows-specific structure of the RECT type with the size data of the window.

lpci
Pointer to the first structure of the TLG_PROT_CURVE_INFOS (Page 809) type with
information about how the trends are to be output.

dwNumberOfCurves
Number of the structures (number of trends to be shown) transferred in lpci.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Trends shown

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 879
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Error messages

TLG_API_INVALID_PARAM invalid/wrong parameter supply


TLG_API_NO_INTERFACE Access to lower level COM interfaces failed
TLG_API_NO_CONNECTION No connection established with an activated project
TLG_API_NOT_SUPPORTED This function is not supported

Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll

See also
TLG_PROT_CURVE_INFOS (Page 809)

2.8.7.3 TLGInsertTemplateItem (RT Professional)

Description
The function inserts a new entry for an existing window template, either a trend template or a
table template.

Declaration

BOOL TLGInsertTemplateItem (
LPTSTR lpszTemplateName,
PTLG_TEMPLATEITEM_INFO lpptii,
LPCMN_ERROR lpError );

Parameter

lpszTemplateName
Pointer to the name of the window template to which a trend or table template is to be added.

lpptii
Pointer to a structure of the TLG_TEMPLATEITEM_INFO (Page 816) type with the data of
the trend or table template to be added.

WinCC Professional V13 SP2 – Programming reference


880 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Window template extended

FALSE
Error

Error messages

TLG_API_ERR_SUPPLY An error has occurred


TLG_API_INVALID_PARAM invalid/wrong parameter supply
TLG_API_NO_INTERFACE Access to lower level COM interfaces failed
TLG_API_NO_CONNECTION No connection established with an activated
project
TLG_API_NOT_SUPPORTED This function is not supported

Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll

Examples
Edit curve template - Example 1 (Page 901)"TL02.cpp"

See also
TLG_TEMPLATEITEM_INFO (Page 816)
Edit curve template - Example 1 (Page 901)

2.8.7.4 TLGPressToolbarButton (RT Professional)

Description
You can trigger functions linked with the toolbar buttons with this function.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 881
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Declaration

BOOL TLGPressToolbarButton (
LPTSTR lpszTemplate,
DWORD dwButtonID,
PCMN_ERROR lpError );

Parameter

lpszTemplate
Name of the template

dwButtonID
Code number for the button to be triggered:

Constants for trends and tables


TLG_BASIC_BTN_HELP Open online help
TLG_BASIC_BTN_DLG Open parameter assignment dialog
TLG_BASIC_BTN_FIRST Show first data records of a log.
TLG_BASIC_BTN_PREV Scroll back in the log.
TLG_BASIC_BTN_NEXT Scroll forward in the log.
TLG_BASIC_BTN_LAST Show last data records of a log.
TLG_BASIC_BTN_STARTSTOP Activate or deactivate the updated view of a tred or table.
TLG_BASIC_BTN_PREV_ITEM Previous trend in the foreground or table column first.
TLG_BASIC_BTN_NEXT_ITEM Next trend in the foreground or table column first.
TLG_BASIC_BTN_ARC_VAR_SELECT Opens the log tag selection dialog.
TLG_BASIC_BTN_ITEM_SELECT Opens the selection dialog for trends or table columns.
TLG_BASIC_BTN_TIME_SELECT Opens the selection dialog for the display time range.

Constants for tables


TLG_TABLE_BTN_EDIT Activate or deactivate the edit function.

Constants for trends


TLG_CURVE_BTN_ZOOMIN Activate the zoom function for enlarging the section.
TLG_CURVE_BTN_ZOOMOUT Deactivate the zoom function.
TLG_CURVE_BTN_1_TO_1 Swsitch to normal trend view.
TLG_CURVE_BTN_LINEAL Activate or deactivate the ruler.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

WinCC Professional V13 SP2 – Programming reference


882 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Error messages

TLG_API_INVALID_PARAM invalid/wrong parameter supply


IDS_API_ERROR_WINDOW_NOT_FOUND Button ( window ) could not be found
TLG_API_NO_CONNECTION No connection established with an activated
project
TLG_API_NO_TYP_CHANGE_ALLOWED Type change is not allowed

Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll

2.8.7.5 TLGSetRulerWindowVisible (RT Professional)

Description
The data window of the read line is shown or hidden with this function.

Declaration

BOOL TLGSetRulerWindowVisible (
LPTSTR lpszTemplateName,
BOOL bShowRulerWindow,
LPCMN_ERROR lpError );

Parameter

lpszTemplateName
Pointer to the name of the window template

bShowRulerWindow

TRUE: The read line with data window is shown.


FALSE: The read line without data window is shown.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 883
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Return value

TRUE
The parameter for the visibility of the read line data window was re-entered.

FALSE
Error

Comment
The function is not effective in the f(x) trend view and table view until the appropriate image
with the object is displayed.

Error messages

TLG_API_ERR_SUPPLY An error has occurred


IDS_API_ERROR_WINDOW_NOT_FOUND Button ( window ) could not be found
TLG_API_INVALID_PARAM invalid/wrong parameter supply

Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll

2.8.7.6 TLGShowWindow (RT Professional)

Description
The function influences the display form of the window.

Declaration

BOOL TLGShowWindow (
HWND hwnd,
DWORD dwFlags,
PCMN_ERROR lpError );

WinCC Professional V13 SP2 – Programming reference


884 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Parameter

hwnd
Window handle of the runtime window

dwFlags
The same flags apply here as in ::ShowWindow(HWND hwnd, int nCmdShow) as they are
defined in WinUser.h (SW_SHOW, SW_HIDE, ...).

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Application window shown

FALSE
Error

Error messages

TLG_API_ERR_SUPPLY An error has occurred


TLG_API_INVALID_PARAM invalid/wrong parameter supply

Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll
WinUser.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 885
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.8 Functions for processing time systems (RT Professional)

2.8.8.1 TLGEnumTime (RT Professional)

Description
Enumerates the names of all detection and logging times of a project

Declaration

BOOL TLGEnumTime (
HANDLE hProject,
TLG_ENUM_TIME_NAME_CALLBACK lpCallbackFunc,
PVOID lpUser,
LPCMN_ERROR lpoes );

Parameter

hProject
Handle of the project in which the time objects to be listed are located.

lpCallbackFunc
Pointer to your callback function which is called for every existing time object.

lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

lpoes
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Time objects listed

FALSE
Error

Required files
pdecscli.h

WinCC Professional V13 SP2 – Programming reference


886 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

pdecscli.lib
pdecscli.dll

Related functions

TLG_ENUM_TIME_NAME_CALLBACK List time objects (callback)


(Page 888)

Examples
Enum all acquisition and logging times (Page 904)"TL01.cpp"

See also
TLG_ENUM_TIME_NAME_CALLBACK (Page 888)
Enum all acquisition and logging times (Page 904)

2.8.8.2 TLG_ENUM_TIME_NAME_CALLBACK (RT Professional)

Description
In order to be able to evaluate the time objects listed by the system, you must provide a callback
function of the TLG_ENUM_TIME_NAME_CALLBACK type.

Declaration

BOOL ( * TLG_ENUM_TIME_NAME_CALLBACK) (
LPTSTR lpszName,
PVOID lpUser );

Parameters

lpszName
The lpszName pointer refers to the name of the first time object.

lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 887
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Return value

TRUE
The enumeration is continued.

FALSE
The enumeration is cancelled.

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
pdecscli.h

Related functions

TLGEnumTime (Page 886) List time objects

Examples
Enum all acquisition and logging times (Page 904)"TL01.cpp"

See also
Enum all acquisition and logging times (Page 904)
TLGEnumTime (Page 886)

2.8.8.3 TLGEnumTimes (RT Professional)

Description
Enumerates all detection and logging times.

WinCC Professional V13 SP2 – Programming reference


888 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Declaration

BOOL TLGEnumTimes(
TLG_ENUMTIMES_CALLBACK lpfnCallback,
LPVOID lpUser,
PCMN_ERROR lpError );

Parameter

lpfnCallback
Pointer to your callback function

lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Time objects listed

FALSE
Error

Error messages

TLG_API_INVALID_PARAM invalid/wrong parameter supply


TLG_API_ERR_SUPPLY An error has occurred
TLG_API_NO_INTERFACE Access to lower level COM interfaces failed
TLG_API_NO_CONNECTION No connection established with an activated
project

Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 889
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Related functions

TLG_ENUMTIMES_CALLBACK (Page 891) List time objects (callback)

See also
TLG_ENUMTIMES_CALLBACK (Page 891)

2.8.8.4 TLG_ENUMTIMES_CALLBACK (RT Professional)

Description
In order to be able to evaluate the time objects listed by the system, you must provide a callback
function of the TLG_ENUMTIMES_CALLBACK type.

Declaration

BOOL ( * TLG_ENUMTIMES_CALLBACK) (
PTLG_TIMEDATA lpTime,
PVOID lpUser );

Parameters

lpTime
The system reserves temporary storage of the length of the TLG_TIMEDATA (Page 819)
structure per time object. The lpTime pointer refers to the beginning of the first element.

lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
The enumeration is continued.

WinCC Professional V13 SP2 – Programming reference


890 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

FALSE
The enumeration is cancelled.

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
pdertcli.h
pde_glob.h
pdertdef.h

Related functions

TLGEnumTimes (Page 888) List time objects

See also
TLGEnumTimes (Page 888)
TLG_TIMEDATA (Page 819)

2.8.8.5 TLGReadTime (RT Professional)

Description
Read the parameters of an already created time object

Declaration

BOOL TLGReadTime (
HANDLE hProject,
LPTSTR lpszTimeName,
PTLG_TIME_STR lpTime,
LPCMN_ERROR lpoes );

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 891
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Parameter

hProject
Handle of the project in which the time object to be processed is located.

lpszTimeName
Pointer to the name of the time object

lpTime
Address of the TLG_TIME_STR (Page 818) structure with the data of the time object.

lpoes
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Parameters of the time object read

FALSE
Error

Required files
pdecscli.h
pdecscli.lib
pdecscli.dll

Examples
Read parameters of time object (Page 918)"TL01.cpp"

See also
TLG_TIME_STR (Page 818)
Read parameters of time object (Page 918)

WinCC Professional V13 SP2 – Programming reference


892 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.9 Functions for saving and restoring (RT Professional)

2.8.9.1 TLGEnumBackupEntries (RT Professional)

Description
This function is no longer supported and supplies FALSE and the error code
TLG_API_NOT_SUPPORTED as a return value.

Declaration

BOOL TLGEnumBackupEntries (
LPTSTR lpszArchivName,
TLG_ENUMBACKUP_ENTRIES lpfnCallback,
LPVOID lpUser,
PCMN_ERROR lpError );

Parameter

lpszArchivName
Pointer to the name of the log

lpfnCallback
Pointer to your callback function which is called for every existing backuo.

lpUser
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Backups listed

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 893
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Error messages

TLG_API_INVALID_PARAM invalid/wrong parameter supply


TLG_API_NO_INTERFACE Access to lower level COM interfaces failed
TLG_API_NO_CONNECTION No connection established with an activated project
TLG_API_NOT_SUPPORTED This function is not supported

Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll

Related functions

TLG_ENUMBACKUP_ENTRIES (Page 895) List backups (callback)

See also
TLG_ENUMBACKUP_ENTRIES (Page 895)

2.8.9.2 TLG_ENUMBACKUP_ENTRIES (RT Professional)

Description
The TLGEnumBackupEntries function is no longer supported. In order to be able to evaluate
the backups listed by the system, you must provide a callback function of the
TLG_ENUMBACKUP_ENTRIES type.

Declaration

BOOL ( * TLG_ENUMBACKUP_ENTRIES) (
PTLG_BACKUP_TABLE_INFO lpbti,
PVOID lpUser );

Parameters

lpbti
The system reserves temporary storage of the length of the TLG_BACKUP_TABLE_INFO
(Page 796) structure per backup. The lpbti pointer refers to the beginning of the first element.

WinCC Professional V13 SP2 – Programming reference


894 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

lpUser
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
The enumeration is continued.

FALSE
The enumeration is cancelled.

Comment

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations

Required files
pdertcli.h
pde_glob.h
pdertdef.h

Related functions

TLGEnumBackupEntries (Page 893) List backups

See also
TLGEnumBackupEntries (Page 893)
TLG_BACKUP_TABLE_INFO (Page 796)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 895
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.9.3 TLGExport (RT Professional)

Description
Parts of a log can be exported with the function. The data records to be exported are selected
by the TLG_IO_BACKUP_SELECT structure.

Declaration

BOOL TLGExport (
LPTSTR lpszArchivName,
LPTSTR lpszFileName,
PTLG_IO_BACKUP_SELECT lpibs,
DWORD dwJobFlags,
DWORD dwFormatFlags,
PCMN_ERROR lpError );

Parameter

lpszArchivName
Pointer to the name of the log The name must be specified made up in the form "log name\tag
name" zusammengesetzt anzugeben.
The parts of the name can be determined with TLGEnumArchivsEx and TLGEnumVariablesEx.

lpszFileName
Pointer to the name of the file into which the data are to be exported.

lpibs
Address of the transfer structure TLG_IO_BACKUP_SELECT (Page 808) for the selection
parameters.

dwJobFlags
The parameter is provided for later upgrades and must be supplied with 0L.

dwFormatFlags
Format specifier:

TLG_BAKFMT_CSV: CSV format (Comma Separated Value)

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

WinCC Professional V13 SP2 – Programming reference


896 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Return value

TRUE
Log data exported

FALSE
Error

Comment
This function is only useful for sequential logs, circular logs and compressed logs.

Error messages

TLG_API_ERR_SUPPLY An error has occurred


TLG_API_INVALID_PARAM invalid/wrong parameter supply
TLG_API_NO_INTERFACE Access to lower level COM interfaces failed
TLG_API_NO_CONNECTION No connection established with an activated project

Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll

See also
TLG_IO_BACKUP_SELECT (Page 808)

2.8.9.4 TLGGetBackupSize (RT Professional)

Description
The function is no longer supported and supplies FALSE and the error code
TLG_API_NOT_SUPPORTED as a return value.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 897
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Declaration

BOOL TLGGetBackupSize (
LPTSTR lpszArchivName,
DWORD* lpdwSizeOfTable,
PTLG_IO_BACKUP_SELECT lpibs,
DWORD dwJobFlags,
DWORD dwFormatFlags,
PCMN_ERROR lpError );

Parameter

lpszArchivName
Pointer to the name of the log

lpdwSizeOfTable
Address of a DWORD in which the size of the selected data in bytes is written.

lpibs
Address of the transfer structure TLG_IO_BACKUP_SELECT (Page 808) for the selection
parameters.

dwJobFlags
Job-specific identification, following are possible:

TLG_BACKUP_EXPORT: Simple backup without deleting the source data


TLG_BACKUP_EVACUATE: Export with deletion of the sources

dwFormatFlags
Format specifier:

TLG_BAKFMT_CSV: CSV format (Comma Separated Value)-

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Size of data determined

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


898 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

Error messages

TLG_API_ERR_SUPPLY An error has occurred


TLG_API_INVALID_PARAM invalid/wrong parameter supply
TLG_API_NO_INTERFACE Access to lower level COM interfaces failed
TLG_API_NO_CONNECTION No connection established with an activated project
TLG_API_NOT_SUPPORTED This function is not supported

Required files
pdertcli.h
pde_glob.h
pdertdef.h
pdertcli.lib
pdertcli.dll

See also
TLG_IO_BACKUP_SELECT (Page 808)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 899
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.10 Examples (RT Professional)

2.8.10.1 Edit curve template - Example 1 (RT Professional)

Example

// =====================================================================
// =====================================================================
// : Module with examples to TagLogging-API
// *********************************************************************
// Copyright (C) 1995/96 SIEMENS AG, AUT 913 All rights reserved
// *********************************************************************
#include "stdafx.h" // if MFC classes
//#include "odkapi.h" // if console application
#include "TL02.h"
#include <string.h>
#include <stdlib.h>
#include <malloc.h>
#include <time.h>

// IMPLEMENTATION
//{{ODK_EXAMPLE}Edit curve template (example no. 1) (TLG)}
//{{FUNCTION}TLGConnect (TLG)}
//{{FUNCTION}TLGDisconnect (TLG)}
//{{FUNCTION}TLGInsertTemplateItem (TLG)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: MyTLGInsertTemplateItem(void) ODK TL RT
// =====================================================================
// : Edit trend template
// : Defines a new trend with previous settings
// =====================================================================
void MyTLGInsertTemplateItem (void)
{
#define COLOR_RED 0x000000FF

// Color Sym. name Value (hexadecimal) Value (decimal)


// black CO_BLACK 0x00000000 0
// white CO_WHITE 0x00FFFFFF 16777215
// red CO_RED 0x000000FF 255
// dark red CO_DKRED 0x00000080 128
// green CO_GREEN 0x0000FF00 65280
// dark green CO_DKGREEN 0x00008000 32768
// blue CO_BLUE 0x00FF0000 16711680
// dark blue CO_DKBLUE 0x00800000 8388608
// yellow CO_YELLOW 0x0000FFFF 65535
// dark yellow CO_DKYELLOW 0x00008080 32896
// cyan CO_CYAN 0x00FFFF00 1048320
// dark cyan CO_DKCYAN 0x00808000 8421376
// magenta CO_MAGENTA 0x00FF00FF 16711935
// dark magenta CO_DKMAGENTA 0x00800080 8388736
// light gray CO_LTGRAY 0x00C0C0C0 12632256
// dark gray CO_DKGRAY 0x00808080 8421504

WinCC Professional V13 SP2 – Programming reference


900 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

// scripts
BOOL ret = FALSE;
CMN_ERROR Error;
TCHAR szText[255];
HWND hwndParent = NULL;
TLG_TEMPLATEITEM_INFO TemplateItem;
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGConnect(hwndParent, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TLGInsertTemplateItem: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
memset(&TemplateItem, 0, sizeof(TLG_TEMPLATEITEM_INFO));
_tcsncpy_s(TemplateItem.szArchivName, _countof(TemplateItem.szArchivName),
_T("PLSMWA"), _TRUNCATE); // archive name
_tcsncpy_s(TemplateItem.szTemplateName, _countof(TemplateItem.szTemplateName),
_T("KV_PID1"), _TRUNCATE); // template for curve window
_tcsncpy_s(TemplateItem.szVariableName, _countof(TemplateItem.szVariableName),
_T("VPID1_X"), _TRUNCATE); // DM variable name
_tcsncpy_s(TemplateItem.szDMVariableName, _countof(TemplateItem.szDMVariableName),
_T("VPID1_X"), _TRUNCATE);
_tcsncpy_s(TemplateItem.szTemplateItemName,
_countof(TemplateItem.szTemplateItemName), _T("KPID3_X"), _TRUNCATE); // curve name
TemplateItem.dwTemplateTyp = TLG_TEMPLATE_CURVE;
TemplateItem.dwTemplateItemTyp = TLG_TEMPLATEITEM_CURVE;
TemplateItem.dwReadAccessLevel = 1;
TemplateItem.dwWriteAccessLevel = 1;
TemplateItem.dwArchivTyp = TLG_ARCTYP_PROCESS; //_USER, _PROCESS, _COMPRESS
_tcsncpy_s(TemplateItem.szTimeNameRange, _countof(TemplateItem.szTimeNameRange),
_T("500 ms"), _TRUNCATE);
TemplateItem.fVisible = TRUE;
TemplateItem.tplInfo.tplCurve.csx.dwDataTyp = TLG_DATATYP_TIMERANGE;
TemplateItem.tplInfo.tplCurve.csx.fAutoRange = TRUE;
TemplateItem.tplInfo.tplCurve.csx.fActualize = TRUE;
TemplateItem.tplInfo.tplCurve.csx.dwBufferSize = 10;
TemplateItem.tplInfo.tplCurve.csy.dwDataTyp = TLG_DATATYP_BLOCKDATA;
TemplateItem.tplInfo.tplCurve.csy.fAutoRange = TRUE;
TemplateItem.tplInfo.tplCurve.csy.crColor = COLOR_RED;
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGInsertTemplateItem(TemplateItem.szTemplateName, &TemplateItem, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TLGInsertTemplateItem: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText,_countof(szText), _TRUNCATE, _T("InsertItem:
TemplateItemName= %s "), TemplateItem.szTemplateItemName);

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 901
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

}
ODKTrace(szText);
// Disconnect
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGDisconnect(&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGDisconnect:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
}
}
//{{ODK_EXAMPLE}(END)}

See also
TLGInsertTemplateItem (Page 880)
TLGConnect (Page 834)
TLGDisconnect (Page 836)

WinCC Professional V13 SP2 – Programming reference


902 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.10.2 Enum all acquisition and logging times (RT Professional)

Example

/ =====================================================================
// =====================================================================
// : Module with examples to TagLogging-API
// *********************************************************************
// Copyright (C) 1995/96 SIEMENS AG, AUT 913 All rights reserved
// *********************************************************************
#include "stdafx.h" // if MFC classes
#include "stdlib.h"
#include "TL01.h"
#include "dm01.h"
// IMPLEMENTATION
// =====================================================================
// 4. Callback
// =====================================================================
//{{ODK_EXAMPLE}Enum all acquisition and logging times (TLG)}
//{{FUNCTION}TLGCSConnect (TLG)}
//{{FUNCTION}TLGCSDisConnect (TLG)}
//{{FUNCTION}TLGEnumTime (TLG)}
//{{FUNCTION}TLG_ENUM_TIME_NAME_CALLBACK (TLG)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: TLGEnumTime(void) ODK TL CS
// =====================================================================
// : Enum all acquisition and logging times
// :
// =====================================================================
BOOL MyTLGEnumTimeNameCallback (LPTSTR szTime, PVOID lpUser)
{
TCHAR szText[255];
sprintf(szText,"...Enum Time %s", szTime);
ODKTrace(szText);
//printf("%s\r\n",szText);
return TRUE;
}

void MyTLGEnumTime(void)
{
// #define PROJ_PATH "C:\\siemens\\odk\\samples\\projects\\demo\\odk.mcp"
BOOL ret = FALSE;
TCHAR szText[255];
HANDLE hProject;
CMN_ERROR Error;
PVOID pUser = NULL;
sprintf(szText, "TLGEnumTime");
ODKTrace(szText);
//printf("%s\r\n",szText);
MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGCSConnect(NULL, &Error);
if (FALSE == ret)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 903
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

{
sprintf(szText, "Error in TLGCSConnect: E1= 0x%08lx ; E2= 0x%08lx ; %s",
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
//printf("%s\r\n",szText);
}
else
{
sprintf(szText, " TLGCSConnect");
ODKTrace(szText);
//printf("%s\r\n",szText);
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGOpenProject(&hProject, /*PROJ_PATH*/g_szProjectFile, NULL, &Error);
if (FALSE == ret)
{
sprintf(szText, "Error in TLGOpenProject: E1= 0x%08lx ; E2= 0x%08lx ; %s",
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
//printf("%s\r\n",szText);
}
else //TLGOpenProject OK
{
sprintf(szText, " TLGOpenProject");
ODKTrace(szText);
//printf("%s\r\n",szText);
// read projected logging times
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGEnumTime(hProject, MyTLGEnumTimeNameCallback, pUser, &Error);
if (FALSE == ret)
{
sprintf(szText, "Error in TLGEnumTime: E1= 0x%08lx ; E2= 0x%08lx ; %s",
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
sprintf(szText, "TLGEnumTime");
}
ODKTrace(szText);
//printf("%s\r\n",szText);
//TLGCloseProject();
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGCloseProject(hProject, &Error);
if(FALSE == ret)
{
sprintf(szText, "Error in TLGCloseProject: E1= 0x%08lx ; E2= 0x%08lx ; %s",
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
sprintf(szText, " TLGCloseProject");
}
ODKTrace(szText);
//printf("%s\r\n",szText);
}
// Disconnect
memset(&Error,0,sizeof(CMN_ERROR));

WinCC Professional V13 SP2 – Programming reference


904 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

ret = TLGCSDisConnect(&Error);
if (FALSE == ret)
{
sprintf(szText, "Error in TLGCSDisConnect: E1= 0x%08lx ; E2= 0x%08lx ; %s",
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
sprintf(szText, " TLGCSDisConnect");
}
ODKTrace(szText);
//printf("%s\r\n",szText);
}
}
//{{ODK_EXAMPLE}(END)}

See also
TLGCSConnect (Page 829)
TLG_ENUM_TIME_NAME_CALLBACK (Page 887)
TLGEnumTime (Page 886)
TLGDisconnect (Page 836)
TLGCSDisConnect (Page 832)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 905
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.10.3 Enum logs (RT Professional)

Example

//{{ODK_EXAMPLE}Enum logs (TLG)}


//{{FUNCTION}TLGCSConnect (TLG)}
//{{FUNCTION}TLGCSDisConnect (TLG)}
//{{FUNCTION}TLGOpenProject (TLG)}
//{{FUNCTION}TLGCloseProject (TLG)}
//{{FUNCTION}TLGEnumArchives (TLG)}
//{{FUNCTION}TLG_ENUM_ARCHIV_CALLBACK (TLG)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: TLGEnumArchives(void) ODK TL CS
// =====================================================================
// : Enum logs
// :
// =====================================================================
BOOL MyTLGEnumArchivCallback(LPTSTR szArchives, PVOID lpUser)
{
lpUser;
TCHAR szText[255];
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("...Enum Archive=%s "),szArchives);
ODKTrace(szText);
return TRUE;
}

void MyTLGEnumArchives(void)
{
// #define PROJ_PATH "C:\\siemens\\odk\\samples\\projects\\demo\\odk.mcp"
BOOL ret = FALSE;
CMN_ERROR Error;
HANDLE hProject;
PVOID pUser = NULL;
TCHAR szText[255];
TCHAR szArchivName[255];
_tcsncpy_s(szArchivName, _countof(szArchivName), _T("PLSMWA"), _TRUNCATE);
MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile
//TLGConnect
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGCSConnect(NULL, &Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGCSConnect:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
//TLGOpenProject
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGOpenProject(&hProject, /*PROJ_PATH*/g_szProjectFile, NULL, &Error);
if (FALSE == ret)

WinCC Professional V13 SP2 – Programming reference


906 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TLGOpenProject: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
// TLGEnumLogs
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGEnumArchives(hProject, MyTLGEnumArchivCallback, pUser, &Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TLGEnumArchives: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" TLGEnumArchives"));
}
ODKTrace(szText);
}
//CloseProject
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGCloseProject(hProject,&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGCloseProject:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" TLGCloseProject"));
}
ODKTrace(szText);
}
// Disconnect
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGCSDisConnect(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGCSDisConnect: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" TLGCSDisConnect"));
}
ODKTrace(szText);
}
//{{ODK_EXAMPLE}(END)}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 907
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

See also
TLGCSConnect (Page 829)
TLGOpenProject (Page 839)
TLGCloseProject (Page 837)
TLGEnumArchives (Page 850)
TLG_ENUM_ARCHIV_CALLBACK (Page 851)
TLGCSDisConnect (Page 832)

WinCC Professional V13 SP2 – Programming reference


908 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.10.4 Enum tags of a log (RT Professional)

Example

//{{ODK_EXAMPLE}Enum tags of a log (TLG)}


//{{FUNCTION}TLG_ENUM_PROJECT_NAME_CALLBACK (TLG)}
//{{FUNCTION}TLGEnumVariablesEx (TLG)}
//{{FUNCTION}TLG_ENUMVARIABLES (TLG)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: MyTLGEnumVariablesEx(void) ODK TL CS
// =====================================================================
// : Edit log tags
// :
// =====================================================================
BOOL MyTLGEnumVariablesExCallback(PTLG_VARIABLE_INFO lpvi, LPVOID lpUser)
{
lpUser;
TCHAR szText[255];
_sntprintf_s(szText,_countof(szText), _TRUNCATE, _T("Enum Variables %d %s "), lpvi-
>dwVariableTyp, lpvi->szVariableName);
ODKTrace(szText);
return TRUE;
}

void MyTLGEnumVariablesEx(void)
{
BOOL ret = FALSE;
TCHAR szText[255];
CMN_ERROR Error;
HANDLE hProject = NULL;
TCHAR szArchivName[255];
HWND hwndParent = NULL;
VOID* pUser = NULL;
_tcsncpy_s(szArchivName, _countof(szArchivName), _T("PLSMWA"), _TRUNCATE);
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGConnect(hwndParent, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGConnect: E1= 0x
%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TLGConnect"));
ODKTrace(szText);

// Info
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGEnumVariablesEx (szArchivName, MyTLGEnumVariablesExCallback,
pUser, &Error );

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 909
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TLGEnumVariablesEx: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TLGEnumVariablesEx: OK"));
}
ODKTrace(szText);

memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGDisconnect(&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGDisconnect:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
}
}
//{{ODK_EXAMPLE}(END)}

See also
TLGOpenProject (Page 839)
TLGEnumVariablesEx (Page 845)
TLG_ENUMVARIABLES (Page 847)

WinCC Professional V13 SP2 – Programming reference


910 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.10.5 Enumerate logs (RT Professional)

Example

//{{ODK_EXAMPLE}Enumerate logs (TLG)}


//{{FUNCTION}TLGConnect (TLG)}
//{{FUNCTION}TLGDisconnect (TLG)}
//{{FUNCTION}TLGEnumArchivs (TLG)}
//{{FUNCTION}TLG_ENUMTABLES (TLG)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: MyTLGEnumArchivs(void) ODK TL RT
// =====================================================================
// : Enumerate logs
// =====================================================================
BOOL MyTLGEnumTablesCallback(LPTSTR lpTableName, PTLG_TABLE_INFO lpti, PVOID lpUser)
{
lpUser;
TCHAR szText[255];
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TableName=%s"), lpTableName);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" ...ArchivTyp=%d"), lpti-
>dwArchivTyp);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" ...ArchivName=%s"),lpti-
>szArchivName);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" ...dwSaveTyp=%d"), lpti-
>dwSaveTyp);
ODKTrace(szText);
return TRUE;
}

void MyTLGEnumArchivs(void)
{
BOOL ret = FALSE;
//DWORD StartTime = 0;
//DWORD StopTime = 0;
void* lpUser = NULL;
CMN_ERROR Error;
TCHAR szText[255];
HWND hwndParent = NULL;
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGConnect(hwndParent, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGConnect: E1= 0x
%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TLGConnect"));

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 911
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

ODKTrace(szText);

memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGEnumArchivs(TLG_ARCTYP_PROCESS, MyTLGEnumTablesCallback, lpUser, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGEnumArchivs:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TLGEnumArchivs: OK"));
}
ODKTrace(szText);
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGDisconnect(&Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGDisconnect:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
}
}
//{{ODK_EXAMPLE}(END)}

See also
TLGConnect (Page 834)
TLGDisconnect (Page 836)
TLGEnumArchivs (Page 853)

WinCC Professional V13 SP2 – Programming reference


912 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.10.6 Read log (RT Professional)

Example

//{{ODK_EXAMPLE}Read log (TLG)}


//{{FUNCTION}TLGCSConnect (TLG)}
//{{FUNCTION}TLGCSDisConnect (TLG)}
//{{FUNCTION}TLGOpenProject (TLG)}
//{{FUNCTION}TLGCloseProject (TLG)}
//{{FUNCTION}TLGReadArchiv (TLG)}
//{{FUNCTION}TLGReadVariable (TLG)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: TLGReadArchiv(void) ODK TL CS
// =====================================================================
// : Read log
// :
// =====================================================================
void MyTLGReadArchiv(void)
{
// #define PROJ_PATH "C:\\siemens\\odk\\samples\\projects\\demo\\odk.mcp"
BOOL ret = FALSE;
CMN_ERROR Error;
HANDLE hProject;
//PVOID pUser = NULL;
TCHAR szText[255];
TCHAR szArchivName[255];
TCHAR szVarName[255];
TLG_ARCHIV_STR TLGArchivStruct;
TLG_VAR_STR TLGVarStruct;
_tcsncpy_s(szArchivName, _countof(szArchivName), _T("PLSMWA"), _TRUNCATE);
_tcsncpy_s(szVarName, _countof(szVarName), _T("X"), _TRUNCATE);
MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGCSConnect(NULL, &Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGCSConnect: E1= 0x
%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGOpenProject(&hProject, /*PROJ_PATH*/g_szProjectFile, NULL, &Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGOpenProject:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 913
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

{
// read
memset(&TLGArchivStruct,0,sizeof(TLG_ARCHIV_STR));
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGReadArchiv(hProject, szArchivName, &TLGArchivStruct, &Error);
if(FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGReadArchiv:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TLGReadArchiv"));
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" ArcName=%s Comments=
%s dwTyp=0x%04x dwRecSize=%d"),
TLGArchivStruct.szName,
TLGArchivStruct.szComment,
TLGArchivStruct.dwTyp,
TLGArchivStruct.dwRecordSize);
ODKTrace(szText);
}
memset(&TLGVarStruct, 0, sizeof(TLG_VAR_STR));
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGReadVariable(hProject, szArchivName, szVarName, &TLGVarStruct, &Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TLGReadVariable: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TLGReadVariable"));
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" szVarName=%s"),
TLGVarStruct.szVarName);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" szProcName=%s"),
TLGVarStruct.szProcName);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" dwVarType=0x%04X"),
TLGVarStruct.dwVarType);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" dwArchivStyle=0x
%04X"), TLGVarStruct.dwArchivStyle);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" szWriteBackTo=%s"),
TLGVarStruct.szWriteBackTo);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" dwSupply=0x%04X"),
TLGVarStruct.dwSupply);
ODKTrace(szText);

WinCC Professional V13 SP2 – Programming reference


914 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" fLocked=%d"),


TLGVarStruct.fLocked);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" szComment=%s"),
TLGVarStruct.szComment);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" szRecordCycle=%s"),
TLGVarStruct.szRecordCycle);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" szArchivCycle=%s"),
TLGVarStruct.szArchivCycle);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" dwMultiple=0x%04X"),
TLGVarStruct.dwMultiple);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" dwValueFlow=0x
%04X"), TLGVarStruct.dwValueFlow);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" dwValueFollow=0x
%04X"), TLGVarStruct.dwValueFollow);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" dwSaveByFault=0x
%04X"), TLGVarStruct.dwSaveByFault);
ODKTrace(szText);
}
}
//CloseProject
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGCloseProject(hProject,&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGCloseProject:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" TLGCloseProject"));
}
ODKTrace(szText);
}
// Disconnect
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGCSDisConnect(&Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGCSDisConnect: E1=
0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" TLGCSDisConnect"));
}
ODKTrace(szText);
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 915
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

//{{ODK_EXAMPLE}(END)}

See also
TLGOpenProject (Page 839)
TLGCloseProject (Page 837)
TLGCSConnect (Page 829)
TLGReadVariable (Page 848)
TLGReadArchiv (Page 876)
TLGCSDisConnect (Page 832)

WinCC Professional V13 SP2 – Programming reference


916 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

2.8.10.7 Read parameters of time object (RT Professional)

Example

//{{ODK_EXAMPLE}Read parameters of time object (TLG)}


//{{FUNCTION}TLGCSConnect (TLG)}
//{{FUNCTION}TLGCSDisConnect (TLG)}
//{{FUNCTION}TLGReadTime (TLG)}
//{{FUNCTION}TLGOpenProject (TLG)}
//{{FUNCTION}TLGCloseProject (TLG)}
//{{FUNCTION}(END)}
// =====================================================================
// Function: TLGReadTime(void) ODK TL CS
// =====================================================================
// : Reads the parameters of an already existing time object.
// :
// =====================================================================
void MyTLGReadTime(void)
{
// #define PROJ_PATH "C:\\siemens\\odk\\samples\\projects\\demo\\odk.mcp"
BOOL ret = FALSE;
TCHAR szText[255];
HANDLE hProject;
CMN_ERROR Error;
TLG_TIME_STR TLGTimeStruct;
TCHAR szTime[255];
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("TLGReadTime"));
ODKTrace(szText);
MyDMEnumOpenedProjects(); // open the DM and set the g_szProjectFile
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGCSConnect(NULL, &Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGCSConnect: E1= 0x
%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGOpenProject(&hProject, /*PROJ_PATH*/g_szProjectFile, NULL, &Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGOpenProject:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
// read properties of selected time
memset(&Error,0,sizeof(CMN_ERROR));
memset(&TLGTimeStruct, 0, sizeof(TLG_TIME_STR));

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 917
Runtime API (RT Professional)
2.8 Tag and log functions (RT Professional)

_tcsncpy_s(szTime, _countof(szTime), _T("500 ms"), _TRUNCATE);


ret = TLGReadTime(hProject, szTime, &TLGTimeStruct, &Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGReadTime:
E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
ODKTrace(szText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("...szTimeName = %s
"),TLGTimeStruct.szTimeName);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("...dwBasis = %10d
Millisec"), TLGTimeStruct.dwBasis);
ODKTrace(szText);
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("...dwFactor = %10d
"), TLGTimeStruct.dwFactor);
ODKTrace(szText);
}
// save changes permanent
memset(&Error, 0, sizeof(CMN_ERROR));
ret = TLGSaveProject(hProject , &Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TLGSaveProject: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" TLGSaveProject"));
}
ODKTrace(szText);
//TLGCloseProject();
memset(&Error, 0, sizeof(CMN_ERROR));
ret = TLGCloseProject(hProject, &Error);
if (FALSE == ret)
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in
TLGCloseProject: E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" TLGCloseProject"));
}
ODKTrace(szText);
}
// Disconnect
memset(&Error,0,sizeof(CMN_ERROR));
ret = TLGCSDisConnect(&Error);
if (FALSE == ret)
{

WinCC Professional V13 SP2 – Programming reference


918 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T("Error in TLGCSDisConnect:


E1= 0x%08lx ; E2= 0x%08lx ; %s"),
Error.dwError1, Error.dwError2, Error.szErrorText);
}
else
{
_sntprintf_s(szText, _countof(szText), _TRUNCATE, _T(" TLGCSDisConnect"));
}
ODKTrace(szText);
}
}
//{{ODK_EXAMPLE}(END)}

See also
TLGOpenProject (Page 839)
TLGCloseProject (Page 837)
TLGCSConnect (Page 829)
TLGReadTime (Page 891)
TLGCSDisConnect (Page 832)

2.9 Recipe functions (RT Professional)

2.9.1 Basics (RT Professional)

2.9.1.1 Overview of the functions (RT Professional)

Overview

uaSetLocalEvents (Page 931) Sets the local events.


uaArchiveClose (Page 943) Close connection to current user archive
uaArchiveDelete (Page 944) Delete data records in the user archive
uaArchiveExport (Page 945) Export user archive
uaArchiveGetCount (Page 956) Read the number of data records
uaArchiveGetFieldLength (Page 965) Read the current field length
uaArchiveGetFieldName (Page 966) Read the current field name
uaArchiveGetFields (Page 967) Determine number of fields
uaArchiveGetFieldType (Page 968) Read the current field type
uaArchiveGetFieldValueDate (Page 969) Read date and time from current data field
uaArchiveGetFieldValueDouble (Page 970) Read double value from current data field
uaArchiveGetFieldValueLong (Page 972) Read long value from current data field

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 919
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

uaArchiveGetFieldValueString (Page 973) Read string from current data field


uaArchiveGetFilter (Page 958) Read filter setting
uaArchiveGetID (Page 946) Read ID of the current data field
uaArchiveGetName (Page 947) Read name of archive
uaArchiveGetSort (Page 949) Read sorting of the current data field
uaArchiveImport (Page 950) Import user archive
uaArchiveInsert (Page 959) Insert data record into user archive
uaArchiveMoveFirst (Page 960) Move to first data record
uaArchiveMoveLast (Page 961) Move to last data record
uaArchiveMoveNext (Page 962) Move to next data record
uaArchiveMovePrevious (Page 963) Move to previous data record
uaArchiveOpen (Page 951) Create connection to current user archive
uaArchiveReadTagValuesByName (Page 986) Read tag values based on the name
uaArchiveReadTagValues (Page 985) Read tag values
uaArchiveRequery (Page 980) Reload to current user archive
uaArchiveSetFieldValueDate (Page 974) Write date and time to current data field
uaArchiveSetFieldValueDouble (Page 975) Write double value to current data field
uaArchiveSetFieldValueLong (Page 976) Write long value to current data field
uaArchiveSetFieldValueString (Page 978) Write string to current data field
uaArchiveSetFilter (Page 981) Set filter
uaArchiveSetSort (Page 983) Set up sorting criterion
uaArchiveUpdate (Page 952) Update data record into user archive
uaArchiveWriteTagValuesByName (Page 989) Write data record to tag based on the name
uaArchiveWriteTagValues (Page 987) Write data record to tag
uaConnect (Page 932) Establish connection to a user archive (runtime).
uaDisconnect (Page 934) Close connection to user archive
uaGetArchive (Page 953) Read archive configuration
uaGetField (Page 979) Read field configuration
uaGetLastError (Page 928) Query last error in user archive
AUTOHOTSPOT Query last COM function error that occurred
uaGetNumArchives (Page 955) Find number of configured user archives
uaGetNumFields (Page 964) Determine number of fields
uaIsActive (Page 930) Query whether an archive is open in runtime
uaOpenArchives (Page 955) Query how many user archives are open in runtime
uaOpenViews (Page 984) Query how many user archive views are open in
runtime
uaQueryArchiveByName (Page 937) Set up connection to user archive based on the
name (runtime)
uaQueryArchive (Page 935) Set up connection to user archive (runtime)
UaQueryConfiguration (Page 939) Query connection to the configuration
uaReleaseArchive (Page 940) Close connection to user archive (runtime)
uaReleaseConfiguration (Page 941) Close connection to the configuration

WinCC Professional V13 SP2 – Programming reference


920 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

See also
uaUsers (Page 931)

2.9.1.2 Structure of recipes (RT Professional)

Introduction

User archives are individual tables in the database that can be structured by the user in any
manner, except for the first column. The data types are limited to char, double, int, and
DateTime fields.
The GetField and SetField functions act on an internal hRecord data record that can be written
to the archive with Insert and Update.
If the user archive is modified directly via the database (ODBC/SQL), an online synchronization
is not performed.

Configuration of User Archives


The first step is to configure the user archives. This configuration can be carried out with the
User Archives editor, the User Archives script functions, or the User Archives API functions.
The script functions are identical to the API functions in this case.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 921
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Configuration with the User Archives API functions


The UAQueryConfiguration function supplies a handle (UAHCONFIG) for the configuration
functions. This handle can be used to call the configuration functions UASetArchive,
UAAddArchive, UASetField, UAAddField, etc. The "UAReleaseConfiguration" function
completes the configuration of User Archives.
These functions are not available in multiclient projects.

Establishing connection to User Archives


Next, standard function UAConnect must be called in order to establish a connection to the
User Archives component. UAConnect creates the UAHCONNECT handle, which enables
archives (but not views) to be opened and closed.

Information functions in runtime mode


The UAIsActive function indicates whether an archive is active and open in runtime. UAUsers
returns the number of logged on users, UAOpenArchives the number of open archives, and
UAOpenViews the number of open views.

Opening of runtime functions


A configured user archive is required for runtime mode. The UAQueryArchive and
UAQueryArchiveByName provide a handle for the runtime functions. Once the archive is
opened with the UAArchiveOpen function, the User Archives runtime functions can be used.

Functions for runtime mode


The UAArchiveMoveNext, UAArchiveMovePrevious, UAArchiveMoveFirst, and
UAArchiveMoveLast functions are used to move the cursor. The hArchive handle ensures a
unique assignment to a data record in the user archive. This assignment also allows indirect
addressing, as is required for screen masks, for example.
The UAArchiveUpdate function saves the temporary data record in the archive and in doing
so overwrites the data record on which the cursor is currently positioned. This data record must
be read beforehand using the UAArchiveMoveNext, UAArchiveMovePrevious,
UAArchiveMoveFirst, or UAArchiveMoveLast function.

Closing connection to User Archives


The UAArchiveClose function is used to close a user archive. The UAReleaseArchive function
closes the connection to the current archive and the UADisconnect function then terminates
the connection to the User Archives component.

WinCC Professional V13 SP2 – Programming reference


922 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

2.9.1.3 Dependencies in call sequence of API functions (RT Professional)

Dependencies in call sequence of runtime functions


The User Archives function UAConnect creates the UAHCONNECT handle. This handle is
required for opening and closing archives (not views). Therefore, the UAConnect function must
be called first in order to obtain the UAHCONNECT handle. This handle can then be used to
call the API functions for opening and closing archives (not views), as listed below. The
UADisconnect function must be called to complete the configuration.
The UAQueryArchive and UAQueryArchiveByName functions create the UAHARCHIVE
handle. This handle is a requirement for the User Archives API function UAArchiveOpen, which
opens the archive for runtime mode.

Handles for runtime archive functions

UAConnect Handle UAHCONNECT


--->
Required by UAIsActive
UAUsers
UAOpenArchives
UAOpenViews
UAQueryArchive ---> Handle UA‐
HARCHIVE
UAQueryArchiveBy‐ Handle UA‐
Name ---> HARCHIVE
Required by:
UAArchiveOpen ---
>
Required for UAArchiveDelete
UAArchiveExport
UAArchiveGetCount
UAArchiveGetFieldLength
UAArchiveGetFields
UAArchiveGetFieldType
UAArchiveGetFieldValueDate
UAArchiveGetFieldValueDouble
UAArchiveGetFieldValueFloat
UAArchiveGetFieldValueLong
UAArchiveGetFieldValueString
UAArchiveGetFieldName
UAArchiveGetFilter
UAArchiveGetID
UAArchiveGetName
UAArchiveGetSort

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 923
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

UAArchiveImport
UAArchiveInsert
UAArchiveMoveFirst
UAArchiveMoveLast
UAArchiveMoveNext
UAArchiveMovePrevious
UAArchiveReadTagValues
UAArchiveReadTagValuesBy‐
Name
UAArchiveRequery
UAArchiveSetFieldValueDate
UAArchiveSetFieldValueDouble
UAArchiveSetFieldValueFloat
UAArchiveSetFieldValueLong
UAArchiveSetFieldValueString
UAArchiveSetFilter
UAArchiveSetSort
UAArchiveUpdate
UAArchiveWriteTagValues
UAArchiveWriteTagValuesByName
<--- UAArchiveClose
<---
UAReleaseArchive
<--- UADisconnect

2.9.1.4 Error messages (RT Professional)

Overview
The following error messages can be queried with API function UAGetLastError.

UA_ERROR_SUCCESS 0 No error, everything is OK.


UA_ERROR_GENERIC 1 Error in configuration function.
UA_ERROR_CONNECT_FAILED 100 No runtime connection established (not runtime).
UA_ERROR_OPEN_FAILED 101 The archive cannot be opened.
UA_ERROR_CLOSE_FAILED 102 The archive cannot be closed, or the handle is in‐
valid.
UA_ERROR_REQUERY_FAILED 103 The reloading to archive with, for example, a new
filter/new sorting could not be performed.
UA_ERROR_MOVE_FAILED 104 Movement to the first, last, next, or previous data
record could not be performed.
UA_ERROR_INSERT_FAILED 105 A data record could not be inserted at the specified
position (check position).

WinCC Professional V13 SP2 – Programming reference


924 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

UA_ERROR_UPDATE_FAILED 106 The specified data record could not be updated


(locked, or no data record exists at this position).
UA_ERROR_DELETE_FAILED 107 The data record(s) could not be deleted.
UA_ERROR_IMPORT_FAILED 108 The import of an archive failed (check format, size).
UA_ERROR_EXPORT_FAILED 109 The export of the user archive was not successful
(check space).
UA_ERROR_READ_FAILED 110 Tags could not be read.
UA_ERROR_WRITE_FAILED 111 Tags could not be written
UA_ERROR_GET_FAILED 112 Archive/field description and/or data record values
could not be read.
UA_ERROR_SET_FAILED 113 Archive/field description and/or data record values
could not be written.
UA_ERROR_INVALID_NAME 200 Invalid name.
UA_ERROR_INVALID_TYPE 201 Incorrect type specified
UA_ERROR_INVALID_NUMRECS 202 Number of data records cannot be received
UA_ERROR_INVALID_COMMTYPE 203 Incorrect connection (None / Raw / Direct) selected
UA_ERROR_INVALID_LENGTH 204 The specified (string) length is not received
UA_ERROR_INVALID_PRECISION 205 The specified number of digits to the right of the
decimal point will not be received.
UA_ERROR_NULL_POINTER 1000 A NULL pointer was passed
UA_ERROR_INVALID_POINTER 1001 The specified pointer is invalid
UA_ERROR_INVALID_HANDLE 1002 The specified handle is invalid
UA_ERROR_INVALID_INDEX 1003 The specified index is invalid
UA_ERROR_SERVER_UNKNOWN 1004 The specified server in use is invalid.

2.9.1.5 Constants (RT Professional)

Configuration constants:

Archive types

UA_ARCHIVETYPE_UNKNOWN 0 Unknown archive type


UA_ARCHIVETYPE_UNLIMITED 1 Circular archive
UA_ARCHIVETYPE_LIMITED 2 Archive with fixed number of data records

Archive flags

UA_ARCHIVEFLAG_ACCESS 0x00000001 An additional column showing the time of the last


access is also created
UA_ARCHIVEFLAG_USER 0x00000002 An additional column showing the user name is al‐
so created

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 925
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Communication types

UA_COMMTYPE_NONE 1 No tag connection


UA_COMMTYPE_RAW 2 Communication via raw data tag
UA_COMMTYPE_DIRECT 3 Communication via DM tag

Field types

UA_FIELDTYPE_INTEGER 1 Field type INT


UA_FIELDTYPE_DOUBLE 2 Field type double
UA_FIELDTYPE_FLOAT 3 Field type float
UA_FIELDTYPE_STRING 6 Field type string/byte array null-terminated
UA_FIELDTYPE_DATETIME 8 Field type for date and time

Field flags

UA_FIELDFLAG_UNIQUE 0x00000001 Field must contain a unique value


UA_FIELDFLAG_NOTNULL 0x00000002 Field must contain a value
UA_FIELDFLAG_INDEX 0x00000010 Field should be supported by index

Maximum length

UA_MAXLEN_NAME 20 Maximum length of the archive/field name


UA_MAXLEN_ALIAS 50 Maximum length of the second supplemental name/comment
UA_MAXLEN_PLCID 8 Maximum length of the communication device name
UA_MAXLEN_DMVARNAME 128 Maximum length of the data manager tag name
UA_MAXLEN_VALUE 255 Maximum length for string tag

Parameter constants:

Actions

UA_ACTION_GENERIC 0 Configuration
UA_ACTION_INSERT 1 Insert
UA_ACTION_UPDATE 2 Synchronize/overwrite
UA_ACTION_DELETE 3 Delete

Move values

UA_MOVE_FIRST 0 Move to first data record


UA_MOVE_NEXT 1 Move to next data record
UA_MOVE_PREVIOUS -1 Move to previous data record
UA_MOVE_LAST 0x80000000 Move to last data record

WinCC Professional V13 SP2 – Programming reference


926 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Import/export file types

UA_FILETYPE_DEFAULT 0 CSV is the default file type


UA_FILETYPE_CSV 1 (comma separated value) file type

2.9.2 General functions (RT Professional)

2.9.2.1 uaGetLastError (RT Professional)

Description
Many functions return a Boolean value. TRUE indicates error-free function processing. If the
value FALSE is returned, the error can be read in the last function used by using the
uaGetLastError function.
uaGetLastError always takes you back to the last error. If you know precisely which function
contains an error, you must set return values for after each call and use uaGetLastError for
errors.

Example of functions with return values

if ( uaArchiveGetFieldValueLong ( hArchive, Index, &IntValue ) == TRUE )


printf( "Field Value = %u\n", IntValue );
else
printf("Error calling uaArchiveGetFieldValueLong: %d / %08lx\n", uaGetLastError(),
uaGetLastHResult());

Example of functions with no return values

uaArchiveGetFilter(hArchive, pszFilter, cMaxLen);


INT nUAError = uaGetLastError ( );
if ( UA_ERROR_SUCCESS != nUAError)
{
printf( "Filter = [%s]\n", pszFilter );
}
else
{
printf("Error calling uaArchiveGetFilter: %d, hr=0x%08lX\n", nUAError,
uaGetLastHResult());
}
INT uaGetLastError()

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 927
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Return value
Error status of the last function executed. Error constants and predefined items are determined
in CCUACAPI.H.

UA_ERROR_SUCCESS No error, everything is OK.


UA_ERROR_GENERIC Error in configuration function.
UA_ERROR_CONNECT_FAILED No Runtime connection established.
UA_ERROR_OPEN_FAILED The archive cannot be opened.
UA_ERROR_CLOSE_FAILED The archive cannot be closed, or the handle is invalid.
UA_ERROR_REQUERY_FAILED The archive reset relationship with for example, a new filter/
new sorting could not be established.
UA_ERROR_MOVE_FAILED The new First, Last, Next or Previous positioning could not
be performed.
UA_ERROR_INSERT_FAILED The record cannot be inserted at the given position. Check
the position.
UA_ERROR_UPDATE_FAILED The record stated cannot be updated. The record is locked
or no record is available in this position.
UA_ERROR_DELETE_FAILED The record(s) cannot (all) be deleted.
UA_ERROR_IMPORT_FAILED The import of an archive was not successful. Check the
archive format and size.
UA_ERROR_EXPORT_FAILED The user archive export was not successful. Check the
size of the memory cell.
UA_ERROR_READ_FAILED Variable reading was not performed.
UA_ERROR_WRITE_FAILED Writing to tags was not performed.
UA_ERROR_GET_FAILED Reading the archive / field description and/or record values
was not performed.
UA_ERROR_SET_FAILED Archive / field description and/or record value writing was
not performed.
UA_ERROR_INVALID_NAME Invalid name.
UA_ERROR_INVALID_TYPE Invalid type.
UA_ERROR_INVALID_NUMRECS Invalid record number.
UA_ERROR_INVALID_COMMTYPE Wrong link to None / Raw / Direct selected.
UA_ERROR_INVALID_LENGTH The specified(String) length is invalid.
UA_ERROR_INVALID_PRECISION The specified number of decimal points is invalid.
UA_ERROR_NULL_POINTER A zero pointer was specified.
UA_ERROR_INVALID_POINTER The specified pointer is invalid.
UA_ERROR_INVALID_HANDLE The specified handle is invalid.
UA_ERROR_INVALID_INDEX The specified index is invalid.
UA_ERROR_SERVER_UNKNOWN The server specified as used is unknown.

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

WinCC Professional V13 SP2 – Programming reference


928 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

2.9.2.2 uaIsActive (RT Professional)

Description
Check that no recipe is in use in an active Runtime.

Declaration

BOOL uaIsActive (
UAHCONNECT hConnect )

Parameters

hConnect
Handle on recipe in Runtime. This handle is generated using uaConnect.

Return value

TRUE
Recipe in use in active Runtime.

FALSE
Recipe not in use in active Runtime.

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaConnect (Page 932) Generate handle

See also
uaConnect (Page 932)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 929
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

2.9.2.3 uaUsers (RT Professional)

Description
Provides the number for all users, connected to a recipe by uaConnect. Here, consider calls
by users, e.g. through scripts that are also contained within WinCC.

Declaration

LONG uaUsers (
UAHCONNECT hConnect )

Parameters

hConnect
Handle on recipe in Runtime. This handle is generated using uaConnect.

Return value
Number of active connections

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaConnect (Page 932) Generate handle

See also
uaConnect (Page 932)

2.9.2.4 uaSetLocalEvents (RT Professional)

Description
Sets local events.

WinCC Professional V13 SP2 – Programming reference


930 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Declaration

void uaSetLocalEvents (
UAHCONNECT hConnect
BOOL bLocalEvents )

Parameters

hConnect
Handle on recipe in Runtime. This handle is generated using uaConnect.

bLocalEvents
Local Event

Return value
No return value

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaConnect (Page 932) Generate handle

See also
uaConnect (Page 932)

2.9.3 Functions for generating connections (RT Professional)

2.9.3.1 uaConnect (RT Professional)

Description
Generates a connection to a recipe in Runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 931
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Declaration

BOOL uaConnect (
UAHCONNECT* phConnect )

Parameters

phConnect
Pointer to the recipe handle.

Return value

TRUE
Connection to recipe generated

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Comments
The supplied handle is required for the functions uaDisconnect, uaIsActive, uaUsers,
uaOpenViews, uaOpenArchives, uaQueryArchive and uaQueryArchiveByName.

Related functions

uaDisconnect (Page 934) Break-off connection

See also
uaIsActive (Page 929)
uaUsers (Page 930)
uaSetLocalEvents (Page 930)
uaDisconnect (Page 934)
uaQueryArchive (Page 935)
uaQueryArchiveByName (Page 937)

WinCC Professional V13 SP2 – Programming reference


932 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

uaOpenArchives (Page 955)


uaOpenViews (Page 984)
Overview of the functions (Page 919)

2.9.3.2 uaDisconnect (RT Professional)

Description
When a connection is made to a recipe in Runtime, the connection is terminated.

Declaration

BOOL uaDisconnect (
UAHCONNECT hConnect )

Parameters

hConnect
Handle on recipe in Runtime. This handle is generated using uaConnect.

Return value

TRUE
Connection terminated.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaConnect (Page 931) Generate handle

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 933
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

See also
uaConnect (Page 931)
Overview of the functions (Page 919)

2.9.3.3 uaQueryArchive (RT Professional)

Description
Makes a connection to a recipe. uaQueryArchive generates the handle phArchive.

Declaration

BOOL uaQueryArchive (
UAHCONNECT hConnect,
LONG lArchive,
UAHARCHIVE* phArchive )

Parameters

hConnect
Handle on recipe in Runtime. This handle is generated using uaConnect.

lArchive
ID of the archive to be connected.

phArchive
Pointer to the connected recipe handle.

Return value

TRUE
Connection made.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

WinCC Professional V13 SP2 – Programming reference


934 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Comments
If only an archive index is available, the ID of the archive can be determined with the
configuration function uaGetArchive.

Related functions

uaConnect (Page 931) Generate handle

See also
uaConnect (Page 931)
uaReleaseArchive (Page 940)
uaArchiveClose (Page 943)
uaArchiveDelete (Page 944)
uaArchiveExport (Page 945)
uaArchiveGetID (Page 946)
uaArchiveGetName (Page 947)
uaArchiveGetSort (Page 949)
uaArchiveImport (Page 950)
uaArchiveOpen (Page 951)
uaArchiveUpdate (Page 952)
uaArchiveGetCount (Page 956)
uaArchiveGetFilter (Page 958)
uaArchiveInsert (Page 959)
uaArchiveMoveFirst (Page 960)
uaArchiveMoveLast (Page 961)
uaArchiveMoveNext (Page 962)
uaArchiveMovePrevious (Page 963)
uaArchiveGetFieldLength (Page 965)
uaArchiveGetFields (Page 967)
uaArchiveGetFieldType (Page 968)
uaArchiveGetFieldName (Page 966)
uaArchiveGetFieldValueDate (Page 969)
uaArchiveGetFieldValueDouble (Page 970)
uaArchiveGetFieldValueLong (Page 972)
uaArchiveSetFieldValueDate (Page 974)
uaArchiveSetFieldValueDouble (Page 975)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 935
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

uaArchiveSetFieldValueLong (Page 976)


uaArchiveSetFieldValueString (Page 978)
uaArchiveRequery (Page 980)
uaArchiveSetFilter (Page 981)
uaArchiveSetSort (Page 983)
uaArchiveReadTagValues (Page 985)
uaArchiveReadTagValuesByName (Page 986)
uaArchiveWriteTagValues (Page 987)
uaArchiveWriteTagValuesByName (Page 989)
Overview of the functions (Page 919)

2.9.3.4 uaQueryArchiveByName (RT Professional)

Description
Makes a connection to a recipe by name. uaQueryArchiveByName generates the handle
phArchive.

Declaration

BOOL uaQueryArchiveByName (
UAHCONNECT hConnect,
LPCSTR pszName,
UAHARCHIVE* phArchive )

Parameters

hConnect
Handle on recipe in Runtime. This handle is generated using uaConnect.

pszName
Recipe name.

phArchive
Pointer to the connected recipe handle.

Return value

TRUE
Connection made.

WinCC Professional V13 SP2 – Programming reference


936 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Comments
If only an archive index is available, the name of the archive can be determined with the
configuration function uaGetArchive.

Related functions

uaConnect (Page 931) Generate handle

See also
uaConnect (Page 931)
uaReleaseArchive (Page 940)
uaArchiveClose (Page 943)
uaArchiveDelete (Page 944)
uaArchiveExport (Page 945)
uaArchiveGetID (Page 946)
uaArchiveGetName (Page 947)
uaArchiveGetSort (Page 949)
uaArchiveImport (Page 950)
uaArchiveOpen (Page 951)
uaArchiveUpdate (Page 952)
uaArchiveGetCount (Page 956)
uaArchiveGetFilter (Page 958)
uaArchiveInsert (Page 959)
uaArchiveMoveFirst (Page 960)
uaArchiveMoveLast (Page 961)
uaArchiveMoveNext (Page 962)
uaArchiveMovePrevious (Page 963)
uaArchiveGetFieldLength (Page 965)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 937
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

uaArchiveGetFields (Page 967)


uaArchiveGetFieldType (Page 968)
uaArchiveGetFieldName (Page 966)
uaArchiveGetFieldValueDate (Page 969)
uaArchiveGetFieldValueDouble (Page 970)
uaArchiveGetFieldValueLong (Page 972)
uaArchiveSetFieldValueDate (Page 974)
uaArchiveSetFieldValueDouble (Page 975)
uaArchiveSetFieldValueLong (Page 976)
uaArchiveSetFieldValueString (Page 978)
uaArchiveRequery (Page 980)
uaArchiveSetFilter (Page 981)
uaArchiveSetSort (Page 983)
uaArchiveReadTagValues (Page 985)
uaArchiveReadTagValuesByName (Page 986)
uaArchiveWriteTagValues (Page 987)
uaArchiveWriteTagValuesByName (Page 989)
Overview of the functions (Page 919)

2.9.3.5 UaQueryConfiguration (RT Professional)

Description
Generates the connection to a recipe for the configuration.

Declaration

BOOL uaQueryConfiguration (
UAHCONFIG* phConfig )

Parameters

phConfig
Pointer to receptor handle.

WinCC Professional V13 SP2 – Programming reference


938 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Return value

TRUE
Connection made.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

See also
uaReleaseConfiguration (Page 941)
uaGetArchive (Page 953)
uaGetNumArchives (Page 955)
uaGetNumFields (Page 964)
uaGetField (Page 979)
Overview of the functions (Page 919)

2.9.3.6 uaReleaseArchive (RT Professional)

Description
Breaks off the connection to the currently connected recipe.

Declaration

BOOL uaReleaseArchive (
UAHARCHIVE hArchive )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 939
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Return value

TRUE
Connection terminated.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Comment
To successfully terminate the connection you must set the hArchive handle to NULL . If you
use a handle that is no longer valid the error message UA_ERROR_INVALID_HANDLE is
generated. This avoids unnecessary memory overloading.

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.3.7 uaReleaseConfiguration (RT Professional)

Description
Terminates a connection to a recipe after configuring it.

Declaration

BOOL uaReleaseConfiguration (
UAHCONFIG hConfig,
BOOL bSave )

WinCC Professional V13 SP2 – Programming reference


940 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Parameters

hConfig
Handle on recipe. This handle is generated using uaQueryConfiguration.

bSave
Establishes that changes to a configuration are saved before terminating the connection.

TRUE Save changes


FALSE Cancel changes

Note
bSave = TRUE should only be used, if a recipe is not used in an active WinCC Runtime! Check
if Runtime is active by using the uaIsActive function.

Return value

TRUE
Connection terminated.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

UaQueryConfiguration (Page 938) Generate handle

See also
UaQueryConfiguration (Page 938)
Overview of the functions (Page 919)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 941
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

2.9.4 Functions for recipe processing (RT Professional)

2.9.4.1 uaArchiveClose (RT Professional)

Description
Closes an open recipe.

Declaration

BOOL uaArchiveClose (
UAHARCHIVE hArchive )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

Return value

TRUE
Recipe closed.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle
uaArchiveOpen (Page 951) Open recipe

WinCC Professional V13 SP2 – Programming reference


942 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
uaArchiveOpen (Page 951)
Overview of the functions (Page 919)

2.9.4.2 uaArchiveDelete (RT Professional)

Description
Deletes data from a recipe. The configured recipe remains selected.

Declaration

BOOL uaArchiveDelete (
UAHARCHIVE hArchive,
LPCSTR pszWhere )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

pszWhere
String with the SQL selection for the data entries to be deleted. This string corresponds to the
SQL instruction DELETE FROM <archive> WHERE pszWhere.

Note
If pszWhere is empty, the entire user archive will be deleted.

Return value

TRUE
Data deleted.

FALSE
Error

Required files
ccuacapi.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 943
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.4.3 uaArchiveExport (RT Professional)

Description
Exports data from a recipe to CSV file.

Declaration

BOOL uaArchiveExport (
UAHARCHIVE hArchive,
LPCSTR pszDestination,
LONG lType,
LONG lOptions )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

pszDestination
Target file name. When calling the function on a client, the path specified refers to the server.

WinCC Professional V13 SP2 – Programming reference


944 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

lType
Target file data format. Two formats are available:

UA_FILETYPE_DEFAULT = 0 The preset CSV file format


UA_FILETYPE_CSV = 1 CSV file format

lOptions
The parameter is reserved for future upgrades and must be preset to 0.

Return value

TRUE
Data exported.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle
uaArchiveImport (Page 950) Import data

See also
uaArchiveImport (Page 950)
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.4.4 uaArchiveGetID (RT Professional)

Description
Reads the recipe ID

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 945
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Return Value:
"ID" of the user archive

Declaration

LONG uaArchiveGetID (
UAHARCHIVE hArchive )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

Return value
ID of the recipe

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.4.5 uaArchiveGetName (RT Professional)

Description
Reads the recipe name.

WinCC Professional V13 SP2 – Programming reference


946 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Declaration

VOID uaArchiveGetName (
UAHARCHIVE hArchive,
LPSTR pszName,
LONG cMaxLen )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

pszName
Pointer to the recipe name buffer.

cMaxLen
Maximum Length

Return value
No return value

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

Example

char tank [40];


uaArchiveGetName( hArchive, tank, 39 );

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 947
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.4.6 uaArchiveGetSort (RT Professional)

Description
Reads the recipe sort parameters.

Declaration

VOID uaArchiveGetSort (
UAHARCHIVE hArchive,
LPSTR pszSort,
LONG cMaxLen )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

pszSort
Sort parameters as SQL statement.

cMaxLen
Maximum Length

Return value
No return value

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

WinCC Professional V13 SP2 – Programming reference


948 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.4.7 uaArchiveImport (RT Professional)

Description
Imports data from a CSV file to a recipe. The structure of the recipe must be identical to the
imported CSV archive.

Declaration

BOOL uaArchiveImport (
UAHARCHIVE hArchive,
LPCSTR pszSource,
LONG lType,
LONG lOptions )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

pszSource
File name using the data to be imported.

lType
Source file data format. Two formats are available:

UA_FILETYPE_DEFAULT = 0 The preset CSV file format


UA_FILETYPE_CSV = 1 CSV file format

lOptions
The parameter is reserved for future upgrades and must be preset to 0.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 949
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Return value

TRUE
Data imported.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle
uaArchiveExport (Page 944) Export files.

See also
uaArchiveExport (Page 944)
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.4.8 uaArchiveOpen (RT Professional)

Description
Opens a recipe. Calling uaArchiveOpen is required to read or write in a recipe. Foe example
calling the functionsuaArchiveMoveNext, uaArchiveDelete or uaArchiveUpdate.

Declaration

BOOL uaArchiveOpen (
UAHARCHIVE hArchive )

WinCC Professional V13 SP2 – Programming reference


950 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

Return value

TRUE
Recipe open.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle
uaArchiveClose (Page 942) Close recipe

See also
uaArchiveClose (Page 942)
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.4.9 uaArchiveUpdate (RT Professional)

Description
Updates an open recipe. All changed recipe data will be applied in the database. The recipe
structure remains unchanged.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 951
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Declaration

BOOL uaArchiveUpdate (
U AHARCHIVE hArchive )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

Return value

TRUE
Recipe data updated.

FALSE
In the case of corrupted consistency the error message Update_failed = 106 is displayed. This
kind of consistency corruption exists e.g. if a field has a "field must contain a value" property,
but there is no value in the field.

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.4.10 uaGetArchive (RT Professional)

Description
Reads the recipe configuration.

WinCC Professional V13 SP2 – Programming reference


952 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Declaration

BOOL uaGetArchive (
UAHCONFIG hConfig,
LONG lArchive,
UACONFIGARCHIVE* pArchive )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryConfiguration.

lArchive
Recipe index. Value: 0... uaGetNumArchives() -1

pArchive
Point on the configuration data buffer.

Return value

TRUE
Successful access.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

UaQueryConfiguration (Page 938) Generate handle

See also
UaQueryConfiguration (Page 938)
Overview of the functions (Page 919)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 953
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

2.9.4.11 uaGetNumArchives (RT Professional)

Description
Reads the number of recipes currently configured.

Declaration

LONG uaGetNumArchives (
UAHCONFIG hConfig )

Parameters

hConfig
Handle on recipe. This handle is generated using uaQueryConfiguration.

Return value
Number of recipes configured. If an error occurs -1 is output.

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

UaQueryConfiguration (Page 938) Generate handle

See also
UaQueryConfiguration (Page 938)
Overview of the functions (Page 919)

2.9.4.12 uaOpenArchives (RT Professional)

Description
Communicates the number of recipes in the open Runtime.

WinCC Professional V13 SP2 – Programming reference


954 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Declaration

LONG uaOpenArchives (
UAHCONNECT hConnect )

Parameters

hArchive
Handle on recipe. This handle is generated using uaConnect.

Return value
Number of recipes open.

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaConnect (Page 931) Generate handle

See also
uaConnect (Page 931)
Overview of the functions (Page 919)

2.9.5 Functions for recipe element processing (RT Professional)

2.9.5.1 uaArchiveGetCount (RT Professional)

Description
Reads the number of data records.

Return Value:
Number of data records. If "0" the archive is empty or an error has occurred. A query using
"uaGetLastError" is required.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 955
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Declaration

LONG uaArchiveGetCount(
UAHARCHIVE hArchive,
LONG * plCount )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

plCount
Pointer to a tag in which the number of records should be stored.

Return value
Number of data records. If 0 the archive is empty or an error has occurred. A query using
uaGetLastError is recommended.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

WinCC Professional V13 SP2 – Programming reference


956 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

2.9.5.2 uaArchiveGetFilter (RT Professional)

Description
Reads the selection criteria for the current data record.

Declaration

VOID uaArchiveGetFilter (
UAHARCHIVE hArchive,
LPSTR pszFilter,
LONG cMaxLen )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

pszFilter
Selection parameters as SQL statement.

cMaxLen
Maximum Length

Return value
No return value

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 957
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.5.3 uaArchiveInsert (RT Professional)

Description
Inserts the local data record buffer into the recipe. In order for meaningful records to be stated
in the new data file, before calling uaArchiveInsert the fields of the local data record buffers
must be written using the uaArchiveSetFieldValue...function.
The "ID" field must be written using uaArchiveSetFieldValueLong function if an archive has no
ID or if it is written as "0".

Declaration

BOOL uaArchiveInsert (
UAHARCHIVE hArchive )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

Return value

TRUE
Data record inserted.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

WinCC Professional V13 SP2 – Programming reference


958 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.5.4 uaArchiveMoveFirst (RT Professional)

Description
Goes to the first data record.

Declaration

BOOL uaArchiveMoveFirst (
UAHARCHIVE hArchive )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

Return value

TRUE
Successful jump.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 959
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.5.5 uaArchiveMoveLast (RT Professional)

Description
Goes to the last data record.

Declaration

BOOL uaArchiveMoveLast (
UAHARCHIVE hArchive )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

Return value

TRUE
Successful jump.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

WinCC Professional V13 SP2 – Programming reference


960 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.5.6 uaArchiveMoveNext (RT Professional)

Description
Goes to the next data record.

Declaration

BOOL uaArchiveMoveNext (
UAHARCHIVE hArchive )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

Return value

TRUE
Successful jump.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 961
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.5.7 uaArchiveMovePrevious (RT Professional)

Description
Goes to the previous data record.

Declaration

BOOL uaArchiveMovePrevious (
UAHARCHIVE hArchive )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

Return value

TRUE
Successful jump.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

WinCC Professional V13 SP2 – Programming reference


962 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.5.8 uaGetNumFields (RT Professional)

Description
Supplies the number of the configured fields. The "ID", "Last User" and "Last Access" fields
are not included. In the configuration calls the index is stated using"0 … uaGetNumFields()
-1".

Declaration

LONG uaGetNumFields (
UAHCONFIG hConfig,
long lArchive )

Parameters

hConfig
Handle on recipe. This handle is generated using uaQueryConfiguration.

lArchive
Recipe index. Value: 0... uaGetNumArchives() -1

Return value
Number of the configured fields. If an error occurs -1 is output.

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 963
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Related functions

UaQueryConfiguration (Page 938) Generate handle

See also
UaQueryConfiguration (Page 938)
Overview of the functions (Page 919)

2.9.6 Functions for field processing (RT Professional)

2.9.6.1 uaArchiveGetFieldLength (RT Professional)

Description
Reads the length of a field in the current data record.

Declaration

LONG uaArchiveGetFieldLength(
UAHARCHIVE hArchive,
LONG lField )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses
the "ID" field.

Return value
Length of the current field.

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

WinCC Professional V13 SP2 – Programming reference


964 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.6.2 uaArchiveGetFieldName (RT Professional)

Description
Reads the name of a field in the current data record.

Declaration

VOID uaArchiveGetFieldName (
UAHARCHIVE hArchive,
LONG lField,
LPCSTR pszName,
LONG cMaxLen )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses
the "ID" field.

pszName
Field Name

cMaxLen
Maximum Length

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 965
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Return value

TRUE
Name read.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

AUTOHOTSPOT Generate handle


uaQueryArchive (Page 934) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.6.3 uaArchiveGetFields (RT Professional)

Description
Reads the number of the configured data fields. The "ID", "Last User" and "Last Access" fields
are included. In Runtime calls the index of configured fields is indicated using 1 ... N. The "ID"
field has a "0" index. The "Last User" and "Last Access" fields are appended at the end of the
configured fields.

Declaration

LONG uaArchiveGetFields (
UAHARCHIVE hArchive )

WinCC Professional V13 SP2 – Programming reference


966 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

Return value
Number of the configured fields.

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.6.4 uaArchiveGetFieldType (RT Professional)

Description
Reads the type of a field in the current data record.

Declaration

LONG uaArchiveGetFieldType (
UAHARCHIVE hArchive,
LONG lField )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 967
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses
the "ID" field.

Return value
Type of the current field. The symbolic definitions of the field types are:

UA_FIELDTYPE_INTEGER
UA_FIELDTYPE_FLOAT
UA_FIELDTYPE_DOUBLE
UA_FIELDTYPE_STRING
UA_FIELDTYPE_DATETIME

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.6.5 uaArchiveGetFieldValueDate (RT Professional)

Description
Reads the date and time of a field in the current data record.

Declaration

BOOL uaArchiveGetFieldValueDate (
UAHARCHIVE hArchive,
LONG lField,
LPSYSTEMTIME pstDateTime )

WinCC Professional V13 SP2 – Programming reference


968 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses
the "ID" field.

pstDateTime
Pointer to a tag of the SYSTEMTIME type.

Return value

TRUE
Change date and time.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.6.6 uaArchiveGetFieldValueDouble (RT Professional)

Description
Reads a value of the Double data type from a field in the current data record.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 969
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Declaration

BOOL uaArchiveGetFieldValueDouble (
UAHARCHIVE hArchive,
LONG lField,
double* pdValue )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses
the "ID" field.

pdValue
Pointer to the tag for the field value.

Return value

TRUE
Value read.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

WinCC Professional V13 SP2 – Programming reference


970 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

2.9.6.7 uaArchiveGetFieldValueLong (RT Professional)

Description
Reads a value of the Long data type from a field in the current data record.

Declaration

BOOL uaArchiveGetFieldValueLong (
UAHARCHIVE hArchive,
LONG lField,
LONG* pdValue )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses
the "ID" field.

pdValue
Pointer to the tag for the field value.

Return value

TRUE
Value read.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 971
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.6.8 uaArchiveGetFieldValueString (RT Professional)

Description
Reads a value of the String data type from a field in the current data record.

Declaration

BOOL uaArchiveGetFieldValueString (
UAHARCHIVE hArchive,
LONG lField,
LPSTR pszString,
LONG cMaxLen )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses
the "ID" field.

pszString
Pointer to the tag for the field value.

pdValue
Maximum length of the string.

Return value

TRUE
Value read.

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


972 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.6.9 uaArchiveSetFieldValueDate (RT Professional)

Description
Writes the date and time into a field of the current data record.

Declaration

BOOL uaArchiveSetFieldValueDate (
UAHARCHIVE hArchive,
LONG lField,
LPSYSTEMTIME pstDateTime )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses
the "ID" field.

pstDateTime
Date and Time.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 973
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Return value

TRUE
Value written.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.6.10 uaArchiveSetFieldValueDouble (RT Professional)

Description
Writes a value from the Double data type from a field in the current data record.

Declaration

BOOL uaArchiveSetFieldValueDouble (
UAHARCHIVE hArchive,
LONG lField,
double dValue )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

WinCC Professional V13 SP2 – Programming reference


974 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses
the "ID" field.

dValue
Value to be written.

Return value

TRUE
Value written.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.6.11 uaArchiveSetFieldValueLong (RT Professional)

Description
Writes a value from the Long data type from a field in the current data record.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 975
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Declaration

BOOL uaArchiveSetFieldValueLong (
UAHARCHIVE hArchive,
LONG lField,
LONG dValue )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses
the "ID" field.

dValue
Value to be written.

Return value

TRUE
Value written.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

WinCC Professional V13 SP2 – Programming reference


976 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

2.9.6.12 uaArchiveSetFieldValueString (RT Professional)

Description
Writes a value from the String data type from a field in the current data record.

Declaration

BOOL uaArchiveSetFieldValueString (
UAHARCHIVE hArchive,
LONG lField,
LPCSTR pszString )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses
the "ID" field.

pszString
String to be written.

Return value

TRUE
Value written.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 977
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.6.13 uaGetField (RT Professional)

Description
Reads the field configuration.

Declaration

BOOL uaGetField (
UAHCONFIG hConfig,
LONG lArchive,
Long lField,
UACONFIGFIELD* pField )

Parameters

hConfig
Handle on recipe. This handle is generated using uaQueryConfiguration.

lArchive
Recipe index. Value: 0... uaGetNumArchives() -1

lField
The field number, where iField = 1 addresses the first configured field. lField = 0 addresses
the "ID" field.

pField
Point on the configuration data buffer.

Return value

TRUE
Configuration read.

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


978 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

UaQueryConfiguration (Page 938) Generate handle

See also
UaQueryConfiguration (Page 938)
Overview of the functions (Page 919)

2.9.7 Filter and sort functions. (RT Professional)

2.9.7.1 uaArchiveRequery (RT Professional)

Description
After calling for uaArchiveSetFilter and uaArchiveSetSort you must reload the recipe
usinguaArchiveRequery.

Note
You can use the uaArchiveSetSort and uaArchiveSetFilter functions, without opening the
recipe with uaArchiveOpen. In this case you must not make a call using uaArchiveRequery.

Declaration

BOOL uaArchiveRequery(
UAHARCHIVE hArchive )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 979
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Return value

TRUE
Recipe reloaded.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Comment
You can also make a call using uaArchiveRequery, if you have inserted Runtime values in the
recipe view.

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.7.2 uaArchiveSetFilter (RT Professional)

Description
Sets the selection parameters for the recipe. You can also use the function, without opening
the recipe using uaArchiveOpen.
If you have opened a user archive using uaArchiveOpen, you must reload the recipe after
filtering using uaArchiveRequery.

WinCC Professional V13 SP2 – Programming reference


980 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Declaration

VOID uaArchiveSetFilter (
UAHARCHIVE hArchive,
LPSTR pszFilter )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

pszFilter
Selection parameters as SQL parameters.

Return value

TRUE
Selection parameters changed.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 981
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

2.9.7.3 uaArchiveSetSort (RT Professional)

Description
Sets the sort for a recipe. You can also use the function, without opening the recipe using
uaArchiveOpen.
If you have opened a recipe using uaArchiveOpen, you must reload the recipe after sorting
using uaArchiveRequery.

Declaration

BOOL uaArchiveSetSort (
UAHARCHIVE hArchive,
LPSTR pszSort )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

pszSort
Sort parameters as SQL statement.

Return value

TRUE
Sort successful.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaQueryArchive (Page 934) Generate handle


uaQueryArchiveByName (Page 936) Generate handle

WinCC Professional V13 SP2 – Programming reference


982 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
Overview of the functions (Page 919)

2.9.8 Functions for recipe view processing (RT Professional)

2.9.8.1 uaOpenViews (RT Professional)

Description
Gives the number of recipes in the open Runtime view.

Declaration

LONG uaOpenViews (
UAHCONNECT hConnect )

Parameters

hArchive
Handle on recipe. This handle is generated using uaConnect.

Return value
Number of currently open views.

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaConnect (Page 931) Generate handle

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 983
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

See also
uaConnect (Page 931)
Overview of the functions (Page 919)

2.9.9 Functions for variables processing (RT Professional)

2.9.9.1 uaArchiveReadTagValues (RT Professional)

Description
Reads the current value from the field tag.

Declaration

BOOL uaArchiveReadTagValues (
UAHARCHIVE hArchive,
LONG* pnFields,
LONG cFields,
LONG lOptions )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

pnFields
The parameter is reserved for future upgrades and must be preset to 0.

cFields
The parameter is reserved for future upgrades and must be preset to 0.

lOptions
The parameter is reserved for future upgrades and must be preset to 0.

Return value

TRUE
Data read.

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


984 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaArchiveWriteTagValues (Page 987) Writing values


uaQueryArchive (Page 934) Generate handle
uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
uaArchiveWriteTagValues (Page 987)
Overview of the functions (Page 919)

2.9.9.2 uaArchiveReadTagValuesByName (RT Professional)

Description
Reads the current values from the tags.

Declaration

BOOL uaArchiveReadTagValuesByName (
UAHARCHIVE hArchive,
LPCSTR pszFields,
LONG lOptions )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

pszFields
The parameter is reserved for future upgrades and must be preset to NULL.

lOptions
The parameter is reserved for future upgrades and must be preset to 0.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 985
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Return value

TRUE
Data read.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaArchiveWriteTagValuesByName (Page 989) Reading values


uaQueryArchive (Page 934) Generate handle
uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
uaArchiveWriteTagValuesByName (Page 989)
Overview of the functions (Page 919)

2.9.9.3 uaArchiveWriteTagValues (RT Professional)

Description
Writes the values of the current data record to the tag.

Declaration

BOOL uaArchiveWriteTagValues (
UAHARCHIVE hArchive,
LONG* pnFields,
LONG cFields,
LONG lOptions )

WinCC Professional V13 SP2 – Programming reference


986 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

pnFields
The parameter is reserved for future upgrades and must be preset to 0.

cFields
The parameter is reserved for future upgrades and must be preset to 0.

lOptions
The parameter is reserved for future upgrades and must be preset to 0.

Return value

TRUE
Data written.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaArchiveReadTagValues (Page 984) Reading values


uaQueryArchive (Page 934) Generate handle
uaQueryArchiveByName (Page 936) Generate handle

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
uaArchiveReadTagValues (Page 984)
Overview of the functions (Page 919)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 987
Runtime API (RT Professional)
2.9 Recipe functions (RT Professional)

2.9.9.4 uaArchiveWriteTagValuesByName (RT Professional)

Description
Writes the values of the current data record to the tag.

Declaration

BOOL uaArchiveWriteTagValuesByName (
UAHARCHIVE hArchive,
LPCSTR pszFields,
LONG lOptions )

Parameters

hArchive
Handle on recipe. This handle is generated using uaQueryArchive or uaQueryArchiveByName.

pszFields
The parameter is reserved for future upgrades and must be preset to NULL.

lOptions
The parameter is reserved for future upgrades and must be preset to 0.

Return value

TRUE
Data written.

FALSE
Error

Required files
ccuacapi.h
ccuacapi.lib
ccuacapi.dll

Related functions

uaArchiveReadTagValuesByName (Page 985) Reading values


uaQueryArchive (Page 934) Generate handle
uaQueryArchiveByName (Page 936) Generate handle

WinCC Professional V13 SP2 – Programming reference


988 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

See also
uaQueryArchive (Page 934)
uaQueryArchiveByName (Page 936)
uaArchiveReadTagValuesByName (Page 985)
Overview of the functions (Page 919)

2.10 Alarm functions (RT Professional)

2.10.1 Basics (RT Professional)

2.10.1.1 Overview of the functions (RT Professional)

Overview

MSG_SERVICE_NOTIFY_PROCPlus Send and receive service (callback)


(Page 1039)
MSRTActivateMProtPlus (Page 1042) Pause or continue protocol service
MSRTCheckWinFilterPlus (Page 1079) Check the alarm filter conditions
MSRTCreateMsgInstancePlus (Page 1049) Create alarm
MSRTCreateMsgInstanceWithCommentPlus Create alarm
(Page 1048)
AUTOHOTSPOT Set comment text parameters
AUTOHOTSPOT Set alarm filter parameters
MSRTDialogMsgLockPlus (Page 1052) Set parameters for disabling alarms
MSRTEnumArchivDataPlus (Page 1031) List alarms of a log
MSRTEnumBackupListPlus (Page 1091) List export list entries
MSRTEnumGroupMsgPlus (Page 1073) List alarm group individual alarms
MSRTEnumProtDataPlus (Page 1043) List report data
MSRTExportPlus (Page 1093) Export alarms from sequential logs
MSRTGetClassInfoPlus (Page 1057) Query alarm class information
MSRTGetCommentInstancePlus (Page 1085) Query comment text
MSRTGetFilterDataPlus (Page 1077) Query alarm filter conditions
MSRTGetInfotextPlus (Page 1088) Query info text
MSRTGetLastMsgWithCommentPlus Query last log alarm
(Page 1059)
MSRTGetMsgActualPlus (Page 1060) Determine number of alarms
MSRTGetMsgCSDataPlus (Page 1061) Query alarm configuration data
MSRTGetMsgPriorityPlus (Page 1063) Query priority of the alarm
MSRTGetMsgQuitPlus (Page 1065) Query alarms that require acknowledgment
MSRTGetMsgTextPlus (Page 1066) Query alarm text block

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 989
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

MSRTGetSelectedMsgPlus (Page 1068) Determine alarm number


MSRTLoopInAlarmPlus (Page 1071) Loop-in-alarm
MSRTMsgWinCommandPlus (Page 1083) Perform control function in alarm window
MSRTPrintMProtPlus (Page 1045) Print alarm sequence report of pending alarms
MSRTQuitGroupPlus (Page 1076) Acknowledge alarm group
MSRTQuitHornPlus (Page 1038) Acknowledge audible signal device
MSRTResetMsgPlus (Page 1070) Acknowledge alarm
MSRTSetCommentInstancePlus (Page 1086) Specify comment text
MSRTSetInfotextPlus (Page 1090) Specify info text
MSRTSetMsgFilterPlus (Page 1080) Set alarm filter
MSRTSetMsgWinFilterPlus (Page 1082) Set alarm filter for an alarm window
MSRTStartMsgServicePlus (Page 1033) Start send and receive service (callback)
MSRTStopMsgServicePlus (Page 1036) Stop send and receive service

See also
MSRTEnumMsgRTDataPlus (Page 1056)
MSRTLockGroupPlus (Page 1074)

2.10.1.2 Overview of structures (RT Professional)

Overview

MSG_BACKUP_STRUCT_PLUS (Page 1027) Export list


MSG_CLASS_STRUCT_PLUS (Page 1018) Alarm class
MSG_COMMENT_INSTANCE_STRUCT_PLUS Comment
(Page 1025)
MSG_CSDATA_STRUCT_PLUS (Page 1020) Single alarm
MSG_FILTER_STRUCT_PLUS (Page 1011) Alarm filter
MSG_INFOTEXT_STRUCT_PLUS (Page 1026) Info text
MSG_RTCREATE_STRUCT_PLUS (Page 1005) Create an alarm in the runtime system
MSG_RTDATA_INSTANCECOM‐ Single alarm
MENT_STRUCT_PLUS (Page 1007)
MSG_RTDATA_INSTANCE_STRUCT_PLUS Single alarm
(Page 1015)
MSG_RTGROUPENUM_STRUCT_PLUS Single alarms of an alarm group
(Page 1023)
MSG_RTGROUPSET_STRUCT_PLUS Alarm group data
(Page 1024)
MSG_RTLOCK_STRUCT_PLUS (Page 1029) Alarm lock
MSG_TEXTVAL256_STRUCT_PLUS Associated text values
(Page 1030)

WinCC Professional V13 SP2 – Programming reference


990 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

2.10.1.3 Error messages (RT Professional)

Overview
The following error messages can be returned by the API functions in the CMN_ERROR error
structure:

Alarm Logging CS

MSG_ERR_CS_CONNECT 0x00001001 No connection to the Alarm Logging CS or to


the project.
MSG_ERR_CS_PROJECT 0x00001002 Incorrect or invalid project
MSG_ERR_CS_PROJECTNAME 0x00001003 Incorrect or invalid project name
MSG_ERR_CS_PARAM 0x00001004 Incorrect parameter; dwError2 contains the
number of the incorrect parameter.
MSG_ERR_CS_NODATA 0x00001005 No data found
MSG_ERR_CS_STRUCTFIELD 0x00001006 Error in a structure field; dwError2 contains
the number of the structure field containing the
incorrect value.
MSG_ERR_CS_DBCONNECT 0x00001011 No DBConnect possible
MSG_ERR_CS_DBCDELETE 0x00001012 Error while deleting (no data?)
MSG_ERR_CS_DBOPEN 0x00001013 Table with single alarms could not be opened
MSG_ERR_CS_SOURCES 0x00001014 Out of memory?
MSG_ERR_CS_CREATOR_ID 0x00001015 CreatorID is WinCC-CreatorID!
MSG_ERR_CS_NOTSUPPORTED 0x00001016 This function is not supported
MSG_ERR_UNKNOWN_ERROR 0x00001020 An unspecified error has occurred (WinC V6.0
and higher)
MSG_ERR_API_TERMINATED 0x00001021 Processing was canceled prematurely
(WinCC V6.0 and higher)
MSG_ERR_NO_MEMORY 0x00001022 Insufficient main memory (WinCC V6.0 and
higher)
MSG_ERR_DB_FAIL 0x00001023 Inconsistent database (WinCC V6.0 and high‐
er)
MSG_ERR_I_WRITE 0x00001024 Data could not be entered into the database.
dwError2 and dwError3 contain further infor‐
mation. (WinCC V6.0 and higher)
MSG_ERR_CS_EXIST 0x00001025 Element already exists (WinCC V6.0 and high‐
er)
MSG_ERR_CS_NO_EXIST 0x00001026 Element does not exist (WinCC V6.0 and high‐
er)
MSG_ERR_HANDLE 0x00000090 Handle invalid

Alarm Logging RT

MSG_ERR_RT_NOTCONNECTED 0x00000001 Connection to the Alarm Logging RT not


established
MSG_ERR_RT_NOINIT 0x00000002 Alarm Logging RT not initialized

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 991
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

MSG_ERR_RT_SERVICEMAX 0x00000003 Maximum number of services reached


MSG_ERR_MSG_NOEXIST 0x00000010 Alarm does not exist
MSG_ERR_MSG_NOTFOUND 0x00000011 Alarm not found
MSG_ERR_MSG_NOQUIT 0x00000012 Alarm does not require acknowledgment
MSG_ERR_MSG_ALREADYQUIT 0x00000013 Alarm already acknowledged
MSG_ERR_MSG_NOCLASS 0x00000014 Class information not available
MSG_ERR_MSG_STATE 0x00000015 Message status unknown
MSG_ERR_MSG_LOCKED 0x00000016 Alarm locked
MSG_ERR_MSG_DATETIME 0x00000017 Alarm has invalid date or invalid time
MSG_ERR_WIN_NAMENOTFOUND 0x00000020 Template name not found
MSG_ERR_WIN_CREATE 0x00000021 Error while creating the alarm window
MSG_ERR_WIN_DATA 0x00000022 Alarm window data invalid
MSG_ERR_VAR_BITEXCEEDS_ 0x00000030 Bit for tag invalid
MSG_ERR_VAR_NOCHANGE_ 0x00000031 No tag change
MSG_ERR_VAR_PROCESS_USED_ 0x00000032 Event tag is already assigned
MSG_ERR_VAR_QUIT_USED_ 0x00000033 Acknowledgment tag is already assigned
MSG_ERR_VAR_STATE_USED_ 0x00000034 Status tag is already assigned
MSG_ERR_VAR_VARIANTCONV_ 0x00000035 Error during variant conversion
MSG_ERR_VAR_USED_TYPDIFF_ 0x00000036 Event tag assigned, different types (Ack,
Create, ...)
MSG_ERR_HANDLE 0x00000090 Handle invalid
MSG_ERR_FILTER 0x00000091 Filter condition invalid
MSG_ERR_API_PARAM 0x00000095 Parameter invalid
MSG_ERR_API_SERVICE 0x00000099 dwServiceID invalid
MSG_ERR_API_EXCEPTION 0x0000009a An exception situation occurred in the
code
MSG_ERR_API_DATETIME 0x0000009b Date/time stamp invalid
MSG_ERR_API_SERVICEMAX 0x0000009c Maximum number of services reached
MSG_ERR_API_NODATA 0x0000009d No data
MSG_ERR_PROT_ID 0x00000111 Invalid protocol identifier
MSG_ERR_PROT_BLOCKS 0x00000110 No blocks in protocol
MSG_ERR_PROT_ACTIVE 0x00000112 Protocol service already active
MSG_ERR_NODEFAULTSERVER 0x00000401 No default server configured
MSG_ERR_NOLOCALSERVER 0x00000402 No local server available
MSG_ERR_NOSERVER 0x00000403 No default server configured and no local
server available
MSG_ERR_NOMC 0x00000404 No multiclient project (not used here)
MSG_ERR_NOMCDEFAULTSERVER 0x00000405 No multiclient project and "@default"
specified (not used here)

WinCC Professional V13 SP2 – Programming reference


992 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

2.10.1.4 Constants (RT Professional)

General specifications

MSG_MAX_CLASS (value: 18) Number of alarm classes


MSG_MAX_CLASSTYPE (value: 16) Number of alarm types in alarm
class
MSG_MAX_PVALUE (value: 10) Number of process values
MSG_MAX_TB (value: 10) Number of user texts
MSG_MAX_HITLIST (value: 7) Number of hit list element
MSG_MAX_TB_CONTENT (value: 255) Number of characters per user
text
MSG_MAX_TEXTLEN (value: 64) Number of characters for all texts
MSG_MAX_TEXTVALUE (value: 32) Number of characters in associ‐
ated text values
MSG_MAX_TEXTVALUE256 (value: 256) Number of characters in associ‐
ated text values
MSG_MAX_STATE (value: 4) Number of status texts
MSG_MAX_LOCKITEMS (value: 16) Number of alarms for a lock
MSG_MAX_LEVEL (value: 6) Number of nodes for group
alarms
MSG_MAX_MSG_COUNT (value: 150000) Maximum number of single
V6.2 and higher: (value: 50000) alarms in the project
MSG_MAX_GROUPITEMS (value: 1000) Number of alarms for a group
with Enum
MSG_MAX_USERNAME (value: 16) Maximum length of a user group
name
MSG_MAX_APPLNAME (value: 32) Maximum length of an applica‐
tion name
MSG_MAX_INSTANCE (value: 512) Instance name
MSG_MAX_ARCHIV_QUEUE (value: 1500) Max. number of bufferable log
entries

Alarm states

MSG_STATE_COME (value: 0x00000001) Incoming alarm


MSG_STATE_GO (value: 0x00000002) Outgoing alarm
MSG_STATE_QUIT (value: 0x00000003) Alarm acknowledged
MSG_STATE_LOCK (value: 0x00000004) Alarm locked
MSG_STATE_UNLOCK (value: 0x00000005) Alarm released
MSG_STATE_HIDE (value: 0x0000000A) Alarm hidden
MSG_STATE_UNHIDE (value: 0x0000000B) Alarm displayed
MSG_STATE_HIDE_MANUAL (value: 0x0000000C) Alarm hidden manually
MSG_STATE_UNHIDE_MAN‐ (value: 0x0000000D) Alarm displayed manually
UAL

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 993
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

MSG_STATE_QUIT_SYSTEM (value: 0x00000010) Alarm acknowledged by system


MSG_STATE_QUIT_EMER‐ (value: 0x00000011) Emergency acknowledgment
GENCY
MSG_STATE_QUIT_HORN (value: 0x00000012) Horn acknowledgment
MSG_STATE_COMEGO (value: 0x00000013) Incoming and outgoing alarm,
display in alarm list only
MSG_STATE_RESET (value: 0x00020000) Bit for alarm reset
MSG_STATE_SUMTIME (value: 0x00040000) Bit for daylight saving time active
MSG_STATE_INSTANCE (value: 0x00080000) Bit for instance alarm (n alarms
of a no.)
MSG_STATE_TIMEINVALID (value: 0x00100000) Bit for invalid date/time stamp
OR operation with
(MSG_STATE_COME,
MSG_STATE_GO, ....)
MSG_STATE_HIDDEN (value: 0x02000000) Bit for currently hidden alarm,
available in V6.2 and higher

Flags of an alarm in the database table

MSG_FLAG_SUMTIME (value: 0x00000001) Daylight saving time active


MSG_FLAG_COMMENT (value: 0x00000002) Alarm has comments
MSG_FLAG_ARCHIV (value: 0x00000004) Log
MSG_FLAG_PROTOCOL (value: 0x00000008) Report
MSG_FLAG_TEXTVALUES (value: 0x00000010) Alarm has associated text values
MSG_FLAG_TIMEINVALID (value: 0x00000020) Bit for invalid date/time stamp
MSG_FLAG_INSTANCE (value: 0x00000040) Marking of instance alarms
MSG_FLAG_HIDDEN (value: 0x00000080) Hidden alarm, available in V6.2
and higher
MSG_FLAG_TEXT10_EXT (value: 0x00000100) Extended channel diagnostics,
available in V7.0 and higher
MSG_FLAG_INSTANCE10 (value: 0x08000000) Instance alarm with process val‐
ue 10, available in V5.0 SP2 and
higher
MSG_FLAG_TEXTREF1 (value: 0x10000000) Text reference 1, available in
V5.0 SP2 and higher
MSG_FLAG_TEXTREF2 (value: 0x20000000) Text reference 2, available in
V5.0 SP2 and higher

Flags of an alarm in the online table


Only defined in m_global.h starting in WinCC V6.0 SP4.

MSG_RT_FLAG_COME (value: 0x00000001) Incoming alarm


MSG_RT_FLAG_GO (value: 0x00000002) Outgoing alarm
MSG_RT_FLAG_QUIT_COME (value: 0x00000004) Incoming acknowledgment
MSG_RT_FLAG_QUIT_GO (value: 0x00000008) Outgoing acknowledgment
MSG_RT_FLAG_NOQUIT (value: 0x00000010) No acknowledgment

WinCC Professional V13 SP2 – Programming reference


994 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

MSG_RT_FLAG_QUIT_NOGO (value: 0x00000020) TM II acknowledgment


MSG_RT_FLAG_FLASH (value: 0x00000040) Flashing
MSG_RT_FLAG_FIRSTFLASH (value: 0x00000080) Only first alarm is permitted to
flash
MSG_RT_FLAG_NOLIST (value: 0x00000100) Alarms are not received in the
message list
MSG_RT_FLAG_UNIQUE_USE (value: 0x00000200) Alarms with unique user name
R
MSG_RT_FLAG_ONL_COM_C (value: 0x00000400) Display only comments of in‐
OM coming alarm in alarm list
MSG_RT_FLAG_HIDDEN (value: 0x00000800) Alarm hidden
MSG_RT_FLAG_TEXT10_EXT (value: 0x00001000) Extended channel diagnostics,
available in V7.0 and higher
MSG_RT_FLAG_DELETE (value: 0x00010000) Alarm can be deleted
MSG_RT_FLAG_SUMTIME (value: 0x00020000) Daylight saving time flag
MSG_RT_FLAG_SQUIT (value: 0x00040000) Alarm has group acknowledg‐
ment
MSG_RT_FLAG_QUITNR (value: 0x00080000) Alarm number - Ack
MSG_RT_FLAG_MSGLIST (value: 0x00100000) Alarm from alarm list
MSG_RT_FLAG_COMMENT (value: 0x00200000) Alarm has comments
MSG_RT_FLAG_ARCHIV (value: 0x00400000) Alarm is logged
MSG_RT_FLAG_PROTOCOL (value: 0x00800000) Alarm is logged
MSG_RT_FLAG_INSTANCE (value: 0x01000000) Flag for instance alarm
MSG_RT_FLAG_TIMEINVALID (value: 0x02000000) Flag for invalid date/time stamp
MSG_RT_FLAG_LOCKGROUP (value: 0x04000000) Flag for group lock
MSG_RT_FLAG_INSTANCE10 (value: 0x08000000) Bit for new instance alarm with
process value 10.
MSG_RT_FLAG_TEXTREF1 (value: 0x10000000) Bit for text reference 1
MSG_RT_FLAG_TEXTREF2 (value: 0x20000000) Bit for text reference 2
MSG_RT_FLAG_QUITCOUNT‐ (value: 0x40000000) Bit for acknowledgment via
ER counter
MSG_RT_FLAG_QUITGROUP (value: 0x80000000) Bit for acknowledgment via
counter

Flags for single alarms

MSG_PARAMS_SQUIT (value: 0x00000001) Alarm is subject to single ac‐


knowledgment.
MSG_PARAMS_HORN (value: 0x00000002) Alarm activates horn.
MSG_PARAMS_ARCHIV (value: 0x00000004) Alarm is to be logged.
MSG_PARAMS_PROTOCOL (value: 0x00000008) Alarm is to be reported.
MSG_PARAMS_VARFLANK (value: 0x00000010) Alarm is generated on falling
edge of tag.
MSG_PARAMS_LOCKED (value: 0x00000020) Alarm is locked during startup.
MSG_PARAMS_INFOTEXT (value: 0x00000040) Alarm has an info text.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 995
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

MSG_PARAMS_LOOPINA‐ (value: 0x00000080) Alarm has loop-in-alarm.


LARM
MSG_PARAMS_APFUNC (value: 0x00000100) Alarm activates global AP func‐
tion.
MSG_PARAMS_NORMDLL (value: 0x00000200) Alarm has a normalization DLL.
MSG_PARAMS_TEXT10_EXT (value: 0x00000400) Extended channel diagnostics,
available in V7.0 and higher.

State machines

MSG_QUIT_QUIT_COME (value: 0x00000004) Incoming acknowledgment


MSG_QUIT_QUIT_GO (value: 0x00000008) Outgoing acknowledgment
MSG_QUIT_NOQUIT (value: 0x00000010) No acknowledgment
MSG_QUIT_QUIT_NOGO (value: 0x00000020) TM II acknowledgment (without
outgoing alarm)
MSG_QUIT_FLASH (value: 0x00000040) Flashing
MSG_QUIT_FIRSTFLASH (value: 0x00000080) Only first alarm is permitted to
flash
MSG_QUIT_NOLIST (value: 0x00000100) Alarms are not received in the
message list
MSG_QUIT_UNIQUE_USER (value: 0x00000200) Alarms with unique user name
MSG_QUIT_ONL_COM_COME (value: 0x00000400) Display only comments of in‐
coming alarm in alarm list

Group alarms

MSG_COLLECT_ALL (value: 0x00000001) All alarms


MSG_COLLECT_QUIT (value: 0x00000002) All unacknowledged alarms
MSG_COLLECT_CLASS (value: 0x00000003) All alarms of an alarm class
MSG_COLLECT_TYPE (value: 0x00000004) All alarms of an alarm type
MSG_COLLECT_USER (value: 0x00000005) User-defined group alarms

Single alarms

MSG_SINGLE_OPERATION (value: 0x00BEDBED) Operator input alarm

Alarm classes

MSG_CLASS_SYSTEM_QUIT (value: 0x00000011) System alarm class with ac‐


knowledgment
MSG_CLASS_SYSTEM (value: 0x00000012) System alarm class without ac‐
knowledgment

WinCC Professional V13 SP2 – Programming reference


996 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Alarm blocks
The main type of the alarm blocks is available in the HIWORD. The LOWORD includes the
subtypes of the alarm blocks.

MSG_BLOCK_SYSTEM (value: 0x00010000) System blocks


MSG_BLOCK_DATE (value: 0x00010001) Date
MSG_BLOCK_TIME (value: 0x00010002) Time of day
MSG_BLOCK_TIMEDIFF (value: 0x00010003) Alarm duration
MSG_BLOCK_SUMWIN (value: 0x00010004) Daylight-saving time/standard
time
MSG_BLOCK_STATE (value: 0x00010005) Alarm status
MSG_BLOCK_QUIT (value: 0x00010006) Acknowledgment status
MSG_BLOCK_NUMBER (value: 0x00010007) Alarm number
MSG_BLOCK_CLASS (value: 0x00010008) Alarm class
MSG_BLOCK_TYP (value: 0x00010009) Alarm type
MSG_BLOCK_AGCPU (value: 0x0001000A) Controller/CPU number
MSG_BLOCK_DMVAR (value: 0x0001000B) Alarm tag
MSG_BLOCK_LIMIT (value: 0x0001000C) Limit exceeded
MSG_BLOCK_ARCHIV (value: 0x0001000D) Log identifier
MSG_BLOCK_PROTOCOL (value: 0x0001000E) Report identifier
MSG_BLOCK_COMMENT (value: 0x0001000F) Comment
MSG_BLOCK_INFO (value: 0x00010010) Info text
MSG_BLOCK_LOOPINALARM (value: 0x00010011) Loop-in-alarm/AP function
MSG_BLOCK_COMPUTER‐ (value: 0x00010012) Computer name
NAME
MSG_BLOCK_USERNAME (value: 0x00010013) User name
MSG_BLOCK_PRIORITY (value: 0x00010014) Priority
MSG_BLOCK_TEXT (value: 0x00020000) The maximum amount of 16
user text blocks can be activated
using the MSG_BLOCK_TEXT1
to MSG_BLOCK_TEXT16 con‐
stants with values 0x00020001
to 0x00020010.
MSG_BLOCK_VALUE (value: 0x00030000) The maximum amount of 16
process value text blocks can be
activated using the
MSG_BLOCK_VALUE1 to
MSG_BLOCK_VALUE16 con‐
stants with values 0x00030001
to 0x00030010.
MSG_MAX_SYSBL Number of system alarm blocks
= MSG_BLOCK_LOOPINA‐
LARM -MSG_BLOCK_SYSTEM
MSG_MAX_SYSBL_V6 Number of system blocks in
V6.0 and higher =
MSG_BLOCK_PRIORITY -
MSG_BLOCK_SYSTEM

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 997
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

MSG_MAX_BLOCKS Total number of alarm blocks =


(MSG_MAX_TB +
MSG_MAX_PVALUE +
MSG_MAX_SYSBL)
MSG_MAX_BLOCKS_V6 Total number of alarm blocks in
V6.0 and higher =
(MSG_MAX_TB +
MSG_MAX_PVALUE +
MSG_MAX_SYSBL_V6)

Date format

DATE_FORMAT_YEAR_2 (value: 0x00000001) Two-digit year specification


DATE_FORMAT_YEAR_4 (value: 0x00000002) Four-digit year specification
DATE_FORMAT_DMY (value: 0x00000004) Order: Day, month, year
DATE_FORMAT_MDY (value: 0x00000008) Order: Month, day, year
DATE_FORMAT_YMD (value: 0x00000010) Order: Year, month, day

Time of day format

TIME_FORMAT_HOUR (value: 0x00000001) Hour


TIME_FORMAT_MIN (value: 0x00000002) Minute
TIME_FORMAT_SEC (value: 0x00000004) Second
TIME_FORMAT_MSEC (value: 0x00000008) Millisecond
TIME_FORMAT_24HOUR (value: 0x00000010) 24-hour format
TIME_FORMAT_DAY (value: 0x00000020) Hour display

Alarm number - format


The formatting rule (with leading zeros) is available in the HiWord; the LoWord contains the
number of digits.

MSGNR_FORMAT_NOLEAD‐ (value: 0x00000000)


ING
MSGNR_FORMAT_LEADING‐ (value: 0x00010000)
ZERO
MSG_BLOCK_FOR‐ (value: 0x00020000) Right-justified output
MAT_RIGHT
MSG_BLOCK_FORMAT_CEN‐ (value: 0x00040000) Centered output
TER
MSG_BLOCK_FOR‐ (value: 0x80000000) Alarm block flashing
MAT_FLASH

WinCC Professional V13 SP2 – Programming reference


998 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Elements of the status bar

MSG_SB_HELP (value: 0x00000001) Help line


MSG_SB_DATE (value: 0x00000002) Date
MSG_SB_TIME (value: 0x00000004) Time of day
MSG_SB_COUNTALL (value: 0x00000008) All alarms
MSG_SB_COUNTSEL (value: 0x00000010) Current alarms
MSG_SB_COUNTQUIT (value: 0x00000020) Acknowledged alarms
MSG_SB_SELECT (value: 0x00000040) Selection active
MSG_SB_LOCK (value: 0x00000080) Lock active
MSG_SB_HIDE (value: 0x00000100) Hiding of alarms active
MSG_SB_WARNING (value: 0x00000200) Hiding information
MSG_MAX_SBITEMS (value: 10) Maximum number of elements
in the status bar

Elements of the symbol bar

MSG_TB_MSGWIN (value: 0x00000001) Display "Alarm window" button.


MSG_TB_ARC_S (value: 0x00000002) Display "Circular log" button.
MSG_TB_ARC_L (value: 0x00000004) Display "Sequential log" button.
MSG_TB_QH (value: 0x00000008) Display "Horn acknowledgment"
button.
MSG_TB_QM (value: 0x00000010) Display "Single acknowledg‐
ment" button.
MSG_TB_QS (value: 0x00000020) Display "Group acknowledg‐
ment" button.
MSG_TB_SCROLL (value: 0x00000040) Display "Scroll function On/Off"
button.
MSG_TB_SELECT (value: 0x00000080) Display "Selection dialog" but‐
ton.
MSG_TB_LOCK (value: 0x00000100) Display "Lock dialog" button.
MSG_TB_PROTOCOL (value: 0x00000200) Display "Report dialog" button.
MSG_TB_CITYRUF (value: 0x00000400) Display "City call" button.
MSG_TB_RESET (value: 0x00000800) Display "Reset button" button.
MSG_TB_MSGFIRST (value: 0x00001000) Display "Start of list" button.
MSG_TB_MSGLAST (value: 0x00002000) Display "End of list" button.
MSG_TB_MSGNEXT (value: 0x00004000) Display "Next alarm" button.
MSG_TB_MSGPREV (value: 0x00008000) Display "Previous alarm" button.
MSG_TB_INFO (value: 0x00010000) Display "Info texts" button.
MSG_TB_COMMENT (value: 0x00020000) Display "Enter comment" button.
MSG_TB_LOOPINALARM (value: 0x00040000) Display "Loop-in-alarm" button.
MSG_TB_LANGUAGESET (value: 0x00080000) Display "Language switch" but‐
ton.
MSG_TB_PRINT (value: 0x00100000) Display "Print" button.
MSG_TB_LOCKWIN (value: 0x00200000) Display "Lock window" button.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 999
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

MSG_TB_UNLOCKMSG (value: 0x00400000) Display "Release alarm" button.


MSG_TB_LOCK_UN‐ (value: 0x00400000) Display "Lock or release alarm"
LOCK_MSG button.
MSG_TB_SORTDLG (value: 0x00800000) Display "Sorting dialog" button.
MSG_TB_TIMEBASE (value: 0x01000000) Display "Dialog for timebase"
button.
MSG_TB_HITLIST (value: 0x02000000) Display "Hit list" button.
MSG_TB_HIDELIST (value: 0x04000000) Display "List of hidden messag‐
es" button
MSG_TB_UNHIDEMSG (value: 0x08000000) Display "Display alarm" button.
MSG_TB_HIDE_UNHIDE_MSG (value: 0x080000000) Display "Hide and display alarm"
button.
MSG_TB_HIDEDLG (value: 0x10000000) Display "Hide and display alarm
dialog" button.
MSG_MAX_TBITEMS (value: 24) Maximum number of operator
controls in the status bar.
MSG_MAX_TBITEMS_V6 (value: 25) Maximum number, available in
V6 and higher
MSG_MAX_TBITEMS_V6_1 (value: 26) Maximum number, available in
V6.1 and higher
MSG_MAX_TBITEMS_V6_2 (value: 30) Maximum number, available in
V6.2 and higher
MSG_ALIGN_TOP (value: 1) Top alignment
MSG_ALIGN_BOTTOM (value: 2) Bottom alignment
MSG_ALIGN_LEFT (value: 3) Left alignment
MSG_ALIGN_RIGHT (value: 4) Right alignment

Window options

MSG_MWWIN_SWITCHENA‐ (value: 0x00000001) Process value switching


BLE
MSG_MWWIN_PROCESS (value: 0x00000002) Process alarm window
MSG_MWWIN_ARCHIV_CIR‐ (value: 0x00000004) Circular log
CLE
MSG_MWWIN_ARCHIV_LONG (value: 0x00000008) Sequential log
MSG_MWWIN_GRIDLINE‐ (value: 0x00000010) Grid line horizontal
HORZ
MSG_MWWIN_GRIDLINEVERT (value: 0x00000020) Grid line vertical
MSG_MWWIN_LINETITLE (value: 0x00000040) Line label
MSG_MWWIN_LINEHEIGHT (value: 0x00000080) Line height adjustable
MSG_MWWIN_LINEHEIGHT‐ (value: 0x00000100) Adapt font to line height
FONT
MSG_MWWIN_COLUMNTITLE (value: 0x00000200) Column label
MSG_MWWIN_COLUMNTI‐ (value: 0x00000400) 2 title lines
TLE2
MSG_MWWIN_COLUMNTI‐ (value: 0x00000800) 3 title lines
TLE3

WinCC Professional V13 SP2 – Programming reference


1000 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

MSG_MWWIN_COLUM‐ (value: 0x00001000) Column width adjustable


NWIDTH
MSG_MWWIN_COLUMNMOVE (value: 0x00002000) Columns may be moved
MSG_MWWIN_CELLSELECT (value: 0x00004000) Selection cell only (default set‐
ting: line)
MSG_MWWIN_LINESELECT (value: 0x00008000) Line selection
MSG_MWWIN_AUTOSCROLL‐ (value: 0x00010000) Auto scroll Off (default setting:
OFF On)
MSG_MWWIN_TITLECUT (value: 0x00020000) Title will be truncated with peri‐
ods if necessary
MSG_MWWIN_CELLCUT (value: 0x00040000) Cell content truncated with peri‐
ods if necessary
MSG_MWWIN_TITLEBAR (value: 0x00080000) Display title line of window (+
frame)
MSG_MWWIN_SIZEABLE (value: 0x00100000) Size of window adjustable
MSG_MWWIN_TOOLTIP (value: 0x00200000) Tool tip display specially for
alarm texts
MSG_MWWIN_LOOP_IN_ALAR (value: 0x00400000) One click for "Loop-in-alarm"
M_DC
MSG_MWWIN_SELECTFO‐ (value: 0x00800000) Selection made with frame in‐
CUSRECT stead of inversion
MSG_MWWIN_OPMSG_HIDE (value: 0x01000000) Operator input alarm when hid‐
ing
MSG_MWWIN_OPMSGUN‐ (value: 0x02000000) Operating input alarm when dis‐
HIDE playing
MSG_MWWIN_IN‐ (value: 0x08000000) Instance-specific column width
STANCE_COLWIDTH
MSG_MWWIN_INSTANCE‐ (value: 0x10000000) Instance-specific alarm block
BLOCKINFO settings
MSG_MWWIN_OPMSG_LOCK (value: 0x20000000) Operator input alarm when lock‐
ing
MSG_MWWIN_OPMSG_UN‐ (value: 0x40000000) Operator input alarm when re‐
LOCK leasing
MSG_MWWIN_OPMSG_ACK (value: 0x80000000) Operator input alarm when ac‐
knowledging

Filter conditions

MSG_FILTER_DATE_FROM (value: 0x00000001) Date from


MSG_FILTER_DATE_TO (value: 0x00000002) Date to
MSG_FILTER_TIME_FROM (value: 0x00000004) Time from
MSG_FILTER_TIME_TO (value: 0x00000008) Time to
MSG_FILTER_NR_FROM (value: 0x00000010) Alarm number from
MSG_FILTER_NR_TO (value: 0x00000020) Alarm number to
MSG_FILTER_CLASS (value: 0x00000040) Alarm classes
MSG_FILTER_STATE (value: 0x00000080) Alarm status
MSG_FILTER_AG_FROM (value: 0x00000100) AG number from

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1001
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

MSG_FILTER_AG_TO (value: 0x00000200) AG number to


MSG_FILTER_AGSUB_FROM (value: 0x00000400) AG sub-number from
MSG_FILTER_AGSUB_TO (value: 0x00000800) AG sub-number to
MSG_FILTER_ARC (value: 0x00001000) Log/report identifier
MSG_FILTER_TEXT (value: 0x00002000) Alarm texts
MSG_FILTER_PVALUE (value: 0x00004000) Process values
MSG_FILTER_COUN‐ (value: 0x00008000) Internal alarm counter from
TER_FROM
MSG_FILTER_COUNTER_TO (value: 0x00010000) Internal alarm counter to
MSG_FILTER_PROCESSMSG (value: 0x00020000) Process alarms
MSG_FILTER_SYSMSG (value: 0x00040000) System events
MSG_FILTER_BEDMSG (value: 0x00080000) Operator input alarms
MSG_FILTER_QUICKSELECT (value: 0x00100000) Quick selection (current day,
etc.)
MSG_FILTER_TEXT_EQUAL (value: 0x00200000) Exact alarm texts
MSG_FILTER_PRIORI‐ (value: 0x00400000) Priority from
TY_FROM
MSG_FILTER_PRIORITY_TO (value: 0x00800000) Priority to
MSG_FILTER_VISIBLEONLY (value: 0x01000000) Show displayed alarms
MSG_FILTER_HIDDENONLY (value: 0x02000000) Show hidden alarms
MSG_FILTER_NODYNAMIC (value: 0x04000000) No selection of dynamic texts
MSG_FILTER_DATE Value: (MSG_FIL‐
TER_DATE_FROM | MSG_FIL‐
TER_DATE_TO)
MSG_FILTER_TIME Value: (MSG_FIL‐
TER_TIME_FROM | MSG_FIL‐
TER_TIME_TO)
MSG_FILTER_NR Value: (MSG_FIL‐
TER_NR_FROM | MSG_FIL‐
TER_NR_TO)

Quick selection
The end time of the quick selection refers to the current system time of the local computer.
The start time is back calculated n * (months, days, hours).

MSG_FILTER_QUICK_MONTH (value: 0x00000001) Last n months


MSG_FILTER_QUICK_DAYS (value: 0x00000002) Last n days
MSG_FILTER_QUICK_HOUR (value: 0x00000003) Last n hours

Log types

MSG_ARPRO_LONGARCH (value: 0x00000001) Sequential log


MSG_ARPRO_SHORTARCH (value: 0x00000002) Circular log
MSG_ARPRO_ARCHPROT (value: 0x00000003) Log report
MSG_ARPRO_MFPROT (value: 0x00000004) Alarm sequence report

WinCC Professional V13 SP2 – Programming reference


1002 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Flags for logs

MSG_ARPRO_PAR‐ (value: 0x00000001) Short-term log in main memory


AM_HSPONLY
MSG_ARPRO_PARAM_CIR‐ (value: 0x00000002) Circular log
CLE
MSG_ARPRO_PARAM_EN‐ (value: 0x00000004) Endless log
DLES
MSG_ARPRO_PARAM_RE‐ (value: 0x00000008) Reload after power failure
LOAD
MSG_ARPRO_PARAM_LINE‐ (value: 0x00000010) Print linewise (alarm sequence
PRINT report only)

IDs for locking alarms

MSG_LOCK_UNKNOWN (value: 0) Lock is unknown


MSG_LOCK_CLASS (value: 1) Locks of alarm classes
MSG_LOCK_GROUP1 (value: 2) Locks of alarm group level 1
MSG_LOCK_GROUP2 (value: 3) Locks of alarm group level 2

IDs for logs

MSG_PROT_MSG (value: 1) Alarm sequence report


MSG_PROT_ARCHIV_CIRCLE (value: 2) Log report of circular log
MSG_PROT_ARCHIV_LONG (value: 3) Log report of sequential log

IDs for export of alarm logs

MSG_DB_FMT_CSV (value: 1) CSV file format


MSG_DB_FMT_DBASE3 (value: 2) DBASE3 file format
MSG_DB_FMT_WATCOM (value: 3) Watcom format
MSG_DB_FLAGS_OVER‐ (value: 1) Overwrite existing data records
WRITE
MSG_DB_FLAGS_ADD (value: 2) Add only
MSG_DB_FLAGS_DELETE (value: 4) Delete source data records
MSG_DB_FLAGS_NOEXPORT (value: 8) Do not export data records -->
Delete only (no longer available)

Flags for generic configuration


The flags can be logically combined.

MSG_GENERIC_APPEND (value: 0x00000001) Create new


MSG_GENERIC_OVERWRITE (value: 0x00000002) Overwrite
MSG_GENERIC_DELETE (value: 0x00000004) Delete

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1003
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Mode for tags

MSG_CS_VAR_NOTSET (value: 0x0000) No tag set


MSG_CS_VARNAME_SET (value: 0x0001) Tag name is set
MSG_CS_VARID_SET (value: 0x0002) Tag ID is set
MSG_CS_VARALL_SET (value: 0x0003) Tag ID and name are set

Enumeration of the logs

MSG_ARCHIV_ENUM_DESC (value: 0x00000001) Sorted in descending order (de‐


fault setting: ascending)

2.10.2 Structures (RT Professional)

2.10.2.1 MSG_RTCREATE_STRUCT_PLUS (RT Professional)

Declaration

typedef struct {
DWORD dwMsgState;
DWORD dwMsgNrLow;
DWORD dwMsgNrHigh;
DWORD dwFlags;
SYSTEMTIME stMsgTime;
double dPValue[MSG_MAX_PVALUE];
WORD wPValueUsed;
MSG_TEXTVAL256_STRUCT_PLUS mtTextValueW[MSG_MAX_PVALUE]
WORD wTextValueUsed;
}
MSG_RTCREATE_STRUCT_PLUS;

Members

dwMsgState
Alarm status in compliance with the constants in the "m_global.h" file:

MSG_STATE_COME Incoming alarm


MSG_STATE_GO Outgoing alarm
MSG_STATE_QUIT Alarm acknowledged
MSG_STATE_LOCK Alarm locked
MSG_STATE_UNLOCK Alarm released
MSG_STATE_HIDE Alarm hidden

WinCC Professional V13 SP2 – Programming reference


1004 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

MSG_STATE_UNHIDE Alarm displayed


MSG_STATE_HIDE_MANUAL Alarm hidden manually
MSG_STATE_UNHIDE_MANUAL Alarm displayed manually

dwMsgNrLow
dwMsgNrLow Number of the first alarm

dwMsgNrHigh
dwMsgHigh Number of the last alarm

dwFlags
The parameter is reserved for future development and must be preassigned with 0.

stMsgTime
Date and time for coming-in or going-out of an alarm. The system time of the PLC or the OS
will be used when acknowledging.
If a current time is needed for the passing of a SYSTEMTIME parameter, the GetLocalTime
function must be used and not GetSystemTime. There is generally a considerable time
difference between these two functions.

dPValue
Numeric process values.

wPValueUsed
Process values used in bit coded layout.
Each bit should only be set in one of the two members wPValueUsed or wTextValueUsed,
because only number or text is technically possible as an associated value. In the case of
erroneous double entry the dPValue has priority.

mtTextValue
Structure of the MSG_TEXTVAL256_STRUCT_PLUS (Page 1030) type with the associated
text values.

wTextValueUsed
Text process values used in bit coded layout.
Each bit should only be set in one of the two members wPValueUsed or wTextValueUsed,
because only number or text is technically possible as an associated value. In the case of
erroneous double entry the dPValue has priority.

Comment
Before you fill out the structure, you should initialize it with "0".

Required files
CCMSRTCLIPlus.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1005
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

API functions

AUTOHOTSPOT Create alarm

See also
MSG_TEXTVAL256_STRUCT_PLUS (Page 1030)
Overview of structures (Page 990)

2.10.2.2 MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS (RT Professional)

Declaration

typedef struct {
DWORD dwMsgState;
DWORD dwMsgNrLow;
DWORD dwMsgNrHigh;
SYSTEMTIME stMsgTime;
DWORD dwTimeDiff;
DWORD dwCounter;
DWORD dwFlags;
WORD wPValueUsed;
WORD wTextValueUsed;
double dPValue[MSG_MAX_PVALUE];
MSG_TEXTVAL256_STRUCT_PLUS mtTextValue[MSG_MAX_PVALUE];
WCHAR szInstance[MSG_MAX_INSTANCE+1];
WCHAR szComment[MSG_MAX_TB_CONTENT+1];
WCHAR szUser[MSG_MAX_USERNAME+1];
WCHAR szComputerName[MAX_COMPUTERNAME_LENGTH+1];
WCHAR szApplicationName[MSG_MAX_APPLNAME+1];
WCHAR szServerPrefix[_MAX_PATH+1];
}
MSG_RTDATA_INSTANCECOMMENT_STRUCTPlus;

Members

dwMsgState
Alarm status in compliance with the constants in the "m_global.h" file:
The statuses listed will only be used internally by the system and can only by set by the API
using MSRTCreateMsgInstanceWithCommentPlus.

MSG_STATE_COME Incoming alarm


MSG_STATE_GO Outgoing alarm
MSG_STATE_QUIT Alarm acknowledged
MSG_STATE_LOCK Alarm locked
MSG_STATE_UNLOCK Alarm released

WinCC Professional V13 SP2 – Programming reference


1006 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

MSG_STATE_HIDE Alarm hidden


MSG_STATE_UNHIDE Alarm displayed
MSG_STATE_HIDE_MANUAL Alarm hidden manually
MSG_STATE_UNHIDE_MANUAL Alarm displayed manually

dwMsgNrLow
dwMsgNrLow Number of the first alarm

dwMsgNrHigh
dwMsgHigh Number of the last alarm

stMsgTime
Date and time for coming-in or going-out of an alarm.

dwTimeDiff
Duration coming in or going out, telegram time in seconds.

dwCounter
Internal alarm counter.

dwFlags
Flags in compliance with the constants in the "m_global.h" file:

Flags for alarms in the alarm view


MSG_RT_FLAG_COME 0x00000001 Incoming alarm
MSG_RT_FLAG_GO 0x00000002 Outgoing alarm
MSG_RT_FLAG_QUIT_COME 0x00000004 Incoming acknowledgment
MSG_RT_FLAG_QUIT_GO 0x00000008 Outgoing acknowledgment
MSG_RT_FLAG_NOQUIT 0x00000010 No acknowledgment
MSG_RT_FLAG_QUIT_NOGO 0x00000020 TM II acknowledgment
MSG_RT_FLAG_FLASH 0x00000040 Flashing
MSG_RT_FLAG_FIRSTFLASH 0x00000080 Only first alarm is permitted to flash
MSG_RT_FLAG_DELETE 0x00010000 Alarm can be deleted
MSG_RT_FLAG_SUMTIME 0x00020000 Daylight saving time flag
MSG_RT_FLAG_SQUIT 0x00040000 Alarm has group acknowledgment
MSG_RT_FLAG_QUITNR 0x00080000 Alarm number acknowledgment
MSG_RT_FLAG_MSGLIST 0x00100000 Alarm from the alarm list
MSG_RT_FLAG_COMMENT 0x00200000 Alarm has comments
MSG_RT_FLAG_ARCHIV 0x00400000 Alarm is logged
MSG_RT_FLAG_PROTOCOL 0x00800000 Alarm is reported
MSG_RT_FLAG_INSTANCE 0x01000000 Flag for instance alarm
MSG_RT_FLAG_TIMEINVALID 0x02000000 Flag for invalid date/time stamp
MSG_RT_FLAG_LOCKGROUP 0x04000000 Flag for group lock
MSG_RT_FLAG_INSTANCE10 0x08000000 Bit for new instance alarm with process val‐
ue 10.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1007
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Flags for alarms in the alarm view


MSG_RT_FLAG_TEXTREF1 0x10000000 Bit for text reference 1.
MSG_RT_FLAG_TEXTREF2 0x20000000 Bit for text reference 2.
MSG_RT_FLAG_QUITCOUNTER 0x40000000 Bit for acknowledgment via counter
MSG_RT_FLAG_QUITGROUP 0x80000000 Bit for acknowledgment via counter

With the MSRTCreateMsgInstanceWithCommentPlus function, flags cannot be sent to the


alarm server. Flags are ignored.

wPValueUsed
Process values used in bit coded layout.
Each bit should only be set in one of the two members wPValueUsed or wTextValueUsed,
because only number or text is technically possible as an associated value. In the case of
erroneous double entry the dPValue has priority.

wTextValueUsed
Text values used, bit-coded.
Each bit should only be set in one of the two members wPValueUsed or wTextValueUsed,
because only number or text is technically possible as an associated value.
In the case of erroneous double entry the dPValue has priority.

dPValue
Process values.

mtTextValue
Structure of the MSG_TEXTVAL256_STRUCT_PLUS (Page 1030) type with the associated
text values.

szInstance
Instance name. If szInstance is not provided (empty string), a normal alarm is created

szComment
Comment name

szUser
User name.

szComputerName
Computer name.

szApplicationName
Application name.

szServerPrefix
Server prefix.

WinCC Professional V13 SP2 – Programming reference


1008 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Comment
Before you fill out the structure, you should initialize it with "0".

Required files
CCMSRTCLIPlus.h

API functions

MSRTCreateMsgInstanceWithCommentPlus Create alarm


(Page 1048)
MSRTGetLastMsgWithCommentPlus Query last archived alarm
(Page 1059)
MSG_SERVICE_NOTIFY_PROCPlus Callback function
(Page 1039)

See also
MSRTCreateMsgInstanceWithCommentPlus (Page 1048)
MSRTGetLastMsgWithCommentPlus (Page 1059)
MSG_SERVICE_NOTIFY_PROCPlus (Page 1039)
MSRTGetSelectedMsgPlus (Page 1068)
MSRTCheckWinFilterPlus (Page 1079)
Overview of structures (Page 990)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1009
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

2.10.2.3 MSG_FILTER_STRUCT_PLUS (RT Professional)

Declaration

typedef struct {
WCHAR szFilterName[MSG_MAX_TEXTLEN+1];
DWORD dwFilter;
SYSTEMTIME st[2];
DWORD dwMsgNrLow[2];
DWORD dwMsgNrHigh[2];
VARIANT vMsgClasses;
DWORD dwMsgState;
WORD wAGNr[2];
WORD wAGSubNr[2];
DWORD dwArchivMode;
WCHAR szTB[MSG_MAX_TB][MSG_MAX_TB_CONTENT+1]
DWORD dwTB;
double dPValue[MSG_MAX_PVALUE][2];
DWORD dwPValue[2];
ULONGLONG uMsgCounter[2];
DWORD dwQuickSelect;
DWORD dwPriority[2];
WCHAR szInstance[MSG_MAX_INSTANCE+1];
}
MSG_FILTER_STRUCT_PLUS;

Members

szFilterName
Filter name

dwFilter
The filter conditions are defined by means of the following constants from the file "m_global.h":

MSG_FILTER_DATE_FROM Date from


MSG_FILTER_DATE_TO Date to
MSG_FILTER_TIME_FROM Time from
MSG_FILTER_TIME_TO Time to
MSG_FILTER_NR_FROM Alarm number from
MSG_FILTER_NR_TO Alarm number to
MSG_FILTER_CLASS Alarm classes
MSG_FILTER_STATE Alarm status
MSG_FILTER_AG_FROM AG number from
MSG_FILTER_AG_TO AG number to
MSG_FILTER_AGSUB_FROM AG sub-number from
MSG_FILTER_AGSUB_TO AG sub-number to
MSG_FILTER_TEXT Alarm texts

WinCC Professional V13 SP2 – Programming reference


1010 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

MSG_FILTER_PVALUE Process values


MSG_FILTER_COUNTER_FROM Internal alarm counter from
MSG_FILTER_COUNTER_TO Internal alarm counter to
MSG_FILTER_PROCESSMSG Process alarms (reserved)
MSG_FILTER_SYSMSG System alarms (reserved)
MSG_FILTER_BEDMSG Operator input alarms (reserved)
MSG_FILTER_VISIBLEONLY Display visible alarms (is not included in the filter
condition)
MSG_FILTER_HIDDENONLY Display hidden alarms (is not included in the filter
condition)
MSG_FILTER_NODYNAMIC No dynamic text selection (is not included in filter
condition)
MSG_FILTER_DATE Date from to
MSG_FILTER_TIME Time from to
MSG_FILTER_NR Alarm number from to

The individual filter conditions can be ORed.

st
st[0] Date and time of the start point, st[1] Date and time of the end point
You must assign st , if you use the filter criteria MSG_FILTER_DATE,
MSG_FILTER_DATE_FROM, MSG_FILTER_DATE_TO, MSG_FILTER_TIME,
MSG_FILTER_TIME_FROM, or MSG_FILTER_TIME_To.
If a current time is needed for the passing of a SYSTEMTIME parameter, the GetLocalTime
function must be used and not GetSystemTime. There is generally a considerable time
difference between these two functions.

dwMsgNrLow
dwMsgNrLow Number of the first alarm

dwMsgNrHigh
dwMsgHigh Number of the last alarm
You must assign dwMsgNrLow and dwMsgNrHigh, if you use the MSG_FILTER_NR,
MSG_FILTER_NR_FROM, or MSG_FILTER_NR_TO filter criteria.

vMsgClasses
Alarm classes bit-coded.
0x0001 = class 1, 0x0002 = class 2, 0x0004 = class 3, ... 0x0040= class 7
0x0204 = classes 3 and 10
You must assign dwMsgClass and dwMsgType, if you use the filter criterion
MSG_FILTER_CLASS.

dwMsgState
Alarm status bit-coded.
Assign this field, if you use the filter criterion MSG_FILTER_STATE.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1011
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

The following status values are checked using MSRTCheckWinFilter:

MSG_STATE_COME Incoming alarm


MSG_STATE_GO Outgoing alarm
MSG_STATE_QUIT Alarm acknowledged
MSG_STATE_QUIT_SYSTEM Alarm acknowledged by system
MSG_STATE_QUIT_EMERGENCY Emergency acknowledgment

You must filter other status values yourself, e.g., MSG_STATE_HIDE or


MSG_STATE_UNHIDE, since these are not taken into consideration in the filter condition. To
filter these status values, use e.g. MSG_FILTER_HIDDENONLY.

wAGNr
wAGNr [0] First PLC number, wAGNr [1] last PLC number.
You must assign wAGNr b, if you use the filter criteriaMSG_FILTER_AG_FROM or
MSG_FILTER_AG_TO.

wAGSubNr
wAGSubNr [0] First PLC number, wAGSubNr [1] last PLC number.
You must assign wAGSubNr b, if you use the filter criteriaMSG_FILTER_AGSUB_FROM or
MSG_FILTER_AGSUB_TO.

dwArchivMode
ID for log or report. The parameter must be assigned 0.

szTB
Texts of the text blocks
You must assign szTB, if you use the filter criterion MSG_FILTER_TEXT.

dwTB
Active text blocks, bit coded
You must assign dwTB, if you use the filter criterionMSG_FILTER_TEXT

dPValue
Process values from - to
You must assign dPValue, if you use the filter criterionMSG_FILTER_PVALUE.

dwPValue
Process values, bit-coded
You must assign dwPValue, if you use the filter criterion MSG_FILTER_PVALUE.

uMgCounter
Internal alarm counter
You must assign dwMsgCounter, if you use the filter criterion MSG_FILTER_COUNTER_....

WinCC Professional V13 SP2 – Programming reference


1012 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

dwQuickSelect
The parameter is reserved for future development and must be preassigned with 0.

dwPriority
Priority of the alarm

szInstance
Instance name. If szInstance is not provided (empty string), a normal alarm is created.

Comment
MSG_FILTER_STRUCT_PLUS is also used by the AUTOHOTSPOT structure.

Required files
CCMsRTCliPlus.h

API functions

MSRTCheckWinFilterPlus (Page 1079) Check alarm filter conditions


AUTOHOTSPOT Set alarm filter parameters
MSRTEnumProtDataPlus (Page 1043) List report data
MSRTGetFilterDataPlus (Page 1077) Query alarm filter conditions
MSRTSetMsgFilterPlus (Page 1080) Set alarm filter
MSRTSetMsgWinFilterPlus (Page 1082) Set alarm filter for an alarm window
MSRTGetLastMsgWithCommentPlus Query last archived alarm
(Page 1059)
MSRTStartMsgServicePlus (Page 1033) Start service

See also
MSRTGetLastMsgWithCommentPlus (Page 1059)
MSRTSetMsgWinFilterPlus (Page 1082)
MSRTStartMsgServicePlus (Page 1033)
MSRTSetMsgFilterPlus (Page 1080)
MSRTCheckWinFilterPlus (Page 1079)
MSRTGetFilterDataPlus (Page 1077)
MSRTEnumProtDataPlus (Page 1043)
Overview of structures (Page 990)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1013
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

2.10.2.4 MSG_RTDATA_INSTANCE_STRUCT_PLUS (RT Professional)

Declaration

typedef struct {
DWORD dwMsgState;
DWORD dwMsgNrLow;
DWORD dwMsgNrHigh;
SYSTEMTIME stMsgTime;
DWORD dwTimeDiff;
ULONGLONG ullCounter;
DWORD dwFlags;
WORD wPValueUsed;
WORD wTextValueUsed;
double dPValue[MSG_MAX_PVALUE];
MSG_TEXTVAL256_STRUCT_PLUS mtTextValue[MSG_MAX_PVALUE]
TCHAR szInstance[MSG_MAX_INSTANCE+1];
}
MSG_RTDATA_INSTANCE_STRUCT_PLUS;

Members

dwMsgState
Alarm status in compliance with the constants in the "m_global.h" file:
The statuses listed will only be used internally by the system and can only by set by the API
using MSRTCreateMsgInstanceWithCommentPlus.

MSG_STATE_COME Incoming alarm


MSG_STATE_GO Outgoing alarm
MSG_STATE_QUIT Alarm acknowledged
MSG_STATE_LOCK Alarm locked
MSG_STATE_UNLOCK Alarm released
MSG_STATE_HIDE Alarm hidden
MSG_STATE_UNHIDE Alarm displayed
MSG_STATE_HIDE_MANUAL Alarm hidden manually

dwMsgNrLow
dwMsgNrLow Number of the first alarm

dwMsgNrHigh
dwMsgHigh Number of the last alarm

stMsgTime
Date and time for coming-in or going-out of an alarm.

WinCC Professional V13 SP2 – Programming reference


1014 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

dwTimeDiff
Duration coming in or going out, telegram time in seconds.

ullCounter
Internal alarm counter.

dwFlags
Flags in compliance with the constants in the "m_global.h" file:

Flags for alarms in the alarm view


MSG_RT_FLAG_COME 0x00000001 Incoming alarm
MSG_RT_FLAG_GO 0x00000002 Outgoing alarm
MSG_RT_FLAG_QUIT_COME 0x00000004 Incoming acknowledgment
MSG_RT_FLAG_QUIT_GO 0x00000008 Outgoing acknowledgment
MSG_RT_FLAG_NOQUIT 0x00000010 No acknowledgment
MSG_RT_FLAG_QUIT_NOGO 0x00000020 TM II acknowledgment
MSG_RT_FLAG_FLASH 0x00000040 Flashing
MSG_RT_FLAG_FIRSTFLASH 0x00000080 Only first alarm is permitted to flash
MSG_RT_FLAG_DELETE 0x00010000 Alarm can be deleted
MSG_RT_FLAG_SUMTIME 0x00020000 Daylight saving time flag
MSG_RT_FLAG_SQUIT 0x00040000 Alarm has group acknowledgment
MSG_RT_FLAG_QUITNR 0x00080000 Alarm number acknowledgment
MSG_RT_FLAG_MSGLIST 0x00100000 Alarm from the alarm list
MSG_RT_FLAG_COMMENT 0x00200000 Alarm has comments
MSG_RT_FLAG_ARCHIV 0x00400000 Alarm is logged
MSG_RT_FLAG_PROTOCOL 0x00800000 Alarm is reported
MSG_RT_FLAG_INSTANCE 0x01000000 Flag for instance alarm
MSG_RT_FLAG_TIMEINVALID 0x02000000 Flag for invalid date/time stamp
MSG_RT_FLAG_LOCKGROUP 0x04000000 Flag for group lock
MSG_RT_FLAG_INSTANCE10 0x08000000 Bit for new instance alarm with process val‐
ue 10.
MSG_RT_FLAG_TEXTREF1 0x10000000 Bit for text reference 1.
MSG_RT_FLAG_TEXTREF2 0x20000000 Bit for text reference 2.
MSG_RT_FLAG_QUITCOUNTER 0x40000000 Bit for acknowledgment via counter
MSG_RT_FLAG_QUITGROUP 0x80000000 Bit for acknowledgment via counter

Flags for alarms in the log


MSG_FLAG_SUMTIME 0x00000001 Daylight saving time active
MSG_FLAG_COMMENT 0x00000002 Alarm has comments
MSG_FLAG_ARCHIV 0x00000004 Log
MSG_FLAG_PROTOCOL 0x00000008 Report
MSG_FLAG_TEXTVALUES 0x00000010 Alarm has associated text values
MSG_FLAG_TIMEINVALID 0x00000020 Bit for invalid date/time stamp
MSG_FLAG_INSTANCE 0x00000040 Identifier for instance alarms

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1015
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Flags for alarms in the log


MSG_FLAG_INSTANCE10 0x08000000 Instance alarm with process value 10, avail‐
able from V5.0 SP2
MSG_FLAG_TEXTREF1 0x10000000 Text reference 1
MSG_FLAG_TEXTREF2 0x20000000 Text reference 2

With the MSRTCreateMsgInstanceWithCommentPlus function, flags cannot be sent to the


alarm server. Flags are ignored.

wPValueUsed
Process values used in bit coded layout.
Each bit should only be set in one of the two members wPValueUsed or wTextValueUsed,
because only number or text is technically possible as an associated value. In the case of
erroneous double entry the dPValue has priority.

wTextValueUsed
Text values used, bit-coded.
Each bit should only be set in one of the two members wPValueUsed or wTextValueUsed,
because only number or text is technically possible as an associated value.
In the case of erroneous double entry the dPValue has priority.

dPValue
Process values.

mtTextValue
Structure of the MSG_TEXTVAL256_STRUCT_PLUS (Page 1030) type with the associated
text values.

szInstance
Instance name. If szInstance is not provided (empty string), a normal alarm is created

Required files
CCMSRTCLIPlus.h

API functions

MSRTCreateMsgInstancePlus (Page 1049) Create alarm


MSG_SERVICE_NOTIFY_PROC Send and receive service (callback)

See also
MSRTCreateMsgInstancePlus (Page 1049)
MSG_SERVICE_NOTIFY_PROCPlus (Page 1039)

WinCC Professional V13 SP2 – Programming reference


1016 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

MSG_TEXTVAL256_STRUCT_PLUS (Page 1030)


Overview of structures (Page 990)

2.10.2.5 MSG_CLASS_STRUCT_PLUS (RT Professional)

Declaration

typedef struct {
WCHAR szName[MSG_MAX_TEXTLEN+1];
DWORD dwName;
DWORD dwClassID;
COLORREF crStateCome[2];
COLORREF crStateGo[2];
COLORREF crStateQuit[2];
WORD wQuitType;
WORD wHornQuit;
DWORD dwHornVar;
WCHAR szState[MSG_MAX_STATE][MSG_MAX_TEXTLEN+1];
DWORD dwState[MSG_MAX_STATE];
WCHAR szStateQuit[MSG_MAX_TEXTLEN+1];
DWORD dwStateQuit;
DWORD dwClassTyp;
DWORD dwCreatorID;
}
MSG_CLASS_STRUCT_PLUS;

Members

szName
The class name to be specified is dependent on the selected data language!

dwName
If the class name is included in the project texts, the ID can be specified here.

dwClassID
ID of the alarm class ( 1..18(MSG_MAX_CLASS) )

crStateCome
Color for the "incoming" status

crStateGo
Color for the "outgoing" status

crStateQuit
Color for the "acknowledged" status

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1017
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

wQuitType
The acknowledgment philosophy is defined by means of the following constants from the
"m_global.h" file:

MSG_QUIT_QUIT_COME Incoming acknowledgment


MSG_QUIT_QUIT_GO Outgoing acknowledgment
MSG_QUIT_NOQUIT No acknowledgment
MSG_QUIT_QUIT_NOGO Acknowledgment (without outgoing alarm)
MSG_QUIT_FLASH Flashing
MSG_QUIT_FIRSTFLASH Only first alarm is permitted to flash
MSG_QUIT_NOLIST Do not receive alarms in alarm list

You can logically combine the constants of the state machines bit-by-bit with "OR", provided
they are not mutually contradictory.

wHornQuit
Acknowledgment of central horn

dwHornVar
Tag of central horn

szState
Text for the "incoming", "outgoing", and "incoming and outgoing" statuses.

dwState
TextID

szStateQuit
Text for the "acknowledged" status.

dwStateQuit
TextID

dwClassTyp
The parameter is reserved for future development and must be preassigned with 0.

dwCreatorID
CreatorID

Comment
In contrast to the MSG_CLASS_STRUCT_EX structure, MSG_CLASS_STRUCTPlus does not
have a creator identification.

Required files
CCMSRTCLIPlus.h

WinCC Professional V13 SP2 – Programming reference


1018 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

API functions

MSRTGetClassInfoPlus (Page 1057) Query alarm class information

See also
MSRTGetClassInfoPlus (Page 1057)
Overview of structures (Page 990)

2.10.2.6 MSG_CSDATA_STRUCT_PLUS (RT Professional)

Declaration

typedef struct {
DWORD dwMsgNrLow;
DWORD dwMsgNrHigh;
DWORD dwStatus;
WORD wClass;
WORD wTyp;
DWORD dwTextID[MSG_MAX_TB];
DWORD dwQuitVar;
WORD wQuitBit;
DWORD dwStateVar;
WORD wStateBit;
DWORD dwMsgVar;
WORD wMsgBit;
WORD wAGNr;
WORD wAGSubNr;
DWORD dwGroupID;
DWORD dwPriority;
DWORD dwHidingMask;
}
MSG_CSDATA_STRUCT_PLUS;

Members

dwMsgNrLow
dwMsgNrLow Number of the first alarm

dwMsgNrHigh
dwMsgHigh Number of the last alarm

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1019
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

dwStatus
The individual alarm parameters are defined by means of the following constants from the file
"m_global.h":

MSG_PARAMS_SQUIT Single acknowledgment


MSG_PARAMS_HORN Activates horn
MSG_PARAMS_ARCHIV Will be archived
MSG_PARAMS_PROTOCOL Will be logged
MSG_PARAMS_VARFLANK Will be created on negative edge
MSG_PARAMS_INFOTEXT Has Info text.
MSG_PARAMS_LOOPINALARM Has loop-in-alarm
MSG_PARAMS_NORMDLL Has normalization DLL

You can OR these constants, provided they do not contradict each other.

wClass
Alarm class

wTyp
Alarm type

dwTextID
Reference to the text blocks

dwQuitVar
Acknowledgment tag. Use dwID from DM_VARKEY (Page 239).

wQuitBit
Bit of acknowledgment tag

dwStateVar
Alarm status as tag. Use dwID from DM_VARKEY (Page 239)

wStateBit
wStateBit is used to specify which bits of dwStateVar define the alarm status.
If wStateBit = 1 and dwStateVar of data type "8 Bit unsigned", then Bit 1 of dwStateVar specifies
the incoming/outgoing status, and bit 5 specifies the need for acknowledgment.
If wStateBit = 2 and dwStateVar is a word tag, then Bit 2 of dwStateVar specifies the incoming/
outgoing status, and bit 10 specifies the need for acknowledgment.

dwMsgVar
Alarm variable. Use dwID from DM_VARKEY (Page 239).

wMsgBit
Alarm variable bit.

WinCC Professional V13 SP2 – Programming reference


1020 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

wAGNr
PLC number

wAGSubNr
PLC sub-number

dwGroupID
ID for the alarm group (internal)

dwPriority
Priority of the alarm

dwHidingMask
Display suppression mask

Comment
By means of this structure, your application can use API functions to determine the
configuration data of a single message.

Required files
CCMSRTCLIPlus.h

API functions

MSRTGetMsgCSDataPlus (Page 1061) Query alarm configuration data

See also
MSRTGetMsgCSDataPlus (Page 1061)
DM_VARKEY (Page 239)
Overview of structures (Page 990)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1021
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

2.10.2.7 MSG_RTGROUPENUM_STRUCT_PLUS (RT Professional)

Declaration

typedef struct {
BOOL fIDUsed;
DWORD dwID;
TCHAR szName[MSG_MAX_TEXTLEN+1];
DWORD dwMsgCount;
DWORD dwMsg[MSG_MAX_GROUPITEMS];
}
MSG_RTGROUPENUM_STRUCT_PLUS;

Members

fIDUsed
Specifies whether the Group ID (fIDUsed = TRUE) or name (fIDUsed = FALSE) is used to
specify the alarm group.

dwID
Group ID

szName
Group name

dwMsgCount
Number of single alarms in dwMsg

dwMsg
Locked single alarms

Required files
CCMSRTCLIPlus.h

API functions

MSRTEnumGroupMsgPlus (Page 1073) List alarm group single alarms


MSG_SERVICE_NOTIFY_PROCPlus Callback function
(Page 1039)

WinCC Professional V13 SP2 – Programming reference


1022 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

See also
MSG_SERVICE_NOTIFY_PROCPlus (Page 1039)
MSRTEnumGroupMsgPlus (Page 1073)
Overview of structures (Page 990)

2.10.2.8 MSG_RTGROUPSET_STRUCT_PLUS (RT Professional)

Declaration

typedef struct {
BOOL fIDUsed;
DWORD dwID;
WCHAR szName[MSG_MAX_TEXTLEN+1];
SYSTEMTIME stTime;
DWORD dwData;
}
MSG_RTGROUPSET_STRUCT_PLUS;

Members

fIDUsed
Specifies whether the Group ID (fIDUsed = TRUE) or name (fIDUsed = FALSE) is used to
specify the alarm group.

dwID
Group ID (for alarm classes, alarm types)

szName
Group name

stTime
Time of occurrence

dwData
If the structure is used within the scope of MSRTLockGroupPlus, dwData = 1 signifies locking
and dwData = 0 releasing

Required files
CCMSRTCLIPlus.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1023
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

API functions

MSRTLockGroupPlus (Page 1074) Lock alarm group


MSRTEnumGroupMsgPlus (Page 1073) List single alarms of an alarm group
MSRTQuitGroupPlus (Page 1076) Acknowledge alarm group

See also
MSRTEnumGroupMsgPlus (Page 1073)
MSRTLockGroupPlus (Page 1074)
MSRTQuitGroupPlus (Page 1076)
Overview of structures (Page 990)

2.10.2.9 MSG_COMMENT_INSTANCE_STRUCT_PLUS (RT Professional)

Declaration

typedef struct {
SYSTEMTIME stTime;
DWORD dwMsgNrLow;
DWORD dwMsgNrHigh;
WCHAR szText[MSG_MAX_TB_CONTENT+1];
WCHAR szUser[MSG_MAX_USERNAME+1];
WCHAR szComputerName[MAX_COMPUTERNAME_LENGTH+1];
WCHAR szApplicationName[MSG_MAX_APPLNAME+1];
WCHAR szInstance[MSG_MAX_INSTANCE+1];
}
MSG_COMMENT_INSTANCE_STRUCT_PLUS;

Members

stTime
Date/time

dwMsgNrLow
dwMsgNrLow Number of the first alarm

dwMsgNrHigh
dwMsgHigh Number of the last alarm

szText
Comment

szUser
User name

WinCC Professional V13 SP2 – Programming reference


1024 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

szComputerName
Computer name

szApplicationName
Application name

szInstance
Instance name

Comment
If a current time is needed for the passing of a SYSTEMTIME parameter, the GetLocalTime
function must be used and not GetSystemTime. There is generally a considerable time
difference between these two functions.

Required files
CCMSRTCLIPlus.h

API functions

MSRTGetCommentInstancePlus (Page 1085) Query comment text


MSRTSetCommentInstancePlus (Page 1086) Specify comment text

See also
MSRTSetCommentInstancePlus (Page 1086)
MSRTGetCommentInstancePlus (Page 1085)
Overview of structures (Page 990)

2.10.2.10 MSG_INFOTEXT_STRUCT_PLUS (RT Professional)

Declaration

typedef struct {
DWORD dwMsgNrLow;
DWORD dwMsgNrHigh;
WCHAR szText[MSG_MAX_TB_CONTENT+1];
}
MSG_INFOTEXT_STRUCT_PLUS;

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1025
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Members

dwMsgNrLow
dwMsgNrLow Number of the first alarm

dwMsgNrHigh
dwMsgHigh Number of the last alarm

szText
Info text

Required files
CCMSRTCLIPlus.h

API functions

MSRTGetInfotextPlus (Page 1088) Query info text


MSRTSetInfotextPlus (Page 1090) Specify info text

See also
MSRTGetInfotextPlus (Page 1088)
MSRTSetInfotextPlus (Page 1090)
Overview of structures (Page 990)

2.10.2.11 MSG_BACKUP_STRUCT_PLUS (RT Professional)

Declaration

typedef struct {
SYSTEMTIME stFrom;
SYSTEMTIME stTo;
WCHAR szArchivFile[MAX_PATH+1];
WCHAR szArchivTextFile[MAX_PATH+1];
WCHAR szCommentFile[MAX_PATH+1];
WCHAR szInstanceFile[MAX_PATH+1];
WCHAR szComment[MAX_PATH+1];
DWORD dwFlags;
DWORD dwFormat;
}
MSG_BACKUP_STRUCTPlus;

WinCC Professional V13 SP2 – Programming reference


1026 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Members

stFrom
Date from

stTo
Date to

szArchivFile
File name and path of the export file for log

szArchivTextFile
File name and path of the export file for log texts

szCommentFile
File name and path of the export file for comments

szInstanceFile
File name and path of the export file for instances

szComment
User-defined comments

dwFlags

MSG_DB_FLAGS_OVERWRITE 0x0001 Overwrite existing data records


MSG_DB_FLAGS_ADD 0x0002 Add only
MSG_DB_FLAGS_DELETE 0x0004 Delete source data records

dwFormat
You can use the following constants from the "m_global.h" file for formatting the export file:

MSG_DB_FMT_CSV CSV file format


MSG_DB_FMT_DBASE3 DBASE3 file format
MSG_DB_FMT_WATCOM Sybase format

Comment
If a current time is needed for the passing of a SYSTEMTIME parameter, the GetLocalTime
function must be used and not GetSystemTime. There is generally a considerable time
difference between these two functions.

Required files
CCMSRTCLIPlus.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1027
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

API functions

MSRTEnumBackupListPlus (Page 1091) List entries of an export file


MSRTGetBackupSize Determine size of export file
MSRTRestore Import alarms

See also
MSRTEnumBackupListPlus (Page 1091)
MSRTExportPlus (Page 1093)
Overview of structures (Page 990)

2.10.2.12 MSG_RTLOCK_STRUCT_PLUS (RT Professional)

Declaration

typedef struct {
WCHAR szName[MSG_MAX_TEXTLEN+1];
WCHAR szParent[MSG_MAX_TEXTLEN+1];
DWORD dwLockID;
BOOL fLock;
DWORD dwMsgNum;
DWORD dwMsgLock[MSG_MAX_LOCKITEMS];
}
MSG_RTLOCK_STRUCT_PLUS;

Members

szName
Lock name

szParent
Parent group

dwLockID
Lock ID

fLock
Lock and release

dwMsgNum
Number of locked alarms

dwMsgLock
Locked single alarms

WinCC Professional V13 SP2 – Programming reference


1028 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Required files
CCMSRTCLIPlus.h

API functions

MSG_SERVICE_NOTIFY_PROCPlus Callback function


(Page 1039)

See also
MSG_SERVICE_NOTIFY_PROCPlus (Page 1039)
Overview of structures (Page 990)

2.10.2.13 MSG_TEXTVAL256_STRUCT_PLUS (RT Professional)

Declaration

typedef struct {
WCHAR szText[MSG_MAX_TEXTVAL256+1];
}
MSG_TEXTVAL256_STRUCT_PLUS;

Comment
The structure is used within the following structures:

Members

szText
Text

Required files
CCMSRTCLIPlus.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1029
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

API functions

MSRTCreateMsgInstanceWithCommentPlus Create alarm


(Page 1048)
MSRTGetLastMsgWithCommentPlus Query last pending alarm
(Page 1059)
MSG_SERVICE_NOTIFY_PROCPlus Send and receive service (callback)
(Page 1039)

See also
MSG_RTDATA_INSTANCE_STRUCT_PLUS (Page 1014)
MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS (Page 1006)
MSG_RTCREATE_STRUCT_PLUS (Page 1004)
Overview of structures (Page 990)

2.10.3 General functions (RT Professional)

2.10.3.1 MSRTEnumArchivDataPlus (RT Professional)

Description
Enumerates all alarms in the specified log. Its callback function
MSG_SERVICE_NOTIFY_PROCPlus is called using the MSG_NOTIFY_ARCHIVENUM
notification type. lpbyData refers to data of the MSG_RTARCHIV_STRUCTPlus structure.
Enumeration functions work asynchronously. As a result, you must synchronize the calls using
semaphores.

Declaration

BOOL MSRTEnumArchivDataPlus(
DWORD dwServiceID,
BOOL fArchiv,
DWORD dwMaxRecords
DWORD dwParams
LPDWORD lpdwTAID
LPCMN_ERROR lpError );

Parameters

dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.

WinCC Professional V13 SP2 – Programming reference


1030 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

fArchiv
Designates the log type.

TRUE Sequential log

FALSE Circular log

dwMaxRecords
Maximum number of the data records to be listed. If the dwMaxRecords is exceeded numbering
will stop. If dwMaxRecords = 0xFFFFFFFF, all alarms will be listed.

dwParams
Parameters for the sort order:

MSG_ARCHIV_ENUM_DESC Sort in descending order

lpdwTAID
Pointer to TransactionID for asynchronous processing.

lpError
Pointer to the data of the extended error message in the CMN_ERRORW structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Alarms listed.

FALSE
Error

Error messages

MSG_ERR_API_PARAM Parameter invalid

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1031
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Related functions

MSG_SERVICE_NOTIFY_PROCPlus Callback function


(Page 1039)
MSRTStartMsgServicePlus (Page 1033) Start service

See also
MSG_SERVICE_NOTIFY_PROCPlus (Page 1039)
MSRTStartMsgServicePlus (Page 1033)
Overview of the functions (Page 989)

2.10.3.2 MSRTStartMsgServicePlus (RT Professional)

Description
Starts a service for sending and receiving of notifications in the alarm system.

Declaration

BOOL MSRTStartMsgService (
LPDWORD lpdwServiceID,
LPWSTR lpszServer,
DWORD dwFlags,
DWORD dwFilterCount
LPMSG_FILTER_STRUCT_PLUS* lpMsgFilter,
DWORD dwNotifyMask,
MSG_SERVICE_NOTIFY_PROC_PLUS lpfnNotifyProcPlus
LPVOID lpvUserNotify,
MSG_TAID_COMPLETION_PROC_PLUS lpfnTAIDProcPlus
LPVOID lpvUserTAID
LPCMN_ERRORW lpError );

Parameters

dwServiceID
Contains the identification number of the send and receive service for a function, once it has
been successfully called; this service is required by many functions.

lpszServer
Server prefix

dwFlags
The parameter is reserved for future development and must be preassigned with 0.

WinCC Professional V13 SP2 – Programming reference


1032 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

dwFilterCount
Pointer to the filter conditions (NULL = All alarms)

lpMsgFilter
Pointer to the data of the alarm filter in the MSG_FILTER_STRUCT_PLUS (Page 1010)
structure.

dwNotifyMask
Designates the kind of notification, in accordance with the definition of constants in the
"msrtapi.h" file:

MSG_NOTIFY_MASK_MSGLIST Notification regarding alarm


MSG_NOTIFY_MASK_LOCK Notification regarding locks
MSG_NOTIFY_MASK_ARCHIV Notification regarding logged alarms
MSG_NOTIFY_MASK_ALL All kinds of notifications

lpfnNotifyProcPlus
Pointer to MSG_SERVICE_NOTIFY_PROCPlus type callback function for passing the
notification by the service.
With lpfnNotifyProcPlus = NULL the service will not return any notifications.

Note
If a program declares a Notify routine, it must empty its message queue regularly. Unremoved
messages can block WinCC notifications and thus the entire WinCC.
In rare cases, the Notify may already be delivered before the function call has returned.

lpvUserNotify
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

lpfnTAIDProcPlus
Callback function for asynchronous processing of feedback.

lpvUserTAID
Pointer to application-specific data. This pointer is not evaluated by the function but provided
again in the callback function.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Service started.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1033
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

FALSE
Error

Comment
Your application can install a maximum of 16 services. In total up to 128 services can be
installed.

Error messages

MSG_ERR_RT_NOTCONNECTED Connection to the alarm system not made


MSG_ERR_RT_NOINIT Alarm system not initialized
MSG_ERR_RT_SERVICEMAX Maximum number of services reached
MSG_ERR_NOSERVER No default server specified and no local server
available

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSRTStopMsgServicePlus (Page 1036) Stop services


MSG_SERVICE_NOTIFY_PROCPlus Callback function
(Page 1039)

See also
MSRTCreateMsgInstanceWithCommentPlus (Page 1048)
MSRTCreateMsgInstancePlus (Page 1049)
MSRTExportPlus (Page 1093)
MSRTEnumBackupListPlus (Page 1091)
MSRTGetInfotextPlus (Page 1088)
MSRTSetInfotextPlus (Page 1090)
MSRTGetClassInfoPlus (Page 1057)
MSRTSetMsgFilterPlus (Page 1080)
MSG_FILTER_STRUCT_PLUS (Page 1010)
MSRTGetMsgCSDataPlus (Page 1061)
MSRTCheckWinFilterPlus (Page 1079)

WinCC Professional V13 SP2 – Programming reference


1034 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

MSRTGetMsgPriorityPlus (Page 1063)


MSRTGetMsgQuitPlus (Page 1065)
MSRTGetMsgTextPlus (Page 1066)
MSRTGetSelectedMsgPlus (Page 1068)
MSRTResetMsgPlus (Page 1070)
MSRTLoopInAlarmPlus (Page 1071)
MSRTGetFilterDataPlus (Page 1077)
MSRTEnumArchivDataPlus (Page 1030)
MSRTStopMsgServicePlus (Page 1036)
MSRTSetCommentInstancePlus (Page 1086)
MSG_SERVICE_NOTIFY_PROCPlus (Page 1039)
MSRTQuitHornPlus (Page 1038)
MSRTGetCommentInstancePlus (Page 1085)
MSRTEnumGroupMsgPlus (Page 1073)
MSRTLockGroupPlus (Page 1074)
MSRTGetMsgActualPlus (Page 1060)
Overview of the functions (Page 989)

2.10.3.3 MSRTStopMsgServicePlus (RT Professional)

Description
Stops the service for sending and receiving messages

Declaration

BOOL MSRTStopMsgServicePlus (
DWORD dwServiceID,
LPCMN_ERRORW lpError );

Parameters

dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.

LPCMN_ERRORW
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1035
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Return value

TRUE
Service ended.

FALSE
Error

Comment

Note
The call should not be used in an application destructor (EXE, DLL, OCX, etc.), because a
Microsoft-specific mechanism can sometimes lead to a call hang and therefore a program hang
too.

Error messages

MSG_ERR_RT_NOTCONNECTED Connection to the alarm system not made


MSG_ERR_RT_NOINIT Alarm system not initialized

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSRTEnumBackupListPlus (Page 1091)
MSRTStartMsgServicePlus (Page 1032)
Overview of the functions (Page 989)

WinCC Professional V13 SP2 – Programming reference


1036 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

2.10.3.4 MSRTQuitHornPlus (RT Professional)

Description
Class-specific central horn acknowledgement.

Declaration

BOOL MSRTQuitHornPlus(
DWORD dwServiceID,
LPDWORD lpdwTAID,
LPCMN_ERRORW lpError );

Parameters

dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.

lpdwTAID
Pointer to the TransactionID for asynchronous processing.

LPCMN_ERRORW
Pointer to the data of the extended error message in the CMN_ERRORW structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Alarm acknowledged.

FALSE
Error

Error messages

MSG_ERR_API_PARAM Parameter invalid

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1037
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

CCMSRTCLIPlus.dll

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSRTStartMsgServicePlus (Page 1032)
Overview of the functions (Page 989)

2.10.3.5 MSG_SERVICE_NOTIFY_PROCPlus (RT Professional)

Description
Your callback function for enumeration functions. The enumeration functions work
asynchronously. As a result, you must synchronize the calls using semaphores.

Declaration

BOOL ( * MSG_SERVICE_NOTIFY_PROC) (
DWORD dwNotify,
LPBYTE lpbyData,
DWORD dwItems,
LPVOID lpvUserNotify);

Parameters

dwNotify
The notification type is specified by the constants in the "MSRTAPI.h" file:

General notifications lpbyData points to structure


MSG_NOTIFY_CONNECT Connection setup -
MSG_NOTIFY_DISCONNECT Connection terminated -
MSG_NOTIFY_RESTART New alarm system runtime data -
MSG_NOTIFY_SHUTDOWN The alarm system will be stopped -
MSG_NOTIFY_MSGENUM Enumeration of the alarm list MSG_RTDATA_INSTANCE_STRUCTPlus
MSG_NOTIFY_ARCHIVENUM Enumeration of log alarm(s) MSG_RTDATA_STRUCTPlus (in Blocks)
MSG_NOTIFY_ARCHIVENUMINST Enumeration of log alarm(s) with in‐ MSG_RTDATA_INSTANCE_STRUCTPlus
stances (in Blocks)
MSG_NOTIFY_LOCKENUM Enumeration of locks MSG_LOCK_STRUCTPlus (in Blocks)
MSG_NOTIFY_WINENUM Alarm windows enumeration MSG_WIN_STRUCTPlus (in Blocks)
MSG_NOTIFY_BACKUPENUM Enumeration of export list MSG_BACKUP_STRUCTPlus (in Blocks)

WinCC Professional V13 SP2 – Programming reference


1038 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

General notifications lpbyData points to structure


MSG_NOTIFY_ARCDAYENUM Enumeration of day list MSG_ARCHIVDAY_STRUCTPlus
MSG_NOTIFY_ENUMMAX Enumeration was stopped at maxi‐ -
mum amount
MSG_NOTIFY_LANGUAGESET Language switched -

Single alarms lpbyData points to structure


MSG_NOTIFY_MSGADD New alarm added MSG_RTDATA_INSTANCE_STRUCTPlus
(individual)
MSG_NOTIFY_MSGDELETE Alarm deleted MSG_RTDATA_INSTANCE_STRUCTPlus
(individual)
MSG_NOTIFY_MSGMODIFY Alarm changed MSG_RTDATA_INSTANCE_STRUCTPlus
(individual)
MSG_NOTIFY_MSGCOUNT Current number of alarms -

Alarm groups lpbyData points to structure


MSG_NOTIFY_GROUPENUM Enumeration of single alarms in an MSG_RTGROUPENUM_STRUCTPlus (in
alarm group Blocks)

Locks of alarms lpbyData points to structure


MSG_NOTIFY_LOCKMODIFY Locks set, changed, deleted MSG_RTGROUPENUM_STRUCTPlus

Log alarms lpbyData points to structure


MSG_NOTIFY_ARCHIVADD Log alarm(s) added MSG_RTDATA_INSTANCE_STRUCTPlus
(individual)
MSG_NOTIFY_ARCHIVDELETE Log alarm(s) deleted MSG_RTDATA_INSTANCE_STRUCTPlus
(individual)

lpbyData
lpbyData contains a pointer to data depending on the notification type.

General notifications No data


Single alarms Runtime data, stored in structures of type
● MSG_RTDATA_INSTANCE_STRUCT_PLUS (Page 1014)
Alarm groups Single alarm data in structures of type
● MSG_RTGROUPENUM_STRUCT_PLUS (Page 1022)
Locks Lock data in structures of type
● MSG_RTLOCK_STRUCT_PLUS (Page 1028)
Log alarms Log data in structures of type
● MSG_RTDATA_INSTANCE_STRUCT_PLUS (Page 1014)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1039
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

dwItems
Contains the number of objects returned in lpbyData. If dwItems = 0, then lpbyData = NULL.
Notify will be ended and the semaphore will be released.

lpvUserNotify
Pointer to application-specific data. This pointer is made available again in the callback
function.

Return value

TRUE
Notification was recognized and processed.

FALSE
Error

Comment

Note
Only data should be copied here if possible. The following types of function calls within the
callback can lead to deadlocks or a stack overflow:
● Functions in which a message loop is accessed, for example: GetMessage
● API functions from the same DLL
● Enumerations that call other enumerations
If a program declares a Notify routine, it must empty its message queue regularly. Unremoved
messages can block WinCC notifications and thus the entire WinCC.
In rare cases, the Notify may already be delivered before the function call has returned.

If a callback function is programmed as a project function in script, then the asynchronous call
also has the result that the function is not fully available in the script context, and in particular
the GetTag...- and SetTag-calls will not work. Where appropriate, processing must be
performed in other actions, that are only triggered by the callback.

Required files
CCMSRTCLIPlus.h

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service

WinCC Professional V13 SP2 – Programming reference


1040 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

See also
MSG_RTDATA_INSTANCE_STRUCT_PLUS (Page 1014)
MSG_RTGROUPENUM_STRUCT_PLUS (Page 1022)
MSG_RTLOCK_STRUCT_PLUS (Page 1028)
MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS (Page 1006)
MSRTStartMsgServicePlus (Page 1032)
MSG_TEXTVAL256_STRUCT_PLUS (Page 1029)
MSRTEnumGroupMsgPlus (Page 1073)
Overview of the functions (Page 989)

2.10.3.6 MSRTWebClientPlus (RT Professional)

Description
Initializes the DLL for a WebClient

Declaration

VOID WINAPI MSRTWebClientPlus(


LPCWSTR pszProjectPath,
DWORD dwDataLocale);

Parameters

pszProjectPath
Path to the Web Project

dwDataLocale

Return value

2.10.4 Functions for protocol processing (RT Professional)

2.10.4.1 MSRTActivateMProtPlus (RT Professional)

Description
Pause or continue report service for output of an alarm sequence report.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1041
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Declaration

BOOL MSRTActivateMProtPlus(
BOOL fActive,
LPCMN_ERROR lpError );

Parameters

fActive
Establishes how the report service should be handled:

TRUE Continue report service


FALSE Pause report service

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Function successfully completed.

FALSE
Error

Error messages

MSG_ERR_PROT_ACTIVE Report service already active

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

2.10.4.2 MSRTEnumProtDataPlus (RT Professional)

Description
Enumeration of report data. The individual report data is separated by commas. The function
is no longer supported.

WinCC Professional V13 SP2 – Programming reference


1042 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Enumeration functions work asynchronously. As a result, you must synchronize the calls using
semaphores.

Declaration

BOOL MSRTEnumProtDataPlus (
DWORD dwProtID,
MSG_PROT_NOTIFY_PROC lpfnEnum,
LPMSG_FILTER_STRUCT lpMsgFilter,
LPVOID lpvUser,
LPCMN_ERROR lpError );

Parameters

dwProtService
Service ID for report data exchange.

lpfnEnum
Your callback function that accepts report data.

lpMsgFilter
Pointer to the data in the alarm filter in the MSG_FILTER_STRUCT_PLUS (Page 1010)
structure.

lpvUser
Pointer to application-specific data. This pointer is not evaluated by the function but is made
available again in the callback function.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Report data listed.

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1043
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Comment

WARNING
Your application can use this function to acknowledge alarms, without ensuring that the
equipment operator has been made aware of the alarms. This circumstance can result in
danger to life and limb or property!

Error messages

MSG_ERR_PROT_ID Invalid report identifier

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSG_PROT_NOTIFY_PROC Callback function

See also
MSG_FILTER_STRUCT_PLUS (Page 1010)

2.10.4.3 MSRTPrintMProtPlus (RT Professional)

Description
Prints currently pending alarms of the alarm sequence report, even when a page is not yet full.

Declaration

BOOL MSRTPrintMProtPlus(
DWORD* pdwLines,
LPCMN_ERRORW lpError );

WinCC Professional V13 SP2 – Programming reference


1044 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Parameters

pdwLines
Pointer to the row number Here the number of rows printed is returned. Thus the parameter
should be preassigned with NULL before the call.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Current pending alarms printed.

FALSE
Error

Error messages

MSG_ERR_NOPROT Alarm sequence report inactive

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

2.10.5 Functions for alarm processing (RT Professional)

2.10.5.1 MSRTEnumArchivInstancePlus (RT Professional)

Description
Enumerates all alarms in the specified log with instance name. The
MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS structure is returned.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1045
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Declaration

BOOL WINAPI MSRTEnumArchivInstancePlus(


DWORD dwServiceID,
BOOL fArchiv,
DWORD dwMaxRecords,
DWORD dwParams,
LPDWORD lpdwTAID,
LPCMN_ERRORW lpError );

Parameters

dwServiceID
ID of the installed service

fArchiv
Circular or sequential log

dwMaxRecords
Maximum number of records for enumeration\n. Enumeration is aborted when the maximum
number is exceeded.

dwParams
Supplementary parameter, MSG_ENUM_ARCHIV_DESC = Sort in descending order

lpdwTAID
Pointer to the TransactionID for asynchronous processing feedback

lpError
Pointer to the extended error structure

Return value

TRUE
Function successful

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


1046 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

2.10.5.2 MSRTCreateMsgInstanceWithCommentPlus (RT Professional)

Description
Generates an alarm with the specified alarm number with instance name and comment. In
contrast to most other Create calls, the text associated values may contain up to 256 characters
(255 + EndOfString). The alarm is included in the current alarm list with the specified data.

Declaration

BOOL WINAPI MSRTCreateMsgInstanceWithCommentPlus(


DWORD dwServiceID,
LPMSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS lpMsgCreatePlus,
LPDWORD lpdwTAID,
LPCMN_ERRORW lpError );

Parameter

dwServiceID
ID of the Service - service

lpMsgCreatePlus
Pointer to Createstruct to create the alarm
Use different time stamps for different messages.

lpdwTAID
Pointer to the TransactionID of asynchronous processing feedback

lpError
Pointer that includes the extended error message

Return value

TRUE
Function successful

FALSE
Error

Comment
The Create functions work asynchronously. As a result, you may have to synchronize the calls
using semaphores.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1047
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

If the call is used to acknowledge an alarm, the specified time must be the incoming alarm
time stated to the closest millisecond.

WARNING
Your application can use this function to acknowledge alarms, without ensuring that the
equipment operator has been made aware of the alarms. This circumstance can result in
danger to life and limb or property!

Error messages

MSG_ERR_API_PARAM Invalid parameter


MSG_ERR_API_SERVICE dwServiceID invalid

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSRTCreateMsgInstancePlus (Page 1049) Create instance alarm


MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS (Page 1006)
MSRTStartMsgServicePlus (Page 1032)
MSRTCreateMsgInstancePlus (Page 1049)
MSRTSetCommentInstancePlus (Page 1086)
MSG_TEXTVAL256_STRUCT_PLUS (Page 1029)

2.10.5.3 MSRTCreateMsgInstancePlus (RT Professional)

Description
Creates an alarm with the stated alarm number. The alarm is included in the current alarm list
with the specified data.

WinCC Professional V13 SP2 – Programming reference


1048 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Declaration

BOOL WINAPI MSRTCreateMsgInstancePlus (


DWORD dwServiceID,
LPMSG_RTDATA_INSTANCE_STRUCT_PLUS lpMsgCreatePlus,
LPDWORD lpdwTAID,
LPCMN_ERRORW lpError );

Parameter

dwServiceID
ID of the installed service

lpMsgCreatePlus
Pointer to Createstruct to create the alarm
Use different time stamps for different messages.

lpdwTAID
Pointer to the TransactionID for asynchronous processing feedback

lpError
Pointer to the extended error structure

Return value

TRUE
Function successful

FALSE
Error

Comment
The Create functions work asynchronously. As a result, you may have to synchronize the calls
using semaphores.
If the call is used to acknowledge an alarm, the specified time must be the incoming alarm
time stated to the closest millisecond.

WARNING
Your application can use this function to acknowledge alarms, without ensuring that the
equipment operator has been made aware of the alarms. This circumstance can result in
danger to life and limb or property!

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1049
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Error messages

MSG_ERR_API_PARAM Invalid parameter


MSG_ERR_API_SERVICE dwServiceID invalid

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSRTCreateMsgInstanceWithCommentPlus Create instance alarm with comments


(Page 1047)
MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSRTCreateMsgInstanceWithCommentPlus (Page 1047)
MSRTStartMsgServicePlus (Page 1032)
MSG_RTDATA_INSTANCE_STRUCT_PLUS (Page 1014)
MSRTSetCommentInstancePlus (Page 1086)

WinCC Professional V13 SP2 – Programming reference


1050 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

2.10.5.4 MSRTDialogMsgLockPlus (RT Professional)

Description
Dialog for locking and releasing alarms.

The following options are available:


● Locks on individual alarms
● Locks on alarm classes of alarm groups
● Locks on alarms using the alarm number
Note
Locked alarm:
Locked alarms are neither entered in the alarm lists, logged, nor reported!
Locked alarms send back their acknowledgement signal upon occurrence!
Locked alarms are automatically released when WinCC Runtime restarts. Only alarms that
are locked directly in the AS by means of data blocks will continue to be locked (locking at
source).
Locked alarm classes/alarm groups:
The locks on alarm classes and alarm groups is not affected by a restart of WinCC Runtime.

Declaration

BOOL MSRTDialogMsgLockPlus(
HWND hwndParent,
LPCMN_ERRORW lpError );

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1051
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Parameters

hwndParent
Parent window, that contains the dialog.

lpError
Pointer to the data of the extended error message in the CMN_ERRORW structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Dialog successfully closed.

FALSE
Error or the dialog was canceled.

Error messages

MSG_ERR_API_PARAM Parameter invalid

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

2.10.5.5 MSRTCreateMsgPlus (RT Professional)

Description
Creates an alarm with the stated alarm number. The alarm is included in the current alarm list
with the specified data.

Declaration

BOOL WINAPI MSRTCreateMsgPlus(


DWORD dwServiceID,
LPMSG_RTCREATE_STRUCT_PLUS lpMsgCreatePlus,
LPDWORD lpdwTAID,
LPCMN_ERRORW lpError );

WinCC Professional V13 SP2 – Programming reference


1052 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Parameter

dwServiceID
ID of the installed service

lpMsgCreatePlus
Pointer to Createstruct to create the alarm
Use different time stamps for different messages.

IpdwTAID
Pointer to the TransactionID for asynchronous processing

lpError
Pointer to the extended error structure

Return value

TRUE
Function successful

FALSE
Error

Comment
The Create functions work asynchronously. As a result, you may have to synchronize the calls
using semaphores.

WARNING
Your application can use this function to acknowledge alarms, without ensuring that the
equipment operator has been made aware of the alarms. This circumstance can result in
danger to life and limb or property!

Error messages

MSG_ERR_API_PARAM Invalid parameter


MSG_ERR_API_SERVICE dwServiceID invalid

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1053
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

CCMSRTCLIPlus.dll

Related functions

MSRTCreateMsgInstanceWithCommentPlus Create instance alarm


(Page 1047)
MSRTCreateMsgInstancePlus (Page 1048) Create instance alarm with comments
MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSRTCreateMsgInstanceWithCommentPlus (Page 1047)
MSRTCreateMsgInstancePlus (Page 1048)
MSRTStartMsgServicePlus (Page 1032)

2.10.5.6 MSRTEnumLockedMsgPlus (RT Professional)

Description
Enumerates all the locked alarms.
Enumeration functions work asynchronously. As a result, you must synchronize the calls using
semaphores.

Declaration

BOOL WINAPI MSRTEnumLockedMsgPlus(


DWORD dwServiceID,
LPDWORD lpdwTAID,
LPCMN_ERRORW lpError);

Parameters

dwServiceID
ID of the installed service

lpdwTAID
Pointer to the TransactionID for asynchronous processing

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure.

WinCC Professional V13 SP2 – Programming reference


1054 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Return value

TRUE
Alarms enumerated

FALSE
Error.

2.10.5.7 MSRTEnumMsgRTDataPlus (RT Professional)

Description
Enumerates all alarms that are present in the current alarm list. Its callback function
MSG_SERVICE_NOTIFY_PROCPlus callback function is called with notification type
MSG_NOTIFY_MSGENUM, enumeration of alarms. lpbyData refers to data of the
MSG_RTDATA_STRUCTPlus structure.
Enumeration functions work asynchronously. As a result, you must synchronize the calls using
semaphores.

Declaration

BOOL MSRTEnumMsgRTData(
DWORD dwServiceID,
LPDWORD pdwTAID
LPCMN_ERRORW lpError );

Parameters

dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.

lpdwTAID
Pointer to the TransactionID for asynchronous processing.

LPCMN_ERRORW
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Alarms enumerated

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1055
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

FALSE
Error.

Error messages

MSG_ERR_API_PARAM Parameter invalid


MSG_ERR_API_SERVICE dwServiceID invalid

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSRTStartMsgServicePlus (Page 1032)

2.10.5.8 MSRTGetClassInfoPlus (RT Professional)

Description
Get information about an alarm class.

Declaration

BOOL WINAPI MSRTGetClassInfoPlus(


DWORD dwServiceID,
LPCWSTR lpszServer,
DWORD dwMsgNrLow,
DWORD dwMsgNrHigh,
LPMSG_CLASS_STRUCT_PLUS lpClassPlus,
LPCMN_ERRORW lpError );

Parameters

dwServiceID
ID of the Service - service whose server is to be connected

WinCC Professional V13 SP2 – Programming reference


1056 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

lpszServer
Server to which connecting is to be carried out

dwMsgNrLow
Alarm number of the lower DWORD

dwMsgNrHigh
Alarm number of the upper DWORD WinCC

lpClassPlus
Pointer that includes the information

lpError
Pointer that includes the extended error message

Return value

TRUE
Function successful

FALSE
Error

Comment
The MSRTGetClassInfoPlus function can also be called up without
MSRTStartMsgServicePlus. These calls are however significantly slower. You can improve
performance by performing a MSRTStartMsgServicePlus beforehand and retaining it for all
calls. In this case only the first call of MSRTGetClassInfoPlus is slowed.

Error messages

MSG_ERR_RT_NOINIT Alarm Logging RT is not initialized


MSG_ERR_API_PARAM Invalid parameter
MSG_ERR_MSG_NOEXIST Alarm does not exist

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1057
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSG_CLASS_STRUCT_PLUS (Page 1017)
MSRTStartMsgServicePlus (Page 1032)

2.10.5.9 MSRTGetLastMsgWithCommentPlus (RT Professional)

Description
Retrieves the last alarm from a log based on filter conditions and an instance name.

Declaration

BOOL WINAPI MSRTGetLastMsgWithCommentPlus(


LPCWSTR lpszServer,
LPCWSTR lpszInstance,
LPMSG_FILTER_STRUCT_PLUS* lppFilter,
DWORD dwFilterCount,
LPMSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS lpMsg,
LPCMN_ERRORW lpError );

Parameters

lpszServer
Server prefix without '::'. If an empty string or NULL is input the default server set will be used.

lpszInstance
Instance name. An empty string or also NULL will be added for the filter condition.

lppFilter
Pointer to the ARRAY filter pointer for selecting the type of alarm.

dwFilterCount
Number of filtered alarms.

lpMsg
Returns the message data.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure.

WinCC Professional V13 SP2 – Programming reference


1058 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Return value

TRUE
Alarm queried.

FALSE
Error.

Error messages

MSG_ERR_API_PARAM Invalid parameter


MSG_ERR_RT_NOTCONNECTED Connection not made

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

See also
MSG_FILTER_STRUCT_PLUS (Page 1010)
MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS (Page 1006)
MSG_TEXTVAL256_STRUCT_PLUS (Page 1029)

2.10.5.10 MSRTGetMsgActualPlus (RT Professional)

Description
The function states the number of currently pending alarms in the alarm list.

Declaration

BOOL MSRTGetMsgActualPlus (
LPDWORD lpdwCount,
LPCMN_ERRORW lpError );

Parameters

lpdwCount
Pointer to a buffer in which the number of currently pending alarms is stored.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1059
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Number stated.

FALSE
Error

Comment
The MSRTGetMsgActualPlus function can also be called up without
MSRTStartMsgServicePlus. These calls are however significantly slower. You can improve
performance by performing a MSRTStartMsgServicePlus beforehand and retaining it for all
calls. In this case only the first call of MSRTGetMsgActualPlus is slowed.

Error messages

MSG_ERR_RT_NOINIT Alarm system not initialized

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSRTStartMsgServicePlus (Page 1032)

2.10.5.11 MSRTGetMsgCSDataPlus (RT Professional)

Description
Query the configured data for an alarm.

WinCC Professional V13 SP2 – Programming reference


1060 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Declaration

BOOL MSRTGetMsgCSDataPlus (
DWORD dwServiceNr,
LPCWSTR lpszServer,
DWORD dwMsgNrLow,
DWORD dwMsgNrHigh,
LPMSG_CSDATA_STRUCT_PLUS lpmCSDataPlus,
LPCMN_ERRORW lpError );

Parameters

dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgService is called.

lpszServer
Server name.

dwMsgNrLow
dwMsgNrLow Number of the first alarm

dwMsgNrHigh
dwMsgHigh Number of the last alarm

lpmCSDataPlus
Pointer to the configuration data (alarm class, type of alarm, text block index, etc.) for this alarm
in the MSG_CSDATA_STRUCT_PLUS (Page 1019) structure.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Configuration data queried.

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1061
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Comment
The MSRTGetMsgCSDataPlus function can also be called up without
MSRTStartMsgServicePLus. These calls are however significantly slower. You can improve
performance by performing a MSRTStartMsgServicePlus beforehand and retaining it for all
calls. In this case only the first call of MSRTGetMsgCSDataPlus is slowed.

Error messages

MSG_ERR_RT_NOINIT Alarm system not initialized


MSG_ERR_API_PARAM Parameter invalid
MSG_ERR_MSG_NOEXIST Alarm does not exist

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSG_CSDATA_STRUCT_PLUS (Page 1019)
MSRTStartMsgServicePlus (Page 1032)

2.10.5.12 MSRTGetMsgPriorityPlus (RT Professional)

Description
Query the priority of the given alarm.

Declaration

BOOL MSRTGetMsgPriorityPlus (
DWORD dwServiceID,
LPCWSTR lpszServer,
DWORD dwMsgNrLow,
DWORD dwMsgNrHigh,
long* plPriority,
LPCMN_ERRORW lpError );

WinCC Professional V13 SP2 – Programming reference


1062 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Parameters

dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgService is called.

lpszServer
Server name.

dwMsgNrLow
dwMsgNrLow Number of the first alarm

dwMsgNrHigh
dwMsgHigh Number of the last alarm

plPriority
Pointer to a tag of the long data type, in which the priority is stored.
This parameter must not be NULL!

lpError
Pointer to the data of the extended error message in the CMN_ERRORW structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Priority queried.

FALSE
Error

Comment
The MSRTGetMsgPriorityPlus function can also be called up without
MSRTStartMsgServicePlus. These calls are however significantly slower. You can improve
performance by performing a MSRTStartMsgServicePlus beforehand and retaining it for all
calls. In this case only the first call of MSRTGetMsgPriorityPlus is slowed.

Error messages

MSG_ERR_RT_NOINIT Alarm system not initialized


MSG_ERR_API_PARAM Parameter invalid
MSG_ERR_MSG_NOEXIST Alarm does not exist

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1063
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSRTStartMsgServicePlus (Page 1032)

2.10.5.13 MSRTGetMsgQuitPlus (RT Professional)

Description
Query the number of alarms that require acknowledgement.

Declaration

BOOL MSRTGetMsgQuitPlus(
LPDWORD lpdwCount,
LPCMN_ERRORW lpError );

Parameters

lpdwCount
Pointer for the number of alarms that require acknowledgement

lpError
Pointer to the data of the extended error message in the CMN_ERRORW structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Number stated.

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


1064 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Comment
The MSRTGetMsgPriorityPlus function can also be called up without
MSRTStartMsgServicePlus. These calls are however significantly slower. You can improve
performance by performing a MSRTStartMsgServicePlus beforehand and retaining it for all
calls. In this case only the first call of MSRTGetMsgPriorityPlus is slowed.

Error messages

MSG_ERR_RT_NOINIT Alarm system not initialized

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSRTStartMsgServicePlus (Page 1032)

2.10.5.14 MSRTGetMsgTextPlus (RT Professional)

Description
Get the text for a text block

Declaration

BOOL WINAPI MSRTGetMsgTextPlus(


WORD wTextBlock,
DWORD dwTextNr,
LPWSTR lpszMsgText,
DWORD* lpdwCount,
LPCMN_ERRORW lpError );

Parameters

wTextBlock
Text block number

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1065
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

dwTextNr
Text block ID

lpszMsgText
Pointer to the text block string

IpdwCount
Pointer to the length of the text block string. The length is specified as the number of characters.

lpdwCount=0 Text size is queried.


lpdwCount>0 Text is limited, and current number of charac‐
AND buffer size of lpszMsgText > lpdwCount ters is returned.
lpdwCount>0 Text is limited and returned.
AND buffer size of lpszMsgText > lpdwCount
AND buffer initialized

lpError
Pointer that includes the extended error message

Return value

TRUE
Function successful

FALSE
Error

Comment
The MSRTGetMsgPriorityPlus function can also be called up without
MSRTStartMsgServicePlus. These calls are however significantly slower. You can improve
performance by performing a MSRTStartMsgServicePlus beforehand and retaining it for all
calls. In this case only the first call of MSRTGetMsgPriorityPlus is slowed.

Error messages

MSG_ERR_RT_NOINIT Alarm system not initialized

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

WinCC Professional V13 SP2 – Programming reference


1066 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSRTStartMsgServicePlus (Page 1032)

2.10.5.15 MSRTGetSelectedMsgPlus (RT Professional)

Description
The function determines the alarm number for an alarm selected in an alarm window or an
alarm view. The view is specified using lpszTemplate.
In individual or multiple user projects queries work on the template without restriction. Queries
in the display do not work for engineering data and only on the display of existing process
values.

Declaration

BOOL MSRTGetSelectedMsgPlus(
LPCWSTR lpszTemplate,
LPMSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS lpMsgRTPlus,
LPCMN_ERROR lpError );

Parameters

lpszTemplate
Pointer to the name of the view in which an alarm is selected.

lpMsgRTPlus
Pointer to a structure of the MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS
(Page 1006) type, in which the alarm number is returned.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Data queried.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1067
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

FALSE
Error

Comment
The MSRTGetMsgPriorityPlus function can also be called up without
MSRTStartMsgServicePlus. These calls are however significantly slower. You can improve
performance by performing a MSRTStartMsgServicePlus beforehand and retaining it for all
calls. In this case only the first call of MSRTGetMsgPriorityPlus is slowed.

Note
According to which view is set in the display, the flags in dwFlags of the
MSG_RTDATA_INSTANCECOMMENT_STRUCTPlus structure will be assigned differently:
● for the online view: MSG_RT_FLAG_xxx flags,
● for the log view: MSG_FLAG_ flags, and
● for the hit list: no assignment is possible and flags will be ignored.

Error messages

MSG_ERR_API_PARAM Parameter invalid

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service

Examples
Get selected Msg"MS02.cpp"

See also
MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS (Page 1006)
MSRTStartMsgServicePlus (Page 1032)

WinCC Professional V13 SP2 – Programming reference


1068 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

2.10.5.16 MSRTResetMsgPlus (RT Professional)

Description
The stated alarm will be acknowledged.

Declaration

BOOL MSRTResetMsgPlus(
DWORD dwServiceID,
DWORD dwMsgNrLow,
DWORD dwMsgNrHigh,
LPDWORD lpdwTAID
LPCMN_ERRORW lpError );

Parameters

dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgService is called.

dwMsgNrLow
dwMsgNrLow Number of the first alarm

dwMsgNrHigh
dwMsgHigh Number of the last alarm
You must assign dwMsgNrLow and dwMsgNrHigh, if you use the MSG_FILTER_NR,
MSG_FILTER_NR_FROM, or MSG_FILTER_NR_TO filter criteria.

lpdwTAID
Pointer to the TransactionID for asynchronous processing.

lpError
Pointer to the data of the extended error message in the CMN_ERRORW structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Alarm acknowledged.

FALSE
Error

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1069
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Comment

WARNING
Your application can use this function to acknowledge alarms, without ensuring that the
equipment operator has been made aware of the alarms. This circumstance can result in
danger to life and limb or property!

Error messages

MSG_ERR_RT_NOINIT Alarm system not initialized


MSG_ERR_API_PARAM Parameter invalid
MSG_ERR_MSG_NOEXIST Alarm does not exist
MSG_ERR_MSG_NOTFOUND Alarm not found
MSG_ERR_MSG_NOQUIT Alarm does not require acknowledgment
MSG_ERR_MSG_ALREADYQUIT Alarm already acknowledged

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSRTStartMsgServicePlus (Page 1032)

2.10.5.17 MSRTLoopInAlarmPlus (RT Professional)

Description
API function for loop-in-alarm The alarm number is decisive.

WinCC Professional V13 SP2 – Programming reference


1070 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Declaration

BOOL MSRTLoopInAlarmPlus(
DWORD dwServiceID,
LPCWSTR lpszServer,
DWORD dwMsgNrLow,
DWORD dwMsgNrHigh,
LPCMN_ERRORW lpError );

Parameters

dwServiceID
ID of the Service - service whose server is to be connected

lpszServer
Server to which connecting is to be carried out

dwMsgNrLow
Alarm number of the lower DWORD

dwMsgNrHigh
Alarm number of the upper DWORD WinCC

lpError
Pointer that includes the extended error message

Return value

TRUE
Function successful

FALSE
Error

Error messages

MSG_ERR_API_PARAM Invalid parameter


MSG_ERR_MSG_NOEXIST Alarm does not exist

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1071
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSRTStartMsgServicePlus (Page 1032)

2.10.6 Functions for alarm group processing (RT Professional)

2.10.6.1 MSRTEnumGroupMsgPlus (RT Professional)

Description
Enumerate all single alarms of the alarm group. MSG_MAX_GROUPITEMS gives the
maximum number of single alarms that can be enumerated. Its callback function
MSG_SERVICE_NOTIFY_PROCPlus is called using the MSG_NOTIFY_GROUPENUM
notification type. lpbyData refers to data of the MSG_RTGROUPENUM_STRUCTPlus
structure.
Enumeration functions of the alarm system run asynchronously. As a result, you must
synchronize the calls using semaphores.

Declaration

BOOL WINAPI MSRTEnumGroupMsgPlus(


DWORD dwServiceID,
LPMSG_RTGROUPSET_STRUCT_PLUS lpmGroupPlus,
LPDWORD lpdwTAID,
LPCMN_ERRORW lpError );

Parameters

dwServiceID
ID of the Service - service

lpmGroupPlus
Pointer to the alarm group info

IpdwTAID
Pointer to the TransactionID for asynchronous processing feedback

lpError
Pointer that includes the extended error message

WinCC Professional V13 SP2 – Programming reference


1072 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Return value

TRUE
Function successful

FALSE
Error

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSG_SERVICE_NOTIFY_PROCPlus Callback function


(Page 1038)
MSRTStartMsgServicePlus (Page 1032) Start service
MSG_RTGROUPENUM_STRUCT_PLUS Single alarms of an alarm group
(Page 1022)

See also
MSG_RTGROUPSET_STRUCT_PLUS (Page 1023)
MSRTStartMsgServicePlus (Page 1032)
MSG_SERVICE_NOTIFY_PROCPlus (Page 1038)
MSG_RTGROUPENUM_STRUCT_PLUS (Page 1022)

2.10.6.2 MSRTLockGroupPlus (RT Professional)

Description
Lock a configured alarm group. All individual alarms in the alarm group and also individual
alarms in underlying groups will be locked.

Declaration

BOOL MSRTLockGroupPlus (
DWORD dwServiceID,
LPMSG_RTGROUPSET_STRUCTPlus lpmGroup,
LPDWORD pdwTAID
LPCMN_ERRORW lpError );

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1073
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Parameters

dwServiceID
Identification number of the sending and receiving service, as provided by a query using
MSRTStartMsgServicePlus.

lpmGroup
Pointer on the MSG_RTGROUPSET_STRUCT_PLUS (Page 1023) structure with information
on the alarm groups.
Lock: dwData != 0; Release: dwData = 0

pdwTAID

lpError
Pointer to the data in the error message sent out in the CMN_ERRORW structure. In the case
of an error the system writes error information in this structure.

Return value

TRUE
Alarms in the alarm group locked.

FALSE
Error

Comment
Only configured alarm groups will be locked or released. Groups defined in runtime will not be
included and the function will have no effect.

Error messages

MSG_ERR_RT_NOINIT Alarm system not initialized


MSG_ERR_API_PARAM Invalid parameter
MSG_ERR_API_SERVICE dwServiceID invalid

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

WinCC Professional V13 SP2 – Programming reference


1074 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSG_RTGROUPSET_STRUCT_PLUS (Page 1023)
MSRTStartMsgServicePlus (Page 1032)

2.10.6.3 MSRTQuitGroupPlus (RT Professional)

Description
Acknowledgment of an alarm group. All single alarms of the alarm group as well as the alarms
of subordinate groups are acknowledged.

Declaration

BOOL MSRTQuitGroupPlus (
DWORD dwServiceID,
LPMSG_RTGROUPSET_STRUCTPlus lpmGroupPlus,
LPDWORD pdwTAID
LPCMN_ERRORW lpError );

Parameters

dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.

lpmGroup
Pointer to a structure of the MSG_RTGROUPSET_STRUCT_PLUS (Page 1023) type with
information of the alarm groups.

pdwTAID

lpError
Pointer to the data of the extended error message in the CMN_ERRORW structure. When an
error occurs, the system writes error information to this structure.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1075
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Return value

TRUE
Alarms in the alarm group are acknowledged.

FALSE
Error

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

See also
MSG_RTGROUPSET_STRUCT_PLUS (Page 1023)

2.10.7 Functions for alarm filter processing (RT Professional)

2.10.7.1 MSRTGetFilterDataPlus (RT Professional)

Description
Reads the selection criteria of the alarm view and writes the result to the
MSG_FILTER_STRUCT_PLUS structure.

Declaration

BOOL WINAPI MSRTGetFilterDataPlus(


DWORD dwServiceID,
LPCWSTR lpszName,
LPMSG_FILTER_STRUCT_PLUS** lpppMsgFilter,
LPDWORD lpdwFilterCount,
LPCMN_ERRORW lpError );

Parameters

dwServiceID
ID of the Service - service

WinCC Professional V13 SP2 – Programming reference


1076 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

lpszName
Alarm view name. You assign the name in the alarm view properties.

lpMsgFilterPlus
Pointer to array filter pointer to filter structures

lpdwFilterCount

lpError
Pointer that includes the extended error message

Return value

TRUE
Function successful

FALSE
Error

Comment
Only configured alarm filters are determined. Alarm filters that are set using
MSRTStartMsgServicePlus or MSRTSetMsgFilterPlus will not be included.

Error messages

MSG_ERR_API_PARAM Invalid parameter


MSG_ERR_API_SERVICE dwServiceID invalid
MSG_ERR_API_NODATA No data

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSRTSetMsgFilterPlus (Page 1080) Set alarm filter


MSRTStartMsgServicePlus (Page 1032) Start service

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1077
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

See also
MSG_FILTER_STRUCT_PLUS (Page 1010)
MSRTStartMsgServicePlus (Page 1032)
MSRTSetMsgFilterPlus (Page 1080)

2.10.7.2 MSRTCheckWinFilterPlus (RT Professional)

Description
Tests if the stated alarm corresponds to a filter parameter.

Declaration

BOOL MSRTCheckWinFilterPlus (
DWORD dwServiceID,
LPCWSTR lpszServer,
LPMSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS lpMsgRTPlus,
LPMSG_FILTER_STRUCT_PLUS* lppMsgFilter,
DWORD dwFilterCount,
LPWORD lpwReturn,
LPCMN_ERRORW lpError );

Parameters

dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.

lpszServer
Pointer to the server name. The name will be stated without any :: server separator characters.
If an empty string or NULL is input the default server set will be used

lpMsgRTPlus
Pointer to a structure of the MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS
(Page 1006) type with the runtime data of an alarm.

lpMsgFilter
Pointer to a structure of the MSG_FILTER_STRUCT_PLUS (Page 1010) type with the alarm
filter data.

WinCC Professional V13 SP2 – Programming reference


1078 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

lpwReturn
Pointer to the function results

TRUE Alarm corresponds to the filter conditions.


FALSE Alarm does not correspond to the filter conditions.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Testing will be performed.

FALSE
Error

Error messages

MSG_ERR_API_PARAM Parameter invalid

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSG_FILTER_STRUCT_PLUS (Page 1010)
MSRTStartMsgServicePlus (Page 1032)
MSG_RTDATA_INSTANCECOMMENT_STRUCT_PLUS (Page 1006)

2.10.7.3 MSRTSetMsgFilterPlus (RT Professional)

Description
Resets the filter for the specified service.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1079
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Declaration

BOOL WINAPI MSRTSetMsgFilterPlus(


DWORD dwServiceID,
LPMSG_FILTER_STRUCT_PLUS* lppMsgFilterPlus,
DWORD dwFilterCount,
LPCMN_ERRORW lpError );

Parameters

dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.

lppMsgFilterPlus
Pointer to ARRAY pointer for filter conditions

dwFilterCount
Number of filters in the ARRAY

lpError
Pointer to the data of the extended error message in the CMN_ERRORW structure. The system
writes error information into this structure in the case of an error.

Return value

TRUE
Function successful

FALSE
Error

Error messages

MSG_ERR_API_PARAM Invalid parameter


MSG_ERR_API_SERVICE dwServiceID invalid

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

WinCC Professional V13 SP2 – Programming reference


1080 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Related functions

MSRTStartMsgServicePlus Start service


(Page 1032)
MSRTGetFilterDataPlus Read selection criteria of the alarm view
(Page 1076)

See also
MSRTStartMsgServicePlus (Page 1032)
MSG_FILTER_STRUCT_PLUS (Page 1010)
MSRTGetFilterDataPlus (Page 1076)

2.10.7.4 MSRTSetMsgWinFilterPlus (RT Professional)

Description
Defines new filter conditions for the alarm view. All current alarm views at preset with this name
will be updated.

Declaration

BOOL MSRTSetMsgWinFilterPlus (
LPMSG_FILTER_STRUCT_PLUS lppMsgFilterPlus,
DWORD dwFilterCount,
LPCMN_ERRORW lpError );

Parameters

lppMsgFilterPlus
Pointer to a structure of the MSG_FILTER_STRUCT_PLUS (Page 1010) type with the alarm
filter data. The name of the filter structure is the same as the window name.

dwFilterCount
Number of filters

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Filter was set

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1081
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

FALSE
Error

Error messages

MSG_ERR_API_PARAM Parameter invalid


MSG_ERR_API_SERVICE dwServiceID invalid

See also
MSG_FILTER_STRUCT_PLUS (Page 1010)

2.10.8 Functions for processing alarm view (RT Professional)

2.10.8.1 MSRTMsgWinCommandPlus (RT Professional)

Description
Performs a control function in an alarm view. If you use this function, you only use an alarm
window template once within a screen. The commands are also passed on to controls with the
caption name identical to the template name. (When screens with alarm templates are
converted to screens with controls, the resulting controls have a caption name identical to the
template name.)

Declaration

BOOL MSRTMsgWinCommand(
LPTSTR lpszTemplate,
DWORD dwCommandID,
LPCMN_ERROR lpError );

Parameters

lpszTemplate
Pointer to the window name

dwCommandID
The ID of the control function is specified using the constants in the "m_global.h" file:

MSG_TB_MSGWIN Open process alarm window


MSG_TB_ARC_S Open circular log
MSG_TB_ARC_L Open sequential log

WinCC Professional V13 SP2 – Programming reference


1082 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

MSG_TB_QH Initiate horn acknowledgment


MSG_TB_QM Initiate single acknowledgment
MSG_TB_QS Initiate group acknowledgment
MSG_TB_SCROLL Switch scroll function on/off.
MSG_TB_SELECT Display selection dialog
MSG_TB_LOCK Display lock dialog
MSG_TB_PROTOCOL Display report dialog
MSG_TB_RESET Initiate emergency acknowledgment
MSG_TB_MSGFIRST Move to start of list
(autoscroll must not be activated)
MSG_TB_MSGLAST Move to end of list
(autoscroll must not be activated)
MSG_TB_MSGNEXT Move to next alarm
(autoscroll must not be activated)
MSG_TB_MSGPREV Move to previous alarm
(autoscroll must not be activated)
MSG_TB_INFO Display info text dialog for currently selected alarm
MSG_TB_COMMENT Enter comment for currently selected alarm
MSG_TB_LOOPINALARM Initiate loop-in-alarm for currently selected alarm
MSG_TB_PRINT Start print

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Control function executed

FALSE
Error

Comment
All opened alarm views with the specified name execute the control function.

Error messages

MSG_ERR_API_PARAM Parameter invalid

Required files
CCMSRTCLIPlus.h

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1083
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

2.10.9 Functions for processing comments (RT Professional)

2.10.9.1 MSRTGetCommentInstancePlus (RT Professional)

Description
Gets the comment text for a logged alarm.

Declaration

BOOL MSRTGetCommentInstancePlus (
DWORD dwServiceID,
LPMSG_COMMENT_INSTANCE_STRUCT_PLUS lpmCommentPlus,
LPCMN_ERRORW lpError );

Parameter

dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.

lpmCommentPlus
Pointer to a MSG_COMMENT_INSTANCE_STRUCT_PLUS (Page 1024) type structure with
the data of a comment. The following values in the structure are necessary: Alarm number,
date and time, and instance name.

Note
Date and time must exactly match the time stamp of the message for which the comment text
is to be determined to the millisecond.

lpError
Pointer to the data of the extended error message in the CMN_ERROR W structure. The
system writes error information to this structure if an error occurs.

WinCC Professional V13 SP2 – Programming reference


1084 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Return value

TRUE
Comment text determined.
If no comment exists, the call returns TRUE, but the szText element is empty.

FALSE
Error

Error messages

MSG_ERR_API_PARAM Invalid parameter


MSG_ERR_API_SERVICE dwServiceID invalid

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSRTStartMsgServicePlus (Page 1032)
MSG_COMMENT_INSTANCE_STRUCT_PLUS (Page 1024)

2.10.9.2 MSRTSetCommentInstancePlus (RT Professional)

Description
Specifies the comment text for a logged alarm.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1085
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Declaration

Bool MSRTSetCommentInstancePlus (
DWORD dwServiceID,
LPMSG_COMMENT_INSTANCE_STRUCT_PLUS lpmCommentPlus,
LPDWORD pdwTAID,
LPCMN_ERRORW lpError );

Parameters

dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.

lpmCommentPlus
Pointer to a MSG_COMMENT_INSTANCE_STRUCT_PLUS (Page 1024) type structure with
the data of a comment. The following values in the structure are necessary: Alarm number,
instance name, date, time of day, text, and user name.

pdwTAID

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Successfully sent to server.

FALSE
Error

Comment
The data of the MSRTSetCommentPlus function are written asynchronously. As a result, not
all errors are returned to the user. Use MSRTGetCommentInstancePlus to check how data
are written.
If MSRTSetCommentInstancePlus is executed after MSRTCreateMsgPlus or
MSRTCreateMsgInstancePlus, the asynchronous writing along with the degree of utilization
of the system can cause data to be "overtaken" by other data. As a result, the comment is
specified before the alarm is created.
Instead of the call combination, use the MSRTCreateMsgInstanceWithCommentPlus function.

WinCC Professional V13 SP2 – Programming reference


1086 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Error messages

MSG_ERR_API_PARAM Parameter invalid


MSG_ERR_API_SERVICE dwServiceID invalid

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service


MSRTCreateMsgInstanceWithCommentPlus Create alarm
(Page 1047)
MSRTCreateMsgInstancePlus (Page 1048) Create alarm

See also
MSG_COMMENT_INSTANCE_STRUCT_PLUS (Page 1024)
MSRTStartMsgServicePlus (Page 1032)
MSRTCreateMsgInstanceWithCommentPlus (Page 1047)
MSRTCreateMsgInstancePlus (Page 1048)

2.10.10 Functions for info text processing (RT Professional)

2.10.10.1 MSRTGetInfotextPlus (RT Professional)

Description
Gets the info text for an alarm. The following values have to be transferred to this purpose:
Alarm number

Declaration

BOOL WINAPI MSRTGetInfotextPlus (


DWORD dwServiceID,
LPMSG_INFOTEXT_STRUCT_PLUS lpmInfotext,
LPCMN_ERRORW lpError );

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1087
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Parameter

dwServiceID
ID of the Service - service

lpmInfotext
Pointer of the info text structure

lpError
Pointer that includes the extended error message

Return value

TRUE
Function successful

FALSE
Error

Error messages

MSG_ERR_API_PARAM Invalid parameter


MSG_ERR_API_SERVICE dwServiceID invalid

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSG_INFOTEXT_STRUCT_PLUS (Page 1025)
MSRTStartMsgServicePlus (Page 1032)

WinCC Professional V13 SP2 – Programming reference


1088 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

2.10.10.2 MSRTSetInfotextPlus (RT Professional)

Description
Sets the info text for an alarm.

Declaration

BOOL WINAPI MSRTSetInfotextPlus(


DWORD dwServiceID,
LPMSG_INFOTEXT_STRUCT_PLUS lpmInfotextPlus,
DWORD* lpdwTAID,
LPCMN_ERRORW lpError );

Parameters

dwServiceID
ID of the Service - service

lpmInfotextPlus
Pointer of the info text structure

lpdwTAID
Pointer to the TransactionID with feedback for asynchronous processing.

lpError
Pointer that includes the extended error message.

Return value

TRUE
Function successful

FALSE
Error

Comment
The new info text will be effective from the next minute changeover after one. Until then the
previous info text will be used.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1089
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

Error messages

MSG_ERR_API_PARAM Invalid parameter


MSG_ERR_API_SERVICE dwServiceID invalid

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSG_INFOTEXT_STRUCT_PLUS (Page 1025)
MSRTStartMsgServicePlus (Page 1032)

2.10.11 Archiving functions (RT Professional)

2.10.11.1 MSRTEnumBackupListPlus (RT Professional)

Description
Lists the entries of the export file for the sequential archive.

Declaration

BOOL MSRTEnumBackupListPlus (
DWORD dwServiceID,
LPCMN_ERROR lpError );

Parameters

dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.

WinCC Professional V13 SP2 – Programming reference


1090 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Export list created.

FALSE
Error

Comment
The Enum functions work asynchronously. This has the result that any calls must be
synchronized by semaphore
The callback function MSG_SERVICE_NOTIFY_PROCPlus is called using the
MSG_NOTIFY_BACKUPENUM parameter. The lpbyData parameter points to the data in the
MSG_BACKUP_STRUCT_PLUS (Page 1026) structure.

Error messages

MSG_ERR_API_PARAM Parameter invalid


MSG_ERR_API_SERVICE dwServiceID invalid

Required files
CCMSRTCLIPlus.h
CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service


MSG_SERVICE_NOTIFY_PROCPlus (Page 1038) Callback function

See also
MSG_BACKUP_STRUCT_PLUS (Page 1026)
MSRTStartMsgServicePlus (Page 1032)
MSG_SERVICE_NOTIFY_PROCPlus (Page 1038)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1091
Runtime API (RT Professional)
2.10 Alarm functions (RT Professional)

2.10.11.2 MSRTExportPlus (RT Professional)

Description
Exports alarms from the circular log and the related log backup files.

Declaration

BOOL MSRTExportPlus (
DWORD dwServiceID,
LPMSG_BACKUP_STRUCT_PLUS lpMsgBackup,
LPCMN_ERRORW lpError );

Parameters

dwServiceID
Identification number of the send and receive service, as returned when
MSRTStartMsgServicePlus is called.

lpMsgBackup
Pointer to a structure of the MSG_BACKUP_STRUCT_PLUS (Page 1026) type.

lpError
Pointer to the data of the extended error message in the CMN_ERROR structure. When an
error occurs, the system writes error information to this structure.

Return value

TRUE
Alarms exported.

FALSE
Error

Error messages

MSG_ERR_API_PARAM Parameter invalid


MSG_ERR_API_SERVICE dwServiceID invalid

Required files
CCMSRTCLIPlus.h

WinCC Professional V13 SP2 – Programming reference


1092 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

CCMSRTCLIPlus.lib
CCMSRTCLIPlus.dll

Related functions

MSRTStartMsgServicePlus (Page 1032) Start service

See also
MSRTStartMsgServicePlus (Page 1032)
MSG_BACKUP_STRUCT_PLUS (Page 1026)

2.11 Functions for displaying the PLC code (RT Professional)

2.11.1 Display in STEP 7 (RT Professional)

2.11.1.1 Basics (RT Professional)

General information
You can use this function to switch from a screen in WinCC Runtime directly to the point of
use of a process tag in the program code of STEP 7. This provides the possibility of quick and
simple diagnostics of faults. To speed up the entry point functions, you can restart the TIA
Portal and open a project. This is typically done at the startup of WinCC Runtime.
A check is first made to determine whether the TIA Portal is already open at the entry point. If
this is not the case, the TIA Portal is automatically started. The corresponding editor opens in
the TIA Portal and a search is performed for the point of use, assignment, call or step.

Header files
The declaration of the functions and structures explained here takes place in the header files:

kopapi.h API interface definition header file

Libraries
The DLL link for the functions explained here is provided in the kopapi.dll "lib" files

kopapi.lib Library
kopapi.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1093
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

See also
OpenTIAPortalProject (Page 1095)
OpenTIAPortalIECPLByCall (Page 1097)
OpenTIAPortalIECPLByAssignment (Page 1099)
OpenTIAPortalS7GraphByBlock (Page 1101)
Example: Integration in a WinCC function (Page 1103)

2.11.1.2 OpenTIAPortalProject (RT Professional)

Description
You can use this function to start the TIA Portal and open a project. This will speed up the
individual jump functions. However, you should consider that a program open in the
background requires memory and computation time.

Declaration

BOOL OpenTIAPortalProject (
DWORD dwFlags,
LPCTSTR lpszTiaPortalProjectPath,
LPCTSTR lpszErrorTag,
LPCMN_ERROR lpdmError);

Parameter

dwFlags
Bit array in which the individual values are ORed bit-by-bit. dwFlags should be 0 by default.
● IECPLVIEWER_PIN_SUBSTRING_SEARCH=0x0001: A substring is sought in the search
for the pin name, i.e. the pin name starts with the string pass in lpszPin. If this bit is not set,
the complete pin name is compared to lpszPin.
● KOPAPI_FLAG_TIAPORTAL_SUPPRESS_PROGRAM_STATUS=0x0004: The TIA
Portal does not go into online mode after opening the block. If this bit is not set, online mode
is started after opening the block.

WinCC Professional V13 SP2 – Programming reference


1094 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

● KOPAPI_FLAG_TIAPORTAL_CHECK_PROJECT_STATE 0x0010L: If this bit is set, the


status of the project is checked. The project is not opened.
– The project is open.
Return value FALSE
error.dwError1 = KOPAPI_E_TIAPORTAL_PROJECT_NOT_OPEN
– The project is open and contains no changes.
Return value TRUE
error.dwError1 = 0
– The project is open and contains changes.
Return value FALSE
error.dwError1 = KOPAPI_E_TIAPORTAL_PROJECT_MODIFIED
– The project is opened read only.
Return value FALSE
error.dwError1 = KOPAPI_E_TIAPORTAL_PROJECT_READ_ONLY
● KOPAPI_FLAG_TIAPORTAL_DONT_USE_MODIFIED_PROJECT 0x0008L:If this bit is
set, the call is canceled when the project is already open and contains changes.

lpszTiaPortalProjectPath
Name of the project file including specification of the absolute path, for example, "D:
\TIAProjects\Project1\Project1.ap12"
Please note that within a C script the backslash has to be written using an Escape sequence:
FunctionX(…, "D:\\TIAProjects\\Project1\\Project1.ap12", …);

lpszErrorTag
Name of an internal WinCC tag of the String data type. The error information is returned in
lpszErrorTag (Page 1115) when asynchronous functions that do not provide instant results
are called.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information to this structure if an error occurs.

Return value

TRUE
The function has been completed without any errors.

FALSE
An error has occurred.

Required files
kopapi.h
kopapi.lib
kopapi.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1095
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

See also
Basics (Page 1093)

2.11.1.3 OpenTIAPortalIECPLByCall (RT Professional)

Description
The function is used for the LAD and FBD languages and shows the preceding logic of a
network input of a standard block.

Declaration

BOOL OpenTIAPortalIECPLByCall (
DWORD dwFlags,
LPCTSTR lpszTiaPortalProjectPath,
LPCTSTR lpszCpuName,
LPCTSTR lpszContainingBlock,
LPCTSTR lpszCalledBlock,
LPCTSTR lpszPin,
LPCTSTR lpszErrorTag,
LPCMN_ERROR lpdmError);

Parameter

dwFlags
Bit array in which the individual values are ORed bit-by-bit. dwFlags should be 0 by default.
● IECPLVIEWER_PIN_SUBSTRING_SEARCH=0x0001: A substring is sought in the search
for the pin name, i.e. the pin name starts with the string pass in lpszPin. If this bit is not set,
the complete pin name is compared to lpszPin.
● KOPAPI_FLAG_TIAPORTAL_SUPPRESS_PROGRAM_STATUS=0x0004: The TIA
Portal does not go into online mode after opening the block. If this bit is not set, online mode
is started after opening the block.
● KOPAPI_FLAG_TIAPORTAL_DONT_USE_MODIFIED_PROJECT 0x0008L:If this bit is
set, the call is canceled when the project is already open and contains changes.

lpszTiaPortalProjectPath
Name of the project file including specification of the absolute path, for example, "D:
\TIAProjects\Project1\Project1.ap12"
Please note that within a C script the backslash has to be written using an Escape sequence:
FunctionX(…, "D:\\TIAProjects\\Project1\\Project1.ap12", …);

lpszCpuName
Name of the S7 CPU. The name is identical to the station name displayed in the project tree
in the TIA Portal.

WinCC Professional V13 SP2 – Programming reference


1096 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

lpszContainingBlock
Name of the block to be opened and displayed or name of the instance of an FB.
The following can be used as the name:
● Name a single instance DB. Its FB is then displayed. Example "Station1"
● Name of a multiinstance in an instance DB. Its FB is then displayed. When multiinstance
name paths are specified, these are data hierarchies such as those displayed in the DB
editor, and not those in the call structure. The first part of the name ("Line1") cannot be
enclosed in quotes, because this is a global icon, as can be recognized by the context.
Quotation marks are required for the individual name components, when special characters
such as spaces, dots, etc., occur in it. Example: "Line1.Cell1.Station1"
● Name of an FC or OB
The use of the name of a FB is not allowed.

lpszCalledBlock
Name of the local or global instance that is called in the code block belonging to
lpszContainingBlock.
● For local instances, the hash sign # must be specified here, for example, "#feeder1".
● For global instances, the global name without hash sign # must be specified here, for
example, "feeder3".
The use of the name of an FC is not allowed.
If lpszCalledBlock is called several times within lpszContainingBlock or its FB, the entry point
is always the first call of lpszCalledBlock.
Only lpszContainingBlock is opened and displayed in the status with lpszCalledBlock=ZERO,
but there is no search for a specific block call or a specific network. lpszPin is ignored in this
case.

lpszPin
Name of the input pin of lpszCalledBlock. The parameter is used to make the specified pin
visible within the network in the editor.
Only lpszCalledBlock is shown as visible with lpszPin=ZERO.

lpszErrorTag
Name of an internal WinCC tag of the String data type. The error information is returned in
lpszErrorTag (Page 1115) when asynchronous functions that do not provide instant results
are called.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information to this structure if an error occurs.

Return value

TRUE
The function has been completed without any errors.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1097
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

FALSE
An error has occurred.

Required files
kopapi.h
kopapi.lib
kopapi.dll

See also
Basics (Page 1093)

2.11.1.4 OpenTIAPortalIECPLByAssignment (RT Professional)

Description
The function is used for the LAD and FBD languages and shows the assignment to an operator.

Declaration

BOOL OpenTIAPortalIECPLByAssignment (
DWORD dwFlags,
LPCTSTR lpszTiaPortalProjectPath,
LPCTSTR lpszCpuName,
LPCTSTR lpszContainingBlock,
LPCTSTR lpszOperand,
LPCTSTR lpszErrorTag,
LPCMN_ERROR lpdmError);

Parameter

dwFlags
Bit array in which the individual values are ORed bit-by-bit. dwFlags should be 0 by default.
● KOPAPI_FLAG_TIAPORTAL_SUPPRESS_PROGRAM_STATUS=0x0004: The TIA
Portal does not go into online mode after opening the block. If this bit is not set, online mode
is started after opening the block.
● KOPAPI_FLAG_TIAPORTAL_DONT_USE_MODIFIED_PROJECT 0x0008L:If this bit is
set, the call is canceled when the project is already open and contains changes.

lpszTiaPortalProjectPath
Name of the project file including specification of the absolute path, for example, "D:
\TIAProjects\Project1\Project1.ap12"

WinCC Professional V13 SP2 – Programming reference


1098 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

Please note that within a C script the backslash has to be written using an Escape sequence:
FunctionX(…, "D:\\TIAProjects\\Project1\\Project1.ap12", …);

lpszCpuName
Name of the S7 CPU. The name is identical to the station name displayed in the project tree
in the TIA Portal.

lpszContainingBlock
Name of the block to be opened and displayed or name of the instance of an FB.
The following can be used as the name:
● Name a single instance DB. Its FB is then displayed. Example "Station1"
● Name of a multiinstance in an instance DB. Its FB is then displayed. When multiinstance
name paths are specified, these are data hierarchies such as those displayed in the DB
editor, and not those in the call structure. The first part of the name ("Line1") cannot be
enclosed in quotes, because this is a global icon, as can be recognized by the context.
Quotation marks are required for the individual name components, when special characters
such as spaces, dots, etc., occur in it. Example: "Line1.Cell1.Station1"
● Name of an FC or OB
The use of the name of a FB is not allowed.

lpszOperand
Name of a local or global operand to which an assignment is made.
Name of the local or global instance that is called in the code block belonging to
lpszContainingBlock.
● For local operands, the hash sign # must be specified here.
● For global operands, the global name without hash sign # must be specified.
If lpszOperand is written several times within lpszContainingBlock or its FB, the entry point is
always the first write access of lpszOperand.

lpszErrorTag
Name of an internal WinCC tag of the String data type. The error information is returned in
lpszErrorTag (Page 1115) when asynchronous functions that do not provide instant results
are called.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information to this structure if an error occurs.

Return value

TRUE
The function has been completed without any errors.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1099
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

FALSE
An error has occurred.

Required files
kopapi.h
kopapi.lib
kopapi.dll

See also
Basics (Page 1093)

2.11.1.5 OpenTIAPortalS7GraphByBlock (RT Professional)

Description
The function is used for the S7 Graph languages and shows a step in a sequencer.

Declaration

BOOL OpenTIAPortalS7GraphByBlock (
DWORD dwFlags,
LPCTSTR lpszTiaPortalProjectPath,
LPCTSTR lpszCpuName,
LPCTSTR lpszBlock,
DWORD dwStepNumber,
LPCTSTR lpszErrorTag,
LPCMN_ERROR lpdmError);

Parameter

dwFlags
Bit array in which the individual values are ORed bit-by-bit. dwFlags should be 0 by default.
● KOPAPI_FLAG_TIAPORTAL_SUPPRESS_PROGRAM_STATUS=0x0004: The TIA
Portal does not go into online mode after opening the block. If this bit is not set, online mode
is started after opening the block.
● KOPAPI_FLAG_TIAPORTAL_DONT_USE_MODIFIED_PROJECT 0x00000008L:If this bit
is set, the call is canceled when the project is already open and contains changes.

lpszTiaPortalProjectPath
Name of the project file including specification of the absolute path, for example, "D:
\TIAProjects\Project1\Project1.ap12"

WinCC Professional V13 SP2 – Programming reference


1100 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

Please note that within a C script the backslash has to be written using an Escape sequence:
FunctionX(…, "D:\\TIAProjects\\Project1\\Project1.ap12", …);

lpszCpuName
Name of the S7 CPU. The name is identical to the station name displayed in the project tree
in the TIA Portal.

lpszBlock
Instance name of the S7 Graph block to be displayed.

dwStepNumber
Number of the step to be displayed
dwStepNumber=0 automatically searches for the active step and enables "Track active step"
mode.

lpszErrorTag
Name of an internal WinCC tag of the String data type. The error information is returned in
lpszErrorTag (Page 1115) when asynchronous functions that do not provide instant results
are called.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information to this structure if an error occurs.

Return value

TRUE
The function has been completed without any errors.

FALSE
An error has occurred.

Required files
kopapi.h
kopapi.lib
kopapi.dll

See also
Basics (Page 1093)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1101
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

2.11.1.6 Example: Integration in a WinCC function (RT Professional)

Description
The example shows the embedding of the function calls in a user-defined function. For better
maintainability, the call should be made externally in a global script function, in which the path
to the TIA Portal and the name of the PLC station are then determined.

void OnClick(char* screenName, char* objectName, char* propertyName)


{
// Funktionen bekannt machen'
#pragma code("KOPAPI.dll")
#include "KOPAPI.h"
#pragma code()

BOOL useTiaPortal = TRUE; // use the TIA Portal or the viewer control?
char* pTiaPortalProject = "c:\\Projects\\myproject\\myproject.ap12";
char* pStationName = "OW063IZ1M01_PLC2_STD"; // TODO: read from internal
tag
char* pContainingBlock = "SG01_FG02_ST001+FX001_IDB"; // TODO: get from
current selection
char* pOperand = "#HOME_SEQ1.HOME_MISC[8]"; // TODO: get from current
selection
char* pErrorTag = "IECPLViewerErrorTag"; // TODO: define an own tag
CMN_ERROR error;
BOOL result;

if(useTiaPortal)
{
result = OpenTIAPortalIECPLByAssignment(0, pTiaPortalProject,
pStationName, pContainingBlock, pOperand, pErrorTag, &error);
}
else
{
char *pServerPrefix = NULL, *pTagPrefix = NULL, *pWindowPrefix =
NULL;
// determine ServerPrefix of the current environment
GetServerTagPrefix(&pServerPrefix, &pTagPrefix, &pWindowPrefix);
// make the screen which contains the viewer control visible
SetVisible("SYSTEM#Basic_Screen", "Screen_window_IECPLViewer",
TRUE);
result = OpenViewerIECPLByAssignment(0, pServerPrefix,
"SYSTEM#IECPLViewer", "IECPLViewerObject", pStationName, pContainingBlock,
pOperand, pErrorTag, &error);
}
}

See also
Basics (Page 1093)

WinCC Professional V13 SP2 – Programming reference


1102 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

2.11.2 Display in the PLC code display (RT Professional)

2.11.2.1 Basics (RT Professional)

General information
You can use these functions to display the current program status of PLC programs in a PLC
code display.
The screen containing the PLC code display must have been opened via OpenPicture() or
SetPictureName(), for example.

Header files
The declaration of the functions and structures explained here takes place in the header files:

kopapi.h API interface definition header file

Libraries
The DLL link for the functions explained here is provided in the "lib" files: pdecscli.dll

kopapi.lib Library
kopapi.dll

Note on defining multi-instance names


When multi-instance name paths are specified, these are data hierarchies such as those
displayed in the DB editor and not call structures. The first part of the name ("Line1") does not
need to be enclosed in quotation marks as it is clear from the context that it is a global symbol.
Quotation marks are required for the individual name components where there are special
characters such as spaces, dots, etc. Example: "Line1.Cell1.Station1". Names that do not
contain special characters must not be put in quotation marks.

See also
OpenViewerIECPLByCall (Page 1107)
OpenViewerIECPLByAssignment (Page 1113)
OpenViewerS7GraphByBlock (Page 1104)

2.11.2.2 OpenViewerS7GraphByBlock (RT Professional)

Description
The function displays in the PLC language, S7 Graph, a step called from a sequencer in the
PLC code display.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1103
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

Declaration

BOOL OpenViewerS7GraphByBlock (
DWORD dwFlags,
LPCTSTR lpszServerPrefix,
LPCTSTR lpszPictureName,
LPCTSTR lpszObjectName,
LPCTSTR lpszCpuName,
LPCTSTR lpszBlock,
DWORD dwStepNumber,
LPCMN_ERROR lpdmError);

Parameter

dwFlags
Bit array in which the individual values are ORed bit-by-bit. dwFlags should be 0 by default.

lpszServerPrefix
The parameter is reserved for later upgrades.

lpszPictureName
Name of the screen with the PLC code viewer.

lpszObjectName
Name of the PLC code viewer.

lpszCpuName
Name of the S7 CPU. The name is identical to the station name displayed in the project tree
in the TIA Portal.

lpszBlock
Instance name of the S7 Graph block to be displayed. If special characters such as spaces,
periods, etc. occur in the name, quotation marks need to be used.

dwStepNumber
Number of the step to be displayed.
dwStepNumber=0 automatically searches for the active step and enables "Track active step"
mode.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information to this structure if an error occurs.

WinCC Professional V13 SP2 – Programming reference


1104 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

Return value

TRUE
The function has been completed without any errors.

FALSE
An error has occurred.

Required files
kopapi.h
kopapi.lib
kopapi.dll

Example
The example shows the embedding of the function call in a user-defined C function. For better
maintainability, the call should be swapped out to a global script function in which the name
of the PLC station is also determined.

BOOL OpenCodeViewerByS7Graph(char* screenName, char* objectName, char*


cpuName, char* instanceDBName)
{
#pragma code("kopapi.dll")
#include "kopapi.h"
#pragma code()
BOOL result;
CMN_ERROR error;
char* serverPrefix = "";
DWORD dwFlags = 0;
DWORD stepNumber = 0;
result = OpenViewerS7GraphByBlock(dwFlags, serverPrefix, screenName,
objectName,
cpuName, instanceDBName, stepNumber, &error);
if(!result)
{
// there are only few reasons why the call to OpenViewerIECPLByAssignment
will // fail, in most cases the viewer control could not be found
// most of the errors have to be handled in the OnError event of the viewer
printf("OpenViewerS7GraphByBlock failed: err1=%ld, err2=%ld, err3=%ld,
err4=%ld, err5=%ld, text=\"%s\"\r\n", result, error.dwError1,
error.dwError2, error.dwError3, error.dwError4, error.dwError5,
error.szErrorText);
}
return result;
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1105
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

See also
Error-handling (Page 1115)
Basics (Page 1103)

2.11.2.3 OpenViewerIECPLByCall (RT Professional)

Description
The function is used for the LAD and FBD languages and shows the preceding logic of a
network input of a standard block in the PLC code view.

Note
If the input is occupied by a constant (TRUE, FALSE), this value is not displayed in the PLC
code viewer. To display the value in the PLC code viewer correctly, you should allocate a tag
to the input that has the appropriate value.

Declaration

BOOL OpenViewerIECPLByCall (
DWORD dwFlags,
LPCTSTR lpszServerPrefix,
LPCTSTR lpszPictureName,
LPCTSTR lpszObjectName,
LPCTSTR lpszCpuName,
LPCTSTR lpszContainingBlock,
LPCTSTR lpszCalledBlock,
LPCTSTR lpszPin,
LPCMN_ERROR lpdmError);

Parameter

dwFlags
Bit array in which the individual values are ORed bit-by-bit. dwFlags should be 0 by default.
● IECPLVIEWER_PIN_SUBSTRING_SEARCH=0x0001: A substring is sought in the search
for the pin name, which means the pin name starts with the string transferred in lpszPin. If
this bit is not set, the complete pin name is compared to lpszPin.

lpszServerPrefix
The parameter is reserved for later upgrades.

WinCC Professional V13 SP2 – Programming reference


1106 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

lpszPictureName
Name of the screen with the PLC code viewer.

lpszObjectName
Name of the PLC code viewer.

lpszCpuName
Name of the S7 CPU. The name is identical to the station name displayed in the project tree
in the TIA Portal.

lpszContainingBlock
Name of the block to be opened and displayed or name of the instance of an FB.
The following can be used as the name:
● Name a single instance DB. Its FB is then displayed. Example "Station1"
● Name of a multiinstance in an instance DB. Its FB is then displayed. When multiinstance
name paths are specified, these are data hierarchies such as those displayed in the DB
editor, and not those in the call structure. The first part of the name ("Line1") cannot be
enclosed in quotes, because this is a global icon, as can be recognized by the context.
Quotation marks are required for the individual name components, when special characters
such as spaces, dots, etc., occur in it. Example: "Line1.Cell1.Station1"
● Name of an FC or OB
The use of the name of a FB is not allowed.

lpszCalledBlock
Name of the local or global instance that is called in the code block belonging to
lpszContainingBlock.
● For local instances, the hash sign # must be specified here, for example, "#feeder1".
● For global instances, the global name without hash sign # must be specified here, for
example, "feeder3".
The use of the name of an FC is not allowed.
If lpszCalledBlock is called several times within lpszContainingBlock or its FB, the entry point
is always the first call of lpszCalledBlock.

lpszPin
Name of the input pin of lpszCalledBlock. The parameter is used to display the network
interconnected to the input pin in the PLC code viewer.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information to this structure if an error occurs.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1107
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

Return value

TRUE
The function has been completed without any errors.

FALSE
An error has occurred.

Required files
kopapi.h
kopapi.lib
kopapi.dll

Example
The example shows the embedding of the function call in a user-defined C function. For better
maintainability, the call should be swapped out to a global script function in which the name
of the PLC station is also determined.

BOOL OpenCodeViewerByCall(BOOL matchSubstringPin, char* screenName, char*


objectName, char* cpuName, char* containingBlock, char* calledBlock, char*
pinName)
{
#pragma code("kopapi.dll")
#include "kopapi.h"
#pragma code()
BOOL result;
CMN_ERROR error;
char* serverPrefix = "";
DWORD dwFlags = 0;
if(matchSubstringPin)
dwFlags |= KOPAPI_FLAG_TIAPORTAL_PIN_SUBSTRING_SEARCH;
result = OpenViewerIECPLByCall(dwFlags, serverPrefix, screenName,
objectName,
cpuName, containingBlock, calledBlock, pinName, &error);
if(!result)
{
// there are only few reasons why the call to OpenViewerIECPLByCall will
fail, in // most cases the viewer control could not be found
// most of the errors have to be handled in the OnError event of the viewer
printf("OpenViewerIECPLByCall failed: err1=%ld, err2=%ld, err3=%ld, err4=
%ld, err5=%ld, text=\"%s\"\r\n", result, error.dwError1,
error.dwError2, error.dwError3, error.dwError4, error.dwError5,
error.szErrorText);
}
return result;
}

WinCC Professional V13 SP2 – Programming reference


1108 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

See also
Error-handling (Page 1115)
Basics (Page 1103)

2.11.2.4 OpenViewerIECPLByFCCall (RT Professional)

Description
The function is used for the LAD and FBD languages and shows the preceding logic of a
network input of a standard block in the PLC code view while taking the UDT instance into
consideration.

Note
If the input is occupied by a constant (TRUE, FALSE), this value is not displayed in the PLC
code viewer. To display the value in the PLC code viewer correctly, you should allocate a tag
to the input that has the appropriate value.

Declaration

BOOL OpenViewerIECPLByFCCall (
DWORD dwFlags,
LPCTSTR lpszServerPrefix,
LPCTSTR lpszPictureName,
LPCTSTR lpszObjectName,
LPCTSTR lpszCpuName,
LPCTSTR lpszContainingBlock,
LPCTSTR lpszCalledBlock,
LPCTSTR lpszPin,
LPCTSTR lpszUdtInstance
LPCMN_ERROR lpdmError);

Parameters

dwFlags
Bit array in which the individual values are ORed bit-by-bit. dwFlags should be 0 by default.
● IECPLVIEWER_PIN_SUBSTRING_SEARCH=0x0001: A substring is sought in the search
for the pin name, which means the pin name starts with the string transferred in lpszPin. If
this bit is not set, the complete pin name is compared to lpszPin.

lpszServerPrefix
The parameter is reserved for future development and must be an empty string ("").

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1109
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

lpszPictureName
Name of the screen with the PLC code viewer.

lpszObjectName
Name of the PLC code viewer.

lpszCpuName
Name of the S7 CPU. The name is identical to the station name displayed in the project tree
in the TIA Portal.

lpszContainingBlock
Name of the block to be opened and displayed or name of the instance of an FB.
The following can be used as the name:
● Name a single instance DB. Its FB is then displayed. Example "Station1"
● Name of a multiinstance in an instance DB. Its FB is then displayed. When multiinstance
name paths are specified, these are data hierarchies such as those displayed in the DB
editor, and not those in the call structure. The first part of the name ("Line1") cannot be
enclosed in quotes, because this is a global icon, as can be recognized by the context.
Quotation marks are required for the individual name components, when special characters
such as spaces, dots, etc., occur in it. Example: "Line1.Cell1.Station1"
● Name of an FC or OB
The use of the name of a FB is not allowed.

lpszCalledBlock
Name of the local or global instance that is called in the code block belonging to
lpszContainingBlock.
● For local instances, the hash sign # must be specified here, for example, "#feeder1".
● For global instances, the global name without hash sign # must be specified here, for
example, "feeder3".
The use of the name of an FC is not allowed.
If lpszCalledBlock is called several times within lpszContainingBlock or its FB, the entry point
is always the first call of lpszCalledBlock.

lpszPin
Name of the input pin of lpszCalledBlock. The parameter is used to display the network
interconnected to the input pin in the PLC code viewer.

lpszUdtInstance
The parameter is used to limit the display of FBs or FCs called multiple times. The limitation
is based on an UDT instance interconnected to a given input pin or inout pin.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information to this structure if an error occurs.

WinCC Professional V13 SP2 – Programming reference


1110 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

Return value

TRUE
The function has been completed without any errors.

FALSE
An error has occurred.

Required files
kopapi.h
kopapi.lib
kopapi.dll

Example
The example shows the embedding of the function call in a user-defined C function. For better
maintainability, the call should be swapped out to a global script function in which the name
of the PLC station is also determined.

BOOL OpenCodeViewerByFCCall(BOOL matchSubstringPin, char* screenName,


char* objectName, char* cpuName, char* containingBlock, char* calledBlock,
char* pinName, char* udtInstance)
{
#pragma code("kopapi.dll")
#include "kopapi.h"
#pragma code()
BOOL result;
CMN_ERROR error;
char* serverPrefix = "";
DWORD dwFlags = 0;
if(matchSubstringPin)
dwFlags |= KOPAPI_FLAG_TIAPORTAL_PIN_SUBSTRING_SEARCH;
result = OpenViewerIECPLByFCCall(dwFlags, serverPrefix, screenName,
objectName, cpuName, containingBlock, calledBlock, pinName, udtInstance,
&error);
if(!result)
{
// there are only few reasons why the call to OpenViewerIECPLByFCCall will
fail,
// in most cases the viewer control could not be found
// most of the errors have to be handled in the OnError event of the viewer
control
printf("OpenViewerIECPLByFCCall failed: err1=%ld, err2=%ld, "" err3=%ld,
err4=%ld, err5=%ld, text=\"%s\"\r\n", result, error.dwError1,
error.dwError2, error.dwError3, error.dwError4, error.dwError5,
error.szErrorText);
}
return result;
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1111
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

2.11.2.5 OpenViewerIECPLByAssignment (RT Professional)

Description
The function is used for the LAD and FBD languages and shows the assignment of an operand
and its preceding logic in the PLC code view.

Declaration

BOOL OpenViewerIECPLByAssignment (
DWORD dwFlags,
LPCTSTR lpszServerPrefix,
LPCTSTR lpszPictureName,
LPCTSTR lpszObjectName,
LPCTSTR lpszCpuName,
LPCTSTR lpszContainingBlock,
LPCTSTR lpszOperand,
LPCMN_ERROR lpdmError);

Parameter

dwFlags
Bit array in which the individual values are ORed bit-by-bit. dwFlags should be 0 by default.

lpszServerPrefix
The parameter is reserved for later upgrades.

lpszPictureName
Name of the screen with the PLC code viewer.

lpszObjectName
Name of the PLC code viewer.

lpszCpuName
Name of the S7 CPU. The name is identical to the station name displayed in the project tree
in the TIA Portal.

lpszContainingBlock
Name of the block to be opened and displayed or name of the instance of an FB.

WinCC Professional V13 SP2 – Programming reference


1112 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

The following can be used as names:


● Name a single instance DB. Its FB is then displayed. Example "Station1"
● Name of a multiinstance in an instance DB. Its FB is then displayed. When multiinstance
name paths are specified, these are data hierarchies such as those displayed in the DB
editor, and not those in the call structure. The first part of the name ("Line1") cannot be
enclosed in quotes, because this is a global icon, as can be recognized by the context.
Quotation marks are required for the individual name components, when special characters
such as spaces, dots, etc., occur in it. Example: "Line1.Cell1.Station1"
● Name of an FC or OB
The use of the name of a FB is not allowed.

lpszOperand
Name of a local or global operand to which an assignment is made.
Name of the local or global instance that is called in the code block belonging to
lpszContainingBlock.
● For local operands, the hash sign # must be specified here.
● For global operands, the global name without hash sign # must be specified.
If lpszOperand is written several times within lpszContainingBlock or its FB, the entry point is
always the first write access of lpszOperand.

lpdmError
Pointer to the data of the extended error message in the CMN_ERROR structure. The system
writes error information to this structure if an error occurs.

Return value

TRUE
The function has been completed without any errors.

FALSE
An error has occurred.

Required files
kopapi.h
kopapi.lib
kopapi.dll

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1113
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

Example
The example shows the embedding of the function call in a user-defined C function. For better
maintainability, the call should be swapped out to a global script function in which the name
of the PLC station is also determined.

BOOL OpenCodeViewerByAssignment(char* screenName, char* objectName, char*


cpuName, char* containingBlock, char* operand)
{
#pragma code("kopapi.dll")
#include "kopapi.h"
#pragma code()
BOOL result;
CMN_ERROR error;
char* serverPrefix = "";
DWORD dwFlags = 0;
result = OpenViewerIECPLByAssignment(dwFlags, serverPrefix, screenName,
objectName, cpuName, containingBlock, operand, &error);
if(!result)
{
// there are only few reasons why the call to OpenViewerIECPLByAssignment
will
// fail, in most cases the viewer control could not be found
// most of the errors have to be handled in the OnError event of the viewer
printf("OpenViewerIECPLByAssignment failed: err1=%ld, err2=%ld, err3=%ld,
err4=%ld, err5=%ld, text=\"%s\"\r\n", result, error.dwError1,
error.dwError2, error.dwError3, error.dwError4, error.dwError5,
error.szErrorText);
}
return result;
}

See also
Error-handling (Page 1115)
Basics (Page 1103)

2.11.3 Error-handling (RT Professional)

General information
Execution of the functions for the network entry is divided in a synchronous part and an
asynchronous part. The synchronous part checks the parameters and transfers them to the
asynchronous part.
The return value of the functions specifies whether an error has occurred in the asynchronous
section of the function. If an error has occurred, the return value is FALSE. Such errors occur
when parameters, for example, the lpszErrorTag parameter is not supplied or incorrectly
supplied.

WinCC Professional V13 SP2 – Programming reference


1114 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.11 Functions for displaying the PLC code (RT Professional)

Errors that occur in the asynchronous part of the functions are reported through the
lpszErrorTag parameter. Such errors can be, for example: Project not found, block not
available, ... lpszErrorTag contains the name of a tag of the String data type. In order to respond
to the return value you have to configure a function that is triggered with the cycle "To change"
at a value change of the error tags. The error tag should also be used to prevent further function
calls of the operation of a button, for example, as long as the error tag has the value
"RUNNING".

lpszErrorTag
Name of a tag of the data type String. If the tag is not required, NULL can be transferred as
the parameter. If required, the tag name can include a ServerPrefix.
The value of the error tag is changed as follows:
● When the asynchronous part is started, the value of the error tag is set to "RUNNING".
● When the asynchronous part is completed without an error, the value of the error tag is set
to "OK".
● When the asynchronous part was terminated with an error, the error tag contains a multi-
line string whose lines are separated by a linefeed character ('\n').
In the case of an error, the error tag has the following structure:
● Line 1: "ERROR"
● Line 2 - Line 6: Decimal numbers, data type: 32 bits unsigned; DWORD
● Line 7: Error text

Error text
When the asynchronous part was terminated with an error, the error tag contains a multi-line
string whose lines are separated by a linefeed character ('\n'). The seventh line contains one
of the following error texts:

IDS_E_IS_TIA_PROJECT KOPAPI: This function cannot be used in a


TIA Portal project!
IDS_E_NO_TIA_PROJECT KOPAPI: The function call is disabled be‐
cause no TIA Portal project is open!
IDS_E_TIAPORTAL_UNKNOWN_FLAGS dwFlags contains an unknown value.
IDS_E_TIAPORTAL_ERRORTAG_NOT_EXIST The error tag [%s] does not exist.
IDS_E_TIAPORTAL_PREVIOUS_CALL_IS_RUNNING The previous call is still running (RUN‐
NING). Please terminate it first.
IDS_E_TIAPORTAL_CANNOT_WRITE_ERRORTAG The error tag [%s] cannot be written.
IDS_E_TIAPORTAL_COMACCESS_REGIS‐ No connection to TIA Portal possible.
TERPS_FAILED
IDS_E_TIAPORTAL_CANNOT_START_PORTAL TIA Portal cannot be started.
IDS_E_TIAPORTAL_CANNOT_SEARCH_STAR‐ A search for a started Portal is not possible.
TED_PORTAL

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1115
Runtime API (RT Professional)
2.12 Troubleshooting (RT Professional)

IDS_E_TIAPORTAL_NO_PORTAL_STARTED A Portal could not be started.


IDS_E_TIAPORTAL_EXCEPTION_SYNC_PART Exception in synchronous processing part.
IDS_E_TIAPORTAL_EXCEPTION_ASYNC_PART Exception in asynchronous processing part.
IDS_E_TIAPORTAL_NOT_INSTALLED No TIA Portal installed.
IDS_E_TIAPORTAL_PROJECT_CANNOT_OPEN Project [%s] cannot be opened.
IDS_E_TIAPORTAL_ALREADY_OPENED_WITH_OTH‐ TIA Portal is opened with another project.
ER_PROJECT
IDS_E_TIAPORTAL_CREATECOMMAND CreateCommand error.
IDS_E_TIAPORTAL_COMMAND_ADDARGUMENT Command AddArgument error.
IDS_E_TIAPORTAL_EXECUTECOMMAND Serious error in ExecuteCommand.
IDS_E_TIAPORTAL_COMMAND_ERROR TIA project command error: [%s,%ld].
IDS_E_TIAPORTAL_COMMAND_UNKNOWN TIA project unknown command: [%s,%ld].

2.12 Troubleshooting (RT Professional)

2.12.1 CMN_ERROR (RT Professional)

Description
The extended error structure CMN_Error contains the error code and an error text for the error
that occurred. Each application can use the error structure to evaluate or to output error
messages.

Declaration

Typedef struct {
DWORD dwError1;
DWORD dwError2;
DWORD dwError3;
DWORD dwError4;
DWORD dwError5;
Char szErrorText[512];
}
CMN_ERROR;

Members

dwError1 .. dwError5
Each of the API descriptions contains information on the values of the entries in case of an
error. Unless otherwise specified, the error codes are in dwError1.

WinCC Professional V13 SP2 – Programming reference


1116 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.12 Troubleshooting (RT Professional)

szErrorText
Buffer for the text description of the error cause. The content is determined from the resources
and is generally language-dependent.

Comment
Some modules use the following error code assignments, as required

dwError1 API error code


dwError2 Subordinate error code (e.g., CCStorageError.h)
dwError3 Line number of the source code
dwError4 Array Index 1; Row; Record / Status / ....
dwError5 Array Index 2; Column; Record Element / Counter / ....

See also
Error messages (Page 204)

2.12.2 CCStorageError.h (RT Professional)

Subordinate error messages CCStorageError.h


The following error messages can be returned by the API functions in the CMN_ERROR error
structure in addition to the actual error message in dwError1 and in dwError2, if available in
the respective module.

Error message Value


CCF_STOR‐ 0x80046101L Cannot open WinCC project
AGE_PM_E_NO_PROJECT_OPEN
CCF_STOR‐ 0x80046102L Cannot open/create WinCC
AGE_PM_E_NO_PROJECT_OPEN_1 project - Project Manager can't
start basic application SDIAGRT
CCF_STOR‐ 0x80046103L Cannot open/create WinCC
AGE_PM_E_NO_PROJECT_OPEN_2 project - Project Manager can't
start basic application
PASSDBRT
CCF_STOR‐ 0x80046104L Cannot open/create WinCC
AGE_PM_E_NO_PROJECT_OPEN_3 project - Project Manager can't
start basic application SCRIPT
CCF_STOR‐ 0x80046105L Cannot open/create WinCC
AGE_PM_E_NO_PROJECT_OPEN_31 project - Project Manager can't
start basic application XREF
CCF_STOR‐ 0x80046106L Cannot open/create WinCC
AGE_PM_E_NO_PROJECT_OPEN_4 project - Project Manager can't
initialize ASO

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1117
Runtime API (RT Professional)
2.12 Troubleshooting (RT Professional)

Error message Value


CCF_STOR‐ 0x80046107L Cannot open/create WinCC
AGE_PM_E_NO_PROJECT_OPEN_5 project - Project Manager can
open only one WinCC Project at
the same time
CCF_STOR‐ 0x80046108L Cannot open/create WinCC
AGE_PM_E_NO_PROJECT_OPEN_6 project - Project Manager can't
configure startline for the data
source
CCF_STOR‐ 0x80046109L Cannot open/create WinCC
AGE_PM_E_NO_PROJECT_OPEN_7 project - Project Manager can't
configure data source

CCF_STOR‐ 0x8004610AL Cannot open WinCC project -


AGE_PM_E_NO_PROJECT_OPEN_8 Project Manager for configured
WinCC Server is not already run‐
ning - Start Project Manager for
configured server
CCF_STOR‐ 0x8004610BL Cannot open/create WinCC
AGE_PM_E_NO_PROJECT_OPEN_9 project - Project Manager can't
create Distributed Configuration
File - Project.dcf
CCF_STOR‐ 0x8004610CL Cannot open WinCC project -
AGE_PM_E_NO_PROJECT_OPEN_10 Project path not valid
CCF_STOR‐ 0x8004610DL Cannot close WinCC project -
AGE_PM_E_NO_PROJECT_CLOSE_1 Some users in the network are
already connected to this WinCC
Project
CCF_STOR‐ 0x8004610EL Cannot close WinCC project -
AGE_PM_E_NO_PROJECT_CLOSE_2 Project Manager doesn't know
anything about this WinCC
Project - please check your
Project ID
CCF_STOR‐ 0x8004610FL Cannot close WinCC project - An
AGE_PM_E_NO_PROJECT_CLOSE_3 active WinCC project is already
running on this computer
CCF_STOR‐ 0x80046110L Cannot close WinCC project -
AGE_PM_E_NO_PROJECT_CLOSE_4 Project Manager doesn't support
actual close project mode
CCF_STOR‐ 0x80046111L Cannot close WinCC project -
AGE_PM_E_NO_PROJECT_CLOSE_5 Some users already connected
to this WinCC Project - TimeOut!
CCF_STOR‐ 0x80046112L Project doesn't support desired
AGE_PM_E_NO_PROJECT_LAN‐ language!
GUAGE_1
CCF_STORAGE_PM_E_NO_ACTIVATE 0x80046113L No active WinCC project is run‐
ning on this computer
CCF_STORAGE_PM_E_NO_ACTIVATE_1 0x80046114L Cannot activate WinCC project -
WinCC Server properties are
changed - close and reopen the
WinCC Project please!

WinCC Professional V13 SP2 – Programming reference


1118 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.12 Troubleshooting (RT Professional)

Error message Value


CCF_STOR‐ 0x80046115L Cannot create WinCC project
AGE_PM_E_NO_PROJECT_CREATE
CCF_STOR‐ 0x80046116L Cannot open WinCC project -
AGE_PM_E_NO_PROJECT_OPEN_11 Close WinCC project is already
in process.
CCF_STOR‐ 0x80046117L Cannot open WinCC project -
AGE_PM_E_NO_PROJECT_OPEN_12 WinCC project path exceeds the
maximum value of 255 charac‐
ters.
CCF_STOR‐ 0x80046118L Cannot open WinCC project -
AGE_PM_E_NO_PROJECT_OPEN_13 WinCC project name exceeds
the maximum value of 64 char‐
acters.
CCF_STORAGE_PM_E_NO_ACTIVATE_2 0x80046119L Cannot deactivate WinCC
project - Time-out interval
elapsed -> SCRIPT.EXE
CCF_STORAGE_PM_E_NO_ACTIVATE_3 0x8004611AL Cannot deactivate WinCC
project - Time-out interval
elapsed -> PASSDBRT.EXE
CCF_STORAGE_PM_E_NO_ACTIVATE_4 0x8004611BL Cannot deactivate WinCC
project - Time-out interval
elapsed -> SDIAGRT.EXE
CCF_STOR‐ 0x8004611CL Cannot open WinCC project - No
AGE_PM_E_NO_PROJECT_OPEN_14 project path can be inserted into
simatic.cfg file
CCF_STORAGE_PM_E_NO_ACTIVATE_5 0x8004611DL Cannot activate WinCC project -
No WinCC project !!
CCF_STORAGE_PM_E_NO_ACTIVATE_6 0x8004611EL Cannot activate WinCC project -
WinCC client can't get the serv‐
er's activation state over an
broadcast
CCF_STORAGE_PM_E_NO_ACTIVATE_7 0x8004611FL Activate for WinCC project in
process - WinCC client's activa‐
tion process not already finished
CCF_STORAGE_PM_E_CRE‐ 0x80046120L Cannot create the WinCC-
ATE_SHARE_FAILED Project-Share - WinCC-Project
cannot be opened.
CCF_STOR‐ 0x80046121L Cannot open the WinCC-Project-
AGE_PM_E_OPEN_FILE_FAILED file - WinCC-Project cannot be
opened.
CCF_STORAGE_PM_E_CLIENT_CAN‐ 0x80046122L This client cannot activate this
NOT_ACTIVATE project because it is not in the
client list.
CCF_STORAGE_PM_E_SYBASE_MIGRA‐ 0x80046123L This WinCC version doesn't sup‐
TION port old Sybase projects. Use mi‐
gration.
CCF_STOR‐ 0x80046124L There is no project opened at the
AGE_PM_E_NO_PROJECT_OPENED moment.
CCF_STORAGE_PM_E_COMPUT‐ 0x80046125L This client is not in the machine
ER_NOT_IN_MACHINE_LIST list of the specified server.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1119
Runtime API (RT Professional)
2.12 Troubleshooting (RT Professional)

Error message Value


CCF_SQL_SERVER_NOT_INSTAL‐ 0x80046126L The SQL server may not be cor‐
LED_ERROR rect installed. Please check it.
CCF_SQL_SERVER_DATABASE_AC‐ 0x80046127L The SQL server cannot access
CESS_ERROR database. Please check access
rights.
CCF_PM_E_PROJECT_IS_LOCKED 0x80046128L The Project is locked.
CCF_SQL_SERVER_DATA‐ 0x80046129L The SQL-SERVER 2005 does
BASE_NTFS_ERROR not support compressed NTFS
volumes. Please uncompress at
least the project directory and its
contents.
CCF_PM_OPEN_ERROR_RDP 0xC004612AL This project is generated by RDP
and is not allowed to be opened
by WinCC
CCF_PM_OPEN_CODEPAGE_MIS‐ 0x4004612BL The current codepage does not
MATCH match the codepage at creation
time
CCF_PM_MIGRATION_NEEDED 0x8004612CL
CCF_STORAGE_DBASO_E_NO_LI‐ 0x80046201L No License for the Functionality
CENSE
CCF_STORAGE_DBASO_E_LIMIT 0x80046202L The limit is reached
CCF_STORAGE_DBASO_E_DATA_VER‐ 0x80046203L ASO can not work with this data
SION version
CCF_STORAGE_DBASO_E_NO_CON‐ 0x80046204L no connection to database
NECTION
CCF_STORAGE_DBASO_E_NO_TABLE 0x80046205L Table doesn´t exist or could not
be opened. Please check the
user rights.
CCF_STORAGE_DBASO_E_NO_RE‐ 0x80046206L no record
CORD
CCF_STORAGE_DBASO_E_NO_RE‐ 0x80046207L no resource
SOURCE
CCF_STORAGE_DBASO_E_NOT_CRE‐ 0x80046208L record not created
ATED
CCF_STORAGE_DBASO_E_NOT_DE‐ 0x80046209L record not deleted
LETED
CCF_STORAGE_DBASO_E_NOT_MODI‐ 0x8004620AL record not modified
FIED
CCF_STORAGE_DBASO_E_RE‐ 0x8004620BL record already exists.
CORD_EXIST
CCF_STORAGE_DBASO_E_RE‐ 0x8004620CL record in use
CORD_IN_USE
CCF_STORAGE_DBASO_E_RE‐ 0x8004620DL Invalid Count or Type of Fields
CORD_FIELDSINVALID
CCF_STORAGE_DBASO_E_RE‐ 0x8004620EL Record can not be modified or
CORD_PROTECTED removed.
CCF_STORAGE_DBASO_E_NO_CON‐ 0x8004620FL No or invalid Project Context
TEXT ASO cannot work correct

WinCC Professional V13 SP2 – Programming reference


1120 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.12 Troubleshooting (RT Professional)

Error message Value


CCF_STORAGE_DBA‐ 0x80046210L no entries found for enumeration
SO_E_ENUM_NOENTRIES
CCF_STORAGE_DBASO_E_NOT_FOUND 0x80046211L specified object can not be found
CCF_STORAGE_DBA‐ 0x80046212L It is not allowed to change IDs.
SO_E_ID_CHANGES_NOT_POSSIBLE
CCF_STORAGE_DBASO_E_PARAME‐ 0x80046213L The parameter is too long.
TER_TOO_LONG
CCF_STORAGE_DBASO_E_DA‐ 0x80046214L Can't read data. Data from older
TA_TOO_OLD WinCC version.
CCF_STORAGE_DBASO_E_DATA_NEW‐ 0x80046215L Data newer than software.
ER_THAN_SOFTWARE Please grade up.
CCF_STORAGE_DBASO_E_ENUM‐ 0x80046216L Enum sink returned with error.
SINK_RETURNED_WITH_ERROR
CCF_STORAGE_DBASO_E_DATA_EX‐ 0x80046217L Primary key is referenced in an‐
IST_IN_REFERENCED_TABLE other table.
CCF_STORAGE_DBASO_E_DA‐ 0x80046218L Value out of Range.
TA_OUT_OF_RANGE
CCF_STORAGE_DM_ASO_BULK_FAILED 0x80046219L Bulk operation failed.
CCF_STORAGE_DBASO_E_RT_LIM‐ 0x8004621AL The runtime limit is reached
IT_WARNING
CCF_STORAGE_DBASO_E_BAD_LO‐ 0x8004621BL
CALE_ID
CCF_STORAGE_FILEASO_E_NO_PIC‐ 0x80046301L no picture available
TURE
CCF_STORAGE_GDO_BAD‐ 0x80046405L wrong type in vt
TYPE_IN_VARIANT
CCF_STORAGE_GDO_DATAINCONSIS‐ 0x80046406L data inconsistent
TENT some part of the data is not valid
or out of range
CCF_STORAGE_GDO_UNITID_INVALID 0x80046407L data inconsistent
channel unit ID is invalid
CCF_STORAGE_GDO_USERTYPE_INVA‐ 0x80046408L data inconsistent
LID usertype is invalid
CCF_STORAGE_GDO_ADDRESS‐ 0x80046409L data inconsistent
BUILD_FAILURE failure in building address for var‐
iable
CCF_STORAGE_GDO_MODIFY_NO‐ 0x8004640AL data inconsistent
CHANGE no relevant modifications are
made
CCF_STORAGE_GDO_CHANNELWRAP‐ 0x8004640BL CCMfcChannelWrapper.DLL
PER_LOAD can not be found
CCF_STORAGE_GDO_CHANNEL_LOAD 0x8004640CL Channel Load failure
Channel can not be found
CCF_STORAGE_GDO_CHANNEL_FUNC 0x8004640DL Channel Entry Points not found
CCF_STORAGE_GDO_CHAN‐ 0x8004640EL Invalid Unit Number
NEL_UNITNR

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1121
Runtime API (RT Professional)
2.12 Troubleshooting (RT Professional)

Error message Value


CCF_STORAGE_GDO_CONNECTION 0x8004640FL Invalid Connection or Connec‐
tion not found
CCF_STORAGE_GDO_TAGGROUP 0x80046410L Invalid TagGroup or TagGroup
not found
CCF_STORAGE_GDO_NAMENOTFOUND 0x80046411L Specified name not found
CCF_STORAGE_GDO_TAGOFUSERTY‐ 0x80046412L The object UserType could not
PEEXISTS be removed
CCF_STORAGE_GDO_PROJECTISAC‐ 0x80046413L The project is activated. No
TIVE changes or removes allowed.
CCF_STORAGE_GDO_UNIT 0x80046414L Invalid channel unit or channel
unit not found
CCF_STORAGE_GDO_MINMAX_LIMIT 0x80046415L Min Max Limit violation
CCF_STOR‐ 0x80046416L This Operation is not allowed
AGE_GDO_PROJECT_IN_RUNTIME while project is in runtime.
CCF_STORAGE_GDO_BAD_POINTER 0x80046600L NULL pointer for get property not
allowed.
CCF_STORAGE_GDO_UNEXPECTED 0x80046601L Unexpected error.
CCF_STORAGE_GDO_NO_RECORD 0x80046602L No record.
CCF_STORAGE_GDO_OPERA‐ 0x80046603L Current operation not committed.
TION_NOT_COMITTED
CCF_STOR‐ 0x80046604L No project connector.
AGE_GDO_NO_PROJECT_CONNECTOR
CCF_STOR‐ 0x80046605L Project not opened.
AGE_GDO_PROJECT_NOT_OPENED
CCF_STOR‐ 0x80046606L Get Aso failed.
AGE_GDO_GET_ASO_FAILED
CCF_STORAGE_GDO_BAD_TYPEID 0x80046607L Bad Type ID.
CCF_STORAGE_GDO_OTH‐ 0x80046608L Other type not committed.
ER_TYPE_NOT_COMMITED
CCF_STORAGE_GDO_CACHE_READ 0x80046609L Error in cache read.
CCF_STORAGE_GDO_CACHE_WRITE 0x8004660AL Error in cache write.
CCF_STORAGE_GDO_DM_GDO_ERROR 0x8004660BL Error in DM Gdo.
CCF_STORAGE_GDO_TEXT_GDO_ER‐ 0x8004660CL Error in Text Gdo.
ROR
CCF_STORAGE_GDO_ENUMERA‐ 0x8004660DL Creation of an ASO enumerator
TOR_CREATION failed.
CCF_STORAGE_GDO_ENUMDA‐ 0x8004660EL Call to ICCTxtAsoEnum::Enum‐
TA_FAILED Data() failed.
CCF_STORAGE_GDO_ENUMSINK_CRE‐ 0x8004660FL Creation of an enumeration sink
ATION object failed.
CCF_STORAGE_GDO_WRONG_INTER‐ 0x80046610L Pointer to wrong interface
FACE passed.
CCF_STORAGE_GDO_BAD_LOCALE_ID 0x80046611L Locale ID not found in map.
CCF_STORAGE_GDO_CREATE_OBJECT 0x80046612L CreateObject failed.
CCF_STORAGE_GDO_MODIFY_OBJECT 0x80046613L ModifyObject failed.
CCF_STORAGE_GDO_READ_OBJECT 0x80046614L ReadObject failed.

WinCC Professional V13 SP2 – Programming reference


1122 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.12 Troubleshooting (RT Professional)

Error message Value


CCF_STORAGE_GDO_NOT_IMPLEMEN‐ 0x80046615L Not implemented.
TED
CCF_STORAGE_GDO_REMOVE_OB‐ 0x80046616L RemoveObject failed.
JECT
CCF_STORAGE_GDO_REMOVE_ALL 0x80046617L RemoveAll failed.
CCF_STORAGE_GDO_ENUM_OBJECTS 0x80046618L EnumObjects failed.
CCF_STORAGE_GDO_GET_OB‐ 0x80046619L GetObjectCount failed.
JECT_COUNT
CCF_STORAGE_GDO_GET_RW_INTER‐ 0x8004661AL GetRWInterface from Aso failed.
FACE_FROM_ASO
CCF_STORAGE_GDO_ON_ENUM_DATA 0x8004661BL OnEnumData of sink object
failed.
CCF_STORAGE_GDO_ASO_CREATE 0x8004661CL Create call to Aso failed.
CCF_STORAGE_GDO_CREATE_CACH‐ 0x8004661DL CreateCachedObject failed.
ED_OBJECT
CCF_STORAGE_GDO_CRE‐ 0x8004661EL Create Sink Object for Aso failed.
ATE_SINK_OBJECT_FOR_ASO
CCF_STORAGE_GDO_CRE‐ 0x8004661FL Error in create of DM Gdo.
ATE_DM_GDO
CCF_STORAGE_GDO_CON‐ 0x80046620L Error in connect to DM Gdo.
NECT_DM_GDO
CCF_STORAGE_GDO_CRE‐ 0x80046621L Error in create Text Gdo.
ATE_TEXT_GDO
CCF_STORAGE_GDO_CON‐ 0x80046622L Error in connect to Text Gdo.
NECT_TEXT_GDO
CCF_STORAGE_GDO_INVA‐ 0x80046623L Invalid enum sink pointer.
LID_ENUM_SINK_POINTER
CCF_STORAGE_GDO_VAR‐ 0x80046624L Error in Variant ChangeType.
IANT_CHANGE_TYPE
CCF_STORAGE_GDO_GET_COL‐ 0x80046625L Error in GetCollectID.
LECT_ID
CCF_STORAGE_GDO_COM‐ 0x80046626L CommitToTypeHandler failed.
MIT_TO_TYPE_HANDLER
CCF_STORAGE_GDO_SET_TAG_ID 0x80046627L Error in SetTagId.
CCF_STORAGE_GDO_SET_TEXT_ID 0x80046628L Error in SetTextId.
CCF_STORAGE_GDO_COMMIT_CACH‐ 0x80046629L Error in CommitCachedObject.
ED_OBJECT
CCF_STORAGE_GDO_QUERY_INTER‐ 0x8004662AL QueryInterface of sink failed.
FACE_OF_SINK
CCF_STORAGE_GDO_BAD_PROPER‐ 0x8004662BL Bad Parameter for Property pro‐
TY_PARAMETER vided.
CCF_STORAGE_GET_TAG‐ 0x8004662CL Cannot get tag-name from tag-id.
NAME_FROM_ID
CCF_STORAGE_DELETE_RE‐ 0x8004662DL Cannot delete records for Crea‐
CORD_OF_CREATORID torID not equal 0.
CCF_STORAGE_CACHE_OVERFLOW 0x8004662EL Cache overflow.
CCF_STORAGE_SERVER_DOWN 0x8004662FL Server down.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1123
Runtime API (RT Professional)
2.12 Troubleshooting (RT Professional)

Error message Value


CCF_STORAGE_ASO_PTR_NOT_INI‐ 0x80046630L Aso smart pointer not initialized.
TIALIZED
CCF_STORAGE_CREATE_CONNEC‐ 0x80046631L Cannot create connection con‐
TION_CONTROLLER troller.
CCF_STORAGE_CONNECTION_CON‐ 0x80046632L Cannot connect connection con‐
TROLLER_CONNECT_TO_PROJECT troller to project.
CCF_STORAGE_ASO_WRAP‐ 0x80046633L Cannot set connection controller
PER_SET_CONNECTION_CONTROLLER for aso wrapper.
CCF_STORAGE_ASO_WRAP‐ 0x80046634L Cannot set project storage for
PER_SET_PROJECT_STORAGE aso wrapper.
CCF_STORAGE_PROGID_FROM_CLSID 0x80046635L Error in ProgIDFromCLSID.
CCF_STORAGE_ASO_WRAP‐ 0x80046636L Error in Aso wrapper, GetAso
PER_GET_ASO call.
CCF_STORAGE_ASO_WRAP‐ 0x80046637L Error in Aso wrapper, SetProject‐
PER_SET_PROJECT_STORAGE_NULL Storage(NULL).
CCF_STORAGE_ASO_WRAP‐ 0x80046638L Error in Aso wrapper, GetRWIn‐
PER_GET_RWINTERFACE terface call.
CCF_STORAGE_GDO_GET_PROJECT 0x80046639L Error in GdoCoreBase, GetPro‐
ject call.
CCF_STOR‐ 0x8004663AL Error in GdoCoreBase, GetPro‐
AGE_TLGGDO_VAR_NO_TRIGGER ject call.
CCF_STORAGE_PACK‐ 0x80046501L can't instantiate Project-ASO
AGES_PROJECT_ASO
CCF_STORAGE_PACKAGES_EX‐ 0x80046502L Export Data failed
PORT_DATA
CCF_STORAGE_PACKAGES_LIST 0x80046503L Enum Packages failed
CCF_STORAGE_CCPACKAGEMGR_EX‐ 0x80046504L Export Data is running
PORT_IS_RUNNING
CCF_STORAGE_CCPACKAGEMGR_UP‐ 0x80046505L Update Data is running
DATE_IS_RUNNING
CCF_STORAGE_PACKAGES_EX‐ 0x80046506L Export was canceled by user
PORT_USER_CANCELED
CCF_STORAGE_PACKAGES_IM‐ 0x80046507L Only one central archive server
PORT_ONLY_ONE_CAS_CAN_BE_IM‐ can be imported.
PORTED
CCF_STORAGE_PACKAGES_FOR‐ 0x80046508L Configuration of standard-server
BID_STANDARD_SERVER is not allowed for this server-type
CCF_STORAGE_PACKAGES_IM‐ 0x80046509L Do not import redundant server.
PORT_IMPORT_RED
CCF_STORAGE_PACKAGES_IM‐ 0x8004650AL Do not update package with re‐
PORT_CHANGE_RED dundant server.
CCF_STORAGE_PACKAGES_IM‐ 0x8004650BL Do not import package with iden‐
PORT_IMPORT_PHYS tical server.
CCF_STORAGE_PACKAGES_IM‐ 0x8004650CL Do not update package with iden‐
PORT_CHANGE_PHYS tical server.
CCF_STORAGE_PACKAGES_IM‐ 0x8004650DL Do not import or update package
PORT_CHANGE_OWN with own server.

WinCC Professional V13 SP2 – Programming reference


1124 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.12 Troubleshooting (RT Professional)

Error message Value


CCF_STORAGE_PACKAGES_IM‐ 0x8004650EL Do not import or update package
PORT_INCLUDE_OWN_RED with own redundant server.
PCC_E_CANNOT_CONNECT_TO_DATA‐ 0x80047000L Cannot connect to database
BASE
PCC_E_RECONNECT_TO_DATA‐ 0x80047001L Reconnect to database failed
BASE_FAILED
PCC_E_JOB_ID_IS_INVALID 0x80047002L Job ID is invalid
PCC_E_INVALID_CONTEXT_INFO_PRO‐ 0x80047003L Invalid context info provided
VIDED
PCC_E_DATABASE_ER‐ 0x80047004L Database error - see event log
ROR_SEE_EVENT_LOG for further information
PCC_E_ERROR_SEE_EVENT_LOG 0x80047005L Unspecified error - see event log
for further information
PCC_E_INVALID_PARAMETERS 0x80047006L Incorrect parameters provided
PCC_E_ROLLBACK_TRANSAC‐ 0x80047007L Cannot rollback transaction
TION_FAILED
PCC_E_COMMIT_TRANSAC‐ 0x80047008L Cannot commit transaction
TION_FAILED
PCC_E_BEGIN_TRANSACTION_FAILED 0x80047009L Cannot start transaction
PCC_E_COPY_WORLD‐ 0x8004700AL Failed to copy worldmap - world‐
MAP_FAILED_WORLDMAP_LOCKED map locked
PCC_E_MODIFY_WORLD‐ 0x8004700BL Failed to modify worldmap -
MAP_FAILED_WORLDMAP_LOCKED worldmap locked
PCC_E_REMOVE_WORLD‐ 0x8004700CL Failed to remove worldmap -
MAP_FAILED_WORLDMAP_LOCKED worldmap locked
PCC_E_MODI‐ 0x8004700DL Failed to modify view - view
FY_VIEW_FAILED_VIEW_LOCKED locked
PCC_E_RE‐ 0x8004700EL Failed to remove view - view
MOVE_VIEW_FAILED_VIEW_LOCKED locked
PCC_E_COPY_WORLD‐ 0x8004700FL Copy worldmap failed - view(s)
MAP_FAILED_VIEWS_LOCKED locked
PCC_E_MODIFY_WORLD‐ 0x80047010L Modify worldmap failed - view(s)
MAP_FAILED_VIEWS_LOCKED locked
PCC_E_REMOVE_WORLD‐ 0x80047011L Remove worldmap failed -
MAP_FAILED_VIEWS_LOCKED view(s) locked
PCC_E_COPY_WORLDMAP_FAILED_OB‐ 0x80047012L Copy worldmap failed - ob‐
JECTS_LOCKED jects(s) locked
PCC_E_MODIFY_WORLD‐ 0x80047013L Modify worldmap failed - ob‐
MAP_FAILED_OBJECTS_LOCKED jects(s) locked
PCC_E_REMOVE_WORLD‐ 0x80047014L Remove worldmap failed - ob‐
MAP_FAILED_OBJECTS_LOCKED jects(s) locked
PCC_E_MODIFY_OBJECTS_FAILED_OB‐ 0x80047015L Failed to modify object(s) - ob‐
JECTS_LOCKED ject(s) locked
PCC_E_REMOVE_OB‐ 0x80047016L Failed to remove object(s) - ob‐
JECTS_FAILED_OBJECTS_LOCKED ject(s) locked
PCC_E_COPY_WORLD‐ 0x80047017L Failed to copy worldmap in job -
MAP_FAILED_NO_ACTIVATED_WORLD‐ no activated worldmap
MAP

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1125
Runtime API (RT Professional)
2.12 Troubleshooting (RT Professional)

Error message Value


PCC_E_REMOVE_WORLD‐ 0x80047018L Failed to remove worldmap in job
MAP_FAILED_NO_ACTIVATED_WORLD‐ - no activated worldmap
MAP
PCC_E_REMOVE_OB‐ 0x80047019L Failed to remove object(s) in job
JECTS_FAILED_NO_ACTIVATED_OB‐ - no activated object(s)
JECTS
PCC_E_MODIFY_OB‐ 0x8004701AL Failed to modify object(s) in job
JECTS_FAILED_NO_ACTIVATED_OB‐ - no activated object(s)
JECTS
PCC_E_RE‐ 0x8004701BL Failed to remove view in job - no
MOVE_VIEW_FAILED_NO_ACTIVA‐ activated view
TED_VIEW
PCC_E_MODIFY_VIEW_FAILED_NO_AC‐ 0x8004701CL Failed to modify view in job - no
TIVATED_VIEW activated view
PCC_E_MODIFY_WORLD‐ 0x8004701DL Failed to modify worldmap in job
MAP_FAILED_NO_ACTIVATED_JOB - no activated job
PCC_E_COPY_WORLD‐ 0x8004701EL Copy worldmap failed - world‐
MAP_FAILED_NOT_FOUND map not found
PCC_E_WORLDMAP_NAME_IN_USE 0x8004701FL Worldmap name already in use
PCC_E_VERSION_NUMBER_INVALID 0x80047020L Version number invalid
PCC_E_USER_DOES_NOT_HAVE_WRIT 0x80047021L User does not have 'write' per‐
E_PERMISSION mission
PCC_E_CREATE_AREA‐ 0x80047022L Failed to create area lock. There
LOCK_FAILED_OBJECTS_LOCKED are locked objects
PCC_E_MODIFY_AREA‐ 0x80047023L Failed to modify area lock. There
LOCK_FAILED_OBJECTS_LOCKED are locked objects
PCC_E_JOB_NOT_FOUND 0x80047024L The job was not found
PCC_E_JOB_MUST_EX‐ 0x80047025L The job must exist more than
IST_MORE_THAN_ONCE once
PCC_E_CANNOT_MODIFY_ROOT_CTX 0x80047026L The root context can not be modi‐
fied
PCC_E_CANNOT_MODIFY_JOB 0x80047027L The job can not be modified
PCC_E_CANNOT_MODIFY_JOB_RE‐ 0x80047028L The job can not be modified. It is
SERVED_BY_OTHER_USER reserved by another user
WINCC_DBPLUGIN_E_ROW_EXISTS 0x80047100L Row already exists
WINCC_DBPLUGIN_E_CON‐ 0x80047101L A constraint conflict occurred
STRAINT_CONFLICT
WINCC_DBPLUGIN_E_INVALID_OB‐ 0x80047102L Invalid object name
JECT_NAME
WINCC_DBPLUGIN_E_INVALID_COL‐ 0x80047103L Invalid column name
UMN_NAME
WINCC_DBPLUGIN_E_DATA_CONVER‐ 0x80047104L Error converting data
SION
WINCC_DBPLUGIN_E_DATA_CONVER‐ 0x80047105L String conversion to Datetime-
SION_DATETIME format failed
WINCC_DBPLU‐ 0x80047106L String will be truncated
GIN_E_STRING_TOO_LONG

WinCC Professional V13 SP2 – Programming reference


1126 System Manual, 03/2017, Online help printout
Runtime API (RT Professional)
2.12 Troubleshooting (RT Professional)

Error message Value


WINCC_DBPLUGIN_E_ARITHMET‐ 0x80047107L Arithmetic overflow data type
IC_OVERFLOW cannot store value
WINCC_DBPLUGIN_RECORD_LOCKED 0x80047108L Record locked
WINCC_DBPLUGIN_TABLE_LOCKED 0x80047109L Table locked
WINCC_DBPLUGIN_CANNOTOPENDB 0x8004710AL Can not open database
PCC_E_CAN‐ 0x8004710BL Object cannot get a unique name
NOT_DO_MAKE_UNIQUE_NAME
PCC_E_NO_DB_FOUND_ON_RTS 0x8004710CL Could not access database on
RTS master or standby
PCC_E_OPERATION_NOT_AL‐ 0x8004710DL This operation is not allowed on
LOWED_ON_RTS the RTS database. It must be
performed in the engineering da‐
tabase on the PSOS
PCC_E_NO_DB_FOUND_ON_PSOS 0x8004710EL Could not access database on
PSOS

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1127
Runtime API (RT Professional)
2.12 Troubleshooting (RT Professional)

WinCC Professional V13 SP2 – Programming reference


1128 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced,
RT Professional) 3
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.1 AcknowledgeAlarm (Panels, Comfort Panels, RT Advanced)

Description
Acknowledges all selected alarms.
This system function is used when the HMI device does not have an ACK key or when the
integrated key of the alarm view should not be used.
This system function can only be used for function keys.

Use in the function list


AcknowledgeAlarm

Use in user-defined functions


AcknowledgeAlarm
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter
--

3.1.2 ActivatePreviousScreen (Panels, Comfort Panels, RT Advanced)

Description
Performs a screen change to the screen which was activated before the current screen. The
screen change is not performed if no screen was activated beforehand.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1129
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

The last 10 screens that were called up are saved. A system alarm is output when you change
to a screen which is no longer saved.

Note
If you want to use the system function, the screen to which you change has to be used in the
navigation structure.

Use in the function list


ActivatePreviousScreen

Use in user-defined functions


ActivatePreviousScreen
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter
--

3.1.3 ActivateScreen (Panels, Comfort Panels, RT Advanced)

Description
Performs a screen change to the given screen.
Use the "ActivateScreenByNumber" system function to change from the root screen to the
permanent window or vice versa.

Use in the function list


ActivateScreen (Screen name, Object number)

Use in user-defined functions


ActivateScreen (Screen_name, Object_number)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

WinCC Professional V13 SP2 – Programming reference


1130 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Parameters

Screen name
Name of the screen to which you change.

Object number
The operator control element which receives the focus in the given screen after the screen
change. The number of the operator control element is to be determined using the tabulator
sequence during configuration.
When "0" is specified:
● If the focus is in the permanent window when the system function is called up, the
permanent window maintains the focus.
● If the focus is in the root screen when the system function is called up, the first operator
control element in the given screen receives the focus.
Note
If the "Reach margin" event is assigned to the "ActivateScreen" system function, only the
value "0" is valid for the "Object number" parameter. The active object is not defined by the
object number, but rather by the X position it had prior to the screen change.

Example
The ActivateScreen function is used in the following program code to activate the "Screen_2"
screen when you click a button.

// User defined code


// i.e. when pressing a button
ActivateScreen ("Screen_2", 0);
...
}

3.1.4 ActivateScreenByNumber (Panels, Comfort Panels, RT Advanced)

Description
Performs a screen change to a screen depending on a tag value.
The screen is identified by its screen number.

Use in the function list


ActivateScreenByNumber (Screen number, Object number)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1131
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in user-defined functions


ActivateScreenByNumber (Screen_number, Object_number)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Screen number
Tag which contains the screen number of the destination screen.
When a change from the root screen to the permanent window is desired, "0" or "-1" is specified:
0 = Change from root screen to permanent window
-1 = Change from permanent window to root screen

Object number
The number of the screen object which receives the focus in the given screen after the screen
change. The number of the operator control element is to be determined using the tabulator
sequence during configuration.
When "0" is specified:
● If the focus is in the permanent window when the system function is called up, the
permanent window maintains the focus.
● If the focus is in the root screen when the system function is called up, the first operator
control element in the given screen receives the focus.

3.1.5 ActivateSystemDiagnosticsView (Panels, Comfort Panels, RT Advanced)

Description
Activates the system diagnostics view. The system diagnostics view shows the detail view of
the device concerned.

Use in the function list


ActivateSystemDiagnosticsView (Screen name, Object name)

Use in user-defined functions


ActivateSystemDiagnosticsView (Screen_name, Object_name)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

WinCC Professional V13 SP2 – Programming reference


1132 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Parameter

Screen name
Name of the screen contained in the system diagnostics view.

Object name
Object name of the system diagnostics view.

3.1.6 ArchiveLogFile (Panels, Comfort Panels, RT Advanced)

Description
This system function moves or copies a log to another storage location for long-term logging.
With Audit Trails, always use the "Move" (hmiMove)" mode, otherwise you will be violating the
FDA guideline by duplicating the data stored.
Prior to "ArchiveLogFile" always run the system function "CloseAllLogs".
After this system function, run the "OpenAllLogs" system function.
In "Copy log" mode, the logs are not reopened until the log has been successfully copied, or
unless a timeout occurs during the copy process. In "Move log" mode, the logs to be moved
are renamed and the new logs are opened immediately. To move the renamed logs, a job is
submitted which attempts to move them every 300 seconds if the server cannot be reached.
The job is also retained after Runtime is restarted until it is executed.

Use in the function list


ArchiveLogFile (Log type, Log, Directory name, Mode)

Use in user-defined functions


ArchiveLogFile (Log_type, Log, Directory_name, Mode)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Log type
Determines the type of log:
0 (hmiTagArchive) = Data log
1 (miAlarmArchive) = Alarm log
2 (hmiAudittrailArchive) = Audit trail log available for GMP compliant projects. Additional
information is available under "Activating GMP-compliant configuration".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1133
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Log
Name of the log being archived.

Directory name
Path for saving the log.

Mode
0 (hmiCopy) = Copy log
1 (hmiMove) = Move log

Application example
You want to move a log file from a local storage medium to the server in order to generate a
backup copy of this file at cyclic intervals.
Notes on configuring
Set up a task in the scheduler which is executed at a specific time on a daily basis. Configure
the following function list for the task:

Procedure on HMI device


● All log files will be closed.
● The log file you specified is moved to the server.
● All closed log files will be opened again.

WinCC Professional V13 SP2 – Programming reference


1134 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.7 Back up RAM file system (Panels, Comfort Panels, RT Advanced)

Description
Backs up the RAM file system in the memory medium of the HMI device.
After restarting the HMI device, the data is automatically reloaded in the RAM file system.
Applications such as the Internet Explorer save data (e.g. the last web sites called up)
temporarily to the DRAM file system of the HMI device.

Use in the function list


BackupRAMFileSystem

Use in user-defined functions


BackupRAMFileSystem
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter
--

3.1.8 CalibrateTouchScreen (Panels, Comfort Panels, RT Advanced)

Description
Calls a program for calibrating the touch screen.
During the calibration process, there is a prompt to touch five positions on the screen display.
Touch the screen display within 30 seconds, to confirm the calibration process. If the calibration
is not completed within this time span, the calibration settings are discarded. The user prompt
is in English.
Use this system function the first time you start the HMI device.

Use in the function list


CalibrateTouchScreen

Use in user-defined functions


CalibrateTouchScreen
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1135
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Parameter
--

Note
The CalibrateTouchScreen system function cannot be simulated.

3.1.9 ChangeConnection (Panels, Comfort Panels, RT Advanced)

Description
Disconnects the connection to the currently used PLC in use and establishes a connection to
a PLC with another address. The newly connected PLC must belong to the same device class
(S7-1200, S7-300, ...etc). With S7-1200, the use of the function is also only permitted for
absolute addressing.

Note
When changing to another address, ensure that the address is not already being used by
another HMI device.

The follows address types are supported:


● IP address
● MPI address
The follows PLC types are supported:
● SIMATIC S7 300/400
● SIMATIC S7-NC
● SIMOTION

Use in the function list


ChangeConnection (Connection, Address, Slot, Rack)

Use in user-defined functions


ChangeConnection (Connection, Address, Slot, Rack)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

WinCC Professional V13 SP2 – Programming reference


1136 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Parameter

Connection
Name of the connection that is disconnected. The name is set during configuration, for
example, in the "Connections" editor.

Address
MPI/PROFIBUS or IP address of the PLC to which the connection will be established.

Note
Set the address by means of a tag. The objects list displays the tags of all data types. Select
only tags of the following data types:
● Ethernet connection: "String" data type
● MPI connection: "Int" data type

Slot
Slot of the PLC to which the connection will be established.

Rack
Rack of the PLC to which the connection will be established.

Application example
You want to operate one HMI device on several machines. Configure the necessary PLCs in
the project, to which you want to change by pressing a key. When changing the PLC, the
connection to the PLC in use is disconnected. Then the connection to the new PLC with other
address parameters is reestablished. To access the values of the new PLC, configure the
same tags for the PLC used.
The PLC which you have indicated when creating the project will be used as default.
1. Enter the name and address of the PLC in the "Connections" editor.
2. Configure a button in the process screen.
3. Configure the "ChangeConnection" system function on the "Press" event.
4. Enter the name of the connection and address of the PLC as parameters.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1137
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.10 ClearAlarmBuffer (Panels, Comfort Panels, RT Advanced)

Description
Deletes alarms from the alarm buffer on the HMI device.

Note
Alarms which have not yet been acknowledged are also deleted.

Use in the function list


ClearAlarmBuffer (Alarm class number)

Use in user-defined functions


ClearAlarmBuffer (Alarm_class_number)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Alarm class number


Determines which alarms are to be deleted from the alarm buffer:
0 (hmiAll) = All alarms/events
1 (hmiAlarms) = Alarms of alarm class "Errors"
2 (hmiEvents) = Alarms of alarm class "Warnings"
3 (hmiSystem) = Alarms of alarm class "System"
4 (hmiS7Diagnosis) = Alarms of alarm class "Diagnosis Events"

Note
Device dependency
Alarms of alarm class "Diagnosis Events" are not available on Basic Panels.

3.1.11 ClearAlarmBufferProtool (Panels, Comfort Panels, RT Advanced)

Description
The system function exists to ensure compatibility.

WinCC Professional V13 SP2 – Programming reference


1138 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

It has the same functionality as the "ClearAlarmBuffer" system function, but uses the old
ProTool numbering.

Use in the function list


ClearAlarmBufferProTool (Alarm class number)

Use in user-defined functions


ClearAlarmBufferProtoolLegacy (Alarm_class_number)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Alarm class number


Alarm class number whose messages are to be deleted:
-1 (hmiAllProtoolLegacy) = All alarms/events
0 (hmiAlarmsProtoolLegacy) = Alarms of alarm class "Errors"
1 (hmiEventsProtoolLegacy) = Alarms of alarm class "Warnings"
2 (hmiSystemProtoolLegacy) = Alarms of alarm class "System"
3 (hmiS7DiagnosisProtoolLegacy) = Alarms of alarm class "Diagnosis Events"

Note
Device dependency
Alarms of alarm class "Diagnosis Events" are not available on Basic Panels.

3.1.12 ClearDataRecord (Panels, Comfort Panels, RT Advanced)

Description
Deletes a recipe data record.
Several data records can be deleted from one or more recipes.

Use in the function list


DeleteDataRecord (Recipe number/name, Data record number/name, Confirmation, Output
status message, Processing status)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1139
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in user-defined functions


DeleteDataRecord
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Recipe number/name
Number or name of the recipe from which recipe data records are deleted. "0" is specified if
you want to delete recipe data records from all available recipes.

Data record number/name


Number or name of the recipe data record to be deleted. "0" is specified if you want to delete
all recipe data records.

Confirmation
Determines whether the operator should confirm the deletion:
0 (hmiOff) = Off: Deletion is begun without confirmation.
1 (hmiOn) = On: The starting of the deletion process must be confirmed.

Output status message


Determines whether a status message is output after the deletion:
0 (hmiOff) = Off: Status message is not output.
1 (hmiOn) = On: Status message is output.

Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.

3.1.13 ClearDataRecordMemory (Panels, Comfort Panels, RT Advanced)

Description
Deletes all recipes data records from the specified storage medium.

WinCC Professional V13 SP2 – Programming reference


1140 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in the function list


ClearDataRecordMemory (Storage location, Confirmation, Output status message,
Processing status)

Use in user-defined functions


ClearDataRecordMemory (Storage_location, Confirmation, Output_status_message,
Processing_status)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Storage location
Determines the storage location:
0 (hmiFlashMemory) = Flash memory: Internal flash memory of the HMI device
1 (hmiStorageCard) = Storage card
2 (hmiStorageCard2) = Storage card 2
3 (hmiStorageCard3) = Storage card MultiMediaCard
4 (hmiStorageCard4) = Storage card USB

Confirmation
Determines whether the operator should confirm the deletion:
0 (hmiOff) = Off: Deletion is begun without confirmation.
1 (hmiOn) = On: The starting of the deletion process must be confirmed.

Output status message


Determines whether a status message is output after the deletion:
0 (hmiOff) = Off: Status message is not output.
1 (hmiOn) = On: Status message is output.

Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1141
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.14 ClearLog (Panels, Comfort Panels, RT Advanced)

Description
Deletes all data records in the given log.

Use in the function list


ClearLog (Log type, Log)

Use in user-defined functions


ClearLog (Log_type, Log)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Log type
Determines the type of log:
0 (hmiTagArchive) = Data log
1 (hmiAlarmArchive) = Alarm log
2 (hmiAudittrailArchive) = Audit trail log Available for GMP-compliant projects Additional
information is available under "Activating GMP-compliant configuration".

Log
Name of the log from which all entries are deleted.

3.1.15 CloseAllLogs (Panels, Comfort Panels, RT Advanced)

Description
Disconnects the connection between WinCC and all logs.

Note
Before you close a log, the logging function must first be stopped in the log. Use the
"StopLogging" system function.

Use in the function list


CloseAllLogs

WinCC Professional V13 SP2 – Programming reference


1142 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in user-defined functions


CloseAllLogs
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter
--

Application example
You are in runtime and want to change the data medium on which the process values are
logged.
Notes on configuring
Configure the "StopLogging" and "CloseAllLogs" system functions on the "Close Archive"
button.
Configure the "OpenAllLogs" and "StartLogging" system functions on the "Open Archive"
button.
As parameter transfer the respective name of the log that is to be stopped and started.
Procedure on HMI device
When the button "Close Archive" is pressed, the specified log is stopped and all open logs are
closed. The data medium can be changed. You open all logs with the "Open Archive" button.
The logging process will continue in the specified log.

3.1.16 ControlSmartServer (Panels, Comfort Panels, RT Advanced)

Description
Starts or stops the Sm@rtServer.

Use in the function list


ControlSmartServer (Mode)

Use in user-defined functions


ControlSmartServer (Mode)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1143
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Parameter

Mode
Specifies whether the Sm@rtServer is started or stopped.
-1 (hmiToggle) = Toggle: Toggles between the two modes
0 (hmiStop) = Stop: Sm@rtServer is stopped
1 (hmiStart) = Start: Sm@rtServer is started

3.1.17 ControlWebServer (Panels, Comfort Panels, RT Advanced)

Description
Starts or stops the Web server.

Use in the function list


ControlWebServer (Mode)

Use in user-defined functions


ControlWebServer (Mode)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Mode
Specifies whether the Web server is started or stopped.
-1 (hmiToggle) = Toggle: Toggles between the two modes
0 (hmiStop) = Stop: The Web server is stopped.
1 (hmiStart) = Start: The Web server is started.

WinCC Professional V13 SP2 – Programming reference


1144 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.18 CopyLog (Panels, Comfort Panels, RT Advanced)

Description
Copies the contents of a log to another log. Tag values can only be copied to other data logs
and alarms only to other alarm logs, however.

Note
If you copy a log using the "CopyLog" system function, it is possible that external applications
will be unable to read certain country-specific special characters in the logged message text
of the log copy. This does not apply to WinCC Runtime. WinCC Runtime can read the copied
log files without errors.

Note
80% of the log entries are copied when copying the circular logs. 20% of entries are not copied
because the space is reserved for buffer overflow by default.

Use in the function list


CopyLog (Log type, Destination log, Source log, Mode, Delete source log)

Use in user-defined functions


CopyLog (Log_type, Destination log, Source_log, Mode, Delete_source_log)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Log type
Determines the type of log:
0 (hmiTagArchive) = Data log
1 (hmiAlarmArchive) = Alarm log

Destination log
Name of the log into which the entries are copied (Destination log).

Source log
Name of the log from which the entries are copied (Source log).

Mode
Determines what is done with copied entries in the destination log:
0 (hmiOverwrite) = Overwrite: Existing entries are overwritten.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1145
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

2 (hmiAppend) = Append: The entries are inserted at the end of the destination log. When the
configured size of the log has been reached, the destination log is treated like a circular log.

Delete source log


Determines whether the source log is deleted after copying.
0 (hmiNo) = No: Is not deleted.
1 (hmiYes) = Yes: Is deleted.

3.1.19 DecreaseTag (Panels, Comfort Panels, RT Advanced)

Description
Subtracts the given value from the tag value.
X=X-a

Note
The system function uses the same tag as input and output values. When this system function
is used to convert a value, auxiliary tags must be used. The auxiliary tags are assigned to the
tag value with the "SetTag" system function.

If you configure the system function on the events of an alarm and the tag is not being used
in the current screen, it is not ensured that the actual value of the tags is being used in the
PLC. You can improve the situation by setting the "Cyclic continuous" acquisition mode.

Use in the function list


DecreaseTag (Tag, Value)

Use in user-defined functions


DecreaseTag (Tag, Value)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Tag
The tag from which the given value is subtracted.

Value
The value which is subtracted.

WinCC Professional V13 SP2 – Programming reference


1146 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.20 EditAlarm (Panels, Comfort Panels, RT Advanced)

Description
Triggers the "Edit" event for all selected alarms.
If the alarms to be edited have not yet been acknowledged, the acknowledgment takes place
automatically when this system function is called up.
This system function can only be used for function keys.

Use in the function list


EditAlarm

Use in user-defined functions


EditAlarm
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter
--

3.1.21 Encode (Panels, Comfort Panels, RT Advanced)

Description
Adapts the "String" data type of a tag for transfer to the automation system (AS). The tag of
WinCC data type "String" is converted into the AS data type "Array of byte". The result is written
to a tag.

Use in the function list


Encode (Byte array, String, Coding)

Use in user-defined functions


Encode (Byte_array, String, Encoding)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1147
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Parameter

Byte array
The tag that contains the converted value.

Note
The Byte array must be twice the size of the string length + 2. The Byte array must contain
242 array elements if the string has a length of 120 characters.
Characters are either truncated or not converted if the size is insufficient.

String
The tag of data type "String" that is converted.

Encode
0 (hmiEncodeUTF16LE) - String is encoded in UTF16LE (Unicode 16 Little Endian).

3.1.22 EncodeEx (Panels, Comfort Panels, RT Advanced)

Description
Adapts the "String" data type of a tag for transfer to the automation system (AS). The tag of
WinCC data type "String" is converted into the AS data type "Array of byte". The result is written
to a tag.
By contrast to the Encode system function, you can define the Line break parameter. Using
the Line break parameter you can delete line breaks or replace these with predefined
characters.

Use in the function list


EncodeEx (Byte Array, String, Encode, Line break)

Use in user-defined functions


EncodeEx (Byte_array, String, Encoding, Line_break)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

WinCC Professional V13 SP2 – Programming reference


1148 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Parameter

Byte array
The tag that contains the converted value.

Note
The byte array must be twice the size of the string length +2. If the string has a length of 120
characters, the byte array must contain 242 array elements.
Characters are either truncated or not converted if the size is insufficient.

String
The tag of data type "String" that is converted.

Encoding
0 (hmiEncodeUTF16LE) - String is encoded in UTF16LE (Unicode 16 Little Endian).

Line break
All line breaks are either deleted or replaced with predefined characters. Do not replace line
breaks if set as the default value.
0 (replace with "\r\n' (0x000D, 0x000A)) - the line break is replaced with "\r\n".
1 (replace with "\n' (0x000A)) - the line break is replaced with "\n".
2 (do not replace) - the line break is not replaced.
3 (remove line breaks) - the line breaks are removed.

3.1.23 EstablishPROFIsafe (Panels, Comfort Panels, RT Advanced)

Description
Establishes the PROFIsafe connection for fail-safe operation between a KTP Mobile Panel
and the PLC if the connection was previously disconnected by means of TerminatePROFIsafe.

Note
A connection for the PROFIsafe communication can only be established if ONLINE mode has
been set on the HMI device. Use the "SetDeviceMode" system function for this purpose.

Use in the function list


EstablishPROFIsafe

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1149
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in user-defined functions


EstablishPROFIsafe
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters
--

3.1.24 ExportDataRecords (Panels, Comfort Panels, RT Advanced)

Description
Exports one or all data records of a recipe to a CSV file.
One file is created per recipe.

Use in the function list


ExportDataRecords (Recipe number/name, Data record number/name, File name, Overwrite,
Output status message, Processing status)

Use in user-defined functions


ExportDataRecords (Recipe_number/name,Data_record number/name, File_name,
Overwrite, Output_status_message, Processing_status)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Recipe number/name
Number or name of the recipe from which the data records are exported. Specify "0" if recipe
data records are to be exported from all available recipes.

WinCC Professional V13 SP2 – Programming reference


1150 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

File name
Name of the CSV file to which the recipe data records are exported. Enter the storage location
and the file extension (*.csv), for example, "C:\TEMP\Orange.csv", for Basic Panels
"\USB_X61.1\Orange.csv".

Note
Storage of the CSV file
Does not apply for Basic Panels:
● If a storage card is used as storage location, specify the storage location as follows:
"\StorageCard\<File name>".
● If you only enter one file name and no path, the file will be saved in a system directory, for
example, "C:\Documents and Settings\[User]".
● When only one path for the export is specified, the file name is automatically created from
the respective recipe name. It is a requirement that the folder "D:\Temp\", for example, has
been created. If the folder "D:\Temp" has not been created, the folder name will be used
as the prefix of the file name, Temp_Recipe names.csv.

Data record number/name


Number or name of the recipe data record to be exported. Specify "0" if all recipe data records
are to be exported.

Overwrite
Determines whether an existing CSV file with the same name is overwritten:
0 (hmiOverwriteForbidden) = No: CSV file will not be overwritten. The export process will not
be carried out.
1 (hmiOverwriteAlways) = Yes: CSV file is overwritten without a prompt for confirmation.
2 (hmiOverwriteWithPrompting) = With confirmation: CSV file is not overwritten until confirmed.

Output status message


Determines whether a status message is output after the export:
0 (hmiOff) = Off: Status message is not output.
1 (hmiOn) = On: Status message is output.

Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1151
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Export format of the recipe data records


If ".csv" is chosen as a file extension for the export file, then only valid characters from the
ANSI character set will be supported. This also applies to separators in decimal numbers and
list elements. The separators used are defined in the country/regional settings of the operating
system of the exporting computer.
Does not apply for Basic Panels:
You may also set "Unicode text" (".txt") format for the export file. This file format supports the
WinCC and WinCC Runtime character set. Again, the separators used are specified in the
country/regional settings of the operating system of the exporting computer. This file format
always uses tab separators in list elements.
The corresponding file import function also supports the ".csv" and ".txt" (Unicode) file
formats.

Application example
You want to export all data records using a key.
Notes on configuring
Configure the "ExportDataRecords" system function on the "Press" event for the desired key.
Transfer the following parameters:
● Recipe number/name = 1
● Data record number/name = 0
● File name = c:\temp\orange.csv, for Basic Panels "\USB_X61.1\orange.csv"
● Overwrite = 1
● Output status message = 1
Tags can also be specified in place of the constants. Depending on the configuration, the
operator can enter the desired values in the I/O field or read from the PLC. In this way, the
operator can determine which recipe data records are exported.
Procedure on HMI device
As soon as the key is activated, the system function is triggered. The constants or tags are
evaluated. All data records of Recipe 1 are exported to the orange.csv file. If the file already
exists, it will be overwritten.
After exporting the data records, a system alarm is output.

3.1.25 ExportDataRecordsWithChecksum (Panels, Comfort Panels, RT Advanced)

Description
Exports one or all data records of a recipe to a CSV file and generates a checksum for each
line in the file.
One file is created per recipe.

WinCC Professional V13 SP2 – Programming reference


1152 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in the function list


ExportDataRecordsWithChecksum (Recipe number/name, Data record number/name, File
name, Overwrite, Output status message, Processing status)

Use in user-defined functions


ExportDataRecordsWithChecksum (Recipe_number/name, Data_record number/name,
File_name, Overwrite, Output_status_message, Processing_status)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Recipe number/name
Number or name of the recipe from which the data records are exported. Specify "0" if recipe
data records are to be exported from all available recipes.

Data record number/name


Number or name of the recipe data record to be exported. Specify "0" if all recipe data records
are to be exported.

File name
Name of the CSV file to which the recipe data records are exported. Enter the path and the
file extension e.g. "C:\TEMP\Orange.CSV".
If a storage card is used as storage location, specify the storage location as follows:
"\StorageCard\<File name>".
If you define only a file name without specifying a path, the file is saved to the directory from
which Runtime was started. If write access to this directory is not enabled in the Windows 7
operating system, the file is saved to the "VirtualStore" folder of the user directory.
When only one path for the export is specified, the file name is automatically created from the
respective recipe name. This requires, for example, that the directory "D:\Temp\" has been
created. If the directory "D:\Temp" does not exist, the directory name is used as the prefix for
the file name, Temp_Recipe names.csv.

Overwrite
Determines whether an existing CSV file with the same name is overwritten:
0 (hmiOverwriteForbidden) = No: CSV file will not be overwritten. The export process will not
be carried out.
1 (hmiOverwriteAlways) = Yes: CSV file is overwritten without a prompt for confirmation.
2 (hmiOverwriteWithConfirmation) = With confirmation: CSV file is not overwritten until
confirmed.

Output status message


Determines whether a status message is output after the export:
0 (hmiOff) = Off: Status message is not output.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1153
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

1 (hmiOn) = On: Status message is output.

Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.

Export format of the recipe data records


If ".csv" is chosen as a file extension for the export file, then only valid characters from the
ANSI character set will be supported. This also applies to separators in decimal numbers and
list elements. The separators used are defined in the country/regional settings of the operating
system of the exporting computer.
You may also set "Unicode text" (".txt") format for the export file. This file format supports the
WinCC and WinCC Runtime character set. Again, the separators used are specified in the
country/regional settings of the operating system of the exporting computer. This file format
always uses tab separators in list elements.
The corresponding file import function also supports the ".csv" and ".txt" (Unicode) file formats.

Application example
Using a key, you want to export all data records and assign a checksum.
Notes on configuring
Configure the "ExportDataRecordsWithChecksum" system function on the "Press" event for
the desired key. Transfer the following parameters:
● Recipe number/name = 1
● Data record number/name = 0
● File name = c:\temp\orange.csv
● Overwrite = 1
● Output status message = 1
Tags can also be specified in place of the constants. Depending on the configuration, the
operator can enter the desired values in the I/O field or read from the PLC. In this way, the
operator can determine which recipe data records are exported.
Procedure on HMI device
As soon as the key is activated, the system function is triggered. The constants or tags are
evaluated. All data records of Recipe 1 are exported to the orange.csv file and assigned
checksums. If the file already exists, it will be overwritten.
After exporting the data records, a system message is output.

WinCC Professional V13 SP2 – Programming reference


1154 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.26 ExportImportUserAdministration (Panels, Comfort Panels, RT Advanced)

Description
Exports all users of the user administration of the currently active project to the given file or
imports the users from the given file into the currently active project.
Users, their passwords and rights are saved in the user administration.
All users are overwritten when importing. The imported users are valid immediately.

Use in the function list


ExportImportUserAdministration (File name, Direction)

Use in user-defined functions


ExportImportUserAdministration (File_name, Direction)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

File name
Name of the file which contains the passwords or to which the passwords are written. Enter
the file location and the file extension (*.txt), for example, "C:\TEMP\Passwords.txt".

Note
If a storage card is used as file location, specify the file location as follows: "\StorageCard\<File
name>".

Direction
Specifies whether passwords are exported or imported:
0 (hmiExport) = Export: Passwords are exported.
1 (hmiImport) = Import: Passwords are imported.

3.1.27 GetBrightness (Panels, Comfort Panels, RT Advanced)

Description
Reads the value of the brightness.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1155
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in the function list


GetBrightness (Brightness)

Use in user-defined functions


GetBrightness (Brightness)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Brightness
The tag to which the value is written.

3.1.28 GetDataRecordFromPLC (Panels, Comfort Panels, RT Advanced)

Description
Transfers the selected recipe data record from the PLC to the storage medium of the HMI
device.

Use in the function list


GetDataRecordFromPLC (Recipe number/name, Data record number/name, Overwrite,
Output status message, Processing status)

Use in user-defined functions


GetDataRecordFromPLC (Recipe_number/name, Data_record_number/name, Overwrite,
Output_status_message, Processing_status)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Recipe number/name
Number or name of the recipe from which recipe data records are transferred.

Data record number/name


Number or name of the recipe data record which is transferred from the PLC to the data medium
of the HMI device.

WinCC Professional V13 SP2 – Programming reference


1156 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Overwrite
Determines whether an existing recipe data record with the same name is overwritten:
0 (hmiOverwriteForbidden) = No: Recipe data record is not overwritten. The transfer process
will not be carried out.
1 (hmiOverwriteAlways) = Yes: Recipe data record is overwritten without prompting.
2 (hmiOverwriteWithPrompting) = With confirmation: Recipe data record is not overwritten until
confirmed.

Output status message


Determines whether a status message is output after the transfer:
0 (hmiOff) = Off: Status message is not output.
1 (hmiOn) = On: Status message is output.

Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.

Application example
You want to transfer a data record from the PLC to the data medium of the HMI device using
a key.
Notes on configuring
Configure the "GetDataRecordFromPLC" system function on the "Press" event for the desired
key. Transfer the following parameters:
Recipe number/name = 1
Data record number/name = 1
Overwrite = 1
Output status message = 1
Tags can also be specified in place of the constants. Depending on the configuration, the
operator can enter the desired values in the I/O field or read from the PLC. In this way, the
operator can determine which recipe data record is transferred from the PLC.
Procedure on HMI device
As soon as the key is activated, the system function is triggered. The constants or tags are
evaluated and the first data record of Recipe 1 is transferred from the PLC to the data medium
of the HMI device. If the recipe data record already exists, it will be overwritten.
A system message is output after the transfer.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1157
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.29 GetDataRecordName (Panels, Comfort Panels, RT Advanced)

Description
Writes the name of the given recipe and recipe data record to the given tags.

Note
If the recipe or the recipe data record do not exist, wildcards ("###") are written to the tags.

Use in the function list


GetDataRecordName (Recipe number, Data record number, Recipe name, Data record name,
Processing status)

Use in user-defined functions


GetDataRecordName (Recipe_number, Data_record_number, Recipe_name,
Data_record_name, Processing_status)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Recipe number
Number of the recipe whose name is written to the given tag.

Data record number


Number of the recipe data record whose name is written to the given tag.

Recipe name
The tag to which the recipe name is written. The tag must be of the STRING type.

Data record name


The tag to which the name of the recipe data record is written. The tag must be of the STRING
type.

Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.

WinCC Professional V13 SP2 – Programming reference


1158 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Application example
You want to output the names of the displayed recipes and the name of the displayed recipe
data record on the HMI device.
Configure the following tags:
● "RecNumber" of type INTEGER
● "RecDataNumber" of type INTEGER
● "RecName" of type STRING
● "RecDataName" of type STRING
Configure a recipe view with the tags "RecNumber" for the recipe number and
"RecDataNumber" for the data record number.
Configure the "GetDataRecordName" system function on the "Press" event for a button and
pass the following parameters:
● Recipe number: RecNumber
● Data record number: RecDataNumber
● Recipe name: RecName
● Data record name: RecDataName
Configure two output fields and connect these to the "RecName" and "RecDataName" tags.
Select a recipe and a data record number from the recipe view. As soon as the button is
activated, the system function is triggered and the name of the recipe and the recipe data
record are displayed in both output fields.

3.1.30 GetDataRecordTagsFromPLC (Panels, Comfort Panels, RT Advanced)

Description
Transfers the values of the recipe data record loaded in the PLC to the corresponding recipe
tags.
This system function is used, for example, during teach-in mode on a machine.

Use in the function list


GetDataRecordTagsFromPLC (Recipe number/name, Processing status)

Use in user-defined functions


GetDataRecordTagsFromPLC (Recipe_number/name, Processing_status)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1159
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Parameter

Recipe number/name
Number or name of the recipe data record whose values are written from the PLC to the tags.

Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.

3.1.31 GetGroupNumber (Panels, Comfort Panels, RT Advanced)

Description
Reads the number of the group to which the user logged on to the HMI device belongs, and
writes it to the given tag.

Use in the function list


GetGroupNumber (Tag)

Use in user-defined functions


GetGroupNumber (Tag)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Tag
The tag to which the number of the group is written.

WinCC Professional V13 SP2 – Programming reference


1160 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.32 GetPassword (Panels, Comfort Panels, RT Advanced)

Description
Writes the password of the user currently logged on to the HMI device in the given tag.

Note
Make sure that the value of the given tag is not displayed in another place in the project.

Note
The passwords of SIMATIC Logon users cannot be read.

Use in the function list


GetPassword (Tag)

Use in user-defined functions


GetPassword (Tag)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Tag
The tag to which the password is written.

3.1.33 GetUserName (Panels, Comfort Panels, RT Advanced)

Description
Writes the user name of the user currently logged on to the HMI device in the given tag.
If the given tag has a control connection, the user name is also available in the PLC connection.
This system function makes it possible, for example, to implement a user-dependent release
of certain functionalities.

Use in the function list


GetUserName (Tag)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1161
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in user-defined functions


GetUserName (Tag)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Tag
The tag to which the user name is written.

3.1.34 GoToEnd (Panels, Comfort Panels, RT Advanced)

Description
Executes the key function <End> on the HMI device.
This system function is used when the HMI device does not have this functionality by default.
The system function can only be used for the following function keys.

Use in the function list


GoToEnd

Use in user-defined functions


GoToEnd
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter
--

3.1.35 GoToHome (Panels, Comfort Panels, RT Advanced)

Description
Executes the key function <Home> on the HMI device.
This system function is used when the HMI device does not have this functionality by default.
The system function can only be used for the following function keys.

WinCC Professional V13 SP2 – Programming reference


1162 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in the function list


GoToHome

Use in user-defined functions


GoToHome
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter
--

3.1.36 ImportDataRecords (Panels, Comfort Panels, RT Advanced)

Description
Imports one or all data records of a recipe from a CSV file.
When a path is specified, all records of the given directory are imported.

Use in the function list


ImportDataRecords (File name, Data record number/name, Overwrite, Output status
message, Processing status)

Use in user-defined functions


ImportDataRecords (File_name, Data_record number/name, Overwrite,
Output_status_message, Processing_status)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

File name
Name of the CSV file from which the recipe data records are imported. Enter the storage
location and the file extension (*.csv), for example, "C:\TEMP\Orange.csv", for Basic Panels
"\USB_X61.1\Orange.csv".

Note
Does not apply for Basic Panels: If a storage card is used as file location, specify the file location
as follows: "\StorageCard\<File name>".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1163
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Data record number/name


Number or name of the recipe data record to be imported. Specify "0" if all recipe data records
are to be imported.

Overwrite
Determines whether existing recipe data records are to be overwritten:
0 (hmiOverwriteForbidden) = No: Recipe data records are not overwritten. The import process
will not be carried out.
1 (hmiOverwriteAlways) = Yes: Recipe data records are overwritten without prompting.
2 (hmiOverwriteWithPrompting) = With confirmation: Recipe data records are not overwritten
until confirmed.

Output status message


Determines whether a status message is output after the import:
0 (hmiOff) = Off: Status message is not output.
1 (hmiOn) = On: Status message is output.

Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.

Configurable objects

Object Event
Tag Value change
Upper limit exceeded
Lower limit violated
Function key (global) Release
Press
Function key (local) Release
Press
Screen Loaded
Cleared

WinCC Professional V13 SP2 – Programming reference


1164 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Object Event
Screen object Press
Release
Click
Change (or toggle for switch)
Switch on
Switch off
Enable
Disable
Scheduler Time expired

3.1.37 ImportDataRecordsWithChecksum (Panels, Comfort Panels, RT Advanced)

Description
Imports one or all data records of a recipe from a CSV file with a checksum and verifies the
checksum.

Use in the function list


ImportDataRecordsWithChecksum (File name, Data record number/name, Overwrite, Output
status message, Processing status, verify checksum)

Use in user-defined functions


ImportDataRecordsWithChecksum (File_name, Data_record number/name, Overwrite,
Output_status_message, Processing_status, Verify_Checksum)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

File name
Name of the CSV file from which the recipe data records are imported. Enter the path and the
file extension, for example, "C:\TEMP\Orange.CSV".
If a storage card is used as storage medium, specify the storage location as follows:
"\StorageCard\<File name>".
If you specify a directory instead of an individual CSV file, all files in the specified directory will
be imported.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1165
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Data record number/name


Number or name of the recipe data record to be imported. Specify "0" if all recipe data records
are to be imported.

Overwrite
Determines whether existing recipe data records are to be overwritten:
0 (hmiOverwriteForbidden) = No: Recipe data records are not overwritten. The import process
will not be carried out.
1 (hmiOverwriteAlways) = Yes: Recipe data records are overwritten without prompting.
2 (hmiOverwriteWithConfirmation) = With confirmation: Recipe data records are not
overwritten until confirmed.

Output status message


Determines whether a status message is output after the import:
0 (hmiOff) = Off: Status message is not output.
1 (hmiOn) = On: Status message is output.

Processing status
Returns the processing status of the system function. You can use the return value, for example
to delay execution of other system functions, until this system function has been successfully
completed.
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.

Verify checksum
Determines if the checksum should be verified during import:
0 (hmiFalse) = No: Checksum is not verified.
1 (hmiTrue) = Yes: Checksum is verified.

3.1.38 IncreaseTag (Panels, Comfort Panels, RT Advanced)

Description
Adds the given value to the value of the tags.
X=X+a

Note
The system function uses the same tag as input and output values. When this system function
is used to convert a value, help tags must be used. You can use the "SetTag" system function
to assign the tag value to the auxiliary tags.

WinCC Professional V13 SP2 – Programming reference


1166 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

If you configure the system function on the events of an alarm and the tag is not being used
in the current screen, it is not ensured that the actual value of the tags is being used in the
PLC. You can improve the situation by setting the "Cyclic continuous" acquisition mode.

Use in the function list


IncreaseTag (Tag, Value)

Use in user-defined functions


IncreaseTag (Tag, Value)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Tag
The tag to which the given value is added.

Value
The value that is added.

3.1.39 InverseLinearScaling (Panels, Comfort Panels, RT Advanced)

Description
Assigns a value to the tag X, which is calculated from the value of the given tag Y using the
linear function X = (Y - b) / a.
The tags X and Y must not be identical. This system function is the inverse of the
"LinearScaling" system function.

Note
The tags X and Y must not be identical. If a tag is to be converted into itself, a auxiliary tag
must be used.
The "SetTag" system function can be used to assign the value of the tags to be converted to
the auxiliary tags.

Use in the function list


InvertLinearScaling (X, Y, b, a)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1167
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in user-defined functions


InvertLinearScaling (X, Y, b, a)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

X
The tag which is assigned the value calculated from the linear equation.

Y
The tag that contains the value used for calculation.

b
The value which is subtracted.

a
The value through which is divided.

Example
The following program code assigns a value to the varX tag by means of the
InverseLinearScaling function.

{
BYTE varX;
BYTE Yvalue = 10;
BYTE bvalue = 3;
BYTE avalue = 4;

//Inverse linear scaling


InverseLinearScaling (varX, Yvalue, bvalue, avalue);

printf ("varX = %d\r\n, varX);


...
}

The saved return value can be processed in the following code.

WinCC Professional V13 SP2 – Programming reference


1168 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.40 InvertBit (Panels, Comfort Panels, RT Advanced)

Description
Inverts the value of the given tag of the "Bool" type:
● If the tag has the value of 1 (TRUE), it will be set to 0 (FALSE).
● If the tag has the value of 0 (FALSE), it will be set to 1 (TRUE).

Use in the function list


InvertBit (Tag)

Use in user-defined functions


InvertBit (Tag)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The tag whose bit is set.

Example
The following program code inverts the value of the boolean tag b_value and outputs the result
along with the original b_saved value.

{
BOOL b_value = 0;
BOOL b_saved = b_value;

//Invert variable
invertBit(b_value);

//print current and saved value


printf ("Current value: %d\r\n, Saved value: %d\r\n",b_value, b_saved);
...
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1169
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.41 InvertBitInTag (Panels, Comfort Panels, RT Advanced)

Description
Inverts a bit in the given tag:
● If the bit in the tag has the value of 1 (TRUE), it will be set to 0 (FALSE).
● If the bit in the tag has the value of 0 (FALSE), it will be set to 1 (TRUE).
After changing the given bit, the system function transfers the entire tag back to the PLC. It is
not checked whether other bits in the tags have changed in the meantime. Operator and PLC
have read-only access to the indicated tag until it is transferred back to the PLC.

Note
If the PLC supports BOOL tags, do not use this system function. Use the "InvertBit" system
function instead.

Use in the function list


InvertBitInTag (Tag, Bit)

Use in user-defined functions


InvertBitInTag (Tag, Bit)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The tag in which the given bit is set.

Bit
The number of the bit that is set.
When this system function is used in a user-defined function, the bits in a tag are counted from
right to left. The counting begins with 0.

WinCC Professional V13 SP2 – Programming reference


1170 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Example
The following program code inverts a bit at the specified bitposition in the bvalue tag and
outputs the result along with the original bsaved value.

{
BYTE bvalue;
BYTE bsaved = bvalue;
BYTE bitposition = 2;

//Invert bit in bitposition


InvertBitInTag (bvalue, bitposition);
//print current and saved value
printf ("Current value: %d\r\n, Saved value: %d\r\n",bvalue, bsaved);
...
}

3.1.42 LinearScaling (Panels, Comfort Panels, RT Advanced)

Description
Assigns a value to the tag Y, which is calculated from the value of the given tag X using the
linear function Y= (a *X) + b.
The inverse of this function is the "InvertLinearScaling" system function.

Note
The tags X and Y must not be identical. If a tag is to be converted into itself, a auxiliary tag
must be used.
The "SetTag" system function can be used to assign the value of the tags to be converted to
the auxiliary tags.

Use in the function list


LinearScaling (Y, a, X, b)

Use in user-defined functions


LinearScaling (Y, a, X, b)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1171
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Parameters

Y
The tag which is assigned the value calculated from the linear equation.

a
The value with which is multiplied.

X
The tag that contains the value used for calculation.

b
The value that is added.

Example
The following program code uses the LinearScaling function to assign a value to the Yvar tag.

{
BYTE Yvar;
BYTE Xvalue = 10;
BYTE bvalue = 3;
BYTE avalue = 4;

// linear scaling
LinearScaling ( Yvar, avalue, Xvalue, bvalue);

printf ("Yvar = %d\r\n, Yvar);


...
}

The saved return value can be processed in the following code.

3.1.43 LoadDataRecord (Panels, Comfort Panels, RT Advanced)

Description
Loads the given recipe data record from the memory medium of the HMI device in the recipe
tags. This system function is used, for example, to display a recipe data record in the recipe
screen.
Activate the "Synchronize recipe view and recipe tags" option in the synchronization settings
of the recipe. If this option is deactivated, the system function has no effect.

Use in the function list


LoadDataRecord (Recipe number/name, Data record number/name, Processing status)

WinCC Professional V13 SP2 – Programming reference


1172 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in user-defined functions


LoadDataRecord (Recipe_number/name, Data_record_number/name, Confirmation,
Output_status_message, Processing_status)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Recipe number/name
Number or name of the recipe from which a recipe data record is loaded.

Data record number/name


Number or name of the recipe data record to be loaded.

Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.

3.1.44 LogOff (Panels, Comfort Panels, RT Advanced)

Description
Logs off the current user on the HMI device.

Use in the function list


Logoff

Use in user-defined functions


Logoff
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter
--

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1173
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.45 Logon (Panels, Comfort Panels, RT Advanced)

Description
Logs on the current user on the HMI device.

Use in the function list


Logon (Password, User name)

Use in user-defined functions


Logon (Password, User_name)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Password
The tag from which the password for the user logging on is read.
If the user is logged on, the password in the tag is deleted.

User name
The tag from which the user name for the user logging on is read.

3.1.46 LookupText (Panels, Comfort Panels, RT Advanced)

Description
Identifies an entry from a text list. The result depends on the value and on the selected runtime
language. The result is saved to a tag of data type "String".

Use in the function list


LookupText (Output text, Value, Language, Text list)

Use in user-defined functions


LookupText (Output_text, Index, Language, Text_list)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

WinCC Professional V13 SP2 – Programming reference


1174 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Parameters

Output text
The tag to which the result is written.

Value
The tag that defines the value of the list entry.

Language
Defines the runtime language in which the list entry is identified.
● Runtime language
Language code as per VBScript reference, for example, "de-DE" for German (Germany)
or "en-US" for English (United States of America). The selection depends on the activated
runtime languages.
● Tag
The tag that contains the language. Enter the runtime language as decimal value of the
country ID, for example, 1031 for German - Standard, 1033 for English - USA. Details are
available in the VBScript basics, "Locale identifier (LCID) diagram".
● Integer
The number that corresponds to the order of runtime languages for language switching.
The selection depends on the activated runtime languages, for example, "0" for the
language that appears when you first start runtime. You can find more information under
the topic of "Languages in Runtime".

Text list
Defines the text list. The list entry is read from the text list.

3.1.47 NotifyUserAction (Panels, Comfort Panels, RT Advanced)

Description

This system function is used to log user actions that are not automatically logged in the audit
trail. You can also use this system function to require the user to enter an acknowledgment or
an electronic signature and a comment for the operator action. Requirement for the use of the
system function is that the GMP-compliant configuration is activated under "Runtime settings".
If you use the "NotifyUserAction" system function in a function, the debugger may open if you
cancel your input by clicking "Cancel". To compensate for this reaction, you can use the "On
Error Resume Next" statement in a function. With this instruction, the next instruction is
executed after a runtime error. If you use the "On Error Resume Next" statement, output of
system events is also suppressed.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1175
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in the function list


NotifyUserAction (Confirmation type, Mandatory commenting, Category, Object name,
Description)

Use in user-defined functions


NotifyUserAction (Confirmation_type, Mandatory_commenting, Category, Object_name,
Description)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Confirmation type
Establishes how the action must be confirmed
0 = (None): No confirmation required, an entry is created in the audit trail
1 = (Acknowledgement): Acknowledgment, the user must acknowledge the action; an entry is
created in the audit trail
2 = (Digital Signature): Electronic signature, a dialog window opens in which the user must
enter his electronic signature - an entry is created in the audit trail

Mandatory commenting
Establishes if the user has to enter a comment. The comment is logged in the audit trail.
0 = (True): True; a dialog window opens in which the user must enter a comment
1 = (False): False; no mandatory commenting

Category
Category or class name of the modified object

Object name
Name of the modified object

Description
Text which describes the archiving user action.

WinCC Professional V13 SP2 – Programming reference


1176 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.48 OpenAllLogs (Panels, Comfort Panels, RT Advanced)

Description
Reestablishes the connection between WinCC and the logs. Logging can be continued.

Note
Run the "StartLogging" system function in order to restart logging.

Use in the function list


OpenAllLogs

Use in user-defined functions


OpenAllLogs
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter
--

Application example
You are in runtime and want to change the data medium on which the process values are
logged.
Notes on configuring
Configure the "StopLogging" and "CloseAllLogs" system functions on the "Close Archive"
button.
Configure the "OpenAllLogs" and "StartLogging" system functions on the "Open Archive"
button.
As parameter transfer the respective name of the log that is to be stopped and started.
Procedure on HMI device
When the button "Close Archive" is pressed, the specified log is stopped and all open logs are
closed. The data medium can be changed. You open all logs with the "Open Archive" button.
Logging will be continued in the specified log.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1177
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.49 OpenCommandPrompt (Panels, Comfort Panels, RT Advanced)

Description
Opens a Windows system prompt.
This function is used, e.g., to copy files or to call up another application.

Use in the function list


OpenCommandPrompt

Use in user-defined functions


OpenCommandPrompt
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter
--

3.1.50 OpenControlPanel (Panels, Comfort Panels, RT Advanced)

Description
Opens a dialog that you can use to edit selected Control Panel settings.
This system function lets you set the following on the HMI device:
● Properties and value of the IP address
● User identification on the network
● WinCC Internet settings

Note
Project security
The "OpenControlPanelDialog" system function is used to bypass the SecureMode on the HMI
device. Take the corresponding precautions to ensure the security of your project.

Use in the function list


OpenControlPanelDialog (Dialog)

WinCC Professional V13 SP2 – Programming reference


1178 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in user-defined functions


-

Parameters

Dialog
Sets the Control Panel dialog to be opened.
● PROFINET_X1: Setting of the IP address and Ethernet parameters
● PROFINET_X3: Setting of the IP address and Ethernet parameters; only for Comfort Panel
KP 1500, TP 1500; TP1900, TP2200
● WinCC Internet settings: Setting for Web Server, e-mail notification, provided the HMI
device supports these functions
● Network ID: Setting for identification on the network, provided the HMI device supports
these functions

3.1.51 OpenInternetExplorer (Panels, Comfort Panels, RT Advanced)

Description
Opens the Internet Explorer on the HMI device.
If the Internet Explorer is already open, it will be closed and reopened when you call the system
function.

Note
The Internet Explorer saves data temporarily in the DRAM file system of the HMI device, e.g.
the last web sites that were be called up.
This data can be saved using the "BackupRAMFileSystem" system function so that it is still
available when the HMI device is restarted.

Use in the function list


OpenInternetExplorer (Start page)

Use in user-defined functions


OpenInternetExplorer (Start_page)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1179
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Parameter

Start page
The page which is loaded when Internet Explorer is started, e.g. "www.siemens.com".

3.1.52 OpenScreenKeyboard (Panels, Comfort Panels, RT Advanced)

Description
Hides or shows the screen keyboard.
The screen keyboard remains open until the screen keyboard is explicitly closed. In this way,
the screen keyboard can also be used in other applications.

Use in the function list


OpenScreenKeyboard (Layout)

Use in user-defined functions


OpenScreenKeyboard (Display_mode)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Layout
Specifies whether the window is opened minimized or maximized with the screen keyboard:
0 (hmiScreenKeyboardMinimized) = Minimized
1 (hmiScreenKeyboardMaximized) = Maximized

3.1.53 OpenTaskManager (Panels, Comfort Panels, RT Advanced)

Description
Shows the task manager.
The task manager allows changing to other open applications on the HMI device.

Note
The appearance of the task manager depends on the operating system installed.

WinCC Professional V13 SP2 – Programming reference


1180 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in the function list


OpenTaskManager

Use in user-defined functions


OpenTaskManager
Can be used if the configured device supports user-defined scripts. For additional information,
refer to "Device dependency".

Parameter
--

3.1.54 PageDown (Panels, Comfort Panels, RT Advanced)

Description
Executes the key function <Pagedown> on the HMI device.
This system function can only be used for function keys.

Use in the function list


PageDown

Use in user-defined functions


PageDown
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter
-

3.1.55 PageUp (Panels, Comfort Panels, RT Advanced)

Description
Executes the key function <PageUp> on the HMI device.
This system function can only be used for function keys and tasks with a time trigger.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1181
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in the function list


PageUp

Use in user-defined functions


PageUp
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter
-

3.1.56 PrintReport (Panels, Comfort Panels, RT Advanced)

Description
Prints the given report from the printer which is connected to the HMI device. The report is
printed in the language which is set on the HMI device.

Note
If runtime is closed whilst log data are being printed using the system function, the report will
cease to be supplied with data as soon as runtime stops.

Use in the function list


PrintReport (Report)

Use in user-defined functions


PrintReport (Report)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

WinCC Professional V13 SP2 – Programming reference


1182 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Parameter

Report
Name of the report to be printed.

Note
If you have set up via the "Function list" dialog box a new report for the "PrintReport" function,
when compiling, the following warning appears: "The report "Report_1" has no printed pages."
In order to remedy the warning, open the "Report_1" via the project view and recompile the
project.

3.1.57 PrintScreen (Panels, Comfort Panels, RT Advanced)

Description
Prints the screen currently being displayed on the HMI device from the printer which is
connected to the HMI device.
Opened windows are also printed.

Note
The printer settings are taken over from the current settings in the Windows operation system.

Use in the function list


PrintScreen

Use in user-defined functions


PrintScreen
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter
--

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1183
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.58 ResetBit (Panels, Comfort Panels, RT Advanced)

Description
Sets the value of a "Bool" type tag to 0 (FALSE).

Use in the function list


ResetBit (Tag)

Use in user-defined functions


ResetBit (Tag)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The BOOL type tag which is set to 0 (FALSE).

Example
The following program code resets the value of the boolean tag b_value to 0 by means of the
ResetBit function and outputs the result along with the original b_saved value.

{
BOOL b_value = 1;
BOOL b_saved = b_value;

//Reset bit
ResetBit (b_value);

//print current and saved value


printf ("Current value: %d\r\n, Saved value: %d\r\n",b_value, b_saved);
...
}

3.1.59 ResetBitInTag (Panels, Comfort Panels, RT Advanced)

Description
Sets a bit in the specified tag to 0 (FALSE).

WinCC Professional V13 SP2 – Programming reference


1184 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

After changing the given bit, the system function transfers the entire tag back to the PLC. It is
not checked whether other bits in the tags have changed in the meantime. Operator and PLC
have read-only access to the indicated tag until it is transferred back to the PLC.

Note
If the PLC supports BOOL tags, do not use this system function. Use the "ResetBit" system
function instead.

Use in the function list


ResetBitInTag (Tag, Bit)

Use in user-defined functions


ResetBitInTag (Tag, Bit)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The tag in which a bit is set to 0 (FALSE).

Bit
The number of the bit that is set to 0 (FALSE).
When this system function is used in a user-defined function, the bits in the specified tag will
be counted from right to left independent of the PLC used. The counting begins with 0.

Example
The following program code sets a bit at the specified bitposition in the bvalue tag to 0 and
outputs the result along with the original bsaved value.

{
BYTE bvalue;
BYTE bsaved = bvalue;
BYTE bitposition = 2;

//Reset bit in bitposition


ResetBitInTag (bvalue, bitposition);

//print current and saved value


printf ("Current value: %d\r\n, Saved value: %d\r\n",bvalue, bsaved);
...
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1185
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.60 SafelyRemoveHardware (Panels, Comfort Panels)

Description
Checks whether there is read or write access to the external storage medium. If there is no
access, the external storage medium can be removed without data loss.

Use in the function list


SafelyRemoveHardware(Path, Result)

Use in user-defined functions


SafelyRemoveHardware(Path, Result)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Path
Path of storage medium , e.g. \Storage Card USB\

Result
The tag in which the result is entered.
TRUE : The storage medium can be removed safely. A corresponding system alarm will be
output.
FALSE : The storage medium cannot be removed safely. A corresponding system alarm will
be output.

3.1.61 SaveDataRecord (Panels, Comfort Panels, RT Advanced)

Description
Saves the current values of the recipe tags as data record to the memory medium of the HMI
device.
This system function is used, for example, to save a recipe data record in the recipe screen.

Use in the function list


SaveDataRecord (Recipe number/name, Data record number/name, Overwrite, Output status
message, Processing status)

WinCC Professional V13 SP2 – Programming reference


1186 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in user-defined functions


SaveDataRecord (Recipe_number/name, Data_record_number/name, Overwrite,
Output_status_message, Processing_status)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Recipe number/name
Number or name of the recipe to which a recipe data record is saved.

Data record number/name


Number or name of the recipe data record to be saved. A new data record will be created if
no record of this name or number was found in the recipe, independent of the value at the
"Overwrite" parameter.

Overwrite
Specifies whether an existing data record is overwritten:
0 (hmiOverwriteForbidden) = No: The recipe data record is not overwritten, the data record is
not saved.
1 (hmiOverwriteAlways) = Yes: The recipe data record is overwritten without a prompt for
confirmation.
2 (hmiOverwriteWithConfirmation) = With confirmation: The recipe data record is overwritten
only with confirmation by the user.

Output status message


Determines whether a status message is output after saving:
0 (hmiOff) = Off: Status message is not output.
1 (hmiOn) = On: Status message is output.

Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1187
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.62 SendEMail (Panels, Comfort Panels, RT Advanced)

Description
Sends an e-mail from the HMI device to the given addressee.
This system function is used, for example, when, in the case of service, the alarm is to be
passed on directly to the service technician.

Note
To send alarms as e-mails, the HMI system must have an e-mail client at its disposal.

Use in the function list


SendEMail (Address, Subject, Text, Return address)

Use in user-defined functions


SendEMail (Address, Subject, Text, Return_address)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Address
The e-mail address of the addressee.

Subject
The subject line of the e-mail.

Text
The text sent in the e-mail.

Return address
The e-mail address to which the addressee of this e-mail should send the reply.

WinCC Professional V13 SP2 – Programming reference


1188 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.63 SetAcousticSignal (Panels, Comfort Panels, RT Advanced)

Description
Configures the acoustic feedback of touch screen operation on the HMI device.

Note
The configuration that was set at Switch off is reestablished when restarting the HMI device.

Use in the function list


SetAcousticSignal (Volume)

Use in user-defined functions


SetAcousticSignal (Volume)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Volume
Determines whether and how loud an acoustic signal is emitted:
-1 (hmiToggle) = Toggle: Toggles the emission of the acoustic signal as follows: Muted > Quiet
> Loud.
0 (hmiMuted) = Mute: no acoustic signal
1 (hmiQuiet) = Quiet: quiet acoustic signal
2 (hmiLoud) = Loud: loud acoustic signal

3.1.64 SetAlarmReportMode (Panels, Comfort Panels, RT Advanced)

Description
Switches the automatic reporting of alarms on the printer on or off.

Use in the function list


SetAlarmReportMode (Mode)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1189
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in user-defined functions


SetAlarmReportMode (Mode)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Mode
Determines whether alarms are reported automatically on the printer:
0 (hmiDisablePrinting) = Reporting off: Alarms are not printed automatically.
1 (hmiEnablePrinting) = Reporting On: Alarms are printed automatically.
-1 (hmiToggle) = Toggle: Toggles between the two modes.

3.1.65 SetAndGetBrightness (Panels, Comfort Panels, RT Advanced)

Description
Determines the brightness of the MP 377 Touch daylight readable display. The brightness
value can be interpreted as absolute or relative to the current value.

Note
The configuration that is set in the Control Panel will be reestablished when you restart the
HMI device.

Use in the function list


SetAndGetBrightness (Brightness, Mode, Current value)

Use in user-defined functions


SetAndGetBrightness (Brightness, Mode, Actual brightness)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Brightness
New value for the brightness.

Mode
Specifies if the new brightness value is set as absolute or relative to the current value.

WinCC Professional V13 SP2 – Programming reference


1190 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Current value
Tag in which the current brightness value is stored.

3.1.66 SetBit (Panels, Comfort Panels, RT Advanced)

Description
Sets the value of a "Bool" type tag to 1 (TRUE).

Use in the function list


SetBit (Tag)

Use in user-defined functions


SetBit (Tag)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The BOOL type tag which is set to 1 (TRUE).

Example
The following program code sets the value of the boolean tag b_value to 1 by means of the
SetBit function and outputs the result along with the original b_saved value.

{
BOOL b_value = 0;
BOOL b_saved = b_value;

//Set bit
SetBit (b_value);

//print current and saved value


printf ("Current value: %d\r\n, Saved value: %d\r\n",b_value, b_saved);
...
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1191
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.67 SetBitInTag (Panels, Comfort Panels, RT Advanced)

Description
Sets a bit in the given tag to 1 (TRUE).
After changing the given bit, the system function transfers the entire tag back to the PLC. It is
not checked whether other bits in the tags have changed in the meantime. Operator and PLC
have read-only access to the indicated tag until it is transferred back to the PLC.

Note
If the PLC supports BOOL tags, do not use this system function. Use the "SetBit" system
function instead.

Use in the function list


SetBitInTag (Tag, Bit)

Use in user-defined functions


SetBitInTag(Tag, Bit)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The tag in which a bit is set to 1 (TRUE).

Bit
The number of the bit that is set to 1 (TRUE).
When this system function is used in a user-defined function, the bits in the specified tag will
be counted from right to left independent of the PLC used. The counting begins with 0.

Note
The guaranteed update of the tags used with actual process values is absolutely conditional
in terms of reliable functionality. You should therefore configure the tag in an I/O field or assign
the system function to a screen object, such as a button.
If you have configured a short event such as the activation of an alarm for the system function
you can only access the actual process values by setting the tag for continuous reading.

WinCC Professional V13 SP2 – Programming reference


1192 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Example
The following program code sets a bit to 1 at the specified bitposition in the bvalue tag and
outputs the result along with the original bsaved value.

{
BYTE bvalue;
BYTE bsaved = bvalue;
BYTE bitposition = 2;

//Reset bit in bitposition


SetBitInTag (bvalue, bitposition);

//print current and saved value


printf ("Current value: %d\r\n, Saved value: %d\r\n",bvalue, bsaved);
...
}

3.1.68 SetBrightness (Panels, Comfort Panels, RT Advanced)

Description
Determines the brightness of the display.

Note
The configuration that is set in the Control Panel / Start Center will be reestablished when you
restart the HMI device.

For Basic Panels 2nd Generation, Mobile Panels and Comfort Panels:
The value for the system function "SetBrightness" can be set between 0% and 100%. The set
value is transferred to the HMI device. The brightness settings on the HMI device can be viewed
and edited in "Start Center > Settings > Display". The HMI devices support a brightness setting
between 10% and 100%.
If the system function "SetBrightness" is assigned a value of 0%, the display of the HMI device
is switched off by default in Runtime. If the operator touches the display, the display switches
to the previous brightness setting.
If the system function "SetBrightness" is assigned a value between 1% and 10% and the
operator opens the display settings in the Start Center, brightness is reset to 10%.

Use in the function list


SetBrightness (value)

Use in user-defined functions


SetBrightness (Value)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1193
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Value
New value for the brightness.

3.1.69 SetConnectionMode (Panels, Comfort Panels, RT Advanced)

Description
Connects or disconnects the given connection.

Note
A connection to the PLC cannot be established until the operating mode ONLINE has been
set on the HMI device. Use the "SetDeviceMode" system function for this purpose.

Use in the function list


SetConnectionMode (Mode, Connection)

Use in user-defined functions


SetConnectionMode (Mode, Connection)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Mode
Determines whether a connection to the PLC is established or disconnected:
0 (hmiOnline) = Online: Connection is established.
1 (hmiOffline) = Offline: Connection is disconnected.

Connection
The PLC to which the HMI device is connected. You specify the name of the PLC in the
connection editor.

WinCC Professional V13 SP2 – Programming reference


1194 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Multiple use of the system function in a user-defined function


If you use the "SetConnectionMode" system function for different connections, it may be
possible that not all system functions are executed correctly. Proceed as follows to prevent
this situation:
1. Create a "BOOL" type tag with the start value "0".
2. Configure the "SetConnectionMode" system function on the "Value change" event of the
HMI tags. If you want to disconnect three connections, for example, you must configure the
system function three times.
3. In the user-defined function, apply the "InvertBit" system function to the HMI tag.

Application example
Two typical application examples for this system function are as follows:
● Test
As long as no PLC is connected to the HMI device, no error messages will be output during
the test on the HMI device. If the HMI device is connected to a PLC, the connection to the
PLC can be established by pressing a key.
● Commissioning
Several PLCs are to be configured for a system. At first, all PLCs except one are configured
"Offline". After commissioning of the first PLC, the connection to each of the other PLCs is
established by pressing a key. In this way, the other PLCs are started up one after another.

3.1.70 SetDataRecordTagsToPLC (Panels, Comfort Panels, RT Advanced)

Description
Transfers the values of the recipe tags to the PLC. The recipe tags contain the values of the
data record which is displayed on the HMI device.

Use in the function list


SetDataRecordTagsToPLC (Recipe number/name, Processing status)

Use in user-defined functions


SetDataRecordTagsToPLC (Recipe_ number/name, Processing_status)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Recipe number/name
Number or name of the recipe from which recipe data record is transferred to the PLC.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1195
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.

3.1.71 SetDataRecordToPLC (Panels, Comfort Panels, RT Advanced)

Description
Transfers the given recipe data record directly from the data medium of the HMI device to the
PLC with which the HMI device is connected.

Note
The values of the recipe data record don't need to be displayed on the HMI device.

Use in the function list


SetDataRecordToPLC (Recipe number/name, Data record number/name, Output status
message, Processing status)

Use in user-defined functions


SetDataRecordToPLC (Recipe_number/name, Data_record_number/name,
Output_status_message, Processing_status)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Recipe number/name
Number or name of the recipe from which recipe data record is transferred to the PLC.

Data record number/name


Number or name of the recipe data record to be transferred to the PLC.

Output status message


Determines whether a status message is output after the transfer:
0 (hmiOff) = Off: Status message is not output.

WinCC Professional V13 SP2 – Programming reference


1196 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

1 (hmiOn) = On: Status message is output.

Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.

3.1.72 SetDaylightSavingTime (Panels, Comfort Panels, RT Advanced)

Description
The system function "SetDaylightSavingTime" changes the setting of the HMI device from
daylight saving to standard time and vice versa.
Time settings will take place immediately following system function.

Note
The "SetDaylightSavingTime" system function does not support time zones without daylight
saving time.

Note
Windows 7
The system function "SetDaylightSavingTime" is not supported for PC-based HMI devices
under Windows 7.

Use in the function list


SetDaylightSavingTime(DaylightSavingTime)

Use in user-defined functions


SetDaylightSavingTime (Daylight_saving_time)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Daylight Saving Time


Determines whether Daylight Saving Time is set on the HMI device:

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1197
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

0 = Daylight Saving Time is not activated


1 = Daylight Saving Time is activated

3.1.73 SetDeviceMode (Panels, Comfort Panels, RT Advanced)

Description
Toggles the operating mode on the HMI device. The following types of operation are possible:
"Online", "Offline" and "Loading".

Use in the function list


SetDeviceMode (Operating mode)

Use in user-defined functions


SetDeviceMode (Operating_mode)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Operating mode
Determines the operating mode of the HMI device:
0 (hmiOnline) = Online: The connection to the PLC is established. The configured connection
status is always set in this process. The states that were last used in Runtime are not
considered.
1 (hmiOffline) = Offline: The connection to the PLC is disconnected.
2 (hmiTransfer) = load: A project can be transferred from the configuration computer to the
HMI device.

Note
If you use a PC as an HMI device, the runtime software will be exited when you switch operating
mode after "Load".

3.1.74 SetDisplayMode (Panels, Comfort Panels, RT Advanced)

Description
Changes the settings of the screen in which the runtime software runs.

WinCC Professional V13 SP2 – Programming reference


1198 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

The runtime software runs in full-screen mode as default. The Windows task switch is disabled.

Use in the function list


SetDisplayMode (Layout)

Use in user-defined functions


SetDisplayMode (Display mode)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Display mode
Determines the settings for the screen in which the runtime software runs.
1 (hmiScreenFull): Full-screen: Title bar of the screen is not visible
2 (hmiScreenMaximized): Maximized
3 (hmiScreenRestore): Restore: The last used screen setting is used. This layout can only be
used when the window is displayed minimized or maximized.
4 (hmiScreenMinimized): Minimized
5 (hmiScreenAutoAdjust): Automatic: The size of the window is set so that all screen objects
in it will be visible.
6 (hmiScreenOnTop): Foreground; either the window appears in the foreground or the program
icon associated with the window flashes on the taskbar depending on the Windows setting.
The setting can be changed in the Windows configuration and applies to all Windows
applications.

3.1.75 SetLanguage (Panels, Comfort Panels, RT Advanced)

Description
Toggles the language on the HMI device. All configured text and system events are displayed
on the HMI device in the newly set language.

Use in the function list


SetLanguage (Language)

Use in user-defined functions


SetLanguage (Language)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1199
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Language
Determines which language is set on the HMI device. The following specifications are possible:
● -1 (hmiToggle) = Toggle: Changes to the next language. The sequence is determined
during configuration in the "Project languages" editor.
● Number you have defined under "Languages and fonts" in the "Runtime Settings" editor.
Changes to the language with the given number.
● Language you have defined under "Languages and fonts" in the "Runtime Settings" editor.
● Language abbreviation in accordance with the VBScript5 reference: This changes to the
language corresponding to the specified language code, e.g. "de-DE" for German
(Germany) or "en-US" for English (United States).
An overview of the language abbreviations is available in the basic information of VBScript
under the topic "Area diagram-ID (LCID) Diagram".

3.1.76 SetPLCDateTime (Panels, Comfort Panels, RT Advanced)

Description
Changes the data and the time of the linked PLC
The system function "SetPLCDateTime" can only be configured for the following PLCs:
● SIMATIC S7 1200
● SIMATIC S7 1500

Use in the function list


SetPLCDateTime (connection, time)

Use in user-defined functions


SetPLCDateTime (Connection, Time)

Parameters

Connection
Connection of PLC and HMI device.

WinCC Professional V13 SP2 – Programming reference


1200 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Time
Transfers the date and the time of the HMI device to the PLC. The PLC applies the date and
the time of the HMI device.

3.1.77 SetRecipeTags (Panels, Comfort Panels, RT Advanced)

Description
Changes the status of the recipe tags from "Online" to "Offline" and vice versa.
This system function is used, for example, when recipe data record values are fine tuned when
starting up a machine.

Use in the function list


SetRecipeTags (Recipe number/name, Status, Output status message, Processing status)

Use in user-defined functions


SetRecipeTags (Recipe_number/name, Status, Output_status_message, Processing_status)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Recipe number/name
Number or name of the recipe in which the recipe data record is saved.

Status
Determines the status of the recipe tags:
0 (hmiOnline) = Online: Value changes of the recipe tags are transferred immediately to the
PLC connected to the HMI device.
1 (hmiOffline) = Offline: Value changes to the recipe tags are only transferred to the PLC
connected to the HMI device when, for example, the "SetDataRecordTagsToPLC" system
function is executed.

Output status message


Determines whether a status message is output after saving:
0 (hmiOff) = Off: Status message is not output.
1 (hmiOn) = On: Status message is output.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1201
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Processing status
Returns the processing status of the system function. You can use the return value, for
example, to delay execution of other system functions until this system function has been
successfully completed:
2 = System function is being performed.
4 = System function was successfully completed.
12 = System function was not performed because an error has occurred.

3.1.78 SetScreenKeyboardMode (Panels, Comfort Panels, RT Advanced)

Description
Enables or disables the automatic display of the screen keyboard on the HMI device.
This system function is also used to prevent the display of the screen keyboard, e.g. because
an external keyboard is connected to the HMI device.

Note
To enable the "SetScreenKeyboardMode" ("SetScreenKeyboardMode") system function on
an HMI other than a Touch Panel device, set the "Use on-screen keyboard" check box in the
"Runtime settings" dialog of the device settings.

Use in the function list


SetScreenKeyboardMode (Mode)

Use in user-defined functions


SetScreenKeyboardMode (Mode)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Mode
Determines whether the screen keyboard is hidden or shown:
0 (hmiOff) = Off: Screen keyboard is hidden
1 (hmiOn) = On: Screen keyboard is shown
-1 (hmiToggle) = Toggle: Toggles between the two modes.

WinCC Professional V13 SP2 – Programming reference


1202 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.79 SetTag (Panels, Comfort Panels, RT Advanced)

Description
Assigns a new value to the given tag.

Note
This system function can be used to assign strings and numbers, depending on the type of
tag.

Use in the function list


SetTag (Tag, Value)

Use in user-defined functions


SetTag (Tag, Value)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The tag to which the given value is assigned.

Value
The value which the given tag is assigned.

Note
The "SetTag" system function is only executed after a connection has been established.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1203
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Example
The following program code uses the SetTag function to set the value of the gs_tag_bit tag to
TRUE and saves the return value to the ok tag.

{
BOOL ok;
BOOL bvalue;

//Set the tag to true


ok = SetTag("gs_tag_bit", TRUE);
//error handling
if(ok)
{
// succeeded
printf ( "Function has run through.\r\n" );
bvalue = GetTagBit("gs_tag_bit");
printf ("Value of gs_tag_bit: %d\r\n", bvalue);
}
else
{
// failed
printf ( "Error - function failed." );
}
...
}

The saved return value can be processed in the following code.

3.1.80 ShiftAndMask (Panels, Comfort Panels, RT Advanced)

Description
This system function converts the input bit pattern of the source tags into an output bit pattern
of the target tags. This involves bit shifting and masking.

Note
If the source and target tag have a different number of bits, using the system function in the
target tag can result in a violation of the value range.

Use in the function list


ShiftAndMask (Source tag, Target tag, Bits to shift, Bits to mask)

Use in user-defined functions


ShiftAndMask (Source_tag, Target_tag, Bits_to_shift, Bits_to_mask)

WinCC Professional V13 SP2 – Programming reference


1204 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Source tag
The tag includes the input bit pattern. Integer-type tags, e.g. "Byte", "Char", "Int", "UInt", "Long"
and "ULong" are permitted.
Example: The actual value 72 is set at the 16-bit integer source tag: 0000000001001000.

Target tag
The output bit pattern is saved in the tag. Integer type tags, e.g. "Byte", "Char", "Int", "UInt",
"Long" and "ULong" are permitted.
Example: The shifted input bit pattern is multiplied by the bit mask, with bit-by-bit logical AND
operation: 0000000000001001. The resultant decimal value "8" is saved to the target tag.
Please note the following:
● The source and target tags have the same number of bits.
● The number of bits to shift is less than the number of bits in the source tag and target tag.
● Bits to mask does not have more bits than the source tag and the target tag.

Bits to shift
Number of bits by which the input bit pattern is shifted right. A negative value shifts the input
bit pattern to the left.
Example: "Bits to shift" has the value "+3". The input bit pattern is shifted right by three bits
when the system function is called: 0000000000001001.
Bits to the left are padded with "0". Three bits are truncated on the right. The new decimal
value is "9".

Note
The left bit is "1" in a source tag of the data type with negative signed integer. This sign bit is
padded with "0" when the bits are shifted right. The sign changes to "+".

Bits to mask
An integer serves as bit mask. The bit pattern is used to multiply the shifted input bit pattern.
Example: Integer "2478" with the bit pattern "0000100110101110".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1205
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

You can enter the bit mask in three different ways:


● Hexadecimal: First enter the prefix "0h" or "0H", followed by an optional space for better
readability. Then group the bit pattern in blocks of four (0000)(1001)(1010)(1110) and set
each block in hexadecimal code: (0)(9)(A)(E). Only the characters 0-9, A-F, a-f are allowed:
"0h 09AE".
● Binary: First enter the prefix "0b" or "0B", followed by an optional space for better readability.
Then group the binary bit pattern into blocks of four 0000 1001 1010 1110 with spaces in
between as a check. Only the characters "0" or "1" are allowed: "0b 0000 1001 1010 1110".
● Decimal: Enter the value "2478" directly, without a prefix.

3.1.81 ShowAlarmWindow (Panels, Comfort Panels, RT Advanced)

Description
Hides or shows the alarm window on the HMI device.

Use in the function list


ShowAlarmWindow (Object name, Layout)

Use in user-defined functions


ShowAlarmWindow (Object_name, Display_mode)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Object name
Name of the alarm view which is hidden or shown.

Layout
Determines whether the alarm window is hidden or shown:
0 (hmiOff) = Off: Alarm view is hidden
1 (hmiOn) = On: Alarm view is shown
-1 (hmiToggle) = Toggle: Toggles between the two modes

WinCC Professional V13 SP2 – Programming reference


1206 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.82 ShowOperatorNotes (Panels, Comfort Panels, RT Advanced)

Application
Displays the tooltip configured for the selected object.
If the system function is configured on a function key, the tooltip for the screen object that
currently has the focus is displayed. If a tooltip is configured for the screen itself, you can switch
to this text by pressing <Enter> or by double-clicking on the help window.
If the system function is configured on a button, only the tooltip for the current screen is
displayed. If a tooltip is configured on the button itself, initially only the tooltip for the button is
displayed. You can press <Enter> or double-click on the help window to switch to the tooltip
for the current screen.

Note
No other screen object can be used while the help window is open. To use the screen object,
close the help window.

Closing the help window


You can close the help window in the following ways:
Using the keys:
● By pressing the <HELP> key again
● By pressing the <ESC> key
Using the touch screen:
● By pressing the button

Use in the function list


ShowOperatorNotes (Layout)

Use in user-defined functions


ShowOperatorNotes (Display_mode)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Display mode
Determines whether the configured tooltip is hidden or shown:
0 (hmiOff) = Off: Configured tooltip is hidden
1 (hmiOn) = On: Configured tooltip is shown

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1207
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

-1 (hmiToggle) = Toggle: Toggles between the two modes

3.1.83 ShowPopUpScreen (Panels, Comfort Panels, RT Advanced)

Description
Opens the pop-up-screen, for example, when a button is pressed.
You can enter a constant value or assign a tag as coordinates.
If the configured pop-up screen is not visible or only partially visible, the coordinates are set
to 0.0.

Use in the function list


ShowPopupScreen (Screen object)

Use in user-defined functions


ShowPopupScreen (Name_of_the_screen, Coordinate_X, Coordinate_Y, Layout)

Parameters

Screen name
Specifies the name of the screen that appears in Runtime when a button is pressed.

X coordinate
Position of the screen in the current screen on the X axis

Y coordinate
Position of the screen in the current screen on the Y axis

Layout
Specifies the mode for the slide-in screen:
Switching
Off
On

3.1.84 ShowSlideInScreen (Panels, Comfort Panels, RT Advanced)

Description
Calls the slide-in screen, for example, when operating a button.

WinCC Professional V13 SP2 – Programming reference


1208 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in the function list


ShowSlideinScreen (screen name, mode)

Use in user-defined functions


ShowSlideInScreen (SlideInScreen_name, Mode)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Screen name
Specifies the slide-in screen that appears in Runtime when a button is pressed:
Slide-in screen top
Slide-in screen bottom
Slide-in screen left
Slide-in screen right

Mode
Specifies the mode for the slide-in screen:
Switching
Off
On

3.1.85 ShowSoftwareVersion (Panels, Comfort Panels, RT Advanced)

Description
Hides or shows the version number of the runtime software.
Use this system function if during servicing, for example, you required the version of the runtime
software used.

Use in the function list


ShowSoftwareVersion (Layout)

Use in user-defined functions


ShowSoftwareVersion (Display_mode)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1209
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Parameter

Layout
Determines whether the version number is shown:
0 (hmiOff) = Off: Version number is not shown
1 (hmiOn) = On: Version number is shown
-1 (hmiToggle) = Toggle: Toggles between the two modes

3.1.86 ShowSystemAlarm (Panels, Comfort Panels, RT Advanced)

Description
Displays the value of the parameter passed as a system event to the HMI device.

Use in the function list


ShowSystemAlarm (Text/value)

Use in user-defined functions


ShowSystemAlarm (Text/value)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Text/Value
The text or the value, which was output as a system alarm.

3.1.87 ShowSystemDiagnosticsWindow (Panels, Comfort Panels)

Description
Hides or shows the system diagnostic window on the HMI device. The system diagnostic view
is only available in the global screen for Comfort Panels and for WinCC Runtime Advanced.

Use in the function list


ShowSystemDiagnosticsWindow (Screen object)

WinCC Professional V13 SP2 – Programming reference


1210 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in user-defined functions


ShowSystemDiagnosticsWindow (Target_Object_name)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Screen object
Name of the system diagnostic window which is hidden or shown.

3.1.88 StartLogging (Panels, Comfort Panels, RT Advanced)

Description
Starts the logging of data or alarms in the specified log. The function can also be applied to
audit trails.
You can interrupt logging at runtime using the "StopLogging" system function.

Use in the function list


StartLogging (Log type, Log)

Use in user-defined functions


StartLogging (Log_type, Log)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Log type
Determines the type of log:
0 (hmiTagArchive) = Data log
1 (hmiAlarmArchive) = Alarm log
2 (hmiAudittrailArchive) = Audit trail

Log
Name of the log which is started.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1211
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3.1.89 StartNextLog (Panels, Comfort Panels, RT Advanced)

Description
Stops the logging of data or alarms for the given log.
Logging is continued in the next log of the segmented circular log you configured for the
specified log.
If you did not configure a segmented circular log for the specified log, the system function has
no effect.

Use in the function list


StartNextLog (Log type, Log)

Use in user-defined functions


StartNextLog (Log_type, Log)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Log type
Determines the type of log:
0 (hmiTagArchive) = Data log
1 (hmiAlarmArchive) = Alarm log

Log
Name of the log for which the logging is stopped and continued in the next log.

3.1.90 StartProgram (Panels, Comfort Panels, RT Advanced)

Description
Starts the specified program on the HMI device.
The runtime software continues running in the background. Alarms continue to be output and
data continues to be updated.
When the given application is exited, the screen which was active during the performance of
the system function is displayed on the HMI device.

WinCC Professional V13 SP2 – Programming reference


1212 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

This system function is used, for example, to edit recipe data records in MS Excel on the HMI
device.

Note
If Windows CE is installed on the HMI device, during the configuration it must be checked
whether the desired application can be started with this system function.
This system function allows all applications to be started which can be started in the "Execute"
dialog of Windows CE.
The application to be started must be installed on the HMI device.

Use in the function list


StartProgram (Program name, Program parameters, Layout, Wait for program to end)

Use in user-defined functions


StartProgram (Program_name, Program_parameters, Display_mode,
Wait_for_program_to_end)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Program name
Name and path of the program which is started. Upper and lower case are taken into account
in this parameter.

Note
If the path contains spaces, the program can only be started correctly if the path is specified
in inverted commas, e.g. "C:\Program Files\START\start.exe".

Program parameters
The parameters you transfer at the start of the program, for example a file that is opened after
the start of the program.
The description of the necessary parameters is found in the documentation of the program to
be started.

Layout
Determines how the program window is displayed on the HMI device:
0 (hmiShowNormal) = Normal
1 (hmiShowMinimized) = Minimized
2 (hmiShowMaximized) = Maximized

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1213
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

3 (ShowMinimizedAndInactive) = Minimized and inactive

Wait for program to end


Determines whether there is a change back to the project after the called up program has
ended:
0 (hmiNo) = No: No change to project
1 (hmiYes) = Yes: Change to project

Note
The "Wait for program to end" parameter is only available for Runtime Advanced and Panels.

3.1.91 StopLogging (Panels, Comfort Panels, RT Advanced)

Description
Stops the logging of process values or alarms in the specified log. The function can also be
applied to audit trails.
The "StartLogging" system function is used to resume logging at runtime.

Note
When logging is stopped, a connection between WinCC and the log files or log database still
exists. Use the "CloseAllLogs" system function to disconnect this connection.

Use in the function list


StopLogging (Log type, Log)

Use in user-defined functions


StopLogging (Log_type, Log)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameter

Log type
Determines the type of log:
0 (hmiTagArchive) = Data log
1 (hmiAlarmArchive) = Alarm log
2 (hmiAudittrailArchive) = Audit trail

WinCC Professional V13 SP2 – Programming reference


1214 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Log
Name of the log that is stopped.

Application example
You are in runtime and want to change the data medium on which the process values are
logged.
Notes on configuring
Configure the "StopLogging" and "CloseAllLogs" system functions on the "Close Archive"
button.
Configure the "OpenAllLogs" and "StartLogging" system functions on the "Open Archive"
button.
As parameter transfer the respective name of the log that is to be stopped and started.
Procedure on HMI device
When the button "Close Archive" is pressed, the specified log is stopped and all open logs are
closed. The data medium can be changed. The "Open Archive" button opens all logs and
continues logging in the specified log.

3.1.92 StopRuntime (Panels, Comfort Panels, RT Advanced)

Description
Exits the runtime software and thereby the project running on the HMI device.

Use in the function list


StopRuntime (Mode)

Use in user-defined functions


StopRuntime (Mode)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Mode
Determines whether the operating system is shut down after exiting runtime.
0 (hmiStopRuntime) = Runtime: Operating system is not shut down
1 (hmiStopRuntimeAndOperatingSystem) = Runtime and operating system: The operating
system is shut down (not possible with WinCE)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1215
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Example
The following program code shuts down Runtime and the operating system.

//Stop runtime and shutdown


StopRuntime (hmiStopRuntimeAndOperationSystem);

The saved return value can be processed in the following code.

3.1.93 TerminatePROFIsafe (Panels, Comfort Panels, RT Advanced)

Description
Disconnects the PROFIsafe connection for fail-safe operation between a KTP Mobile Panel
and the PLC.
After execution of the system function "TerminatePROFIsafe", the connector of the KTP Mobile
Panel can be removed from the PLC without the system signaling an error.

Use in the function list


TerminatePROFIsafe

Use in user-defined functions


TerminatePROFIsafe
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters
--

3.1.94 WinACMPGetVersion (Panels, Comfort Panels)

Description
Reads out the value of the version number of WinAC MP.

WinCC Professional V13 SP2 – Programming reference


1216 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.1 System functions (Panels, Comfort Panels, RT Advanced)

Use in the function list


WinACMPGetVersion (Version, Action)

Use in user-defined functions


WinACMPGetVersion (Version, Action)
Can be used if the configured device supports user-defined functions. For more information,
refer to AUTOHOTSPOT.

Parameters

Version
The tag that contains the value.

Action
Determines whether the version number is read out:
0 (SwitchOff) = Off: Version number is not read out.
1 (SwitchOn) = On: Version number is read out.

3.1.95 WinACMPSetStartAtBoot (Panels, Comfort Panels)

Description
Determines whether or not WinAC MP is started automatically after startup of the HMI
device.

Use in the function list


WinACMPSetStart at boot(Start at boot)

Use in user-defined functions


WinACMPSetStartAtBoot (Start at boot)
Can be used if the configured device supports user-defined functions. For more information,
refer to AUTOHOTSPOT.

Parameters

StartAtBoot
Defines whether WinAC MP is started automatically.
0 (StartAtBootOff) = Off: WinAC MP is not started on startup of the HMI device.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1217
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

1 (StartAtBootOn) = On: WinAC MP is started automatically on startup of the HMI device.

3.1.96 WinACSetStartMode (Panels, Comfort Panels)

Description
Sets the operating mode of WinAC MP after startup of the HMI device.

Use in the function list


WinACSetStartMode (Autostart)

Use in user-defined functions


WinACSetStartMode (Autostart)
Can be used if the configured device supports user-defined functions. For more information,
refer to AUTOHOTSPOT.

Parameters

Action
Defines whether the Autostart function of WinAC MP is activated.
0 (AutoStartOff) = Off: After startup, WinAC MP remains in the STOP operating mode.
1 (AutoStartOn) = On: After startup, WinAC MP changes to the operating mode it was in before
it was closed.

3.2 System functions (RT Professional)

3.2.1 ActivateScreen (RT Professional)

Description
Performs a screen change to the given screen.
Use the "ActivateScreenByNumber" system function to change from the root screen to the
permanent window or vice versa.

Use in the function list


ActivateScreen (Screen name, Object number)

WinCC Professional V13 SP2 – Programming reference


1218 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Use in user-defined functions


ActivateScreen (Screen_name, Object_number)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Screen name
Name of the screen to which you change.

Object number
The operator control element which receives the focus in the given screen after the screen
change. The number of the operator control element is to be determined using the tabulator
sequence during configuration.
When "0" is specified:
● If the focus is in the permanent window when the system function is called up, the
permanent window maintains the focus.
● If the focus is in the root screen when the system function is called up, the first operator
control element in the given screen receives the focus.
Note
If the "Reach margin" event is assigned to the "ActivateScreen" system function, only the
value "0" is valid for the "Object number" parameter. The active object is not defined by the
object number, but rather by the X position it had prior to the screen change.

Example
The ActivateScreen function is used in the following program code to activate the "Screen_2"
screen when you click a button.

// User defined code


// i.e. when pressing a button
ActivateScreen ("Screen_2", 0);
...
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1219
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

3.2.2 ActivateScreenInScreenWindow (RT Professional)

Description
Performs a screen change to the specified screen in a specified screen window.

Use in the function list


ActivateScreenInScreenWindow (Screen name, Screen window, New screen name)

Use in user-defined functions


ActivateScreenInScreenWindow (Screen_name, Screen_window, New_screen_name)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

Parameters

Screen name
Name of the screen to be displayed in the screen window.

Screen window
Name of the screen window in which the new screen is to be displayed.

New screen name


Name of the new screen to be displayed in the screen window.

Example
The ActivateScreenInScreenWindow function is used in the following program code to activate
the "Screen_2" screen when you click a button.

{
// User defined code
// i.e. when pressing a button
ActivateScreenInScreenWindow (GetParentScreen(screenName),
GetParentScreenWindow(screenName), "Screen_2");
...
}

WinCC Professional V13 SP2 – Programming reference


1220 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

3.2.3 DecreaseTag (RT Professional)

Description
Subtracts the given value from the tag value.
X=X-a

Note
The system function uses the same tag as input and output values. When this system function
is used to convert a value, auxiliary tags must be used. You can use the "SetTag" system
function to assign the tag value to the auxiliary tags.

If you configure the system function for events of an alarm and the tag is not being used in the
current screen, it is not ensured that the actual tag value is being used in the PLC. You can
improve the situation by setting the "Cyclic continuous" acquisition mode.

Use in the function list


DecreaseTag (Tag, Value)

Use in user-defined functions


DecreaseTag (Tag, Value)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

Parameters

Tag
The tag from which the given value is subtracted.

Value
The value which is subtracted.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1221
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Example
The following program code decrements the value at the varX tag by the value at the value
tag. The value entered is saved to the old_value tag and output along with the new varX value.

{
BYTE varX;
BYTE value;

//user input
...
BYTE old_value = varX;

//Decrease tag
DecreaseTag(varX, value);

//print original value and function result


printf ("User input: %i\r\n, Result of function DecreaseTag: %i\r\n", old_value, varX);
...
}

3.2.4 ExportImportUserAdministration (RT Professional)

Description
Exports all users of the user administration of the currently active project to the given file or
imports the users from the given file into the currently active project.
Users, their passwords and rights are saved in the user administration.
All users are overwritten when importing. The imported users are valid immediately.

Use in the function list


ExportImportUserAdministration (File name, Direction)

Use in user-defined functions


ExportImportUserAdministration (File_name, Direction)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

WinCC Professional V13 SP2 – Programming reference


1222 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Parameter

File name
Name of the file which contains the passwords or to which the passwords are written. Enter
the file location and the file extension (*.txt), for example, "C:\TEMP\Passwords.txt".

Note
If a storage card is used as file location, specify the file location as follows: "\StorageCard\<File
name>".

Direction
Specifies whether passwords are exported or imported:
0 (hmiExport) = Export: Passwords are exported.
1 (hmiImport) = Import: Passwords are imported.

3.2.5 IncreaseTag (RT Professional)

Description
Adds the given value to the value of the tags.
X=X+a

Note
The system function uses the same tag as input and output values. When this system function
is used to convert a value, auxiliary tags must be used. You can use the "SetTag" system
function to assign the tag value to the auxiliary tags.

If you configure the system function for events of an alarm and the tag is not being used in the
current screen, it is not ensured that the actual tag value is being used in the PLC. You can
improve the situation by setting the "Cyclic continuous" acquisition mode.

Use in the function list


IncreaseTag (Tag, Value)

Use in user-defined functions


IncreaseTag (Tag, Value)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1223
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Parameters

Tag
The tag to which the given value is added.

Value
The value that is added.

Example
The following program code increments the value of the varX tag by the value in the value tag.
The value entered is saved to the old_value tag and output along with the new varX value.

{
BYTE varX;
BYTE value;

//user input
...
BYTE old_value = varX;

//Increase tag
IncreaseTag(varX, value);

//print original value and function result


printf ("User input: %i\r\n, Result of function IncreaseTag: %i\r\n", old_value, varX);
...
}

3.2.6 InverseLinearScaling (RT Professional)

Description
Assigns a value to the tag X, which is calculated from the value of the given tag Y using the
linear function X = (Y - b) / a.
The tags X and Y must not be identical. This system function is the inverse of the
"LinearScaling" system function.

Note
The tags X and Y must not be identical. If a tag is to be converted into itself, a auxiliary tag
must be used.
The "SetTag" system function can be used to assign the value of the tags to be converted to
the auxiliary tags.

WinCC Professional V13 SP2 – Programming reference


1224 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Use in the function list


InvertLinearScaling (X, Y, b, a)

Use in user-defined functions


InvertLinearScaling (X, Y, b, a)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

X
The tag which is assigned the value calculated from the linear equation.

Y
The tag that contains the value used for calculation.

b
The value which is subtracted.

a
The value through which is divided.

Example
The following program code assigns a value to the varX tag by means of the
InverseLinearScaling function.

{
BYTE varX;
BYTE Yvalue = 10;
BYTE bvalue = 3;
BYTE avalue = 4;

//Inverse linear scaling


InverseLinearScaling (varX, Yvalue, bvalue, avalue);

printf ("varX = %d\r\n, varX);


...
}

The saved return value can be processed in the following code.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1225
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

3.2.7 InvertBit (RT Professional)

Description
Inverts the value of the given tag of the "Bool" type:
● If the tag has the value of 1 (TRUE), it will be set to 0 (FALSE).
● If the tag has the value of 0 (FALSE), it will be set to 1 (TRUE).

Use in the function list


InvertBit (Tag)

Use in user-defined functions


InvertBit (Tag)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The tag whose bit is set.

Example
The following program code inverts the value of the boolean tag b_value and outputs the result
along with the original b_saved value.

{
BOOL b_value = 0;
BOOL b_saved = b_value;

//Invert variable
invertBit(b_value);

//print current and saved value


printf ("Current value: %d\r\n, Saved value: %d\r\n",b_value, b_saved);
...
}

WinCC Professional V13 SP2 – Programming reference


1226 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

3.2.8 InvertBitInTag (RT Professional)

Description
Inverts a bit in the given tag:
● If the bit in the tag has the value of 1 (TRUE), it will be set to 0 (FALSE).
● If the bit in the tag has the value of 0 (FALSE), it will be set to 1 (TRUE).
After changing the given bit, the system function transfers the entire tag back to the PLC. It is
not checked whether other bits in the tags have changed in the meantime. Operator and PLC
have read-only access to the indicated tag until it is transferred back to the PLC.

Note
If the PLC supports BOOL tags, do not use this system function. Use the "InvertBit" system
function instead.

Use in the function list


InvertBitInTag (Tag, Bit)

Use in user-defined functions


InvertBitInTag (Tag, Bit)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The tag in which the given bit is set.

Bit
The number of the bit that is set.
When this system function is used in a user-defined function, the bits in a tag are counted from
right to left. The counting begins with 0.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1227
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Example
The following program code inverts a bit at the specified bitposition in the bvalue tag and
outputs the result along with the original bsaved value.

{
BYTE bvalue;
BYTE bsaved = bvalue;
BYTE bitposition = 2;

//Invert bit in bitposition


InvertBitInTag (bvalue, bitposition);
//print current and saved value
printf ("Current value: %d\r\n, Saved value: %d\r\n",bvalue, bsaved);
...
}

3.2.9 LinearScaling (RT Professional)

Description
Assigns a value to the tag Y, which is calculated from the value of the given tag X using the
linear function Y= (a *X) + b.
The inverse of this function is the "InvertLinearScaling" system function.

Note
The tags X and Y must not be identical. If a tag is to be converted into itself, a auxiliary tag
must be used.
The "SetTag" system function can be used to assign the value of the tags to be converted to
the auxiliary tags.

Use in the function list


LinearScaling (Y, a, X, b)

Use in user-defined functions


LinearScaling (Y, a, X, b)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

WinCC Professional V13 SP2 – Programming reference


1228 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Parameters

Y
The tag which is assigned the value calculated from the linear equation.

a
The value with which is multiplied.

X
The tag that contains the value used for calculation.

b
The value that is added.

Example
The following program code uses the LinearScaling function to assign a value to the Yvar tag.

{
BYTE Yvar;
BYTE Xvalue = 10;
BYTE bvalue = 3;
BYTE avalue = 4;

// linear scaling
LinearScaling ( Yvar, avalue, Xvalue, bvalue);

printf ("Yvar = %d\r\n, Yvar);


...
}

The saved return value can be processed in the following code.

3.2.10 ResetBit (RT Professional)

Description
Sets the value of a "Bool" type tag to 0 (FALSE).

Use in the function list


ResetBit (Tag)

Use in user-defined functions


ResetBit (Tag)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1229
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The BOOL type tag which is set to 0 (FALSE).

Example
The following program code resets the value of the boolean tag b_value to 0 by means of the
ResetBit function and outputs the result along with the original b_saved value.

{
BOOL b_value = 1;
BOOL b_saved = b_value;

//Reset bit
ResetBit (b_value);

//print current and saved value


printf ("Current value: %d\r\n, Saved value: %d\r\n",b_value, b_saved);
...
}

3.2.11 ResetBitInTag (RT Professional)

Description
Sets a bit in the specified tag to 0 (FALSE).
After changing the given bit, the system function transfers the entire tag back to the PLC. It is
not checked whether other bits in the tags have changed in the meantime. Operator and PLC
have read-only access to the indicated tag until it is transferred back to the PLC.

Note
If the PLC supports BOOL tags, do not use this system function. Use the "ResetBit" system
function instead.

Use in the function list


ResetBitInTag (Tag, Bit)

WinCC Professional V13 SP2 – Programming reference


1230 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Use in user-defined functions


ResetBitInTag (Tag, Bit)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The tag in which a bit is set to 0 (FALSE).

Bit
The number of the bit that is set to 0 (FALSE).
When this system function is used in a user-defined function, the bits in the specified tag will
be counted from right to left independent of the PLC used. The counting begins with 0.

Example
The following program code sets a bit at the specified bitposition in the bvalue tag to 0 and
outputs the result along with the original bsaved value.

{
BYTE bvalue;
BYTE bsaved = bvalue;
BYTE bitposition = 2;

//Reset bit in bitposition


ResetBitInTag (bvalue, bitposition);

//print current and saved value


printf ("Current value: %d\r\n, Saved value: %d\r\n",bvalue, bsaved);
...
}

3.2.12 SetBit (RT Professional)

Description
Sets the value of a "Bool" type tag to 1 (TRUE).

Use in the function list


SetBit (Tag)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1231
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Use in user-defined functions


SetBit (Tag)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The BOOL type tag which is set to 1 (TRUE).

Example
The following program code sets the value of the boolean tag b_value to 1 by means of the
SetBit function and outputs the result along with the original b_saved value.

{
BOOL b_value = 0;
BOOL b_saved = b_value;

//Set bit
SetBit (b_value);

//print current and saved value


printf ("Current value: %d\r\n, Saved value: %d\r\n",b_value, b_saved);
...
}

3.2.13 SetBitInTag (RT Professional)

Description
Sets a bit in the given tag to 1 (TRUE).
After changing the given bit, the system function transfers the entire tag back to the PLC. It is
not checked whether other bits in the tags have changed in the meantime. Operator and PLC
have read-only access to the indicated tag until it is transferred back to the PLC.

Note
If the PLC supports BOOL tags, do not use this system function. Use the "SetBit" system
function instead.

Use in the function list


SetBitInTag (Tag, Bit)

WinCC Professional V13 SP2 – Programming reference


1232 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Use in user-defined functions


SetBitInTag(Tag, Bit)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The tag in which a bit is set to 1 (TRUE).

Bit
The number of the bit that is set to 1 (TRUE).
When this system function is used in a user-defined function, the bits in the specified tag will
be counted from right to left independent of the PLC used. The counting begins with 0.

Note
The guaranteed update of the tags used with actual process values is absolutely conditional
in terms of reliable functionality. You should therefore configure the tag in an I/O field or assign
the system function to a screen object, such as a button.
If you have configured a short event such as the activation of an alarm for the system function
you can only access the actual process values by setting the tag for continuous reading.

Example
The following program code sets a bit to 1 at the specified bitposition in the bvalue tag and
outputs the result along with the original bsaved value.

{
BYTE bvalue;
BYTE bsaved = bvalue;
BYTE bitposition = 2;

//Reset bit in bitposition


SetBitInTag (bvalue, bitposition);

//print current and saved value


printf ("Current value: %d\r\n, Saved value: %d\r\n",bvalue, bsaved);
...
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1233
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

3.2.14 SetPropertyByConstant (RT Professional)

Description
Specifies the value of an object property as a string.

Use in the function list


SetPropertyByConstant (Screen name, Object, Name of the property, Value)

Use in user-defined functions


SetPropertyByConstant
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".
If you want to change the property of a screen, the parameter "Object" must be empty. For this
purpose, use the following syntax, for example:
SetPropertyByConstant ("<Screen name>","","<Property name>","<Value>")

Parameters

Screen name
Name of the screen that contains the object.

Object
Name of the object whose property is changed.

Name of the property


Name of the property that will be changed.

Value
The value assigned to the property.

WinCC Professional V13 SP2 – Programming reference


1234 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Example
The SetPropertyByConstant function is used in the following program code to change an object
property: In the "Trends" screen, the "ToolbarButtonClick" property of the "Control_1" object
is set to the value 26.

//Name of the picture: Trends


//Name of the f(t) trend view control: Control_1

SetPropertyByConstant ("Trends", "Control_1", "ToolbarButtonClick", "26");

// User defined code


...
}

Example: Changing a screen property


The SetPropertyByConstant function is used in the following program code to change a screen
property: In the "Trends" screen, the "Backcolor" property is set to the value 255.

//Name of the picture: Trends

SetPropertyByConstant ("Trends", "Trends", "Backcolor", "255");

// User defined code


...
}

Alternatively, use the password ZERO or a space-string instead of the second parameter
(object).

3.2.15 SetPropertyByProperty (RT Professional)

Description
Specifies the value of an object property with another object property.

Use in the function list


SetPropertyByProperty (Screen name, Object, Name of the property, Destination screen
name, Destination object, Destination property name)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1235
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Use in user-defined functions


SetPropertyByProperty (Screen_name, Screen_object, Property_name,
Source_screen_name, Source_screen_object, Source_property_name)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".
If you want to specify the property of a screen with another screen property, the parameters
"Object" and "Destination object" must be empty. For this purpose, use the following syntax,
for example:
SetPropertyByProperty ("<Screen name>","","<Property name>","<Destination_Screen
name>","","<Destination_Property name>")

Parameters

Screen name
Name of the screen that contains the object.

Object
Name of the object whose property is transferred to the destination object.

Name of the property


Name of the property that will be transferred to the destination object.

Destination screen name


Name of the screen that contains the destination object.

Destination object
Name of the destination object to which the property is transferred.

Destination property name


Name of the property that will be changed.

WinCC Professional V13 SP2 – Programming reference


1236 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Example
The following program code uses the SetPropertyByProperty function to set the property
"ToolbarButtonClick" of the object "Control_1" in the original screen Trend_1": on the
corresponding property in the destination screen "Trend_2".

//Name of source picture: Trend_1


//Name of target picture: Trend_2
//Name of the f(t) trend view control: Control_1

SetPropertyByProperty ("Trend_1", "Control_1", "ToolbarButtonClick", "Trend_2",


"Control_2", "ToolbarButtonClick");

// User defined code


...
}

3.2.16 SetPropertyByTag (RT Professional)

Description
Specifies the value of an object property with a tag value.

Use in the function list


SetPropertyByTag (Screen name, Object, Name of the property, Tag name)

Use in user-defined functions


SetPropertyByTag (Screen_name, Screen_object, Property_name, Tag_name)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".
If you want to specify the property of a screen by means of a tag value, the "Object" parameter
must be empty. For this purpose, use the following syntax, for example:
SetPropertyByTag ("<Screen name>","","<Property name>","<Tag name>")

Parameters

Screen name
Name of the screen that contains the object.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1237
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Object
Name of the object containing the property to be set with the tag value.

Name of the property


Name of the property that is set with the tag value.

Tag name
Name of the tag that contains the value of the property.

Example
The SetPropertyByTag function is used in the following program code to change an object
property: A click on the object transfers the object name and the screen containing the object.
The CaptionText in the screen window contains the value of the HMI_value_1 tag.

SetPropertyByTag (screenName, objectName, "CaptionText", "HMI_value_1");

// User defined code


...
}

Example
The SetPropertyByTag function is used in the following program code to change an object
property: In the "Trends" screen, the "ToolbarButtonClick" property of the "Control_1" object
is set to the value 26.

//Name of the picture: Trends


//Name of the f(t) trend view control: Control_1

SetPropertyByConstant ("Trends", "Control_1", "ToolbarButtonClick", "26");

// User defined code


...
}

3.2.17 SetPropertyByTagIndirect (RT Professional)

Description
Specifies the value of an object property with a tag. The tag contains the tag name that specifies
the object property.

WinCC Professional V13 SP2 – Programming reference


1238 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Use in the function list


SetPropertyByTagIndirect (Screen name, Object, Name of the property, Tag name)

Use in user-defined functions


SetPropertyByTagIndirect (Screen_name, Screen_object, Property_name, Tag_name)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".
If you want to specify the property of a screen by means of a tag, the "Object" parameter must
be empty. For this purpose, use the following syntax, for example:
SetPropertyByTagIndirect ("<Screen name>","","<Property name>","<Tag name>")

Parameters

Screen name
Name of the screen that contains the object.

Object
Name of the object containing the property to be set with the tag value.

Name of the property


Name of the property that is set with the tag value.

Tag name
Name of the tag that, in turn, contains the name of the tag that specifies the object property.

Example
The SetPropertyByTagIndirect function is used in the following program code to change an
object property: .

SetPropertyByTagIndirect (GetParentScreen(screenName), GetParentScreenWindow(screenName),


"ScreenName", "HMI_value_1");

// User defined code


...
}

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1239
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

3.2.18 SetTag (RT Professional)

Description
Assigns a new value to the given tag.

Note
This system function can be used to assign strings and numbers, depending on the type of
tag.

Use in the function list


SetTag (Tag, Value)

Use in user-defined functions


SetTag (Tag, Value)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Tag
The tag to which the given value is assigned.

Value
The value which the given tag is assigned.

Note
The "SetTag" system function is only executed after a connection has been established.

WinCC Professional V13 SP2 – Programming reference


1240 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Example
The following program code uses the SetTag function to set the value of the gs_tag_bit tag to
TRUE and saves the return value to the ok tag.

{
BOOL ok;
BOOL bvalue;

//Set the tag to true


ok = SetTag("gs_tag_bit", TRUE);
//error handling
if(ok)
{
// succeeded
printf ( "Function has run through.\r\n" );
bvalue = GetTagBit("gs_tag_bit");
printf ("Value of gs_tag_bit: %d\r\n", bvalue);
}
else
{
// failed
printf ( "Error - function failed." );
}
...
}

The saved return value can be processed in the following code.

3.2.19 SetTagByProperty (RT Professional)

Description
Specifies a tag value with the value of an object property. The change is also logged in the
alarm system.

Use in the function list


SetTagByProperty (Tag name, Screen name, Object, Name of the property, With or without
operator event)

Use in user-defined functions


SetTagByProperty (Tag_name, Screen_name, Screen_object, Property_name,
With_or_without_operator_event)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1241
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Parameters

Tag name
Name of the tag whose value is specified by the object property.

Screen name
Name of the screen that contains the object.

Object
Name of the object whose property supplies the tag value.

Name of the property


Name of the property that supplies the tag value.

With or without operator event


0 (hmiWithoutOperatorEvent) = Without operator event
1 (hmiWithOperatorEvent) = With operator event

Example
The following program code returns the value of the selected text when you click in a combo
box.

{
char* rt_value;

SetTagByProperty (rt_value, screenName, objectName, "SelectedText",


hmiWithoutOperatorEvent);

...
}

3.2.20 SetTagByTagIndirect (RT Professional)

Description
Sets the tag value to the value of an indirect tag. The change is also logged in the alarm
system.

Use in the function list


SetTagByTagIndirect (Tag name, Tag name, With or without operator event)

WinCC Professional V13 SP2 – Programming reference


1242 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Use in user-defined functions


SetTagByTagIndirect (Tag_name, Source_tag_name, With_or_without_operator_event)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

Parameters

Tag name
Name of the tag whose value is specified by an indirect tag.

Tag name
Name of the indirect tag that returns the tag value.

With or without operator event


0 (hmiWithoutOperatorEvent) = Without operator event
1 (hmiWithOperatorEvent) = With operator event

Example
The following program code returns the value of the "@LocalMachineName" tag when you
click the corresponding button.

{
char* rt_value;

SetTagByTagIndirect (rt_value, "@LocalMachineName", hmiWithoutOperatorEvent);

...
}

3.2.21 SetTagIndirect (RT Professional)

Description
Specifies the indirect name for a tag.

Use in the function list


SetTagIndirect (Tag name (output), LpValue)

Use in user-defined functions


SetTagIndirect (Tag_name, Value, With_or_without_operator_event)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1243
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

Parameters

Tag name (output)


Name of the tag to which the tag name is written.

LpValue
Name of the tag written to the tag.

Example
The following program code transfers the value from the "value" tag to the "result" tag when
you click the corresponding button.

{
BYTE result;
BYTE value;

SetTagIndirect ("result", "value", hmiWithoutOperatorEvent);


...
}

3.2.22 SetTagIndirectByProperty (RT Professional)

Description
Specifies a tag name with the value of an object property. The change is also logged in the
alarm system.

Use in the function list


SetTagIndirectByProperty (Tag name, Screen name, Screen object, Name of the property,
With or without operator event)

Use in user-defined functions


SetTagIndirectByProperty (Tag_name, Screen_name, Screen_object, Property_name,
With_or_without_operator_event)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

WinCC Professional V13 SP2 – Programming reference


1244 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Parameters

Tag name
Name of the tag whose tag name is specified by the object property.

Screen name
Name of the screen that contains the object.

Screen object
Name of the object whose property returns the tag name.

Name of the property


Name of the property that returns the tag name.

With or without operator event


0 (hmiWithoutOperatorEvent) = Without operator event
1 (hmiWithOperatorEvent) = With operator event

Example
When you click the objectName button, the following program code sets the value of the
"rt_value_property" tag to the value of the "FlashingEnabled" property.

{
Int rt_value_property;
SetTagIndirectByProperty ("rt_value_property", screenName, objectName, "FlashingEnabled",
hmiWithoutOperatorEvent);
...
}

3.2.23 SetTagIndirectByTagIndirect (RT Professional)

Description
Sets the tag value to the value of an indirect tag. The change is also logged in the alarm
system.

Use in the function list


SetTagIndirectByTagIndirect (Tag name, Tag name, With or without operator event)

Use in user-defined functions


SetTagIndirectByTagIndirect (Tag_name, Source_tag_name,
With_or_without_operator_event)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1245
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

Parameters

Tag name
Name of the indirect tag whose value is specified by an indirect tag.

Tag name
Name of the indirect tag that returns the tag value.

With or without operator event


0 (hmiWithoutOperatorEvent) = Without operator event
1 (hmiWithOperatorEvent) = With operator event

Example
When you click the objectName button, the following program code sets the "rt_value" tag to
the value of the "value" tag.

{
Int rt_value;
Int value;

SetTagIndirectByTagIndirect ("rt_value", "value", hmiWithoutOperatorEvent);


...
}

3.2.24 SetTagIndirectWithOperatorInputAlarm (RT Professional)

Description
Specifies the indirect name for a tag. The change is also logged in the alarm system.

Use in the function list


SetTagIndirectWithOperatorInputAlarm (Tag name (output), LpValue)

Use in user-defined functions


SetTagIndirectWithOperatorEvent
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

WinCC Professional V13 SP2 – Programming reference


1246 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Parameters

Tag name (output)


Name of the tag to which the tag name is written.

LpValue
Name of the tag written to the tag.

3.2.25 SetTagWithOperatorEvent (RT Professional)

Description
Specifies the value for a tag. The change is also logged in the alarm system.

Use in the function list


SetTagWithOperatorInputAlarm (Tag name (output), LpValue)

Use in user-defined functions


SetTagWithOperatorEvent (Tag_name, Value)
Can be used if the configured device supports user-defined functions. For more information,
refer to "AUTOHOTSPOT".

Parameters

Tag name (output)


Name of the tag whose value is to be set.

LpValue
Value written to the tag.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1247
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.2 System functions (RT Professional)

Example
The following program code transfers the value from the "value" tag to the "result" tag when
you click the corresponding button.

{
BYTE result;
BYTE value;

SetTagWithOperatorEvent ("result", "value");


...
}

3.2.26 ShowLogonDialog (RT Professional)

Description
Opens a dialog on the HMI device with which the user can log on to the HMI device.

Use in the function list


ShowLogonDialog

Use in user-defined functions


ShowLogonDialog
Can be used if the configured device supports user-defined functions. Additional information
is available under "AUTOHOTSPOT".

Parameters
--

3.2.27 StopRuntime (RT Professional)

Description
Exits the runtime software and thereby the project running on the HMI device.

Use in the function list


StopRuntime (Mode)

WinCC Professional V13 SP2 – Programming reference


1248 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.3 VBScript for Windows (Panels, Comfort Panels, RT Advanced, RT Professional)

Use in user-defined functions


StopRuntime (Mode)
Can be used if the configured device supports user-defined functions. For additional
information, refer to "Device dependency".

Parameters

Mode
Determines whether the operating system is shut down after exiting runtime.
0 (hmiStopRuntime) = Runtime: Operating system is not shut down
1 (hmiStopRuntimeAndOperatingSystem) = Runtime and operating system: The operating
system is shut down (not possible with WinCE)

Example
The following program code shuts down Runtime and the operating system.

//Stop runtime and shutdown


StopRuntime (hmiStopRuntimeAndOperationSystem);

The saved return value can be processed in the following code.

3.3 VBScript for Windows (Panels, Comfort Panels, RT Advanced, RT


Professional)

3.3.1 VBScript for Windows (Panels, Comfort Panels, RT Advanced, RT Professional)

VBScript
If you have worked with Visual Basic or Visual Basic for applications, then VBScript will seem
familiar to you. If you do not know Visual Basic and are getting familiar with it, then you will
learn all Visual Basic programming languages at once. The step-by-step guides from Microsoft
Press are a good introduction to programming.
You will find fundamental information on VBScript language elements on the Microsoft
homepage:
http://msdn.microsoft.com/en-us/library/t0aew7h6.aspx

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1249
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

Local ID (LCID)
An overview of all language codes can be found on the Microsoft homepage:
http://msdn.microsoft.com/en-us/goglobal/bb964664

3.4 VBScript for Windows CE (Panels, Comfort Panels)

3.4.1 VBScript for Windows CE (Panels, Comfort Panels)

3.4.1.1 Attr (Panels, Comfort Panels)

Function
This property of the File control returns a number indicating the file mode that was used to
open the file.

Syntax
file.Attr

Parameters

File
Reference to a File control.

Return values
The return values listed in the following table indicate the file access mode. If the return value
is 0, the file is closed.

Constant Value
None 0
fsModeInput 1
fsModeOutput 2
fsModeRandom 4
fsModeAppend 8
fsModeBinary 32

Remarks
The Attr property is read-only. Use the Open method of the File control to set the file mode.

WinCC Professional V13 SP2 – Programming reference


1250 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

3.4.1.2 Close (Panels, Comfort Panels)

Function
This method closes an open File control.

Syntax
file.Close

Parameters

File
Name of a File control.

Return Values
None.

Remarks
Use the Open method to open a file.

3.4.1.3 CreateObject (Panels, Comfort Panels)

Function
This function creates a reference to an Automation object.

Syntax
CreateObject (Object)

Parameters

Object
A string containing the ProgID of the object to create.

Return values
Returns a reference to an Automation object.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1251
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

Remarks
Use CreateObject to create non-visible ActiveX controls at runtime. You cannot use
CreateObject to create graphical objects such as a TreeView control or a ListView control.
CreateObject produces objects that cannot respond to events. To produce objects that can
respond to events, use the CreateObjectWithEvents function. The following table lists the
ProgIDs for the ActiveX controls without events.

Control ProgID
Microsoft CE File control 6.0 .file
Microsoft CE FileSystem control 6.0 .filesystem
Microsoft CE ImageList control 6.0 CEimageList.imagelistctrl

Example

Dim f, fwModeAppend
Set f = CreateObject("FileCtl.File")
fwModeAppend=8
f.Open "\Storage Card\testfile.txt", fwModeAppend
f.Close

3.4.1.4 Dir (Panels, Comfort Panels)

Function
This method returns the name of a file, directory, or folder that matches a specified pattern or
file attribute.

Syntax
File.Dir (Pathname,[Attributes])

Parameters

File
Reference to a FileSystem control.

Pathname
Optional. String expression that specifies a file name or path.

Attributes
Optional. Numeric expression whose sum specifies file attributes. If omitted, all files that match
pathname are returned.

WinCC Professional V13 SP2 – Programming reference


1252 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

The following table describes the parameter settings of attributes.

Constant Value Description


fsAttrNormal 0 Normal
fsAttrReadOnly 1 Read only
fsAttrHidden 2 Hidden
fsAttrSystem 4 System file
fsAttrVolume 8 Volume label. If specified, all other attributes are ignored.
fsAttrDirectory 16 Directory or folder
fsAttrArchive 32 Logs

Return values
String. File name that matches pathname and attributes. Dir returns a zero-length string ("") if
pathname is not found.

Remarks
Dir supports the use of multiple-character (*) and single-character (?) wildcards to specify
multiple files. You must specify pathname the first time you call the Dir method. In addition, if
you specify file attributes you must include pathname.
The Dir method returns the first file name that matches pathname. To get any additional file
names that match pathname, call Dir again with no parameters. When no more file names
match, Dir returns a zero-length string (" "). Once a zero-length string is returned, you must
specify pathname in subsequent calls.

3.4.1.5 EOF (Panels, Comfort Panels)

Function
This property returns True when the end of a file opened for random or sequential input is
reached.

Syntax
File.EOF

Parameters

File
Reference to a File control.

Remarks
Use the EOF property to avoid the error generated by attempting to read past the end of a file.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1253
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

The EOF property returns False until the end of the file has been reached. For files opened
with a fsModeRandom or fsModeBinary file mode, EOF returns False until the last executed
Get statement is unable to read an entire record.
For files opened with a fsModeBinary file mode, an attempt to read through the file using the
Input function until EOF returns True generates an error. Use the LOF and LOC properties
instead of EOF when reading binary files with Input, or use Get when using the EOF property.
For files opened with a fsModeOutput file mode, EOF always returns True.

3.4.1.6 FileCopy (Panels, Comfort Panels)

Function
This method copies an existing file to a new file.

Syntax
Filesystem.FileCopy PathName, NewPathName

Parameters

Filesystem
Reference to a FileSystem object.

PathName
String that contains the path and file name.

NewPathName
String that contains the file name and path of the new file.

Return Values
None.

Remarks
FileCopy returns an error if the new file does not exist.

3.4.1.7 FileLen (Panels, Comfort Panels)

Function
This method returns a value specifying the length, in bytes, of a file.

WinCC Professional V13 SP2 – Programming reference


1254 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

Syntax
Filesystem.FileLen(pathname)

Parameters

Filesystem
Reference to a FileSystem control.

Pathname
Required. String expression that specifies a file. The pathname can include a directory or folder.

Return Values
Returns the number of bytes in a file.

Remarks
If the specified file is open when the FileLen method is called, the value returned represents
the size of the file immediately before it was opened.

3.4.1.8 FileDateTime (Panels, Comfort Panels)

Function
This method returns a variant (Date) that indicates the date and time when a file was created
or last modified.

Syntax
filesystem.FileDateTime(pathname)

Parameters

Filesystem
Reference to a FileSystem control.

Pathname
Required. String expression that specifies a file name. The pathname can include a directory
or folder.

Return Values
Returns the date the file was last modified.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1255
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

Remarks
FileDateTime returns an error if the new file does not exist.

3.4.1.9 Get (Panels, Comfort Panels)

Function
This method reads data from an open disk file into a variable.

Syntax
file.Get Data, [Recnumber]

Parameters

File
Reference to a File control.

Data
Required. Variant variable into which data is read.

Recnumber
Optional. Variant. Record number at which reading begins. For files opened in binary mode,
Recnumber specifies the byte position.

Return Values
None

Remarks
Data read with the Get method usually is written to a file with the Put method. The first record
or byte in a file is at position 1, the second record or byte is at position 2, and so on. If you omit
Recnumber, the next record or byte following the last Get or Put method (or pointed to by the
last Seek function) is read.

WinCC Professional V13 SP2 – Programming reference


1256 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

For files opened in Random mode, the following rules apply:


● If the length of the data being read is less than the length specified in the Len clause of the
Open method, Get reads subsequent records on record-length boundaries. The space
between the end of one record and the beginning of the next record is padded with the
existing contents of the file buffer. Because the amount of padding data cannot be
determined with any certainty, it is generally advisable to match the record length with the
length of the data being read.
● If Data is a Variant of numeric type, Get reads 2 bytes identifying the VarType of the Variant
and then reads the data that goes into the variable. For example, when reading a Variant
of VarType 3, Get reads 6 bytes: 2 bytes identifying the Variant as VarType 3 (Long) and
4 bytes containing the Long data. The record length specified by the Len clause in the Open
method must be at least 2 bytes greater than the actual number of bytes required to store
the variable.
● You can use the Get method to read a Variant array from a disk, but you cannot use Get
to read a scalar Variant containing an array. You also cannot use Get to read objects from
a disk.
● If the variable being read into is a Variant of VarType 8 (String), Get reads 2 bytes identifying
the VarType and 2 bytes indicating the length of the string. Then it reads the string data.
The record length specified by the Len clause in the Open method must be at least 4 bytes
greater than the actual length of the string.
● If the variable being read into is a dynamic array, Get reads a descriptor whose length
equals 2 plus 8 times the number of dimensions, that is, 2 + 8 * NumberOfDimensions. The
record length specified by the Len clause in the Open method must be greater than or equal
to the sum of all the bytes required to read the array data and the array descriptor.
For files opened in Binary mode, the Len clause in the Open method has no effect. Get reads
all variables from a disk contiguously; that is, with no padding between records.

3.4.1.10 GetAttr (Panels, Comfort Panels)

Function
This method returns a number representing the attributes of a file, directory, or folder.

Syntax
filesystem.GetAttr(pathname)

Parameters

File system
Reference to a FileSystem control.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1257
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

Pathname
Required. String expression that specifies a file name or directory or a folder name. The
pathname can include the directory or folder.

Return values
Sum of attribute values. The following table shows the sums that can be returned.

Constant Value Description


vbNormal 0 Normal
VbReadOnly 1 Read only
VbHidden 2 Hidden
VbSystem 4 System
VbDirectory 16 Directory or folder
VbArchive 32 File has changed since last backup

Remarks
To determine which attributes are set, use the And operator to perform a bitwise comparison
of the value returned by the GetAttr method and the value of the individual file attribute you
want. If the result is not zero, that attribute is set for the named file.

3.4.1.11 Input (Panels, Comfort Panels)

Function
This method returns a string containing characters from a file opened in Input or Binary mode.

Syntax
file.Input(number)

Parameters

File
Reference to a File control.

Number
Any valid numeric expression that specifies the number of characters to return.

Return Values
String containing characters read from file.

WinCC Professional V13 SP2 – Programming reference


1258 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

Remarks
Data read with the Input method usually is written to a file with the LinePrint or Put functions.
Use this method only with files opened in Input or Binary mode.
Unlike the LineInputString method, the Input method returns all the characters it reads,
including commas, carriage returns, line feeds, quotation marks, and leading spaces.
With files opened for Binary access, an attempt to read through the file using the Input method
until the EOF function returns True generates an error. To avoid an error, use the LOF and
Loc functions instead of EOF when reading binary files with the Input method or use Get when
using the EOF function.

3.4.1.12 InputFields (Panels, Comfort Panels)

Function
This method reads data from an open sequential file and returns a single dimension Variant
array.

Syntax
file.InputFields(number)

Parameters

File
Reference to a File control.

Number
Number of comma-delimited fields to read from the file.

Return values
Array containing the fields read from the file.

Remarks
Data read with the InputFields method usually is written to a file with WriteFields. Use this
method only with files opened in Input or Binary mode.
InputFields reads standard string or numeric data without modification. The following table
shows how InputFields reads other input data.

Data Value Assigned to Variable


Delimiting comma or blank line Empty
#ZERO# Zero

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1259
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

Data Value Assigned to Variable


#TRUE# or #FALSE# True or False
#yyyy-mm-dd hh:mm:ss# The date and/or time represented by the expression

Double quotation marks ("") within input data are discarded.


If you reach the end of the file while you are inputting a data item, the input is terminated and
an error occurs.
To correctly read data from a file into variables using InputFields, use the WriteFields method
instead of the LinePrint method to write the data to the files. Using WriteFields ensures each
separate data field is properly delimited.

3.4.1.13 InputB (Panels, Comfort Panels)

Function
This method returns bytes from a file opened in Input or Binary mode.

Syntax
file.InputB(number)

Parameters

File
Reference to a File control.

Number
Any valid numeric expression that specifies the number of bytes to return.

Return Values
Array containing bytes read from file.

Remarks
Data read with the InputB method usually is written to a file with the LinePrint or Put functions.
Use this method only with files opened in Input or Binary mode.

3.4.1.14 Kill (Panels, Comfort Panels)

Function
This method deletes files from a disk.

WinCC Professional V13 SP2 – Programming reference


1260 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

Syntax
filesystem.Kill pathname

Parameters

Filesystem
Reference to a FileSystem control.

Pathname
Required. String expression that specifies one or more file names to be deleted. The pathname
can include the directory or folder.

Return Values
None.

Remarks
The Kill method supports the use of multiple-character (*) and single-character (?) wildcards
to specify multiple files.
An error occurs if you try to use Kill to delete an open file.

3.4.1.15 LineInputString (Panels, Comfort Panels)

Function
This method reads a single line from an open sequential file and assigns it to a string variable.

Syntax
file.LineInputString

Parameters

File
Reference to a File control.

Return Values
None.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1261
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

Remarks
Data read with LineInputString usually is written from a file with LinePrint.
The LineInputString method reads from a file one character at a time until it encounters a
carriage return (Chr(13)) or carriage return/line feed (Chr(13) + Chr(10)) sequence. Carriage
return/line feed sequences are skipped rather than appended to the character string.

3.4.1.16 LinePrint (Panels, Comfort Panels)

Function
This method writes a single line to an open sequential file.

Syntax
file.LinePrint output

Parameters

File
Reference to a File control.

Output
String expression to write to a file.

Return Values
None.

Remarks
Data written with LinePrint is usually read from a file with LineInputString.
A carriage return/line feed (Chr(13) + Chr(10)) sequence is appended to the end of the string.

3.4.1.17 Loc (Panels, Comfort Panels)

Function
This property returns a number specifying the current read/write position.

Syntax
file.Loc

WinCC Professional V13 SP2 – Programming reference


1262 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

Parameters

File
Reference to a File control.

Remarks
For files opened with the fsModeRandom file mode, Loc returns the number of the last record
read or written. For files opened with all other modes, Loc returns the position of the last byte
read or written.

3.4.1.18 LOF (Panels, Comfort Panels)

Function
This property returns a number representing the size, in bytes, of a file.

Syntax
file.LOF

Parameters

File
Reference to a File control.

Remarks
The LOF property can be used with the Loc property to guarantee that a read operation does
not continue past the end of a file.

3.4.1.19 MkDir (Panels, Comfort Panels)

Function
This method creates a new directory.

Syntax
filesystem.MkDir PathName

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1263
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

Parameters

Filesystem
Reference to a FileSystem control.

Pathname
String expression that contains the directory name.

Return Values
None.

Remarks
MkDir generates an error if the directory already exists.

3.4.1.20 MoveFile (Panels, Comfort Panels)

Function
This method renames an existing file or a directory, including all its subdirectories.

Syntax
filesystem.MoveFile PathName, NewPathName

Parameters

Filesystem
Reference to a FileSystem control.

PathName
String that contains the file name.

NewPathName
String that contains the file name to copy to.

Return Values
None.

WinCC Professional V13 SP2 – Programming reference


1264 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

3.4.1.21 Open (Panels, Comfort Panels)

Function
This method opens a file in either the Input (1), Output (2), Random (4), Append (8), or Binary
mode (32).

Syntax
file.Open pathname, mode, [access], [lock], [reclength]

Parameters

File
Reference to a File control.

Pathname
String expression that specifies a file name.

Mode
Specifies the file mode: Input (1), Output (2), Random (4) , Append (8), or Binary (32).

Access
Operation permitted on the open file: Read, Write, or ReadWrite [Default]. (1, 2, 3)

Lock
Operations permitted on the open file by other processes: Shared, LockRead, LockWrite
[Default], and LockReadWrite. (1, 2, 3, 0)

Reclength
Number, in bytes, that is less than 32,767. For files opened for random access, this value is
the record length. For sequential files, this value is the number of characters buffered.

Return Values
None.

Remarks
The reclength parameter is ignored if the mode is Binary. When opening a file in Random
mode, you must specifiy a record size of greater than zero or an error will occur.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1265
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

3.4.1.22 Put (Panels, Comfort Panels)

Function
This method writes data from a variable to a disk file.

Syntax
file.Put data, [recnumber]

Parameters

Data
Required. Variant variable that contains data to be written to disk.

Recnumber
Optional. Variant (Long). Record number (Random mode files) or byte number (Binary mode
files) at which writing begins.

Return Values
None.

Remarks
Data written with Put usually is read from a file with Get.
The first record or byte in a file is at position 1, the second record or byte is at position 2, and
so on. If you omit recnumber, the next record or byte after the last Get or Put method or pointed
to by the last Seek function is written.
For files opened in Random mode, the following rules apply:
● If the length of the data being written is less than the length specified in the Len clause of
the Open method, Put writes subsequent records on record-length boundaries. The space
between the end of one record and the beginning of the next record is padded with the
existing contents of the file buffer. Because the amount of padding data cannot be
determined with any certainty, it generally is a good idea to have the record length match
the length of the data being written. If the length of the data being written is greater than
the length specified in the Len clause of the Open method, an error occurs.
● If the variable being written is a Variant of a numeric type, Put writes 2 bytes identifying the
VarType of the Variant and then writes the variable. For example, when writing a Variant
of VarType 3, Put writes 6 bytes: 2 bytes identifying the Variant as VarType 3 (Long) and
4 bytes containing the Long data. The record length specified by the Len clause in the Open
method must be at least 2 bytes greater than the actual number of bytes required to store
the variable.
You can use the Put method to write a Variant array to disk, but you cannot use Put to write
a scalar Variant containing an array to disk. You also cannot use Put to write objects to disk.
If the variable being written is a Variant of VarType 8 (String), Put writes 2 bytes identifying

WinCC Professional V13 SP2 – Programming reference


1266 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

the VarType and 2 bytes indicating the length of the string. It then writes the string data. The
record length specified by the Len clause in the Open method must be at least 4 bytes greater
than the actual length of the string.
If the variable being written is a dynamic array, Put writes a descriptor whose length equals 2
plus 8 times the number of dimensions, that is, 2 + 8 * NumberOfDimensions. The record length
specified by the Len clause in the Open method must be greater than or equal to the sum of
all the bytes required to write the array data and the array descriptor. For example, the following
array declaration requires 118 bytes when the array is written to disk.
For files opened in Binary mode, the Len clause in the Open method has no effect. Put writes
all variables to disk contiguously; that is, with no padding between records.

3.4.1.23 RmDir (Panels, Comfort Panels)

Function
This method deletes an existing empty directory.

Syntax
filesystem.RmDir PathName

Parameters

Filesystem
Reference to a FileSystem control.

PathName
String that contains the directory name.

Return Values
None.

Remarks
The directory must be empty before it can be removed. You must specify a complete file path.

3.4.1.24 Seek (Panels, Comfort Panels)

Function
This property returns and sets the next position in a file that will be read or written.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1267
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

Syntax
file.Seek [= position]

Parameters

File
Reference to a File control.

Position
Numeric expression that specifies a position within a file.

Remarks
The Seek property specifies the next file position, whereas the Loc property specifies the
current position. Seek always will be one more than Loc, except when a file is first opened and
Seek and Loc are both 1.
Negative Seek or 0 causes an error.

3.4.1.25 SetAttr (Panels, Comfort Panels)

Function
This method sets attribute data for a file.

Syntax
filesystem.SetAttr pathname, attributes

Parameters

File system
Reference to a FileSystem control.

Pathname
Required. String expression that specifies a file name.

WinCC Professional V13 SP2 – Programming reference


1268 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

Attributes
Required. Numeric expression whose sum specifies file attributes. The following table shows
the parameter settings of attributes.

Constant Value Description


vbNormal 0 Normal (default)
vbReadOnly 1 Read only
vbHidden 2 Hidden
VbSystem 4 System file
VbArchive 32 File has changed since last backup

Return values
None.

Remarks
A run-time error occurs if you try to set the attributes of an open file.

3.4.1.26 WriteFields (Panels, Comfort Panels)

Function
This method writes data to a sequential file.

Syntax
file.WriteFields [data]

Parameters

File
Reference to a File control.

Data
Variant or Variant array of numeric or string expressions to write to a file.
Prinzip

Return Values
None.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1269
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.4 VBScript for Windows CE (Panels, Comfort Panels)

Remarks
Data written with WriteFields is usually read from a file with InputFields.
If you omit d ata, a blank line is printed to the file.
● Numeric data is always written using the period as the decimal separator.
● For Boolean data, either #TRUE# or #FALSE# is printed. The True and False keywords
are not translated, regardless of locale.
● Date data is written to the file using the universal date format. When either the date or the
time component is missing or is zero, only the component provided gets written to the file.
● Nothing is written to the file if Data is Empty. However, for Null data, #NULL# is written.
● If d ata is Null, #NULL# is written to the file.
The WriteFields method inserts commas between items and quotation marks around strings
as they are written to the file. You do not have to put explicit delimiters in the list. WriteFields
inserts a newline character—that is, a carriage return/line feed (Chr(13) + Chr(10))—after it
has written the final character in data to the file.

WinCC Professional V13 SP2 – Programming reference


1270 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT


Professional)

3.5.1 VBS object model (RT Professional)

VBS object model in WinCC


The following screen shows the VBS object model in WinCC:

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1271
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

$FWLYH3URMHFW

$FWLYH6FUHHQ

'DWD6HW

'DWD,WHP
+0,5XQWLPH

/RJJLQJ $ODUPORJV

'DWDORJV

$ODUPV 3URFHVVYDOXHV

$ODUP 3URFHVVYDOXH

6FUHHQV

6FUHHQ $FWLYH6FUHHQ,WHP

'DWD6HW

'DWD,WHP

/D\HUV

/D\HU

6FUHHQ,WHPV

6FUHHQ,WHP

7DJV 7DJ6HW

7DJ 7DJ

Use the WinCC object model of the graphic Runtime system to access objects and tags in
Runtime.

WinCC Professional V13 SP2 – Programming reference


1272 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Objects
Objects and lists are provided for access to all the objects in the graphic Runtime systems:
● Display and operating objects
● Screens
● Layers
● Tags

Properties
You can specifically change the display and operating elements and tags in Runtime via the
properties of the individual objects. For example, you can enable a button with a click or trigger
a color change by changing a tag value.

Methods
Methods which are applied to individual objects can be used to read out tag values for further
processing or displaying alarms in Runtime.

3.5.2 Objects (Panels, Comfort Panels, RT Advanced)

3.5.2.1 HMIRuntime (Panels, Comfort Panels, RT Advanced)

Description

+0,5XQWLPH

6FUHHQV 6PDUW7DJV

6FUHHQ 6PDUW7DJ

Portrays the graphic runtime system.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1273
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

The HMIRuntime object contains properties and methods which return the objects to the main
layer, e.g. returns the ActiveScreen property of a screen object.

Application
You use the "HMIRuntime" object, e.g. as follows:
● Read or set the current Runtime language ("Language" property).
● Read name of current base screen or trigger a base screen change by setting a new screen
name (property "BaseScreenName")
● Access tags (List "SmartTags")
● End runtime (Method "Stop")
● Output information on sequence tracing output (Method "Trace")
● Access the screens displayed during runtime (List "Screens")

See also
ActiveScreen (Page 1519)

3.5.2.2 Screen object (list) (Panels, Comfort Panels, RT Advanced)

Description

+0,5XQWLPH

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

A list of screen objects.

WinCC Professional V13 SP2 – Programming reference


1274 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

The list contains the following two elements:


● The first element with the index 0 represents the permanent window.
● The second element with the index 1 represents the root screen.
Alternatively, the two elements can be addressed with their their names as follows:
● Permanent window: "Overview"
● Root screen: Name of the screen displayed in the root screen
If the named screen is not displayed, an error occurs during access.
Permanent window "Overview" is displayed in the objects list and in Auto complete.

Note
The alarm window and the alarm indicator are not contained in the screens list, even if they
have the focus in Runtime.

Application
Use the screen property to return the screen list. In the following example, the background
color is changed from black to green:
Use the object name as an index.

'VBS_Example_BackColor
HMIRuntime.Screens("Rootscreen").BackColor = vbGreen

Note
If you perform a screen change, the open references to the screen that is no longer available
will become invalid. As a result, it is no longer possible to work with these references.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1275
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.2.3 Screen (Panels, Comfort Panels, RT Advanced)

Description

+0,5XQWLPH

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

Represents the process screen which is being displayed on the HMI device at the moment or
the permanent window in runtime. The screen object is returned to you as a result of accessing
the screen list.
The screen object also contains a list of all graphic objects in the screen that can be addressed
through the list "ScreenItems".

Application
You can also use the screen object to do the following:
● Read the height and width of a screen (properties "Height" and "Width").
● Change the background color (property "BackColor").
Use the object name as an index.
In the following example, the background color is changed from black to green:
'VBS example background color
HMIRuntime.Screens("Rootscreen").BackColor = vbGreen

See also
ScreenItem (Page 1277)

WinCC Professional V13 SP2 – Programming reference


1276 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.2.4 ScreenItem (Panels, Comfort Panels, RT Advanced)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents an object in the specified screen. The ScreenItem object is an element of the
ScreenItems list.

Application
You can use the ScreenItem object to access the properties of graphic objects within a screen,
depending on certain events.
You use the "ScreenItem" object as follows, for example:
● "Visible" property
Switch the visibility of an object on or off.
● "Height" and "Width" properties
Query the width and height of an object.
● "Top" and "Left" properties
Change the position of an object.
● "ObjectName" property
Read the name of a graphic object
● "Parent" property
Set a reference to the parent screen
Use the ScreenItems property to return an object to the screen. Use the object name as an
index.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1277
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example
In the following example, the background color of the "RootScreen" circle in the "myCircle"
screen is set to green.

'VBS_Example_ScreenItems

Dim objCircle
Set objCircle = HMIRuntime.Screens("RootScreen").ScreenItems("myCircle")
objCircle.BackColor = vbGreen

Note
To save memory space in the HMI device, no object names are loaded during transfer of the
project. If you still want to transfer object names, call up the Runtime settings for the respective
HMI device in WinCC. You can change the setting under "General". The object name is
required when the object should be accessed via the object name or for debugging a project.

The "ScreenItem" object has different properties depending on its features. The following
properties are provided for every "ScreenItem" object:
● Enabled
● Height
● Left
● ObjectName
● Parent
● Top
● Type
● Visible
● Width
If a specific object type is addressed, further properties are added to the standard properties.
The additional properties are provided in the descriptions of the individual object types.

WinCC Professional V13 SP2 – Programming reference


1278 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.2.5 ScreenItems (Panels, Comfort Panels, RT Advanced)

Description

+0,5XQWLPH

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

A list of screen item objects with all screen objects of the given process screen. The list has a
parent property. This property provides a reference to the process screen in which the screen
object is located.

Application
By means of the "ScreenItems" list you are able
● To edit or output all objects within the list (that is, all objects within a screen)
● To count the objects of a screen (property "Count").
● To work on a particular object in the list (method "Item").
Use the screen items property to return an object from the process screen. Use the object
name as an index.
In the following example, the background color of the "RootScreen" circle in the "myCircle"
screen is set to green.

Dim objCircle
Set objCircle = HMIRuntime.Screens("RootScreen").ScreenItems("myCircle")
objCircle.BackColor = vbGreen

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1279
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.2.6 SmartTags (Panels, Comfort Panels, RT Advanced)

Description

+0,5XQWLPH

6PDUW7DJV

6PDUW7DJ

A list of SmartTag objects which represent all of the tags in WinCC Runtime.

Note
The SmartTags list has a limited range of functions. You can only use the tag names to access
a SmartTag object. Access via the index or by using "For each" instruction is not supported.

Note
In order to access a tag, which has still not been created in the project, using the SmartTags
list, no value is returned. Assignment to a non-existing tag is not executed:
Dim intVar
intVar = SmartTags("FillLevel")
"intVar" remains empty when the "FillLevel" tag has not been created.

WinCC Professional V13 SP2 – Programming reference


1280 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Application
Use the SmartTags list to return a SmartTag object. Use the tag name to reference the
SmartTag object.

'VBS_Example_SmartTags
'Writes tag value to local tag and returns a user-defined text through the
operating system channel for debug alarms.
Dim strAirPressure
strAirPressure = "Current air pressure: " + CStr(SmartTags("AirPressure"))
HMIRuntime.Trace strAirPressure

In Runtime Advanced and Panels you address the tag directly using its name. If the tag name
corresponds to the VBS name conventions, you do not need to use the SmartTags list. Follow
the example below:

Dim strAirPressure
strAirPressure = "Current air pressure: " + CStr(AirPressure)
HMIRuntime.Trace strAirPressure

3.5.2.7 SmartTag (Panels, Comfort Panels, RT Advanced)

Description

+0,5XQWLPH

6PDUW7DJV

6PDUW7DJ

Represents the value of the specified process tag. The SmartTag object is an element of the
SmartTag list.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1281
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Application
The SmartTag object provides read and write access to the value of the specified process tag.
The SmartTag object does not return an object reference. Use the SmartTags list to return the
value of a process tag. Use the tag name as an index.

Note
With the "SmartTags reads values from the cache" setting, values are read from the process
image (cache) instead of directly from the controller.
The SmartTag object can also read values directly from the controller. However, you can then
expect a substantially higher communication load between the HMI device and the controller.

Example

'VBS_Example_SmartTags
'Writes tag value to local tag and returns a user-defined text through the
operating system channel for debug alarms.
Dim strAirPressure
strAirPressure = "Current air pressure: " + CStr(SmartTags("AirPressure"))
HMIRuntime.Trace strAirPressure

Note
In order to access a tag, which has still not been created in the project, using the SmartTags
list, no value is returned. Assignment to a non-existing tag is not executed:
Dim intVar
intVar = SmartTags("FillLevel")
"intVar" remains empty when the "FillLevel" tag has not been created.

Note
If you want to return the "TypeName" of a SmartTag object data type with the VBS function
"TypeName", use the following syntax:
TypeName(SmartTags("FillLevel").value)

Use "SmartTags("<tag>")(index)" to access the value of an array element. Set the number of
the desired array element for "index", for example, "SmartTags("AirPressure")(2)".

WinCC Professional V13 SP2 – Programming reference


1282 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.3 Objects (RT Professional)

3.5.3.1 Alarm (RT Professional)

Description

+0,5XQWLPH

Alarms 3URFHVVYDOXHV

$ODUP 3URFHVVYDOXH

The alarm object is used to access the Alarms object list.

Note
The properties of the alarm object are not automatically updated when the values of the
properties change.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1283
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.3.2 Alarms (list) (RT Professional)

Description

+0,5XQWLPH

Alarms 3URFHVVYDOXHV

$ODUP 3URFHVVYDOXH

Use the alarm object to trigger existing messages.

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)
● Read the status of a message (State property)
● Read 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 or set the name of the user who triggered the message (UserName property)
● Read or set the name of the process value blocks (ProcessValues property)
● Read or set the message commentary (Comment property)
● Read or set the message server prefix (Context property)

WinCC Professional V13 SP2 – Programming reference


1284 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example
In the following example the alarm with the alarm number "1" configured in the "HMI alarms"
editor is activated.

'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
AlarmID (Page 1527)

3.5.3.3 AlarmLogs (list) (RT Professional)

Description

/RJJLQJ $ODUPORJV

'DWDORJV

You can use the object to reconnect swapped-out log segments of the alarm log to Runtime
or to remove previously swapped-in log segments of the alarm log. The log segments to be
swapped in are copied to the "Common logging" folder of the WinCC project. The previously
swapped-in log segments are removed from the "Common logging" folder.
You use parameters to control the location from which log segments are to be swapped in.
You specify the time period over which the log segments are to be swapped in or removed.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1285
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

If an error occurs during the operation with log segments, the applied method returns an error
alarm.

Usage
● "Restore" method
Previously swapped-out log segments of the alarm log are connected to Runtime.
● "Remove" method
Previously swapped-in log segments of the alarm log are removed from the Runtime project.

Example
In the following example, log segments from the alarm log are swapped in and the return value
is output as a trace.

'VBS187
HMIRuntime.Trace "Ret: " & HMIRuntime.Logging.AlarmLogs.Restore("D:
\Folder","2004-09-14","2004-09-20",-1) & vbNewLine

See also
Restore (Page 2206)
Remove (Page 2201)

WinCC Professional V13 SP2 – Programming reference


1286 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.3.4 DataItem (RT Professional)

Description

+0,5XQWLPH

'DWD6HW

'DWD,WHP

6FUHHQV 'DWD6HW

6FUHHQ 'DWD,WHP

You can use the DataItem object 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. You
can use the index to output the complete contents of the list. The output is in alphabetical order.

Note
For object references, ensure that the objects are capable of multi-threading.

Example
The example shows how the value of 'Motor1' is output as a trace.

'VBS163
HMIRuntime.Trace "motor1: " & HMIRuntime.DataSet("motor1").Value & vbNewLine

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1287
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

The following example enumerates all DataItem objects of the DataSet list. Name and value
are output as a trace.

'VBS164
Dim data
For Each data In HMIRuntime.DataSet
HMIRuntime.Trace data.Name & ": " & data.Value & vbNewLine
Next

Note
The value may not be output directly for objects.

See also
Value (Page 1931)
Name (Page 1717)

3.5.3.5 DataLogs (list) (RT Professional)

Description

/RJJLQJ $ODUPORJV

'DWDORJV

You can use the object to reconnect swapped-out log segments of the data log to Runtime or
to delete previously swapped-in log segments of the data log. The log segments to be swapped
in are copied to the "Common logging" folder of the WinCC project. The previously swapped-
in log segments are removed from the "Common logging" folder.

WinCC Professional V13 SP2 – Programming reference


1288 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

You use parameters to control the location from which log segments are to be swapped in.
You specify the time period over which the log segments are to be swapped in or removed.
You also set the type of log ("Fast data log", "Slow data log", "Fast data log and Slow data
log").
If an error occurs during the operation with log segments, the applied method returns an error
alarm.

Usage
● "Restore" method
Previously swapped out log segments of the data log are connected to Runtime.
● "Remove" method
Previously swapped-in log segments of the data log are removed from the Runtime project.

Example
In the following example, log segments from the Fast data log are swapped in and the return
value is output as a trace.

'VBS188
HMIRuntime.Trace "Ret: " & HMIRuntime.Logging.DataLogs.Restore("D:
\Folder","2004-09-14","2004-09-20",-1,1) & vbNewLine

See also
Restore (Page 2206)
Remove (Page 2201)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1289
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.3.6 DataSet (list) (RT Professional)

Description

+0,5XQWLPH

'DWD6HW

'DWD,WHP

6FUHHQV 'DWD6HW

6FUHHQ 'DWD,WHP

Using the DataSet object, you can exchange data throughout several actions.
A DataSet object is global and defined by the screen object. You can can access the data from
any VBS action.
You address the screen object according to the screen hierarchy . The DataSet object persists
as long as the screen is displayed. The global object persists over the entire runtime time
period.
Access uses the DataItem object.

Note
You cannot include objects with the types Screen, Screens, ScreenItem, ScreenItems, Tag
and TagSet in the DataSet list.
The DataSet object does not support any classes.

Usage
Use the "DataSet" list as follows:
● Enumeration
Output or process all objects in the list
● "Count" property
Output the number of elements contained

WinCC Professional V13 SP2 – Programming reference


1290 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● "Item" method
Work on a particular object in the list
● "Add" method
Add an object to the list
● "Remove" method
Remove a particular object from the list
● "RemoveAll" method
Remove all objects from the list
Access to list elements is made as follows:

HMIRuntime.DataSet("Itemname")

For a picture-specific list, access is performed as follows:

HMIRuntime.Screens("Screenname").DataSet("Itemname")

You access the DataSet object of the screen as follows:

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 a value can be entered in the list, read and removed from the list
throughout various actions.

'VBS162
HMIRuntime.DataSet.Add "motor1", 23
HMIRuntime.Trace "motor1: " & HMIRuntime.DataSet("motor1").Value & vbNewLine
HMIRuntime.DataSet.Remove("motor1")

See also
RemoveAll (Page 2205)
Remove (Page 2201)
Item (Page 2182)
Add (Page 2121)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1291
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.3.7 HMIRuntime (RT Professional)

Description

+0,5XQWLPH

$ODUPV

$ODUP

7DJV

7DJ

6FUHHQV

6FUHHQ

'DWD6HW

'DWD,WHP

/RJJLQJ

$FWLYH3URMHFW

$FWLYH6FUHHQ

The HMIRuntime object represents the graphic Runtime environment.

Usage
You can use the "HMIRuntime" object as follows:
● "Language" property
Read or set the current Runtime language
● "BaseScreenName" property
Read or set the name of the current root screen
● "ActiveProject" property
Read the path of the active Runtime project

WinCC Professional V13 SP2 – Programming reference


1292 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● "Tags" property
Accessing tags
● "DataSet" property
Accessing tags in a list
● "Stop" method
Stop Runtime
● "Trace" method
Display messages in a diagnostics window

Example
The following command closes WinCC Runtime:

'VBS3
HMIRuntime.Stop

See also
Trace (Page 2225)
Stop (Page 2225)
Language (Page 1671)
Tags (Page 1823)
Logging (Page 1693)
DataSet (Page 1605)
CurrentContext (Page 1601)
MenuToolBarConfig (Page 1697)

3.5.3.8 Item (RT Professional)

Description
The Item object provides a reference to the current object.

Usage
Use the Item object, for example, to address the properties of the object currently selected in
the screen.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1293
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example
In the following example, you set the background color of the object selected in the screen to
red:

'VBS195
Item.BackColor = RGB(255,0,0)

3.5.3.9 Layer (RT Professional)

Description

6FUHHQV

6FUHHQ

/D\HUV

/D\HU

The Layer object returns the result of access to the layers list.

Parent object
Screen in which the screen layer is located

Usage
Depending on certain events, you can use the Layer object to obtain access to the properties
of a complete layer to hide or display a layer with operating elements according to the operator
authorization.

WinCC Professional V13 SP2 – Programming reference


1294 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

You can use the "Layer" object as follows:


● "Visible" property
Activate or deactivate visibility of a layer
● "Name" property
Read the name of a layer
Note
The layer property specifies the layer in which the object is located. The layer "0" is output
as layer "0".
When accessed, the layers are counted up from 1 in VBS. Therefore, address level "1" with
"Layers(2)".

Example
In the following example, Layer 1 is set to "invisible":

'VBS4
Layers(2).Visible = vbFalse

See also
Name (Page 1717)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1295
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.3.10 Layers (list) (RT Professional)

Description

6FUHHQV

6FUHHQ

/D\HUV

/D\HU

Use the layers list to access all 32 layers of the graphical Runtime system.

Parent object
Screen in which the screen layer is located

Usage
You use the "Layers" list as follows:
● "_NewEnum" property
Process all layers in the list
● "Count" property
Count all layers contained in the list
● "Item" method
Process a layer from the list
The properties represent default properties and methods of a list and are not described in detail
in the WinCC documentation.

See also
Item (Page 2182)

WinCC Professional V13 SP2 – Programming reference


1296 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.3.11 Logging (RT Professional)

Description

+0,5XQWLPH

/RJJLQJ $ODUPORJV

'DWDORJV

You can use the object to reconnect swapped-out log segments to Runtime or to remove
previously swapped-in log segments. The log segments to be swapped in are copied to the
"Common logging" folder of the WinCC project. The previously swapped-in log segments are
removed from the "Common logging" folder.
You use parameters to control the location from which log segments are to be swapped in.
You specify the time period over which the log segments are to be swapped in or removed.
If an error occurs during the operation with log segments, the applied method returns an error
alarm.

Usage
● "Restore" method
Previously swapped out log segments of the alarm log and the data log are connected to
Runtime.
● "Remove" method
Previously swapped-in log segments of the alarm log and data log are removed from the
Runtime project.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1297
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example
In the following example, log segments from the alarm log and data log are swapped in and
the return value is output as a trace.

'VBS189
HMIRuntime.Trace "Ret: " & HMIRuntime.Logging.Restore("D:
\Folder","2004-09-14","2004-09-20",-1) & vbNewLine

See also
Restore (Page 2206)
Remove (Page 2201)
DataLogs (list) (Page 1288)
AlarmLogs (list) (Page 1285)

3.5.3.12 Project (RT Professional)

Description

+0,5XQWLPH

$FWLYH3URMHFW

Using the object, you can query information from the current Runtime project.
The project object is returned as the result of ActiveProject.

WinCC Professional V13 SP2 – Programming reference


1298 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Usage
You can read the following using the "Project" object:
● The path of the current Runtime project ("Path" property)
● 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 a trace:

'VBS159
HMIRuntime.Trace "Name: " & HMIRuntime.ActiveProject.Name & vbNewLine
HMIRuntime.Trace "Path: " & HMIRuntime.ActiveProject.Path & vbNewLine

See also
Name (Page 1717)
Path (Page 1741)

3.5.3.13 Screen (RT Professional)

Description

+0,5XQWLPH

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

Represents the screen which is being displayed on the HMI device at the moment or the
permanent window in Runtime. The screen object is returned as a result of accessing the
screen list.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1299
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

The screen object also contains the following lists:


● You can address all the graphic objects in the addressed screen using the "ScreenItems"
list.
● You can address all the layers in the addressed screen using the "Layers" object.

Application
You can use the screen object for the following actions, for example:
● "Width" and "Height" properties
Reading the width and height of a screen
● "BackColor" property
Changing the background color
Use the object name as an index.

Example
In the following example, the background color is changed from black to green:

'VBS_Example_BackColor
HMIRuntime.Screens("Rootscreen").BackColor = vbGreen

Parent object
Screen window in which the screen object is embedded.
If the screen object is the root screen, the parent object is not defined and set to zero.

Note
If you perform a screen change, the open references to screens that are no longer available
will become invalid. As a result, it is no longer possible to work with these references.

Example
In the following example, the width of the first screen is increased by 20 pixels in Runtime:

'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

WinCC Professional V13 SP2 – Programming reference


1300 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Notes on Cross References


All the screens you address with the standard formulation are automatically compiled by the
CrossReference of WinCC and then listed in the screen properties.

HMIRuntime.BaseScreenName = "Screenname"

If you call screens with different formulations in the code, you make them known by the
following section of the CrossReference:

' ' WINCC:SCREENNAME_SECTION_START


Const ScreenNameInAction = "ScreenName"
' WINCC:SCREENNAME_SECTION_END
The section can be inserted in VBS actions as often as required.

See also
Refresh (Page 2200)
Activate (Page 2116)
ObjectSizeDeclutteringEnable (Page 1723)
ObjectSizeDeclutteringMax (Page 1724)
ObjectSizeDeclutteringMin (Page 1725)
LayerDeclutteringEnable (Page 1678)
Layers (Page 1679)
DataSet (Page 1605)
ExtendedZoomingEnable (Page 1625)
AccessPath (Page 1518)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1301
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.3.14 ScreenItem (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents an object in the specified screen. The ScreenItem object is an element of the
ScreenItems list.

Application
You can use the ScreenItem object to access the properties of graphic objects within a screen,
depending on certain events.
You use the "ScreenItem" object as follows, for example:
● "Visible" property
Switch the visibility of an object on or off.
● "Height" and "Width" properties
Query the width and height of an object.
● "Top" and "Left" properties
Change the position of an object.
● "ObjectName" property
Read the name of a graphic object
● "Parent" property
Set a reference to the parent screen
Use the ScreenItems property to return an object to the screen. Use the object name as an
index.

WinCC Professional V13 SP2 – Programming reference


1302 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example
In the following example, the background color of the "RootScreen" circle in the "myCircle"
screen is set to green.

'VBS_Example_ScreenItems

Dim objCircle
Set objCircle = HMIRuntime.Screens("RootScreen").ScreenItems("myCircle")
objCircle.BackColor = vbGreen

Note
To save memory space in the HMI device, no object names are loaded during transfer of the
project. If you still want to transfer object names, call up the Runtime settings for the respective
HMI device in WinCC. You can change the setting under "General". The object name is
required when the object should be accessed via the object name or for debugging a project.

The "ScreenItem" object has different properties depending on its features. The following
properties are provided for every "ScreenItem" object:
● Enabled
● Height
● Left
● ObjectName
● Parent
● Top
● Type
● Visible
● Width
If a specific object type is addressed, further properties are added to the standard properties.
The additional properties are provided in the descriptions of the individual object types.

See also
Activate (Page 2116)
Layer (Page 1675)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1303
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.3.15 ScreenItems (list) (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

A list of ScreenItem objects with all screen objects of the specified screen. The list has a
"Parent" property. This "Parent" property provides a reference to the screen in which the screen
object is located.

Usage
You use the "ScreenItems" list as follows:
● To edit or output all objects within the list (that is, all objects within a screen)
● "Count" property
Count the objects of a screen
● "Item" method
Work on a particular object in the list
Use the screen items property to return an object from the screen. Use the object name as an
index.

Example
In the following example, the background color of the "RootScreen" circle in the "myCircle"
screen is set to green.

Dim objCircle
Set objCircle = HMIRuntime.Screens("RootScreen").ScreenItems("myCircle")
objCircle.BackColor = vbGreen

WinCC Professional V13 SP2 – Programming reference


1304 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Peculiarities of the ScreenItem object


If you embed an external control (ActiveX control or OLE object) in WinCC, the properties of
the embedded control may have the same names as the general properties of the ScreenItem
object. In this case, the ScreenItem properties take priority.
You can address the properties of the embedded controls, however, via the "object" property.
The "object" property is only available in ActiveX controls and OLE objects.
Example:

'Control1 is an embedded ActiveX-Control with property "type"


'VBS196
Dim Control
Set Control=ScreenItems("Control1")
Control.object.type

'Control1 is a WinCC-Control
'VBS197
Dim Control
Set Control=ScreenItems("Control1")
Control.type

Example
In the following example, you output the name of the objects in the current screen in a message
box:

Sub OnClick(ByVal Item)


'VBS6
Dim lngAnswer
Dim lngIndex
lngIndex = 1
For lngIndex = 1 To ScreenItems.Count
lngAnswer = MsgBox(ScreenItems(lngIndex).Objectname, vbOKCancel)
If vbCancel = lngAnswer Then Exit For
Next
End Sub

See also
Item (Page 2182)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1305
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.3.16 Screen object (list) (RT Professional)

Description

+0,5XQWLPH

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

Several screens can be opened simultaeously in WinCC Runtime by means of the screen
window technique, whereby there is only one main screen. The "Screens" list allows access
to all open screens in Runtime using the screen name. The screen list contains all hidden
screens.
The access key required in the VBS environment in the HMIRuntime.Screens(<access key>)
instruction must conform to the following syntax description:

[<Root screen name>.]<Screen window name>[:<Screen name>] ...


.<Screen window name>[:<Screen name>]

● The access key represents the screen hierarchy.


● You can omit the screen name at all locations in the key.
● The "AccessPath" property of the "Screen" object corresponds to the full access key.
● The root screen can be addressed via the "" access key.

Examples
The screens are addressed by specifying the hierarchy in the list. You can address the screens
with or without using the screen names. In the following example, a "BaseScreenName" root
screen is configured with a "ScreenWindow". The screen window contains a "ScreenName"
screen.

WinCC Professional V13 SP2 – Programming reference


1306 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Addressing using the screen name

'VBS8
Set objScreen = HMIRuntime.Screens("BaseScreenName.ScreenWindow:ScreenName")

Addressing without using the screen name

'VBS9
Set objScreen = HMIRuntime.Screens("ScreenWindow")

Referencing the root screen in various ways

'VBS10
Set objScreen = HMIRuntime.Screens(1)

'VBS11
Set objScreen = HMIRuntime.Screens("")

'VBS12
Set objScreen = HMIRuntime.Screens("BaseScreenName")

3.5.3.17 SmartTag (RT Professional)

Description

+0,5XQWLPH

6PDUW7DJV

6PDUW7DJ

Represents the value of the specified process tag. The SmartTag object is an element of the
SmartTag list.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1307
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Application
The SmartTag object provides read and write access to the value of the specified process tag.
The SmartTag object does not return an object reference. Use the SmartTags list to return the
value of a process tag. Use the tag name as an index.

Note
With the "SmartTags reads values from the cache" setting, values are read from the process
image (cache) instead of directly from the controller.
The SmartTag object can also read values directly from the controller. However, you can then
expect a substantially higher communication load between the HMI device and the controller.

Example

'VBS_Example_SmartTags
'Writes tag value to local tag and returns a user-defined text through the
operating system channel for debug alarms.
Dim strAirPressure
strAirPressure = "Current air pressure: " + CStr(SmartTags("AirPressure"))
HMIRuntime.Trace strAirPressure

Note
In order to access a tag, which has still not been created in the project, using the SmartTags
list, no value is returned. Assignment to a non-existing tag is not executed:
Dim intVar
intVar = SmartTags("FillLevel")
"intVar" remains empty when the "FillLevel" tag has not been created.

Note
If you want to return the "TypeName" of a SmartTag object data type with the VBS function
"TypeName", use the following syntax:
TypeName(SmartTags("FillLevel").value)

Use "SmartTags("<tag>")(index)" to access the value of an array element. Set the number of
the desired array element for "index", for example, "SmartTags("AirPressure")(2)".

WinCC Professional V13 SP2 – Programming reference


1308 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.3.18 SmartTags (RT Professional)

Description

+0,5XQWLPH

6PDUW7DJV

6PDUW7DJ

A list of SmartTag objects which represent all of the tags in WinCC Runtime.

Note
The SmartTags list has a limited range of functions. You can only use the tag names to access
a SmartTag object. Access via the index or by using "For each" instruction is not supported.

Note
In order to access a tag, which has still not been created in the project, using the SmartTags
list, no value is returned. Assignment to a non-existing tag is not executed:
Dim intVar
intVar = SmartTags("FillLevel")
"intVar" remains empty when the "FillLevel" tag has not been created.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1309
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Application
Use the SmartTags list to return a SmartTag object. Use the tag name to reference the
SmartTag object.

'VBS_Example_SmartTags
'Writes tag value to local tag and returns a user-defined text through the
operating system channel for debug alarms.
Dim strAirPressure
strAirPressure = "Current air pressure: " + CStr(SmartTags("AirPressure"))
HMIRuntime.Trace strAirPressure

In Runtime Advanced and Panels you address the tag directly using its name. If the tag name
corresponds to the VBS name conventions, you do not need to use the SmartTags list. Follow
the example below:

Dim strAirPressure
strAirPressure = "Current air pressure: " + CStr(AirPressure)
HMIRuntime.Trace strAirPressure

See also
SmartTag (Page 1307)

3.5.3.19 Tag (RT Professional)

Description

+0,5XQWLPH

7DJV 7DJ6HW

7DJ 7DJ

WinCC Professional V13 SP2 – Programming reference


1310 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

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 initialized 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 can be found in WinCC Information System under
key word "Communication" > "Diagnostics" or "Communication" > "Quality Codes".

Usage
Use the "Tag" object as follows:
● "Name", "QualityCode", "TimeStamp", "LastError" and "ErrorDescription" properties
Read information on the tag
● "Write" method, "Value" property
Set a value for a tag
● "Read" method, "Value" property
Read a value for a tag

Example
The following example reads the value in the "Tag1" tag:

'VBS13
Dim objTag
Set objTag = HMIRuntime.Tags("Tag1")
objTag.Read()
MsgBox objTag.Value

Declaration of tags in WinCC


Always define internal tags in VB script using the "Dim" instruction in order to prevent writing
tags wrongly.
When creating a new action, the "Option explicit" instruction is automatically entered in the
declaration area and cannot be deleted.
Do not use the "Option explicit" statement in your code as it can lead to Runtime errors.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1311
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example
The following example reads the declaration value in the "lngVar" VB Script tag:

'VBS14
Dim lngVar
lngVar = 5
MsgBox lngVar

Note
Tag names must not contain any special characters.
When creating a tag, ensure it does not contain a value (Value = VT_EMPTY). Initialize the
tags after declaration with the corresponding value.

Notes on Cross References


All the pictures which are addressed with the standard formulation

HMIRuntime.Tags("Tagname")

are automatically compiled by the CrossReference of WinCC and then listed in the picture
properties.
If you address tags with different formulations in the code, you can make them known by the
following section of the CrossReference:

' ' WINCC:TAGNAME_SECTION_START


Const TagNameInAction = "TagName"
' WINCC:TAGNAME_SECTION_END

The section can be inserted in VBS actions as often as required.

Note
Composed tag names may not be recognized by the CrossReference.

See also
Name (Page 1717)
Value (Page 1931)
ErrorDescription (Page 1618)
LastError (Page 1674)
QualityCode (Page 1748)
Timestamp (Page 1847)

WinCC Professional V13 SP2 – Programming reference


1312 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.3.20 Tags (list) (RT Professional)

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.

Application
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. The appropriate
HMI tags must exist in order for the write and read acccess to be executed without error.
You can address HMI tags directly in VBScript and set and read values. If you wish to inquire
about additional tag properties, such as quality code or time stamp, or wish to execute error
processing, you must address the tag through tags list. The tag object returned enables access
to all tag properties and methods.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1313
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Using the "CreateTagSet" method, you may generate a TagSet object which allows
simultaneous access to several tags.

Example
You use tag names when you set tags.

'VBS16
Dim objTag
Set objTag = HMIRuntime.Tags("Tagname")
If you only use the tag name, the "TagPrefix" property is assigned the values from the
current context (the current screen window).

3.5.3.21 TagSet (list) (RT Professional)

Description
The "TagSet" object enables simultaneous access to several tags in one call. Simultaneous
access demonstrates better performance and lower communication load than single access
to multiple tags.

Usage
You can use the TagSet object as follows:
● "Add" method
Add tags to the list
● "Item" method
Access tag objects contained in the list and their properties
● "Write" method
Write all tags of the list
● "Read" method
Read all tags of the list
● "Remove" method
Remove single tags from the list
● "RemoveAll" method
Remove all tags from the list
Tags in the list are accessed via:

'VBS169
Dim myTags
myTags = HMIRuntime.Tags.CreateTagSet
myTags("Tagname")

WinCC Professional V13 SP2 – Programming reference


1314 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

In order to have error-free read/write access to tags (tag objects) of the list, the respective tags
must exist in WinCC.
If a read/write access error has occurred, the method used will return an error message using
the "LastError" and "ErrorDescription" properties.

Example
The following example shows how to generate a TagSet object, how to add tags, and how to
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
ErrorDescription (Page 1618)
LastError (Page 1674)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1315
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.4 Object types (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.4.1 Objects A-I (Panels, Comfort Panels, RT Advanced, RT Professional)

AlarmControl (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Alarm view" object. The AlarmControl object is an element of the ScreenItems
list.

Type identifier in VBS


HMIAlarmControl

Example
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

WinCC Professional V13 SP2 – Programming reference


1316 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Abbreviation Validity
Pa Panels
A RT Advanced
P RT Professional

Table 3-1 Properties

Properties Read Write Description


Activate (Page 2030) P P Specifies whether the data to be visualized is requested by the
alarm server.
AlarmListType P P Specifies the alarm classes to be reported in runtime.
AllServer P P Sets the display of the alarms of all available servers.
ApplyProjectSettings (Page 1535) P P Specifies whether the project settings from the "HMI alarms" ed‐
itor are applied.
ApplyProjectSettingsForDesign‐ P P Specifies that the project settings are used for the design.
Mode
AutoCompleteColumns P P Specifies whether empty columns are shown if the control is wid‐
(Page 1538) er than the configured columns.
AutoCompleteRows (Page 1539) P P Specifies whether empty rows are shown if the control is longer
than the number of configured rows.
AutoSelectionColors (Page 1540) P P Specifies whether the colors defined by the system are used as
the selection colors for cells and rows.
AutoSelectionRectColor P P Specifies whether the selection frame is shown with the color
(Page 1540) defined by the system.
BackColor (Page 1543) P P Specifies the background color of the selected object.
Blocks P P Sets the alarm blocks.
BorderColor (Page 1560) P P Specifies the line color of the object.
BorderWidth (Page 1571) P P Specifies the line thickness of the object.
Caption (Page 1578) P P Specifies the text that is displayed in the header of the selected
object.
CellCut (Page 1581) P P Specifies whether the contents of the cells are abbreviated if the
cells are too narrow.
CellSpaceBottom (Page 1582) P P Specifies the bottom margin of the table cells.
CellSpaceLeft (Page 1582) P P Sets the left indent for the table cells.
CellSpaceRight (Page 1583) P P Specifies the right indent of the table cells.
CellSpaceTop (Page 1583) P P Specifies the top margin of the table cells.
Closeable (Page 1587) P P Specifies that the control can be closed in runtime.
ColumnResize (Page 1590) P P Enables changes to the width of columns.
ColumnScrollbar (Page 1591) P P Specifies the scroll bar type.
ColumnTitleAlignment P P Specifies the type of column title alignment.
(Page 1594)
ColumnTitles (Page 1595) P P Specifies whether the column title is displayed.
ControlDesignMode (Page 1798) P P Specifies the design.
DefaultMsgFilterSQL P P Specifies an SQL statement as default for alarm filters.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1317
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


DefaultSort P P Specifies the sorting order.
DefaultSort2 P P Specifies the sorting order.
DefaultSort2Column P P Specifies the sorting order.
DisplayOptions (Page 1609) P P Specifies the alarms to be displayed.
DoubleClickAction (Page 1609) P P Specifies the action to be executed in runtime by double-clicking
an alarm row.
ExportDirectoryChangeable P P Specifies whether the data export directory can be changed in
(Page 1620) runtime.
ExportDirectoryname P P Specifies the target directory for the exported Runtime data.
(Page 1620)
ExportFileExtension (Page 1621) P P Specifies the file extension of the export file. Only the "csv" file
extension is currently supported.
ExportFilename (Page 1621) P P Specifies the name of the target file for the exported Runtime
data.
ExportFilenameChangeable P P Specifies whether the export file name can be changed in run‐
(Page 1622) time.
ExportFormatGuid (Page 1622) P P Default assignment of the ID number and export provider.
ExportFormatName (Page 1623) P P Specifies the export file format. Only the "csv" file format is cur‐
rently available for the export.
ExportParameters (Page 1624) P P Specifies the parameters of the selected format by means of the
"Properties" dialog.
ExportSelection (Page 1624) P P Specifies the file extension of the export file. Only the "csv" file
extension is currently supported.
ExportShowDialog (Page 1625) P P Specifies whether the data export dialog is shown in runtime.
Filters P P Specifies database criteria in SQL syntax.
Font (Page 1639) P P Specifies or returns the font.
GridLineColor (Page 1647) P P Specifies the color for the grid lines.
GridLineWidth (Page 1648) P P Specifies the width of the separation lines in pixels.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectan‐
gle" objects.
HitlistColumnAdd (Page 1655) * P P Transfers the selected alarm block from the list of available alarm
blocks to the list of selected alarm blocks.
HitlistColumnCount (Page 1656) * P P Sets the number of selected alarm blocks to be displayed in the
hitlist in runtime.
HitlistColumnIndex (Page 1656) P P References an alarm block that is selected for the hitlist.
HitlistColumnName (Page 1657) * P P Displays the name of the alarm block of the hitlist that is refer‐
enced by means of the "HitlistColumnIndex" attribute.
HitlistColumnRemove P P Cuts the marked alarm block from the list of selected alarm
(Page 1657) * blocks and pastes it into the list of existing alarm blocks.
HitlistColumnRepos (Page 1658) P P Changes the sorting order of the alarm blocks. The "Up" and
* "Down" commands move the selected alarm block accordingly
in the list.
HitlistColumnSort (Page 1658) * P P Specifies the sorting order in the hitlist for the alarm block that is
referenced in "MessageColumnIndex".
HitlistColumnSortIndex P P Specifies the sorting order in the hitlist for the alarm block that is
(Page 1659) * referenced in "HitlistColumnIndex".

WinCC Professional V13 SP2 – Programming reference


1318 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


HitlistColumnVisible (Page 1659) P P The list displays the selected alarm blocks from the alarm list or
* hitlist that are to be used in the control in runtime.
HitListDefaultSort (Page 1660) P P Sets the default sorting order in the table columns of the hitlist.
HitListMaxSourceItems P P Sets the maximum number of data records from the alarm log
(Page 1660) that are to be used to create the hit list.
HitListMaxSourceItemsWarn P P Sets the output of a warning on reaching the maximum number
(Page 1661) of data records that was specified in "HitlistMaxSourceItems".
HitListRelTime (Page 1662) P P Sets a time range for the statistics.
HitListRelTimeFactor P P Sets the time factor that is used in combination with the "Hitlis‐
tRelativeTimeFactorType" to calculate the period for creating the
hitlist statistics.
HitListRelTimeFactorType P P Sets the time type that is used in combination with the "HitlistRe‐
lativeTimeFactor" to calculate the period for creating the hitlist
statistics.
HorizontalGridLines (Page 1664) P P Specifies whether horizontal separation lines are displayed.
IconSpace (Page 1666) P P Specifies the spacing between icons and text in the table cells.
Layer (Page 1675) P P Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineColor (Page 1689) P P Sets the color of the window separation lines.
LineWidth (Page 1691) P P Specifies the line thickness of the selected object.
LongTermArchiveConsistency P P If "LongTimeArchiveConsistency" is set to "No", 1000 alarms will
(Page 1694) be displayed in the historical alarm list (long-term) on the single
station, on the server, or on the client for each server or redun‐
dant server pair.
MessageBlockAlign (Page 1698) * P P Sets the mode of alignment for the table contents of the selected
alarm block.
MessageBlockAutoPrecisions P P Enables automatic setting of the number of decimal places.
(Page 1698) *
MessageBlockCaption P P Specifies the caption of the column header in the alarm view for
(Page 1699) * the selected alarm block.
MessageBlockCount (Page 1699) P P Specifies the number of alarm blocks that are available for the
alarm list and hitlist.
MessageBlockDateFormat P P Specifies the date format for displaying the alarms.
(Page 1700) *
MessageBlockExponentialFor‐ P P Specifies the exponential notation for visualization of the values
mat (Page 1700) * of a selected alarm block.
MessageBlockFlashOn P P Enables flashing of the selected alarm block in runtime when an
(Page 1701) * alarm appears.
MessageBlockHideText P P Enables the textual display of the content of the selected alarm
(Page 1701) * block.
MessageBlockHideTitleText P P Specifies textual display of the caption of the selected alarm
(Page 1702) * block.
MessageBlockId (Page 1702) P P Specified assignment of ID number and alarm block in the alarm
view.
MessageBlockIndex (Page 1702) P P References an existing alarm block.
MessageBlockLeadingZeros P P Enables the display of the selected alarm block with leading ze‐
(Page 1703) * roes.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1319
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


MessageBlockLength P P Specifies the length of the selected alarm block based on the
(Page 1703) * number of characters.
MessageBlockName (Page 1704) P P Displays the name of the selected alarm block.
MessageBlockPrecision P P Specifies the number of decimal places for the values of the se‐
(Page 1704) * lected alarm block.
MessageBlockSelected P P Existing alarm blocks are blocks that are available for use in the
(Page 1705) * control in runtime for the alarm list or hitlist.
MessageBlockShowDate P P Specifies whether to display both the date and time in the "Time"
(Page 1705) * alarm block.
MessageBlockShowIcon P P Enables the display of the content of the selected alarm block as
(Page 1706) * icon.
MessageBlockShowTitleIcon P P Specifies textual display of the caption of the selected alarm
(Page 1706) * block.
MessageBlockTextId P P Specifies naming of the selected alarm block by means of a text
(Page 1707) ID that was taken from the text library.
MessageBlockTimeFormat P P Specifies the format for the time or period used to display the
(Page 1707) * alarms.
MessageColumnAdd P P Adds the selected alarm block from the list of available alarm
(Page 1708) * blocks to the list of selected alarm blocks.
MessageColumnCount P P Specifies the number of alarm blocks to be displayed in the alarm
(Page 1709) * list in runtime.
MessageColumnIndex P P References an alarm block selected for the alarm list.
(Page 1709)
MessageColumnName P P Shows the name of the alarm block from the alarm list, which is
(Page 1710) * referenced by means of the "MessageColumnIndex" property.
MessageColumnRemove P P Cuts the marked alarm block from the list of selected alarm
(Page 1710) * blocks and pastes it into the list of existing alarm blocks.
MessageColumnRepos P P Changes the sorting order of the alarm blocks. The "Up" and
(Page 1711) * "Down" commands move the selected alarm block accordingly
in the list.
MessageColumnSort P P Specifies the sorting order for the alarm block that is referenced
(Page 1711) * in "MessageColumnIndex" .
MessageColumnSortIndex P P Specifies the sorting order for the alarm block that is referenced
(Page 1712) * in "MessageColumnIndex".
MessageColumnVisible P P The list shows the selected alarm blocks of the alarm list or hitlist
(Page 1712) * that are are used in the alarm view in runtime.
Moveable (Page 1716) P P Specifies whether the window can be moved in runtime.
MsgFilterSQL (Page 1716) P P Specifies one or several SQL statements for user-defined selec‐
tion of the alarms.
Name (Page 1717) P P Returns the object name as STRING.
OperatorAlarms P P Specifies the operator message settings.
OperatorMessageId (Page 1726) P P Default assignment of the ID number and trigger event in the
* alarm view.
OperatorMessageIndex P P References the operator message event.
(Page 1727) *
OperatorMessageName P P On alarm events, this displays the name that is referenced by
(Page 1728) * means of "OperatorMessageIndex" for operator alarms.

WinCC Professional V13 SP2 – Programming reference


1320 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


OperatorMessageNumber P P Specify an alarm number for the operator message of the selec‐
(Page 1728) * ted alarm event if you do not use the operator message of
WinCC.
OperatorMessageSelected P P Activate the alarm events of the list that trigger operator mes‐
(Page 1729) * sages.
OperatorMessageSource1 P P Specify the alarm block of the operated alarm to be added to
(Page 1729) * "Process value block 1" of the operator message configured in
Source.
OperatorMessageSource10 P P Specify the alarm block of the operated alarm to be added to
(Page 1734) * "Process value block 10" of the operator message configured in
Source.
OperatorMessageSource2 P P Specify the alarm block of the operated alarm to be added to
(Page 1730) * "Process value block 2" of the operator message configured in
Source.
OperatorMessageSource3 P P Specify the alarm block of the operated alarm to be added to
(Page 1730) * "Process value block 3" of the operator message configured in
Source.
OperatorMessageSource4 P P Specify the alarm block of the operated alarm to be added to
(Page 1731) * "Process value block 4" of the operator message configured in
Source.
OperatorMessageSource5 P P Specify the alarm block of the operated alarm to be added to
(Page 1731) * "Process value block 5" of the operator message configured in
Source.
OperatorMessageSource6 P P Specify the alarm block of the operated alarm to be added to
(Page 1732) * "Process value block 6" of the operator message configured in
Source.
OperatorMessageSource7 P P Specify the alarm block of the operated alarm to be added to
(Page 1732) * "Process value block 7" of the operator message configured in
Source.
OperatorMessageSource8 P P Specify the alarm block of the operated alarm to be added to
(Page 1733) * "Process value block 8" of the operator message configured in
Source.
OperatorMessageSource9 P P Specify the alarm block of the operated alarm to be added to
(Page 1733) * "Process value block 9" of the operator message configured in
Source.
OperatorMessageSourceType1 P P Specifies the format of the source content to be transferred.
(Page 1735) *
OperatorMessageSourceType10 P P Specifies the format of the source content to be transferred.
(Page 1739) *
OperatorMessageSourceType2 P P Specifies the format of the source content to be transferred.
(Page 1735) *
OperatorMessageSourceType3 P P Specifies the format of the source content to be transferred.
(Page 1736) *
OperatorMessageSourceType4 P P Specifies the format of the source content to be transferred.
(Page 1736) *
OperatorMessageSourceType5 P P Specifies the format of the source content to be transferred.
(Page 1737) *
OperatorMessageSourceType6 P P Specifies the format of the source content to be transferred.
(Page 1737) *

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1321
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


OperatorMessageSourceType7 P P Specifies the format of the source content to be transferred.
(Page 1738) *
OperatorMessageSourceType8 P P Specifies the format of the source content to be transferred.
(Page 1738) *
OperatorMessageSourceType9 P P Specifies the format of the source content to be transferred.
(Page 1739) *
PageMode (Page 1740) P P Sets the page orientation (portrait / landscape).
PageModeMessageNumber P P Defines the number of alarm shown per page when paging the
(Page 1740) historical alarm list (long-term).
PrintJob P P Specifies a print job
RowScrollbar (Page 1756) P P Specifies whether row scroll bars are displayed.
RowTitleAlignment P P Specifies the type of row title alignment.
RowTitles P P Specifies that row headers will be displayed.
RTPersistence (Page 1757) P P Specifies how online configurations of WinCC are retained.
RTPersistenceAuthorization P P Specifies the authorization required for online configuration in
(Page 2007) runtime.
RTPersistenceType (Page 1758) - - Specifies how online configurations of WinCC are retained.
SelectedCellColor (Page 1769) P P Specifies the background color of the selected cell.
SelectedCellForeColor P P Specifies the font color of the selected cell.
(Page 1770)
SelectedRowColor (Page 1771) P P Specifies the background color of the selected row.
SelectedRowForeColor P P Specifies the font color of the selected row.
(Page 1772)
SelectedTitleColor (Page 1773) P P Specifies the background color of a selected table header.
SelectedTitleForeColor P P Specifies the font color of the selected table header.
(Page 1773)
SelectionColoring (Page 1776) P P Specifies whether selection colors are used for cells or rows.
SelectionRect (Page 1777) P P Specifies whether a selection frame is used for the selected cells
or rows.
SelectionRectColor (Page 1777) P P Specifies the color of the selection rectangle in the alarm window
if SelectionType equals "1".
SelectionRectWidth (Page 1778) P P Specifies the line width of the selection rectangle in the alarm
window if SelectionType equals "1".
SelectionType (Page 1779) P P Specifies the number of lines you can mark.
ServerNames (Page 1782) P P Specifies the servers of a distributed system that form the data
source for the alarm view.
ShowSortButton (Page 1791) P P Specifies whether the sorting button is shown above the vertical
scroll bar.
ShowSortIcon (Page 1792) P P Specifies whether the sorting icon is displayed.
ShowSortIndex (Page 1792) P P Specifies whether the sorting icon is displayed.
ShowTitle (Page 1795) P P Specifies the representation of the control's window title.
Sizeable (Page 1797) P P Specifies that the size of an object can be changed in runtime.
SortSequence (Page 1799) P P Specifies how the sorting order can be changed by mouse click.
StatusbarBackColor (Page 1802) P P Specifies the background color of the status bar.
StatusbarElementAdd P P Creates a new, user-defined status bar element.
(Page 1803) *

WinCC Professional V13 SP2 – Programming reference


1322 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


StatusbarElementAutoSize P P Specifies whether the width of the selected status bar element
(Page 1803) * is set automatically.
StatusbarElementCount P P Specifies the number of configurable status bar elements.
(Page 1804) *
StatusbarElementIconId P P Default assignment of the ID number and icon of a status bar
(Page 1805) * element.
StatusbarElementId (Page 1805) P P Unique ID of the selected status bar element.
*
StatusbarElementIndex P P References a status bar element. You can use this property to
(Page 1806) assign the values of other properties to a specific element of the
status bar.
StatusbarElementName P P Displays the object name of the selected status bar element.
(Page 1807) *
StatusbarElementRemove P P Removes the selected status bar element.
(Page 1807) *
StatusbarElementRename P P Renames the user-defined status bar element that is referenced
(Page 1808) * by means of the "StatusbarElementIndex" property.
StatusbarElementRepos * P P Specifies the index that is assigned to the element.
StatusbarElements (Page 1808) - - Specifies the elements that are to be shown in the status bar.
StatusbarElementText * P P Specifies the text of the currently selected status bar element.
StatusbarElementTooltipText P P Specifies the tooltip text for the user-defined status bar element.
(Page 1809) *
StatusbarElementUserDefined P P Indicates whether the project engineer has added the toolbar
(Page 1809) * button as a new user-defined element.
StatusbarElementVisible P P In the list, activate the status bar elements that you wish to dis‐
(Page 1810) * play in runtime.
StatusbarElementWidth P P Specifies the width of the selected status bar element in pixels.
(Page 1810) *
StatusbarFont - - Status bar font
StatusbarFontColor (Page 1811) P P Specifies the color of the text in the status bar.
StatusbarShowTooltips P P Specifies whether tooltips are displayed for the elements of the
(Page 1812) status bar in runtime.
StatusbarText (Page 1812) P P Default text in the status bar.
StatusbarUseBackColor P P Specifies whether the background color of the status bar is
(Page 1813) shown.
StatusbarVisible (Page 1814) P P Specifies whether the status bar of the control is displayed.
TableColor P P Specifies the background color of the rows. Use this to open the
color selection dialog.
TableColor2 P P Specifies the background color of "Row color 2".
TableForeColor P P Specifies the font color of "Row color".
TableForeColor2 P P Specifies the font color of "Row color 2".
TimeBase (Page 1831) P P Sets the timebase.
TitleColor P P Specifies the color of the header.
TitleCut P P Specifies whether the contents of the fields of a header should
be abbreviated if the column is too narrow.
TitleDarkShadowColor P P Specifies the color of the dark side of shading.
TitleForeColor P P Specifies the font color of the table header for the selected status.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1323
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


TitleGridLineColor P P Specifies the color of separation lines in the table header.
TitleLightShadowColor P P Specifies the color of the bright side of shading.
TitleSort P P Specifies how sorting by column title is triggered.
TitleStyle P P Specifies whether a shading color is used for the table header.
ToolbarAlignment P P Specifies or returns the position of the toolbar.
ToolbarBackColor P P Specifies the background color of the toolbar.
ToolbarButtonActive * P P Specifies whether the function linked to the button is activated in
runtime.
ToolbarButtonAdd * P P Creates a new, user-defined button function.
ToolbarButtonBeginGroup * P P Specifies whether a separator is inserted before the selected
button function.
ToolbarButtonClick P P Clicks a toolbar button.
ToolbarButtonCount * P P Specifies the number of configurable button functions.
ToolbarButtonEnabled * P P Specifies whether a user-defined toolbar button can be operated.
ToolbarButtonHotKey * P P Shows the hotkey for the selected button function.
ToolbarButtonId * P P Unique ID number for the selected button function.
ToolbarButtonIndex P P References a button function.
ToolbarButtonLocked * P P Specifies whether the clicked, pressed in state is displayed for a
user-defined toolbar button.
ToolbarButtonName * P P Shows the name of the selected button function.
ToolbarButtonPasswordLevel * P P Shows the authorization for the selected button function.
ToolbarButtonRemove * P P Removes the selected button function from the list.
ToolbarButtonRename * P P Renames the user-defined toolbar element that is referenced by
means of the "ToolbarButtonIndex" property.
ToolbarButtonRepos * P P Changes the sequence of button functions.
ToolbarButtons - - Specifies which buttons are available for the toolbar.
ToolbarButtonTooltipText * P P Specifies the tooltip text for the button.
ToolbarButtonUserDefined * P P Indicates whether the project engineer has added the toolbar
button as a new user-defined button.
ToolbarButtonVisible * P P Specifies that the button is visible.
ToolbarShowTooltips P P Specifies whether the tooltips for the button functions are dis‐
played in runtime.
ToolbarUseBackColor P P Specifies whether the background color for the toolbar is shown.
ToolbarUseHotKeys P P Specifies whether the hotkeys for the button functions are acti‐
vated in runtime.
ToolbarVisible P P Specifies whether the toolbar of the control is displayed.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
UseMessageColor (Page 1921) P P Specifies whether scrolling is enabled.
UseSelectedTitleColor P P Specifies whether a selection color is used for the headers of
(Page 1921) selected table cells.
UseTableColor2 (Page 1922) P P Specifies whether a second row color is used for the represen‐
tation of the table.
VerticalGridLines (Page 1935) P P Specifies whether vertical separation lines are displayed.

WinCC Professional V13 SP2 – Programming reference


1324 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

* not visible in the ES

Table 3-2 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at
runtime.
AttachDB (Page 2123) P, A Executes the "Connect backup" button function of the control.
CopyRows (Page 2124) P Executes the "Copy rows" button function of the control.
DeactivateDynamic (Page 2126) P Deactivates the trigger of the "ActivateDynamic" method used for the
specified property in/during Runtime.
DetachDB (Page 2128) P, A Executes the "Disconnect backup" button function of the control.
Export (Page 2129) P, A Executes the "Export log" or "Export data" button function of the control.
GetHistlistColumnCollection P Returns the list of all column objects of the alarm view hitlist as "ICCAx‐
(Page 2132) Collection" type.
GetHitlistColumn (Page 2133) P Returns the column object of the alarm view hitlist designated by name
or index as "ICCAxMessageColumn" type.
GetMessageBlock (Page 2134) P Returns the alarm block object of the alarm view designated by name or
index as "ICCAxMessageBlock" type.
GetMessageBlockCollection P Returns the list of all alarm block objects of the alarm view as "ICCAxCol‐
(Page 2135) lection" type.
GetMessageColumn (Page 2137) P Returns the column object of the alarm view designated by name or index
as "ICCAxMessageColumn" type.
GetOperatorMessage (Page 2138) P Returns the operator message object of the alarm view designated by
name or index as "ICCAxOperatorMessage" type.
GetMessageColumnCollection P Returns the list of all column objects of the message view as "ICCAxCol‐
(Page 2139) lection" type.
GetOperatorMessageCollection P Returns the list of all operator message objects of the alarm view as "IC‐
(Page 2140) CAxCollection" type.
GetRow (Page 2141) P Returns the row object defined by its row number in the table-based con‐
trols as "ICCAxDataRow" type.
GetRowCollection (Page 2142) P Returns the list of all row objects of the table-based controls as "ICCAx‐
DataRowCollection" type.
GetSelectedRow (Page 2149) P Returns the selected row object of a table-based control as "ICCAxDa‐
taRow" type.
GetSelectedRows (Page 2150) P Returns the selected row objects of a table-based control as type "IC‐
CAxDataRow" for multiple selection.
GetStatusbarElement (Page 2156) P, A Returns the element of the control's status bar designated by name or
index as "ICCAxStatusbarElement" type.
GetStatusbarElementCollection P, A Returns the list of all status bar elements of the control as "ICCAxCollec‐
(Page 2157) tion" type.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1325
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Methods Valid Description


GetToolbarButton (Page 2164) P, A Returns the button function designated by name or index on the control
toolbar as "ICCAxToolbarButton" type.
GetToolbarButtonCollection P, A Returns the list of all button functions of the control toolbar as "ICCAx‐
(Page 2165) Collection" type.
HideAlarm (Page 2181) P Executes the "Hide alarm" button function of the alarm view.
LockAlarm (Page 2184) P Executes the "Disable alarm" button function of the alarm view.
LoopInAlarm (Page 2184) P Executes the "Loop in alarm" button function of the alarm view.
MoveToFirstLine (Page 2186) P Executes the "First alarm" button function of the alarm view.
MoveToFirstPage (Page 2186) P Executes the "First page" button function of the alarm view.
MoveToLastLine (Page 2187) P Executes the "Last alarm" button function of the alarm view.
MoveToLastPage (Page 2188) P Executes the "Last page" button function of the alarm view.
MoveToNextLine (Page 2189) P Executes the "Next alarm" button function of the alarm view.
MoveToNextPage (Page 2189) P Executes the "Next page" button function of the alarm view.
MoveToPreviousLine (Page 2190) P Executes the "Previous alarm" button function of the alarm view.
MoveToPreviousPage (Page 2191) P Executes the "Previous page" button function of the alarm view.
Print (Page 2194) P, A Executes the "Print" button function of the control.
QuitHorn (Page 2195) P Executes the "Acknowledge central alarm generator" button function of
the alarm view.
QuitSelected (Page 2195) P Executes the "Single acknowledgment" button function of the alarm view.
QuitVisible (Page 2196) P Executes the "Group acknowledgment" button function of the alarm view.
SelectAll (Page 2209) P Selects all rows in a table-based control.
SelectRow (Page 2210) P Selects a specific row in a table-based control.
ShowComment (Page 2212) P Executes the "Comment dialog" button function of the recipe view.
ShowDisplayOptionsDialog P Executes the "Display options dialog" button function of the alarm view.
(Page 2213)
ShowEmergencyQuitDialog P Executes the "Single acknowledgment" button function of the alarm view.
(Page 2213)
ShowHelp (Page 2214) P, A Executes the "Help" button function of the control.
ShowHideList (Page 2214) P Executes the "List of alarm to hide" button function of the alarm view.
ShowHitList (Page 2215) P Executes the "Hitlist" button function of the alarm view.
ShowInfoText (Page 2215) P Executes the "About dialog" button function of the alarm view.
ShowLockDialog (Page 2216) P Executes the "Lock dialog" button function of the alarm view.
ShowLockList (Page 2216) P Executes the "Lock list" button function of the alarm view.
ShowLongTermArchiveList P Executes the "Historical alarm list (long-term)" button function of the alarm
(Page 2217) view.
ShowMessageList (Page 2217) P Executes the "Alarm list" button function of the alarm view.
ShowPropertyDialog (Page 2218) P, A Executes the "Configuration dialog" button function of the control.
ShowSelectionDialog (Page 2220) P Executes the "Selection dialog" button function of the alarm view.
ShowShortTermArchiveList P Executes the "Historical alarm list (short-term)" button function of the
(Page 2221) alarm view.
ShowSortDialog (Page 2222) P Executes the "Sorting dialog" button function of the alarm view.
ShowTimebaseDialog (Page 2223) P Executes the "Timebase dialog" button function of the alarm view.
UnhideAlarm (Page 2226) P Executes the "Unhide alarm" button function of the alarm view.
UnlockAlarm (Page 2226) P Executes the "Unlock alarm" button function of the alarm view.

WinCC Professional V13 SP2 – Programming reference


1326 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Methods Valid Description


UnselectAll (Page 2227) P Removes all selections from the cells of a table-based control.
UnselectRow (Page 2227) P Removes the selections from a specific cell of a table-based control.

AlarmView (Panels, Comfort Panels, RT Advanced)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Alarm view" object. The MessageView object is an element of the
ScreenItems list.

If you change the settings for this object with a user-defined function, the changed settings are
retained even after the screen is called again.

Note
The object "Simple AlarmView" cannot be dynamized with a user-defined function.

Abbreviation Validity
Pa Panels
A RT Advanced
P RT Professional

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1327
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-3 Properties

Properties Read Write Description


AlarmAreaHeight **
AlarmAreaWidth **
AlarmClasses - - Specifies the alarm classes to be reported in runtime.
AlarmLog - - Specifies the alarm types to be displayed in the alarm view.
AlarmSource - - Specifies that alarms should be displayed.
Authorization (Page 1537) - - Specifies the operating rights of the selected object in runtime.
BackColor A A Specifies the background color of the selected object.
ButtonBarElements ** Specifies that the buttons will be displayed.
ButtonBarStyle - -
Columns - - Specifies the columns to be displayed.
ColumnsMoveable - - Specifies that the columns can be moved.
ColumnTextAckGroup - - Specifies the header for the "AckGroup" column.
ColumnTextAlarmState - - Specifies the header for the "State" column.
ColumnTextAlarmText - - Specifies the header for the "Text" column.
ColumnTextClassName - - Specifies the header for the "Class Name" column.
ColumnTextDate - - Specifies the header for the "Date" column.
ColumnTextDevice - - Specifies the header for the "Device" column.
ColumnTextDiagnosable - - Specifies the header for the "Diagnosable" column.
ColumnTextNumber - - Specifies the header for the "Number" column.
ColumnTextTime - - Specifies the header of the "Time" column.
CountOfLinesPerAlarms - -
CountOfVisibleAlarms - -
Enabled A A Specifies whether the selected object can be operated in runtime.
FilterTag ** Specifies a tag of the string type for filtering alarm texts.
FilterText ** Specifies the text for filtering the alarm text.
FitToSize - - Specifies that the size of the object should be automatically adap‐
ted to the content.
Flashing - - Specifies that the text block flashes.
FocusColor A A Specifies the color for the focus frame of the selected object when
it is in focus.
FocusWidth A A Specifies the border width of the specified object when the object
is in focus.
ForeColor - - Specifies the font color of the text for the selected object.
GridlineColor A A Specifies the color for the grid lines.
Height (Page 1649) A A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
HorizontalScrollingEnabled - -
IsRunningUnderCE * - -
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) A A Specifies the value of the X coordinate of the object.

WinCC Professional V13 SP2 – Programming reference


1328 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


LineAlarmView **
Name (Page 1717) A A Returns the object name as STRING.
PreferredUseOnAck - -
S7Device - -
SecurityForSimpleViewEnabled
**
SelectionBackColor (Page 1775) A A Specifies the background color of the selected cells.
SelectionForeColor (Page 1776) A A Specifies the foreground color of the selected cells.
SeparateLineForAlarmText - -
ShowAcknowledgeButton - -
ShowAlarmsFromDate A A Specifies that only those message events are displayed that are
(Page 1783) saved in this tag.
ShowAlarmsToAcknowledge - - Specifies that unacknowledged alarms should be displayed.
ShowColumnHeaders - -
ShowHelpButton - -
ShowHorizontalGridlines - -
ShowLoopInAlarmButton - - Specifies that the "Loop-In-Alarm" button will be displayed.
ShowMilliseconds - - Display time in milliseconds.
ShowPendingAlarms - -
SortByTimeDirection - - Specifies whether the last incoming alarm is displayed at the top
(Page 1799) of the "AlarmControl" object.
SortByTimeEnabled A A Specifies whether the sorting order of alarms based on the time
(Page 2013) in the "AlarmControl" object can be changed.
TableBackColor (Page 1816) A A Specifies the background color of the table cells for the selected
object.
TableFont - - Specifies the font in the table.
TableForeColor A A Specifies the font color of "Row color".
TableHeaderBackColor A A Specifies the background color in the header of the table of the
(Page 1820) selected object.
TableHeaderFont - - Specifies the text color of the header.
TableHeaderForeColor A A Specifies the text color in the header of the table of the selected
(Page 1821) object.
Top (Page 1873) A A Specifies the value of the Y coordinate of the object.
VerticalScrollbarEnabled - -
VerticalScrollingEnabled - -
ViewType - - Specifies the alarm view type.
ViewTypeForSaveStream ** Specifies the display type for the Save Stream.
Visible (Page 1936) * A A Specifies whether the selected object is visible.
Width (Page 1946) A A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

* not visible in the ES, ** no relevant information available

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1329
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-4 Methods

Methods Valid Description


Activate (Page 2116) ??? Activates the permanent window or the root screen.
???

Bar (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Bar" object. The Bar object is an element of the ScreenItems list.

WinCC Professional V13 SP2 – Programming reference


1330 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Type identifier in VBS


HMIBar

Abbreviation Validity
Pa Panels
A RT Advanced
P RT Professional

Table 3-5 Properties

Properties Read Write Description


AlarmLowerLimit (Page 1527) P P Specifies the low limit at which the interrupt is triggered.
AlarmLowerLimitColor P P Specifies the bar color of the "AlarmLowerLimit" limit.
(Page 1528)
AlarmLowerLimitEnabled P P Specifies whether the "AlarmLowerLimit" limit is monitored.
(Page 1529)
AlarmLowerLimitRelative P P Specifies whether the low limit at which the interrupt is triggered is
(Page 1529) evaluated as a percentage or an absolute value.
AlarmUpperLimit (Page 1530) P P Specifies the high limit that triggers the interrupt.
AlarmUpperLimitColor P P Specifies the bar color of the "AlarmUpperLimit" limit.
(Page 1530)
AlarmUpperLimitEnabled P P Specifies whether the "AlarmUpperLimit" limit is monitored.
(Page 1531)
AlarmUpperLimitRelative P P Specifies whether the high limit at which the interrupt is triggered
(Page 1532) is evaluated as a percentage or an absolute value.
Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
AverageLast15Values P P Specifies that the average of the last 15 values is shown.
BackColor (Page 1543) P, A P, A Specifies the background color of the selected object.
BackFillStyle (Page 1546) P P Defines the fill pattern of the specified object.
BackFlashingColorOff P P Specifies the background color for flash state "Off".
(Page 1547) *
BackFlashingColorOn P P Specifies the background color for flash state "On".
(Page 1548) *
BackFlashingEnabled P P Specifies whether the background of the specified object flashes
(Page 1549) * in runtime.
BackFlashingRate (Page 1550) * P P Specifies the flash rate of the background for the selected object.
BarBackColor (Page 1551) P, A P, A Specifies the color of the bar background for the selected object.
BarBackFillStyle (Page 1551) P P Specifies the fill style for the bar.
BarBackFlashingColorOff - - Specifies the border background color of the object for the "OFF"
state.
BarBackFlashingColorOn - - Specifies the border background color of the object for the "ON"
state.
BarBackFlashingEnabled - -
BarBackFlashingRate - - Specifies the flash rate of the background.
BarEdgeStyle - - Specifies the style of the border line.
BarOrientation P P Specifies the alignment of the bar.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1331
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


BorderBackColor (Page 1558) P P Specifies the background color of the broken border line for the
selected object.
BorderColor (Page 1560) P P Specifies the line color of the object.
BorderFlashingColorOff P P Specifies the border line color of the selected object for the flash
(Page 1562) state "Off".
BorderFlashingColorOn P P Specifies the border line color of the selected object for the flash
(Page 1564) state "On".
BorderFlashingEnabled P P Specifies whether the border line of the selected object flashes in
(Page 1565) runtime.
BorderFlashingRate P P Specifies the flash rate of the border line for the selected object.
(Page 1566)
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
BorderStyle3D - - Specifies whether the object has a 3D border shading.
BorderWidth (Page 1571) P P Specifies the line thickness of the object.
ColorChangeHysteresis P P Specifies the hysteresis as a percentage of the display value.
(Page 1588)
ColorChangeHysteresisEnabled P P Specifies whether the object is displayed with hysteresis.
(Page 1589)
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.
CountDivisions (Page 1599) P P Specifies the number of segments into which the bar will be split
by means of the large scale tick marks.
CountSubDivisions (Page 1600) A A Specifies the number of scale tick marks between two main tick
marks of the "Bar" object.
DrawInsideFrame (Page 1610) P P Specifies whether the border line of the selected object with a line
thickness greater than 1 should be drawn within the border or sym‐
metrically to the border.
EdgeStyle (Page 1612) P P Specifies the line style of the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
FillPatternColor (Page 1627) P P Specifies the color of the fill pattern for the selected object.
Flashing - - Specifies that the text block flashes.
FlashingColorOff (Page 1631) * - - Specifies the border line color of the selected object for the flash
state "Off".
FlashingColorOn (Page 1633) * - - Specifies the border line color of the selected object for the flash
state "On".
FlashingEnabled (Page 1634) * - - Specifies whether the border line of the selected object flashes in
runtime.
FlashingOnLimitViolation - - Specifies that flashing is activated when a limit is violated.
FlashingRate (Page 1635) * - - Specifies the flash rate of the border line for the selected object.
Font (Page 1639) - - Specifies or returns the font.
FontBold (Page 1640) P P Specifies whether the text of the selected object is shown in bold.
FontName (Page 1642) P P Specifies the font of the selected object.
FontSize (Page 1642) P P Specifies the font size of the text for the selected object.
ForeColor (Page 1644) P, A P, A Specifies the font color of the text for the selected object.
Height (Page 1649) P, A P, A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

WinCC Professional V13 SP2 – Programming reference


1332 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


IntegerDigits (Page 1669) P P, A Specifies the number of digits to the left of the decimal point (0 to
20).
LargeTickLabelingStep - - Specifies which scale sections are labeled.
LargeTicksBold (Page 1672) P P Specifies whether the long tick marks of a scale are shown in bold.
LargeTicksSize (Page 1672) P P Specifies the length of the long tick marks of a scale.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P, A P, A Specifies the value of the X coordinate of the object.
Limit4LowerLimit (Page 1680) P P Specifies the low limit for "Reserve4".
Limit4LowerLimitColor P P Specifies the color for the "Reserve4" low limit.
(Page 1681)
Limit4LowerLimitEnabled P P Specifies whether the "Reserve4" low limit is monitored.
(Page 1681)
Limit4LowerLimitRelative P P Specifies whether the "Reserve4" low limit is evaluated as a per‐
(Page 1682) centage or an absolute value.
Limit4UpperLimit (Page 1683) P P Specifies the high limit for "Reserve4".
Limit4UpperLimitColor P P Specifies the color for the "Reserve4" high limit.
(Page 1683)
Limit4UpperLimitEnabled P P Specifies whether the "Reserve4" high limit is monitored.
(Page 1684)
Limit4UpperLimitRelative P P Specifies whether the "Reserve4" high limit is evaluated as a per‐
(Page 1684) centage or an absolute value.
Limit5LowerLimit (Page 1685) P P Specifies the low limit for "Reserve5".
Limit5LowerLimitColor P P Sets the color for the "Reserve5" low limit.
(Page 1685)
Limit5LowerLimitEnabled P P Specifies whether the "Reserve5" low limit is monitored.
(Page 1686)
Limit5LowerLimitRelative P P Specifies whether the "Reserve5" low limit is evaluated as a per‐
(Page 1687) centage or an absolute value.
Limit5UpperLimit (Page 1687) P P Specifies the high limit for "Reserve5".
Limit5UpperLimitColor P P Specifies the color for the "Reserve5" high limit.
(Page 1688)
Limit5UpperLimitEnabled P P Specifies whether the "Reserve5" high limit is monitored.
(Page 1688)
Limit5UpperLimitRelative P P Specifies whether the "Reserve5" high limit is evaluated as a per‐
(Page 1689) centage or an absolute value.
LineEndShapeStyle P P Specifies the shape of the line ends.
(Page 1690)
MaximumValue (Page 1697) P, A P, A Specifies the maximum value of the scale in the selected object.
MinimumValue (Page 1713) P, A P, A Specifies the minimum value of the scale in the selected object.
Name (Page 1717) P, A - Returns the object name as STRING.
Precision (Page 1746) P P Specifies the number of decimal places (0 to 20).
ProcessValue (Page 1747) P, A P, A Specifies the default for the value to be displayed.
ScaleColor (Page 1760) P, A P, A Specifies the color of the scale of the selected object.
ScaleGradation (Page 1760) P, A P, A Specifies the distance between two large tick marks of the scale.
ScaleLabelFieldLength * - - Distance to the position of the axis label.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1333
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


ScaleLabelingDoubleLined - - Specifies that the horizontal bar orientation of the scale has two
lines.
ScalePosition (Page 1761) P P Specifies the position of the scale of the selected object.
ScaleStart - - Specifies the minimum of the scale.
ScalingType (Page 1765) P P Specifies the type of bar scaling.
SegmentColoring (Page 1768) P, A P, A Specifies the type of color change to be displayed in the "Bar" ob‐
ject if limits are exceeded.
ShowBadTagState (Page 1784) P P Specifies whether an object is grayed out if its associated tag has
a bad quality code or tag state.
ShowLargeTicksOnly P P Specifies or returns the length of axis sections in pixels.
(Page 1787)
ShowLimitLines - - Specifies the display of a line at the limits.
ShowLimitMarkers (Page 1787) P P Specifies whether the limit values are shown as a scale value.
ShowScale (Page 1790) P P Specifies whether the values are also shown in a scale.
ShowSignForPositiveLabel - - Specifies that a "+" is displayed for positive labels.
ShowTickLabels (Page 1794) - - Specifies whether the label is shown in the scale.
ShowTrendIndicator P P Specifies whether the trend (rising or falling) of the measured value
(Page 1797) to be monitored is indicated by means of a small arrow.
StartValue (Page 1801) P P Specifies the zero point value for the scale display.
ToleranceLowerLimit P P Specifies whether the "ToleranceLowerLimit" limit is monitored.
(Page 1854)
ToleranceLowerLimitColor P P Specifies the color for the "ToleranceLowerLimit" low limit.
(Page 1855)
ToleranceLowerLimitEnabled P P Specifies whether the "ToleranceLowerLimit" limit is monitored.
(Page 1856)
ToleranceUpperLimit P P Specifies whether the "ToleranceUpperLimit" limit is monitored.
(Page 1857)
ToleranceUpperLimitColor P P Specifies the color for the "ToleranceUpperLimit" high limit.
(Page 1857)
ToleranceUpperLimitEnabled P P Specifies whether the "ToleranceUpperLimit" limit is monitored.
(Page 1858)
ToleranceUpperLimitRelative P P Specifies whether the "ToleranceHigh" low limit is evaluated as a
(Page 1858) percentage or an absolute value.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P, A P, A Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
TrendIndicatorColor P P Specifies the color for the trend view.
(Page 1886)
Unit (Page 1913) P, A P, A Specifies the unit of measurement in the "IOField" object.
UseAutoScaling - - Specifies auto-scaling.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined
(Page 1918) in the active design.
UseExponentialFormat P P Specifies whether the numbers are displayed with exponentials
(Page 1920) (e.g. "1.00e+000").

WinCC Professional V13 SP2 – Programming reference


1334 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Visible (Page 1936) P, A P, A Specifies whether the selected object is visible.
WarningLowerLimit (Page 1939) P P Specifies the "WarningLowerLimit" low limit.
WarningLowerLimitColor P P Specifies the color for the "WarningLowerLimit" low limit.
(Page 1940)
WarningLowerLimitEnabled P P Specifies whether the "WarningLowerLimit" limit is monitored.
(Page 1941)
WarningLowerLimitRelative P P Specifies whether the "WarningLowerLimit" low limit is evaluated
(Page 1941) as a percentage or an absolute value.
WarningUpperLimit (Page 1944) P P Specifies the "WarningUpperLimit" high limit.
WarningUpperLimitColor P P Specifies the color for the "WarningUpperLimit" high limit.
(Page 1944)
WarningUpperLimitEnabled P P Specifies whether the "WarningUpperLimit" limit is monitored.
(Page 1945)
WarningUpperLimitRelative P P Specifies whether the "WarningUpperLimit" high limit is evaluated
(Page 1945) as a percentage or an absolute value.
Width (Page 1946) P, A P, A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
ZeroPoint (Page 1969) P P Specifies the position of the zero point as a percentage of the bar
height.

* not visible in the ES

Table 3-6 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1335
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BatteryView (Panels, Comfort Panels, RT Advanced)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Charge condition" object. The BatteryView object is an element of the
ScreenItems list.

Abbreviation Validity
Pa Panels
A RT Advanced
P RT Professional

Table 3-7 Properties

Properties Read Write Description


Height (Page 1649) A A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle" ob‐
jects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) A A Specifies the value of the X coordinate of the object.
Name (Page 1717) A - Returns the object name as STRING.
Top (Page 1873) A A Specifies the value of the Y coordinate of the object.
Width (Page 1946) A A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle" ob‐
jects.

WinCC Professional V13 SP2 – Programming reference


1336 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-8 Methods

Methods Valid Description


Not found

Button (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Button" object. The Button object is an element of the ScreenItems list.
The availability of the following object properties depends on the selected mode of the "button":

Property "Text" "Text list" "Graphic"


TextOff x -- --
TextOn x -- --

Type identifier in VBS


HMIButton

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1337
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Abbreviation Validity
Pa Panels
A RT Advanced
P RT Professional

Table 3-9 Properties

Properties Read Write Description


AdaptBorder (Page 1523) P P Specifies whether the border of the specified object is dynamically
adapted to the text size.
Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
BackColor (Page 1543) P P Specifies the background color of the selected object.
BackFillStyle (Page 1546) P P Defines the fill pattern of the specified object.
BackFlashingColorOff P P Specifies the background color for flash state "Off".
(Page 1547)
BackFlashingColorOn P P Specifies the background color for flash state "On".
(Page 1548)
BackFlashingEnabled P P Specifies whether the background of the specified object flashes in
(Page 1549) runtime.
BackFlashingRate (Page 1550) P P Specifies the flash rate of the background for the selected object.
BitNumber (Page 1555) - - Specifies the bit whose status must change to trigger a value
change.
BorderBackColor (Page 1558) P P Specifies the background color of the broken border line for the se‐
lected object.
BorderBrightColor3D P P Specifies the border color of the following border parts in the 3D
(Page 1559) display of the selected object.
BorderColor (Page 1560) P P Specifies the line color of the object.
BorderFlashingColorOff P P Specifies the border line color of the selected object for the flash
(Page 1562) state "Off".
BorderFlashingColorOn P P Specifies the border line color of the selected object for the flash
(Page 1564) state "On".
BorderFlashingEnabled P P Specifies whether the border line of the selected object flashes in
(Page 1565) runtime.
BorderFlashingRate P P Specifies the flash rate of the border line for the selected object.
(Page 1566)
BorderShadeColor3D P P Specifies the border color of the following border parts in the 3D
(Page 1569) display of the selected object.
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
BorderStyle3D A A Specifies whether the object has a 3D border shading.
BorderWidth (Page 1571) P P Specifies the line thickness of the object.
BorderWidth3D (Page 1573) P P Specifies the width of the border for 3D display of the selected object.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.

WinCC Professional V13 SP2 – Programming reference


1338 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


DrawInsideFrame (Page 1610) P P Specifies whether the border line of the selected object with a line
thickness greater than 1 should be drawn within the border or sym‐
metrically to the border.
EdgeStyle (Page 1612) P P Specifies the line style of the selected object.
Enabled (Page 1614) P, A P, A Specifies whether the selected object can be operated in runtime.
FillPatternColor (Page 1627) P P Specifies the color of the fill pattern for the selected object.
FitToLargest - - Specifies that the size of the object depends on the text length in all
languages.
Flashing - - Specifies that the text block flashes.
FlashingColorOff (Page 1631) P P Specifies the border line color of the selected object for the flash
state "Off".
FlashingColorOn (Page 1633) P P Specifies the border line color of the selected object for the flash
state "On".
FlashingEnabled (Page 1634) P P Specifies whether the border line of the selected object flashes in
runtime.
FlashingRate (Page 1635) P P Specifies the flash rate of the border line for the selected object.
FocusColor (Page 1637) A A Specifies the color for the focus frame of the selected object when
it is in focus.
FocusWidth (Page 1638) A A Specifies the border width of the specified object when the object is
in focus.
Font (Page 1639) - - Specifies or returns the font.
FontBold (Page 1640) P P Specifies whether the text of the selected object is shown in bold.
FontItalic (Page 1641) P P Specifies whether the text of the selected object is shown in italics.
FontName (Page 1642) P P Specifies the font of the selected object.
FontSize (Page 1642) P P Specifies the font size of the text for the selected object.
FontUnderline (Page 1643) P P Specifies whether the text of the selected object is underlined.
ForeColor (Page 1644) P, A P, A Specifies the font color of the text for the selected object.
Height (Page 1649) P, A P, A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
HelpText A - Returns the tooltip that is shown in runtime as user help for the
specified object.
HorizontalAlignment P, A P, A Specifies the horizontal alignment of the text within the selected ob‐
(Page 1663) ject.
HotKey (Page 1665) - - Specifies the hotkey.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P, A P, A Specifies the value of the X coordinate of the object.
LineEndShapeStyle P P Specifies the shape of the line ends.
(Page 1690)
Mode (Page 1715) P P Specifies the field type of the selected object.
Name (Page 1717) P, A - Returns the object name as STRING.
PictureAlignment (Page 1742) P P Specifies or returns the display type of the background image in the
process picture.
PictureList - - Specifies the graphic list that supplies the object with values.
PictureOff (Page 1743) P P Specifies the screen to be displayed in the "Off" state.
PictureOn (Page 1744) P P Specifies the screen to be displayed in the "On" state.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1339
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Pressed (Page 1746) P P Specifies whether the selected object is displayed in a pressed
state.
ProcessValue - - Specifies the default for the value to be displayed.
RelativeFillLevel (Page 1752) P P Specifies the fill percentage for the object.
ShowFillLevel (Page 1786) P P Specifies whether the selected object is filled.
StyleSettings (Page 1815) P P Specifies the display style for the object:
TextList (Page 1825) - - A list that contains the assignments between the output value and
the output text to be actually output.
TextOff (Page 1825) P, A P, A Specifies the text to be displayed in the "Off" state of the selected
object.
TextOn A A Specifies the text to be displayed in the "On" state of the selected
object.
TextOrientation (Page 1827) P P Specifies the text orientation of the selected object.
Toggle (Page 1853) P P Specifies whether the selected object engages after it has been op‐
erated in runtime.
ToolTipText (Page 1872) P P, A Specifies the tooltip text.
Top (Page 1873) P, A P, A Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
TransparentColorPictureOff P P Specifies the color to be set to "transparent" for the "Off" state of the
(Page 1879) assigned bitmap object.
TransparentColorPictureOn P P Specifies the color to be set to "transparent" for the "On" state of the
(Page 1880) assigned bitmap object.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined
(Page 1918) in the active design.
UseTransparentColorPicture‐ P P Specifies whether the transparent color defined in the "Transpar‐
Off (Page 1924) entColorPictureOff" property is used for the "Off" state.
UseTransparentColorPictur‐ P P Specifies whether the transparent color defined in the "Transparent‐
eOn (Page 1924) ColorPictureOn" property is used for the "On" state.
VerticalAlignment (Page 1934) P, A P, A Specifies the vertical alignment of the text for the selected object.
Visible (Page 1936) P, A P, A Specifies whether the selected object is visible.
Width (Page 1946) P, A P, A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
WindowsStyle (Page 1950) P P Specifies whether the object is displayed in the general Windows
style.

WinCC Professional V13 SP2 – Programming reference


1340 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-10 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic P Dynamically activates a trigger and the specified cycle for a property at runtime.
(Page 2119)
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

ChannelDiagnose (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "ChannelDiagnose" object. The ChannelDiagnose object is an element of the


ScreenItems list.

Type identifier in VBS


HMIChannelDiagnose

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1341
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-11 Properties

Properties Read Write Description


Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
Flashing * - - Specifies that the text block flashes.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
Name (Page 1717) P - Returns the object name as STRING.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

* not visible in the ES

Table 3-12 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WinCC Professional V13 SP2 – Programming reference


1342 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

CheckBox (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Check box" object. The CheckBox object is an element of the ScreenItems
list.

Type identifier in VBS


HMICheckBox

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-13 Properties

Properties Read Write Description


AdaptBorder (Page 1523) P P Specifies whether the border of the specified object is dynamically
adapted to the text size.
Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
BackColor (Page 1543) P P Specifies the background color of the selected object.
BackFillStyle (Page 1546) P P Defines the fill pattern of the specified object.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1343
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


BackFlashingColorOff P P Specifies the background color for flash state "Off".
(Page 1547)
BackFlashingColorOn P P Specifies the background color for flash state "On".
(Page 1548)
BackFlashingEnabled P P Specifies whether the background of the specified object flashes
(Page 1549) in runtime.
BackFlashingRate (Page 1550) P P Specifies the flash rate of the background for the selected object.
BorderBackColor (Page 1558) P P Specifies the background color of the broken border line for the
selected object.
BorderColor (Page 1560) P P Specifies the line color of the object.
BorderFlashingColorOff P P Specifies the border line color of the selected object for the flash
(Page 1562) state "Off".
BorderFlashingColorOn P P Specifies the border line color of the selected object for the flash
(Page 1564) state "On".
BorderFlashingEnabled P P Specifies whether the border line of the selected object flashes in
(Page 1565) runtime.
BorderFlashingRate P P Specifies the flash rate of the border line for the selected object.
(Page 1566)
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
BorderWidth (Page 1571) P P Specifies the line thickness of the object.
CheckmarkAlignment P P Specifies whether the fields are right aligned.
(Page 1585)
CheckmarkCount (Page 1586) P P Specifies the number of fields.
CornerStyle (Page 1597) - - Specifies the type of border lines for the selected object.
DrawInsideFrame (Page 1610) P P Specifies whether the border line of the selected object with a line
thickness greater than 1 should be drawn within the border or
symmetrically to the border.
EdgeStyle (Page 1612) - - Specifies the line style of the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
FillPatternColor (Page 1627) P P Specifies the color of the fill pattern for the selected object.
Flashing - - Specifies that the text block flashes.
FlashingColorOff (Page 1631) P P Specifies the border line color of the selected object for the flash
state "Off".
FlashingColorOn (Page 1633) P P Specifies the border line color of the selected object for the flash
state "On".
FlashingEnabled (Page 1634) P P Specifies whether the border line of the selected object flashes in
runtime.
FlashingRate (Page 1635) P P Specifies the flash rate of the border line for the selected object.
Font (Page 1639) - - Specifies or returns the font.
FontBold (Page 1640) P P Specifies whether the text of the selected object is shown in bold.
FontItalic (Page 1641) P P Specifies whether the text of the selected object is shown in italics.
FontName (Page 1642) P P Specifies the font of the selected object.
FontSize (Page 1642) P P Specifies the font size of the text for the selected object.
FontUnderline (Page 1643) P P Specifies whether the text of the selected object is underlined.
ForeColor (Page 1644) P P Specifies the font color of the text for the selected object.

WinCC Professional V13 SP2 – Programming reference


1344 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
HorizontalAlignment P P Specifies the horizontal alignment of the text within the selected
(Page 1663) object.
Index (Page 1666) P P Specifies the background for grid control elements.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineEndShapeStyle - - Specifies the shape of the line ends.
(Page 1690)
LogOperation (Page 1694) P P Specifies whether, after operating this object, an alarm is output
to the alarm system.
Name (Page 1717) P P Returns the object name as STRING.
ProcessValue (Page 1747) P P Specifies the default for the value to be displayed.
RelativeFillLevel (Page 1752) P P Specifies the fill percentage for the object.
ShowBadTagState (Page 1784) P P Specifies whether an object is grayed out if its associated tag has
a bad quality code or tag state.
ShowFillLevel (Page 1786) P P Specifies whether the selected object is filled.
Text (Page 1824) P P Specifies the label for the text field.
TextOrientation (Page 1827) P P Specifies the text orientation of the selected object.
Texts - - Specifies the texts for the check boxes.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined
(Page 1918) in the active design.
VerticalAlignment (Page 1934) P P Specifies the vertical alignment of the text for the selected object.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

Table 3-14 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1345
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Circle (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Circle" object. The Circle object is an element of the ScreenItems list.

Type identifier in VBS


HMICircle

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-15 Properties

Properties Read Write Description


Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
BackColor (Page 1543) P, A P, A Specifies the background color of the selected object.
BackFillStyle (Page 1546) P, A P, A Defines the fill pattern of the specified object.
BorderBackColor (Page 1558) P P Specifies the background color of the broken border line for the se‐
lected object.
BorderColor (Page 1560) P, A P, A Specifies the line color of the object.

WinCC Professional V13 SP2 – Programming reference


1346 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


BorderFlashingColorOff P P Specifies the border line color of the selected object for the flash
(Page 1562) state "Off".
BorderFlashingColorOn P P Specifies the border line color of the selected object for the flash
(Page 1564) state "On".
BorderFlashingEnabled P P Specifies whether the border line of the selected object flashes in
(Page 1565) runtime.
BorderFlashingRate P P Specifies the flash rate of the border line for the selected object.
(Page 1566)
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
BorderWidth (Page 1571) P, A P, A Specifies the line thickness of the object.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.
DrawInsideFrame P P Specifies whether the border line of the selected object with a line
(Page 1610) thickness greater than 1 should be drawn within the border or sym‐
metrically to the border.
EdgeStyle (Page 1612) A A Specifies the line style of the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
FillPatternColor (Page 1627) P P Specifies the color of the fill pattern for the selected object.
Flashing - - Specifies that the text block flashes.
FlashingColorOff (Page 1631) P P Specifies the border line color of the selected object for the flash
state "Off".
FlashingColorOn (Page 1633) P P Specifies the border line color of the selected object for the flash
state "On".
FlashingEnabled P P Specifies whether the border line of the selected object flashes in
runtime.
FlashingRate (Page 1635) P P Specifies the flash rate of the border line for the selected object.
Height (Page 1649) P, A P, A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P, A P, A Specifies the value of the X coordinate of the object.
LineEndShapeStyle P P Specifies the shape of the line end.
(Page 1690)
Name (Page 1717) P, A - Returns the object name as STRING.
Radius P P, A Specifies the radius of the selected object "Circle".
RelativeFillLevel (Page 1752) P P Specifies the fill percentage for the object.
ShowFillLevel (Page 1786) P P Specifies whether the selected object is filled.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P, A P, A Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined
(Page 1918) in the active design.
Visible (Page 1936) P, A P, A Specifies whether the selected object is visible.
Width (Page 1946) P, A P, A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1347
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-16 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

CircleSegment (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "CircleSegment" object. The CircleSegment object is an element of the


ScreenItems list.

Type identifier in VBS


HMICircleSegment

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

WinCC Professional V13 SP2 – Programming reference


1348 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-17 Properties

Properties Read Write Description


Authorization (Page 1537) P P Specifies the operating rights of the selected object in run‐
time.
BackColor (Page 1543) P P Specifies the background color of the selected object.
BackFillStyle (Page 1546) P P Defines the fill pattern of the specified object.
BorderBackColor (Page 1558) P P Specifies the background color of the broken border line for
the selected object.
BorderColor (Page 1560) P P Specifies the line color of the object.
BorderFlashingColorOff (Page 1562) P P Specifies the border line color of the selected object for the
flash state "Off".
BorderFlashingColorOn (Page 1564) P P Specifies the border line color of the selected object for the
flash state "On".
BorderFlashingEnabled (Page 1565) P P Specifies whether the border line of the selected object flash‐
es in runtime.
BorderFlashingRate (Page 1566) P P Specifies the flash rate of the border line for the selected
object.
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
BorderWidth (Page 1571) P P Specifies the line thickness of the object.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.
DrawInsideFrame (Page 1610) P P Specifies whether the border line of the selected object with
a line thickness greater than 1 should be drawn within the
border or symmetrically to the border.
EdgeStyle P P Specifies the line style of the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in
runtime.
EndAngle (Page 1616) P P Specifies the angle at which the end point of the selected
object deviates from the zero position (0°).
FillPatternColor (Page 1627) P P Specifies the color of the fill pattern for the selected object.
Flashing - - Specifies that the text block flashes.
FlashingColorOff (Page 1631) P P Specifies the border line color of the selected object for the
flash state "Off".
FlashingColorOn (Page 1633) P P Specifies the border line color of the selected object for the
flash state "On".
FlashingEnabled P P Specifies whether the border line of the selected object flash‐
es in runtime.
FlashingRate (Page 1635) P P Specifies the flash rate of the border line for the selected
object.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rec‐
tangle" objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the
screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineEndShapeStyle (Page 1690) P P Specifies the shape of the line end.
Name (Page 1717) P - Returns the object name as STRING.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1349
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Radius P P Specifies the radius of the selected object "Circle".
RelativeFillLevel (Page 1752) P P Specifies the fill percentage for the object.
ShowFillLevel (Page 1786) P P Specifies whether the selected object is filled.
StartAngle (Page 1800) P P Specifies the SQL statement.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the ob‐
ject.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading
(Page 1918) defined in the active design.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rec‐
tangle" objects.

Table 3-18 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WinCC Professional V13 SP2 – Programming reference


1350 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

CircularArc (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "CircularArc" object. The CircularArc object is an element of the ScreenItems
list.

Type identifier in VBS


HMICircularArc

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-19 Properties

Properties Read Write Description


Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
BackColor (Page 1543) P P Specifies the background color of the selected object.
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
Color (Page 1588) P P Specifies the line color of the selected object.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1351
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


DrawInsideFrame (Page 1610) P P Specifies whether the border line of the selected object with a line
thickness greater than 1 should be drawn within the border or sym‐
metrically to the border.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
EndAngle (Page 1616) P P Specifies the angle at which the end point of the selected object
deviates from the zero position (0°).
Flashing - - Specifies that the text block flashes.
FlashingColorOff (Page 1631) P P Specifies the border line color of the selected object for the flash
state "Off".
FlashingColorOn (Page 1633) P P Specifies the border line color of the selected object for the flash
state "On".
FlashingEnabled P P Specifies whether the border line of the selected object flashes in
runtime.
FlashingRate (Page 1635) P P Specifies the flash rate of the border line for the selected object.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineEndShapeStyle (Page 1690) P P Specifies the shape of the line end.
LineWidth (Page 1691) P P Specifies the line thickness of the selected object.
Name (Page 1717) P - Returns the object name as STRING.
Radius P P Specifies the radius of the selected object "Circle".
StartAngle (Page 1800) P P Specifies the SQL statement.
Style (Page 1814) P P Specifies the line style of the selected object.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined
(Page 1918) in the active design.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

Table 3-20 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WinCC Professional V13 SP2 – Programming reference


1352 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Clock (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Clock" object. The Clock object is an element of the ScreenItems list.

Type identifier in VBS


Clock

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-21 Properties

Properties Read Write Description


Analog (Page 1533) P P Specifies whether the clock is displayed as an analog clock.
BackFillStyle (Page 1546) P P Defines the fill pattern of the specified object.
DialColor (Page 1605) P, A P, A Specifies the color of the dial in the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
Flashing - - Specifies that the text block flashes.
Font (Page 1639) - - Specifies or returns the font.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1353
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Height (Page 1649) P, A P, A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle" ob‐
jects.
HourNeedleHeight P, A P, A Specifies the length of the hour hand in the "Clock" object.
(Page 1665)
HourNeedleWidth P, A P, A Specifies the width of the hour hand in the "Clock" object.
(Page 1665)
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P, A P, A Specifies the value of the X coordinate of the object.
LockSquaredExtent P P Specifies whether the tag values are downloaded from the logs for the
(Page 1693) time range to be displayed when you call a screen.
MinuteNeedleHeight P, A P, A Specifies the length of the minute hand in the "Clock" object.
(Page 1714)
MinuteNeedleWidth P, A P, A Specifies the width of the minute hand in the "Clock" object.
(Page 1714)
Name (Page 1717) P, A - Returns the object name as STRING.
NeedleBorderColor P, A P, A Specifies the name of the data source.
(Page 1719)
NeedleColor (Page 1720) P, A P, A Specifies the hand color in the "Clock" object.
NeedleFillStyle (Page 1721) P P Specifies the fill style for the clock hand.
Picture (Page 1742) - - Specifies the screen to be displayed in the graphics object in runtime.
SecondNeedleHeight P, A P, A Specifies the length of the seconds hand in the "Clock" object.
(Page 1767)
SecondNeedleWidth P, A P, A Specifies the width of the seconds hand in the "Clock" object.
(Page 1768)
ShowFocusRectangle P P Specifies whether the button receives a selection border when it is
(Page 1787) activated in runtime.
ShowTicks (Page 1795) P, A P, A Specifies whether the tick marks are displayed in the scale of the ob‐
ject.
TicksColor (Page 1828) P, A P, A Specifies the scale display.
Top (Page 1873) P, A P, A Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined in
(Page 1918) the active design.
Visible (Page 1936) P, A P, A Specifies whether the selected object is visible.
Width (Page 1946) P, A P, A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle" ob‐
jects.

WinCC Professional V13 SP2 – Programming reference


1354 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-22 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

Connector (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Connector" object. The Connector object is an element of the ScreenItems
list.

Type identifier in VBS


HMIConnector

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1355
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-23 Properties

Properties Read Write Description


Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
BackColor (Page 1543) P P Specifies the background color of the selected object.
BorderEndStyle (Page 1562) P P Specifies the type of line ends for the selected object.
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
Color (Page 1588) P P Specifies the line color of the selected object.
ConnectionType (Page 1596) P P Specifies the type of connector. You can select one of two connec‐
tion types.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
EndStyle (Page 1617) - - Specifies how the line end of the selected object is displayed.
FirstConnectedObjectIndex P P Specifies the index number of the upper connector point.
(Page 1630)
FirstConnectedObjectName P P Specifies the name of the object that is docked to the upper connec‐
(Page 1630) tor point.
Flashing - - Specifies that the text block flashes.
FlashingColorOff (Page 1631) P P Specifies the border line color of the selected object for the flash
state "Off".
FlashingColorOn (Page 1633) P P Specifies the border line color of the selected object for the flash
state "On".
FlashingEnabled (Page 1634) P P Specifies whether the border line of the selected object flashes in
runtime.
FlashingRate (Page 1635) P P Specifies the flash rate of the border line for the selected object.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
LastConnectedObjectIndex P P Specifies the index number of the connection point to the last con‐
(Page 1673) nected object.
LastConnectedObjectName P P Specifies the name of the object that is docked to the lower connector
(Page 1673) point.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineEndShapeStyle P P Specifies the shape of the line end.
(Page 1690)
LineWidth (Page 1691) P P Specifies the line thickness of the selected object.
Name (Page 1717) P P Returns the object name as STRING.
Points * - - Specifies the corner points.
StartStyle - - Specifies how the line start of the selected object is displayed.
Style (Page 1814) P P Specifies the line style of the selected object.
SwapFirstWithLastConnection P P Specifies whether the text in the object is shown horizontally.
(Page 1815)
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.

WinCC Professional V13 SP2 – Programming reference


1356 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies that the font size from the data source should be used.
(Page 1918)
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P - Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

* not visible in the ES

Table 3-24 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at run‐
time.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

DateTimeField (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Date/time field" object. The DateTimeField object is an element of the
ScreenItems list.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1357
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Type identifier in VBS


HMIDateTimeField

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-25 Properties

Properties Read Write Description


Authorization (Page 1537) - - Specifies the operating rights of the selected object in runtime.
BackColor A A Specifies the background color of the selected object.
BackFillStyle - - Defines the fill pattern of the specified object.
BorderBackColor (Page 1558) * - - Specifies the background color of the broken border line for the selec‐
ted object.
BorderColor A A Specifies the line color of the object.
BorderStyle3D (Page 1570) A A Specifies whether the object has a 3D border shading.
DisplaySystemTime - - Specifies that the system time is displayed.
EdgeStyle - - Specifies the line style of the selected object.
Enabled A A Specifies whether the selected object can be operated in runtime.
FitToLargest - - Specifies that the size of the object depends on the text length in all
languages.
Flashing - - Specifies that the text block flashes.
Font (Page 1639) * - - Specifies or returns the font.
ForeColor A A Specifies the font color of the text for the selected object.
Format - - Specifies that the format of the text block is displayed.
Height (Page 1649) A A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle" ob‐
jects.
HelpText (Page 1653) A - Returns the tooltip that is shown in runtime as user help for the speci‐
fied object.
HorizontalAlignment A A Specifies the horizontal alignment of the text within the selected object.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) A A Specifies the value of the X coordinate of the object.
LineWrap * - - Specifies the line break within the object.
LongDateTimeFormat - - Specifies that the date and time are displayed in long format.
Mode (Page 1715) - - Specifies the field type of the selected object.
Name (Page 1717) A - Returns the object name as STRING.
ProcessValue (Page 1747) A A Specifies the default for the value to be displayed.
ShowDate - - Specifies that the date is to be displayed.
ShowTime - - Specifies that only the time is displayed.

WinCC Professional V13 SP2 – Programming reference


1358 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Top (Page 1873) A A Specifies the value of the Y coordinate of the object.
VerticalAlignment (Page 1934) A A Specifies the vertical alignment of the text for the selected object.
Visible (Page 1936) * A A Specifies whether the selected object is visible.
Width (Page 1946) A A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle" ob‐
jects.

* not visible in the ES

Table 3-26 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.

DiskSpaceView (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Disk space view" object. The DiskSpaceView object is an element of the
ScreenItems list.

Type identifier in VBS


IXDiskSpaceView

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1359
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-27 Properties

Properties Read Write Description


Alarm (Page 1525) P P Specifies the limit for the memory space view from which an alarm is
output.
AlarmColor (Page 1526) P P Specifies the alarm types to be displayed in the alarm view.
Drive (Page 1611) P P Specifies the characters of the drive that is to be monitored.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
Free (Page 1645) P P Returns the size of the free memory space.
FreePercent (Page 1646) P P Returns the measured values for the free disk space as a percentage.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectangle" ob‐
jects.
Interval (Page 1669) P P Specifies the time interval for updating the displayed measured values.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
Name (Page 1717) P - Returns the object name as STRING.
NormalColor P P Specifies the color of the object in the normal range.
Tolerance (Page 1853) P P Specifies the limit for the storage space display as of which a deviation
will be reported.
ToleranceColor (Page 1854) P P Specifies the colors in which the bars of the memory space display are
shown as soon as the tolerance range is exceeded.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Total (Page 1876) P P Returns the storage capacity.
Used (Page 1916) P P Specifies whether scrolling is enabled.
UsedPercent (Page 1919) P P Returns the measured values for the occupied memory space as a per‐
centage.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Warning (Page 1938) P P Specifies the limit for the memory space view from which a warning is
output.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rectangle" objects.

WinCC Professional V13 SP2 – Programming reference


1360 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-28 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

Ellipse (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Ellipse" object. The Ellipse object is an element of the ScreenItems list.

Type identifier in VBS


HMIEllipse

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1361
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-29 Properties

Properties Read Write Description


Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
BackColor (Page 1543) P, A P, A Specifies the background color of the selected object.
BackFillStyle (Page 1546) P, A P, A Defines the fill pattern of the specified object.
BorderBackColor (Page 1558) P P Specifies the background color of the broken border line for the
selected object.
BorderColor (Page 1560) P, A P, A Specifies the line color of the object.
BorderFlashingColorOff P P Specifies the border line color of the selected object for the flash
(Page 1562) state "Off".
BorderFlashingColorOn P P Specifies the border line color of the selected object for the flash
(Page 1564) state "On".
BorderFlashingEnabled P P Specifies whether the border line of the selected object flashes in
(Page 1565) runtime.
BorderFlashingRate P P Specifies the flash rate of the border line for the selected object.
(Page 1566)
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
BorderWidth (Page 1571) P, A P, A Specifies the line thickness of the object.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.
DrawInsideFrame (Page 1610) P P Specifies whether the border line of the selected object with a line
thickness greater than 1 should be drawn within the border or sym‐
metrically to the border.
EdgeStyle A A Specifies the line style of the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
FillPatternColor (Page 1627) P P Specifies the color of the fill pattern for the selected object.
Flashing - - Specifies that the text block flashes.
FlashingColorOff (Page 1631) P P Specifies the border line color of the selected object for the flash
state "Off".
FlashingColorOn (Page 1633) P P Specifies the border line color of the selected object for the flash
state "On".
FlashingEnabled (Page 1634) P P Specifies whether the border line of the selected object flashes in
runtime.
FlashingRate (Page 1635) P P Specifies the flash rate of the border line for the selected object.
Height (Page 1649) P, A P, A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P, A P, A Specifies the value of the X coordinate of the object.
LineEndShapeStyle P P Specifies the shape of the line end.
(Page 1690)
Name (Page 1717) P, A - Returns the object name as STRING.
RadiusHeight P P Specifies the minor axis of the "Ellipsis" object.
RadiusWidth P P Specifies the major axis of the "Ellipsis" object.
RelativeFillLevel (Page 1752) P P Specifies the fill percentage for the object.
ShowFillLevel (Page 1786) P P Specifies whether the selected object is filled.

WinCC Professional V13 SP2 – Programming reference


1362 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P, A P, A Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined
(Page 1918) in the active design.
Visible (Page 1936) P, A P, A Specifies whether the selected object is visible.
Width (Page 1946) P, A P, A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

Table 3-30 Method

Method Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

EllipseSegment (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1363
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Represents the "EllipseSegment" object. The EllipseSegment object is an element of the


ScreenItems list.

Type identifier in VBS


HMIEllipseSegment

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-31 Properties

Properties Read Write Description


Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
BackColor (Page 1543) P P Specifies the background color of the selected object.
BackFillStyle (Page 1546) P P Defines the fill pattern of the specified object.
BorderBackColor (Page 1558) P P Specifies the background color of the broken border line for the se‐
lected object.
BorderColor (Page 1560) P P Specifies the line color of the object.
BorderFlashingColorOff P P Specifies the border line color of the selected object for the flash state
(Page 1562) "Off".
BorderFlashingColorOn P P Specifies the border line color of the selected object for the flash state
(Page 1564) "On".
BorderFlashingEnabled P P Specifies whether the border line of the selected object flashes in
(Page 1565) runtime.
BorderFlashingRate P P Specifies the flash rate of the border line for the selected object.
(Page 1566)
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
BorderWidth (Page 1571) P P Specifies the line thickness of the object.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.
DrawInsideFrame P P Specifies whether the border line of the selected object with a line
(Page 1610) thickness greater than 1 should be drawn within the border or sym‐
metrically to the border.
EdgeStyle (Page 1612) P P Specifies the line style of the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
EndAngle (Page 1616) P P Specifies the angle at which the end point of the selected object de‐
viates from the zero position (0°).
FillPatternColor (Page 1627) P P Specifies the color of the fill pattern for the selected object.
Flashing - - Specifies that the text block flashes.
FlashingColorOff (Page 1631) P P Specifies the border line color of the selected object for the flash state
"Off".

WinCC Professional V13 SP2 – Programming reference


1364 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


FlashingColorOn (Page 1633) P P Specifies the border line color of the selected object for the flash state
"On".
FlashingEnabled (Page 1634) P P Specifies whether the border line of the selected object flashes in
runtime.
FlashingRate (Page 1635) P P Specifies the flash rate of the border line for the selected object.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineEndShapeStyle P P Specifies the shape of the line end.
(Page 1690)
Name (Page 1717) P - Returns the object name as STRING.
RadiusHeight P P Specifies the minor axis of the "Ellipsis" object.
RadiusWidth P P Specifies the major axis of the "Ellipsis" object.
RelativeFillLevel (Page 1752) P P Specifies the fill percentage for the object.
ShowFillLevel (Page 1786) P P Specifies whether the selected object is filled.
StartAngle (Page 1800) P P Specifies the SQL statement.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined in
(Page 1918) the active design.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

Table 3-32 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1365
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

EllipticalArc (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "EllipticalArc" object. The EllipticalArc object is an element of the ScreenItems
list.

Type identifier in VBS


HMIEllipticalArc

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-33 Properties

Properties Read Write Description


Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
BackColor (Page 1543) P P Specifies the background color of the selected object.
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
Color (Page 1588) P P Specifies the line color of the selected object.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.

WinCC Professional V13 SP2 – Programming reference


1366 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


DrawInsideFrame (Page 1610) P P Specifies whether the border line of the selected object with a line
thickness greater than 1 should be drawn within the border or
symmetrically to the border.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
EndAngle (Page 1616) P P Specifies the angle at which the end point of the selected object
deviates from the zero position (0°).
Flashing - - Specifies that the text block flashes.
FlashingColorOff (Page 1631) - - Specifies the border line color of the selected object for the flash
state "Off".
FlashingColorOn (Page 1633) - - Specifies the border line color of the selected object for the flash
state "On".
FlashingEnabled (Page 1634) - - Specifies whether the border line of the selected object flashes in
runtime.
FlashingRate (Page 1635) - - Specifies the flash rate of the border line for the selected object.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineEndShapeStyle (Page 1690) P P Specifies the shape of the line end.
LineWidth (Page 1691) P P Specifies the line thickness of the selected object.
Name (Page 1717) P - Returns the object name as STRING.
RadiusHeight P P Specifies the minor axis of the "Ellipsis" object.
RadiusWidth P P Specifies the major axis of the "Ellipsis" object.
StartAngle (Page 1800) P P Specifies the SQL statement.
Style (Page 1814) P P Specifies the line style of the selected object.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined
(Page 1918) in the active design.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1367
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-34 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

ForeignControl (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Object Type of ScreenItem Object. Represents the graphic object "Control"


The control object type always assumes the properties of the control type selected. In the case
of controls provided by WinCC, the properties are indicated under the description of the
corresponding control.
In the case of controls from external suppliers, the control properties are supplied and thus not
a part of this description. However, the control properties can be queried using the "Item"
property.

Type Identifier in VBS


Special WinCC type descriptions or version-independent ProgID

WinCC Professional V13 SP2 – Programming reference


1368 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

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

Access to specific properties instead of event parameters of the third-party controls


The parameter list of an event with third-party control is not read in WinCC. To have access
to custom parameters of control events, you need to implement properties in the control instead
of parameters.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1369
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

The following code example shows the source code of the "UserControlTestModify" control,
in which the "Title" and "Description" properties are defined instead of parameters.

public partial class UserControlTestModify : UserControl


{
public event MyEventHandler MyEvent = null;

public string Title


{
get;
private set;
}

public string Description


{
get;
set;
}

public UserControlTestModify()
{
InitializeComponent();
}
private void OnMyEvent(Exception e)
{
if (this.MyEvent!= null)
{
// Place place data in Properties before invoking event.
Title = "title";
Description = "description"; ";
this.MyEvent.Invoke();
}
}

private void button1_Click(object sender, EventArgs e)


{
this.OnMyEvent (null);
}
}

The specific properties of a third-party control are not displayed in WinCC with IntelliSense.
The following example shows how to access the specific "Title" property of the third-party
control "FControl" in WinCC :

HMIRuntime.Screens("StartScreen").ScreenItems("FControl").Title = "MyForeignControl"

ProgID and UserfriendlyName of third-party controls


The version-independent ProgID is returned as the type if non-WinCC controls are used.

WinCC Professional V13 SP2 – Programming reference


1370 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

It is possible to determine the version-dependent ProgID or "UserfriendlyName" from the


ProgID: In the following example, "Control1" 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.

Determine the version-dependent ProgID as follows:

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

Determine the UserFriendlyName as follows:

'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

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1371
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

The properties of the ScreenItem object are used in the case of identical names, if you use
the following form:

Control.type

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-35 Properties

Properties Read Write Description


Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
Name (Page 1717) P - Returns the object name as STRING.
OCXState (Page 1725) * - - Sets the OCX status.
ProgID (Page 1748) * - - The version-independent ProgID is returned as the type if non-
WinCC controls are used.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

* not visible in the ES

Table 3-36 Methods

Methods Valid Description

WinCC Professional V13 SP2 – Programming reference


1372 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

FunctionTrendControl (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "f(x)FunctionTrendView" object. The FunctionTrendControl object is an


element of the ScreenItems list.

Type identifier in VBS


HMIFunctionTrendControl

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-37 Properties

Properties Read Write Description


Enabled (Page 1614) P P Specifies whether the selected object can be operated in run‐
time.
Height (Page 1649) P - Sets the height of the specified "Ellipsis", "Circle" and "Rectan‐
gle" objects.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
ObjectName (Page 1997) P - Returns the object name as STRING.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1373
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Type (Page 2100) P - Returns the type of the specified object as STRING.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P - Sets the width of the specified "Ellipsis", "Circle" and "Rectan‐
gle" objects.

Table 3-38 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at
runtime.
AttachDB (Page 2123) P, A Executes the "Connect backup" button function of the control.
DeactivateDynamic (Page 2126) P Deactivates the trigger of the "ActivateDynamic" method used for the
specified property in/during Runtime.
DetachDB (Page 2128) P, A Executes the "Disconnect backup" button function of the control.
Export (Page 2129) P, A Executes the "Export log" or "Export data" button function of the control.
GetStatusbarElement (Page 2156) P, A Returns the element of the control's status bar designated by name or
index as "ICCAxStatusbarElement" type.
GetStatusbarElementCollection P, A Returns the list of all status bar elements of the control as "ICCAxCol‐
(Page 2157) lection" type.
GetToolbarButton (Page 2164) P, A Returns the button function designated by name or index on the control
toolbar as "ICCAxToolbarButton" type.
GetToolbarButtonCollection P, A Returns the list of all button functions of the control toolbar as "ICCAx‐
(Page 2165) Collection" type.
GetTrend (Page 2167) P, A Returns the f(t) or f(x) trend view designated by name or index as "IC‐
CAxTrend" or "ICCAxFunctionTrend" type.
GetTrendCollection (Page 2168) P, A Returns the list of all trends of the f(t) or f(x) trend view as "ICCAxCol‐
lection" type.
GetTrendWindow (Page 2169) P, A Returns the trend window object of the f(t) or f(x) trend view designated
by name or index as "ICCAxTrendWindow" type.
GetTrendWindowCollection P, A Returns the list of all trend window objects of the f(t) or f(x) trend views
(Page 2170) as "ICCAxCollection" type.
GetXAxis (Page 2176) P, A Returns the X axis object of the f(x) trend view designated by name or
index as "ICCAxValueAxis" type.
GetXAxisCollection (Page 2177) P, A Returns the list of all X axis objects of the f(x) trend view as "ICCAxCol‐
lection" type.
GetYAxis (Page 2179) P, A Returns the Y axis object of the f(x) trend view designated by name or
index as "ICCAxValueAxis" type.
GetYAxisCollection (Page 2180) P, A Returns the list of all Y axis objects of the f(x) trend view as "ICCAxCol‐
lection" type.
MoveAxis (Page 2185) P, A Executes the "Move axes area" button function of the f(t) and f(x) trend
views.
NextTrend (Page 2192) P, A Executes the "Next trend" button function of the f(t) and f(x) trend views.
OneToOneView (Page 2192) P, A Executes the "Original view" button function of the f(t) and f(x) trend
views.

WinCC Professional V13 SP2 – Programming reference


1374 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Methods Valid Description


PreviousTrend (Page 2194) P, A Executes the "Previous trend" button function of the f(t) and f(x) trend
views.
Print (Page 2194) P, A Executes the "Print" button function of the control.
ShowHelp (Page 2214) P, A Executes the "Help" button function of the control.
ShowPropertyDialog (Page 2218) P, A Executes the "Configuration dialog" button function of the control.
ShowTagSelection (Page 2222) P, A Executes the "Select data connection" button function of the control.
ShowTimeSelection (Page 2223) P, A Executes the "Select time range" button function of the control.
ShowTrendSelection (Page 2224) P, A Executes the "Select trends" button function of the f(t) and f(x) trend
views.
StartStopUpdate (Page 2224) P, A Executes the "Start" or "Stop" button function of the control.
ZoomArea (Page 2231) P, A Executes the "Zoom area" button function of the f(t) and f(x) trend views.
ZoomInOut (Page 2232) P, A Executes the "Zoom +/-" button function of the f(t) and f(x) trend views.
ZoomInOutX (Page 2233) P, A Executes the "Zoom X axis +/-" button function of the f(x) trend view.
ZoomInOutY (Page 2234) P, A Executes the "Zoom Y axis +/-" button function of the f(x) trend view.
ZoomMove (Page 2234) P, A Executes the "Move trend area" button function of the f(t) and f(x) trend
views.

See also
BackColor (Page 1543)
Caption (Page 1578)
LoadDataImmediately (Page 1692)
Online (Page 1725)
TimeBase (Page 1831)
ShowRuler (Page 1789)
ApplyProjectSettings (Page 1535)
BorderColor (Page 1560)
BorderWidth (Page 1571)
Closeable (Page 1587)
ConnectTrendWindows (Page 1596)
ExportDirectoryChangeable (Page 1620)
ExportDirectoryname (Page 1620)
ExportFileExtension (Page 1621)
ExportFilename (Page 1621)
ExportFilenameChangeable (Page 1622)
ExportFormatGuid (Page 1622)
ExportFormatName (Page 1623)
ExportParameters (Page 1624)
ExportSelection (Page 1624)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1375
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ExportShowDialog (Page 1625)


Font (Page 1639)
GraphDirection (Page 1647)
Layer (Page 1675)
LineColor (Page 1689)
LineWidth (Page 1691)
Moveable (Page 1716)
Name (Page 1717)
RTPersistence (Page 1757)
RTPersistenceType (Page 1758)
UseTrendNameAsLabel (Page 1925)
ToolbarAlignment (Page 1859)
ToolbarBackColor (Page 1859)
ToolbarButtonActive (Page 1860)
ToolbarButtonAdd (Page 1861)
ToolbarButtonBeginGroup (Page 1861)
ToolbarButtonCount (Page 1862)
ToolbarButtonEnabled (Page 1863)
ToolbarButtonHotKey (Page 1863)
ToolbarButtonID (Page 1864)
ToolbarButtonIndex (Page 1864)
ToolbarButtonLocked (Page 1865)
ToolbarButtonName (Page 1866)
ToolbarButtonAuthorization (Page 1866)
ToolbarButtonRemove (Page 1867)
ToolbarButtonRename (Page 1867)
ToolbarButtonRepos (Page 1868)
ToolbarButtonTooltipText (Page 1868)
ToolbarButtonUserDefined (Page 1869)
ToolbarShowTooltips (Page 1870)
ToolbarUseBackColor (Page 1870)
ToolbarUseHotKeys (Page 1871)
ToolbarVisible (Page 1871)
TrendActualize (Page 1880)
TrendAdd (Page 1881)

WinCC Professional V13 SP2 – Programming reference


1376 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TrendBeginTime (Page 1881)


TrendColor (Page 1882)
TrendCount (Page 1882)
TrendEndTime (Page 1883)
TrendExtendedColorSet (Page 1883)
TrendFill (Page 1884)
TrendFillColor (Page 1884)
TrendIndex (Page 1885)
TrendLabel (Page 1886)
TrendLineStyle (Page 1887)
TrendLineType (Page 1887)
TrendLineWidth (Page 1888)
TrendLowerLimit (Page 1888)
TrendLowerLimitColor (Page 1889)
TrendLowerLimitColoring (Page 1889)
TrendMeasurePoints (Page 1890)
TrendName (Page 1890)
TrendPointColor (Page 1891)
TrendPointStyle (Page 1891)
TrendPointWidth (Page 1892)
TrendProvider (Page 1892)
TrendRangeType (Page 1893)
TrendRemove (Page 1894)
TrendRename (Page 1894)
TrendRepos (Page 1895)
TrendSelectTagNameX (Page 1895)
TrendSelectTagNameY (Page 1896)
TrendTagNameX (Page 1896)
TrendTagNameY (Page 1897)
TrendTimeRangeBase (Page 1897)
TrendTimeRangeFactor (Page 1898)
TrendTrendWindow (Page 1898)
TrendUncertainColor (Page 1899)
TrendUncertainColoring (Page 1899)
TrendUpperLimit (Page 1900)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1377
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TrendUpperLimitColor (Page 1900)


TrendUpperLimitColoring (Page 1901)
TrendVisible (Page 1901)
TrendWindowAdd (Page 1902)
TrendWindowCoarseGrid (Page 1902)
TrendWindowCoarseGridColor (Page 1903)
TrendWindowFineGrid (Page 1904)
TrendWindowFineGridColor (Page 1904)
TrendWindowForegroundTrendGrid (Page 1905)
TrendWindowGridInTrendColor (Page 1905)
TrendWindowHorizontalGrid (Page 1906)
TrendWindowIndex (Page 1906)
TrendWindowName (Page 1907)
TrendWindowRemove (Page 1907)
TrendWindowRename (Page 1907)
TrendWindowRepos (Page 1908)
TrendWindowRulerColor (Page 1908)
TrendWindowRulerLayer (Page 1909)
TrendWindowRulerStyle (Page 1910)
TrendWindowRulerWidth (Page 1910)
TrendWindowSpacePortion (Page 1911)
TrendWindowVerticalGrid (Page 1911)
TrendWindowVisible (Page 1912)
TrendXAxis (Page 1912)
TrendYAxis (Page 1913)
ShowRulerInAxis (Page 1790)
ShowScrollbars (Page 1791)
ShowTitle (Page 1795)
ShowTrendIcon (Page 1796)
StatusbarBackColor (Page 1802)
StatusbarElementAdd (Page 1803)
StatusbarElementAutoSize (Page 1803)
StatusbarElementCount (Page 1804)
StatusbarElementIconId (Page 1805)
StatusbarElementID (Page 1805)

WinCC Professional V13 SP2 – Programming reference


1378 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

StatusbarElementIndex (Page 1806)


StatusbarElementName (Page 1807)
StatusbarElementRemove (Page 1807)
StatusbarElementRename (Page 1808)
StatusbarElements (Page 1808)
StatusbarElementTooltipText (Page 1809)
StatusbarElementUserDefined (Page 1809)
StatusbarElementVisible (Page 1810)
StatusbarElementWidth (Page 1810)
StatusbarFontColor (Page 1811)
StatusbarShowTooltips (Page 1812)
StatusbarText (Page 1812)
StatusbarUseBackColor (Page 1813)
StatusbarVisible (Page 1814)
XAxisAdd (Page 1951)
XAxisAutoPrecisions (Page 1952)
XAxisAutoRange(i) (Page 1952)
XAxisBeginValue (Page 1953)
XAxisColor (Page 1953)
XAxisCount (Page 1954)
XAxisEndValue (Page 1954)
XAxisExponentialFormat (Page 1955)
XAxisIndex (Page 1955)
XAxisInTrendColor (Page 1956)
XAxisName (Page 1957)
XAxisPrecisions (Page 1957)
XAxisRemove (Page 1957)
XAxisRepos (Page 1958)
XAxisTrendWindow (Page 1959)
XAxisVisible (Page 1959)
YAxisAdd (Page 1960)
YAxisAutoPrecisions (Page 1961)
YAxisAutoRange (Page 1961)
YAxisBeginValue (Page 1962)
YAxisColor (Page 1962)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1379
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

YAxisCount (Page 1963)


YAxisEndValue (Page 1963)
YAxisExponentialFormat (Page 1963)
YAxisIndex (Page 1964)
YAxisInTrendColor (Page 1964)
YAxisLabel (Page 1965)
YAxisName (Page 1965)
YAxisPrecisions (Page 1966)
YAxisRemove (Page 1966)
YAxisRepos (Page 1967)
YAxisScalingType (Page 1968)
YAxisTrendWindow (Page 1968)
YAxisVisible (Page 1969)
ControlDesignMode (Page 1798)
RTPersistencePasswordLevel (Page 2007)

Gauge (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Gauge" object. The Gauge object is an element of the ScreenItems list.

WinCC Professional V13 SP2 – Programming reference


1380 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Type identifier in VBS


HMIGauge

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-39 Properties

Properties Read Write Description


AngleMax (Page 1533) P, A P, A Specifies the angle for the scale end of the "Gauge" object.
AngleMin (Page 1534) P, A P, A Specifies the angle for the scale start of the "Gauge" object.
BackColor (Page 1543) P, A P, A Specifies the background color of the selected object.
BackFillStyle (Page 1546) P P Defines the fill pattern of the specified object.
BackPicture - - Specifies a graphic for the background.
BorderInnerStyle3D (Page 1567) P P Specifies the representation of the inner part of the object border.
BorderOuterStyle3D P P Specifies the representation of the outer part of the object border.
(Page 1568)
BorderWidth (Page 1571) P P Specifies the line thickness of the object.
BorderWidth3D (Page 1573) P P Specifies the width of the border for 3D display of the selected
object.
CaptionColor (Page 1579) P, A P, A Specifies the color of the text that is displayed in the header of
the selected object.
CaptionFont - - Specifies the character set for the caption.
CaptionText (Page 1580) P, A P, A Specifies the text that is displayed in the header of the selected
object.
CaptionTop (Page 1581) P P Specifies the distance of the instrument label from the top edge
of the selected object.
CenterColor (Page 1584) P, A P, A Sets the color for the center point of the "Gauge" object.
CenterSize (Page 1584) P P Sets the diameter of the round scale center point.
DangerRangeColor (Page 1602) P, A P, A Sets the color of the danger range on the scale of the "Gauge"
object.
DangerRangeStart (Page 1603) P, A P, A Specifies the scale value at which the danger range of the
"Gauge" object begins.
DangerRangeVisible P, A P, A Specifies whether the danger range is displayed in the scale of
(Page 1603) the "Gauge" object. {
DialColor (Page 1605) P, A P, A Specifies the color of the dial in the selected object.
DialFillStyle (Page 1606) P P Specifies the type of background for the selected object.
DialPicture - - Specifies a graphic for the dial.
DialSize (Page 1607) P P Specifies the diameter of the scale disc based on the smaller
value of the "Width" and "Height" geometry attributes.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1381
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Enabled (Page 1614) P P Specifies whether the selected object can be operated in run‐
time.
Flashing * - - Specifies that the text block flashes.
Gradation (Page 1646) P, A P, A Specifies the value difference between two main tick marks of
the "Gauge" object.
Height (Page 1649) P, A P, A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P, A P, A Specifies the value of the X coordinate of the object.
LockSquaredExtent (Page 1693) P P Specifies whether the tag values are downloaded from the logs
for the time range to be displayed when you call a screen.
MaximumValue (Page 1697) P, A P, A Specifies the maximum value of the scale in the selected object.
MinimumValue (Page 1713) P, A P, A Specifies the minimum value of the scale in the selected object.
Name (Page 1717) P, A - Returns the object name as STRING.
NormalRangeColor (Page 1721) P, A P, A Specifies the color of the normal range on the scale of the
"Gauge" object. "
NormalRangeVisible P, A P, A Specifies whether the normal range in the scale of the "Gauge"
(Page 1722) object will be displayed.
PointerColor (Page 1745) P, A P, A Specifies the pointer color of the "Gauge" object.
ProcessValue (Page 1747) P, A P, A Specifies the default for the value to be displayed.
ScaleLabelColor (Page 1761) P, A P, A Specifies the color of the label for the scale tick marks of the
"Gauge" object.
ScaleLabelFont - - Specifies the font of the scale label.
ScaleTickColor (Page 1762) P, A P, A Specifies the color of the scale tick marks of the "Gauge" object.
ScaleTickLabelPosition P P Specifies the diameter of the imaginary circle on which the scale
(Page 1763) tick label is location.
ScaleTickLength (Page 1763) P P Specifies the length of the main scale ticks.
ScaleTickPosition (Page 1764) P P Specifies the diameter of the assumed circle on which the scale
divisions are located.
ShowDecimalPoint (Page 1785) P P Specifies whether the scale is labeled with decimal figures (dec‐
imal point and one decimal place) or with whole integers.
ShowPeakValuePointer P, A P, A Specifies whether a slave pointer will be used for the selected
(Page 1788) object.
Top (Page 1873) P, A P, A Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
UnitColor (Page 1914) P, A P, A Specifies the text color for the label of the measurement unit in
the "Gauge" object.
UnitFont - - Specifies the font for the unit.
UnitText (Page 1914) P, A P, A Specifies the text for the measurement unit of the selected object.
UnitTop (Page 1915) P P Specifies the distance of the measurement unit from the upper
edge of the selected object.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined
(Page 1918) in the active design.
Visible (Page 1936) P, A P, A Specifies whether the selected object is visible.

WinCC Professional V13 SP2 – Programming reference


1382 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


WarningRangeColor P, A P, A Specifies the color of the warning range on the scale of the
(Page 1942) "Gauge" object.
WarningRangeStart (Page 1942) P, A P, A Specifies the scale value from which the warning range of the
"Gauge" object begins.
WarningRangeVisible P, A P, A Specifies whether the warning range is displayed in the scale of
(Page 1943) the "Gauge" object.
Width (Page 1946) P, A P, A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

* not visible in the ES

Table 3-40 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

GraphicIOField (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Graphic I/O field" object. The GraphicIOField object is an element of the
ScreenItems list.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1383
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

The availability of the following object properties depends on the selected mode:

Property "Input" "Output" "Input/Output" "Two states"


BorderColor -- -- -- x
BorderStyle3D x x x --
Enabled x -- x --
FocusColor x -- x --
FocusWidth x -- x --
HelpText x -- x --
TransparentColor x x x --
UseTransparent‐ x x x --
Color

Type identifier in VBS


HMIGraphicIOField

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-41 Properties

Properties Read Write Description


AboveUpperLimitColor - - Sets the color of the specified object for the "High limit violated"
(Page 1516) event.
AdaptPicture - - Specifies that the size of the object is automatically adjusted in
runtime.
Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
AutoSizing - - Specifies that the size of the object should be automatically
adapted to the content.
BackColor (Page 1543) A A Specifies the background color of the selected object.
BelowLowerLimitColor - - Sets the color of the specified object for the "Low limit violated"
(Page 1555) event.
BitNumber (Page 1555) - - Specifies the bit whose status must change to trigger a value
change.
BorderBackColor (Page 1558) P P Specifies the background color of the broken border line for the
selected object.
BorderColor (Page 1560) P P Specifies the line color of the object.
BorderFlashingColorOff P P Specifies the border line color of the selected object for the flash
(Page 1562) state "Off".
BorderFlashingColorOn P P Specifies the border line color of the selected object for the flash
(Page 1564) state "On".

WinCC Professional V13 SP2 – Programming reference


1384 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


BorderFlashingEnabled P P Specifies whether the border line of the selected object flashes
(Page 1565) in runtime.
BorderFlashingRate (Page 1566) P P Specifies the flash rate of the border line for the selected object.
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
BorderStyle3D A A Specifies whether the object has a 3D border shading.
BorderWidth (Page 1571) P P Specifies the line thickness of the object.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.
DrawInsideFrame (Page 1610) P P Specifies whether the border line of the selected object with a
line thickness greater than 1 should be drawn within the border
or symmetrically to the border.
EdgeStyle (Page 1612) P P Specifies the line style of the selected object.
Enabled (Page 1614) P, A P, A Specifies whether the selected object can be operated in run‐
time.
FitToLargest - - Specifies that the size of the object depends on the text length
in all languages.
Flashing - - Specifies that the text block flashes.
FlashingEnabled (Page 1634) P P Specifies whether the border line of the selected object flashes
in runtime.
FlashingOnLimitViolation - - Specifies that flashing is activated when a limit is violated.
FlashingRate (Page 1635) P P Specifies the flash rate of the border line for the selected object.
FlashTransparentColor P P Specifies the color of the bitmap object of a flashing graphic that
(Page 1636) is set to "transparent".
FocusColor (Page 1637) A A Specifies the color for the focus frame of the selected object when
it is in focus.
FocusWidth (Page 1638) A A Specifies the border width of the specified object when the object
is in focus.
Height (Page 1649) P, A P, A Sets the height of the specified "Ellipsis", "Circle" and "Rectan‐
gle" objects.
HelpText A - Returns the tooltip that is shown in runtime as user help for the
specified object.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P, A P, A Specifies the value of the X coordinate of the object.
LineEndShapeStyle (Page 1690) P P Specifies the shape of the line ends.
Mode (Page 1715) - - Specifies the field type of the selected object.
Name (Page 1717) P, A - Returns the object name as STRING.
OnValue - - Specifies the value for the "ON" state in "two-state" mode.
PictureList - - Specifies the graphic list that supplies the object with values.
PictureOff (Page 1743) - - Specifies the screen to be displayed in the "Off" state.
PictureOn (Page 1744) - - Specifies the screen to be displayed in the "On" state.
ProcessValue (Page 1747) P P Specifies the default for the value to be displayed.
ScrollBarOrientation - - Specifies the orientation of the scroll bar.
ShowScrollBar - - Specifies the scroll bar type.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P, A P, A Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1385
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


TransparentColor (Page 1878) P, A P, A Specifies which color of the allocated graphic (*.bmp, *dib) of the
specified object is set to "transparent".
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading de‐
(Page 1918) fined in the active design.
UseFlashTransparentColor P P Specifies whether the color of the bitmap object of a flashing
(Page 1920) graphic is set to "transparent".
UseTransparentColor P, A P, A Specifies whether the color defined with the property "Transpar‐
(Page 1923) entColor" is shown as transparent for the selected object.
Visible (Page 1936) P, A P, A Specifies whether the selected object is visible.
Width (Page 1946) P, A P, A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

Table 3-42 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic P Dynamically activates a trigger and the specified cycle for a property at runtime.
(Page 2119)
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WinCC Professional V13 SP2 – Programming reference


1386 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

GraphicView (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Graphic view" object. The GraphicView object is an element of the
ScreenItems list.

Type identifier in VBS


HMIGraphicView

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-43 Properties

Properties Read Write Description


AdaptPicture A - Specifies that the size of the object is automatically adjusted in
runtime.
Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
AutoSizing - - Specifies that the size of the object should be automatically adap‐
ted to the content.
BackColor (Page 1543) P P Specifies the background color of the selected object.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1387
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


BackFillStyle (Page 1546) P P Defines the fill pattern of the specified object.
BackFlashingColorOff P P Specifies the background color for flash state "Off".
(Page 1548)
BackFlashingColorOn P P Specifies the background color for flash state "On".
(Page 1547)
BackFlashingEnabled P P Specifies whether the background of the specified object flashes
(Page 1549) in runtime.
BackFlashingRate (Page 1550) P P Specifies the flash rate of the background for the selected object.
BorderBackColor (Page 1558) P P Specifies the background color of the broken border line for the
selected object.
BorderColor (Page 1560) P P Specifies the line color of the object.
BorderFlashingColorOff P P Specifies the border line color of the selected object for the flash
(Page 1562) state "Off".
BorderFlashingColorOn P P Specifies the border line color of the selected object for the flash
(Page 1564) state "On".
BorderFlashingEnabled P P Specifies whether the border line of the selected object flashes
(Page 1565) in runtime.
BorderFlashingRate (Page 1566) P P Specifies the flash rate of the border line for the selected object.
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
BorderStyle3D A A Specifies whether the object has a 3D border shading.
BorderWidth (Page 1571) P P Specifies the line thickness of the object.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.
DrawInsideFrame (Page 1610) P P Specifies whether the border line of the selected object with a line
thickness greater than 1 should be drawn within the border or
symmetrically to the border.
EdgeStyle (Page 1612) P P Specifies the line style of the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
FillPatternColor (Page 1627) P P Specifies the color of the fill pattern for the selected object.
FitToLargest - - Specifies that the size of the object depends on the text length in
all languages.
Flashing - - Specifies that the text block flashes.
Height (Page 1649) P, A P, A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P, A P, A Specifies the value of the X coordinate of the object.
LineEndShapeStyle (Page 1690) P P Specifies the shape of the line ends.
Name (Page 1717) P, A - Returns the object name as STRING.
Picture (Page 1742) P P Specifies the screen to be displayed in the graphics object in run‐
time.
RelativeFillLevel (Page 1752) P P Specifies the fill percentage for the object.
ShowFillLevel (Page 1786) P P Specifies whether the selected object is filled.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P, A P, A Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
TransparentColor (Page 1878) P, A P, A Specifies which color of the allocated graphic (*.bmp, *dib) of the
specified object is set to "transparent".

WinCC Professional V13 SP2 – Programming reference


1388 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined
(Page 1918) in the active design.
UseTransparentColor P, A P, A Specifies whether the color defined with the property "Transpar‐
(Page 1923) entColor" is shown as transparent for the selected object.
Visible (Page 1936) P, A P, A Specifies whether the selected object is visible.
Width (Page 1946) P, A P, A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

Table 3-44 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic P Dynamically activates a trigger and the specified cycle for a property at runtime.
(Page 2119)
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

Group (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Group" object. The Group object is an element of the ScreenItems list.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1389
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Type identifier in VBS


HMIGroup

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-45 Properties

Properties Read Write Description


Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
BackColor (Page 1543) P P Specifies the background color of the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
ForeColor (Page 1644) P P Specifies the font color of the text for the selected object.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
Name (Page 1717) - - Returns the object name as STRING.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rectangle" ob‐
jects.

Table 3-46 Methods

Methods Valid Description

WinCC Professional V13 SP2 – Programming reference


1390 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

HTMLBrowser (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the object "HTML Browser". The HTMLBrowser-object is an element of the


ScreenItems-list.

Type identifier in VBS


HMIHTMLBrowser

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-47 Properties

Properties Read Write Description


Address (Page 1525) P, A P, A Defines the Web address which is opened in the HTML browser.
Enabled (Page 1614) P, A P, A Specifies whether the selected object can be operated in runtime.
Flashing * - - Specifies that the text block flashes.
Height (Page 1649) P, A P, A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle" ob‐
jects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1391
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Left (Page 1679) P, A P, A Specifies the value of the X coordinate of the object.
Name (Page 1717) P, A - Returns the object name as STRING.
ShowStatusBar P P Specifies whether the status bar is shown.
(Page 1793)
ShowToolBar (Page 1796) * - - Specifies whether the toolbar is shown.
Top (Page 1873) P, A P, A Specifies the value of the Y coordinate of the object.
Visible (Page 1936) P, A P, A Specifies whether the selected object is visible.
Width (Page 1946) P, A P, A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle" ob‐
jects.

* not visible in the ES

Table 3-48 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.
SetHtml ??

IOField (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

WinCC Professional V13 SP2 – Programming reference


1392 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Represents the "I/O field" object. The IOField object is an element of the ScreenItems list.

Type identifier in VBS


HMIIOField

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-49 Properties

Properties Read Write Description


AboveUpperLimitColor - - Sets the color of the specified object for the "High limit violated"
(Page 1516) event.
AcceptOnExit (Page 1517) P P Specifies whether the input field is confirmed automatically
when it is left.
AcceptOnFull (Page 1517) P P Specifies whether the input field will be left and confirmed au‐
tomatically when the defined number of values has been en‐
tered.
AdaptBorder (Page 1523) P P Specifies whether the border of the specified object is dynami‐
cally adapted to the text size.
AskOperationMotive (Page 1535) P P Specifies whether the reason for operating this object is logged.
Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
BackColor (Page 1543) P, A P, A Specifies the background color of the selected object.
BackFillStyle (Page 1546) P P Defines the fill pattern of the specified object.
BackFlashingColorOff (Page 1547) P P Specifies the background color for flash state "Off".
BackFlashingColorOn (Page 1548) P P Specifies the background color for flash state "On".
BackFlashingEnabled (Page 1549) P P Specifies whether the background of the specified object flash‐
es in runtime.
BackFlashingRate (Page 1550) P P Specifies the flash rate of the background for the selected ob‐
ject.
BelowLowerLimitColor (Page 1555) - - Sets the color of the specified object for the "Low limit violated"
event.
BorderBackColor (Page 1558) P P Specifies the background color of the broken border line for the
selected object.
BorderColor (Page 1560) P, A P, A Specifies the line color of the object.
BorderFlashingColorOff P P Specifies the border line color of the selected object for the flash
(Page 1562) state "Off".
BorderFlashingColorOn P P Specifies the border line color of the selected object for the flash
(Page 1564) state "On".
BorderFlashingEnabled P P Specifies whether the border line of the selected object flashes
(Page 1565) in runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1393
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


BorderFlashingRate (Page 1566) P P Specifies the flash rate of the border line for the selected object.
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
BorderStyle3D A A Specifies whether the object has a 3D border shading.
BorderWidth (Page 1571) P P Specifies the line thickness of the object.
BottomMargin - - Sets the margin between the text and the bottom edge of the
object.
ClearOnError (Page 1586) P P Specifies whether an invalid input in this object is deleted auto‐
matically.
ClearOnFocus (Page 1587) P P Specifies whether the field entry is deleted as soon as the I/O
field is activated.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.
CursorControl (Page 1601) P P Specifies whether the mouse cursor jumps to the next field of
the TAB sequence after leaving a field.
DataFormat (Page 1604) P P Returns the data type of the IOField object.
EdgeStyle (Page 1612) A A Specifies the line style of the selected object.
EditOnFocus (Page 1613) P P Specifies whether data input is immediately possible if the input
field is selected using the "Tab" key.
Enabled (Page 1614) P, A P, A Specifies whether the selected object can be operated in run‐
time.
FieldLength (Page 1626) – - Specifies that the "Field length string" field is read-only.
FillPatternColor (Page 1627) P P Specifies the color of the fill pattern for the selected object.
FitToLargest - - Specifies that the size of the object depends on the text length
in all languages.
Flashing - - Specifies that the text block flashes.
FlashingColorOff (Page 1631) P P Specifies the border line color of the selected object for the flash
state "Off".
FlashingColorOn (Page 1633) P P Specifies the border line color of the selected object for the flash
state "On".
FlashingEnabled (Page 1634) P P Specifies whether the border line of the selected object flashes
in runtime.
FlashingOnLimitViolation - - Specifies that flashing is activated when a limit is violated.
FlashingRate (Page 1635) P P Specifies the flash rate of the border line for the selected object.
Font (Page 1639) - - Specifies or returns the font.
FontBold (Page 1640) P P Specifies whether the text of the selected object is shown in
bold.
FontItalic (Page 1641) P P Specifies whether the text of the selected object is shown in
italics.
FontName (Page 1642) P P Specifies the font of the selected object.
FontSize (Page 1642) P P Specifies the font size of the text for the selected object.
FontUnderline (Page 1643) P P Specifies whether the text of the selected object is underlined.
ForeColor (Page 1644) P, A P, A Specifies the font color of the text for the selected object.
FormatPattern (Page 1645) P P Specifies the format of the output value.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectan‐
gle" objects.
HelpText A - Returns the tooltip that is shown in runtime as user help for the
specified object.

WinCC Professional V13 SP2 – Programming reference


1394 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


HiddenInput (Page 1654) P P Specifies whether the input value or a * for each character is
shown during the input.
HorizontalAlignment (Page 1663) P, A P, A Specifies the horizontal alignment of the text within the selected
object.
InputValue (Page 1668) P P Defines the value entered by the user in the IO field.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the
screen.
Left (Page 1679) P, A P, A Specifies the value of the X coordinate of the object.
LeftMargin - A Sets the margin between the text and the left edge of the object.
LineEndShapeStyle (Page 1690) P P Specifies the shape of the line end.
LogOperation (Page 1694) P P Specifies whether, after operating this object, an alarm is output
to the alarm system.
LowerLimit (Page 1695) P P Specifies the low limit for input values.
Mode (Page 1715) P P Specifies the field type of the selected object.
Name (Page 1717) P, A - Returns the object name as STRING.
ProcessValue (Page 1747) P, A P, A Specifies the default for the value to be displayed.
RightMargin - - Sets the margin between the text and the right edge of the ob‐
ject.
ShiftDecimalPoint (Page 1783) - - Specifies that the "Shift decimal point" field is read-only.
ShowBadTagState (Page 1784) P P Specifies whether an object is grayed out if its associated tag
has a bad quality code or tag state.
ShowLeadingZeros - - Specifies that leading zeros should be displayed.
TextOrientation (Page 1827) P P Specifies the text orientation of the selected object.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P, A P, A Specifies the value of the Y coordinate of the object.
TopMargin - - Sets the margin between the text and the top edge of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the ob‐
ject.
Unit (Page 1913) P P Specifies the unit of measurement in the "IOField" object.
UpperLimit (Page 1915) P P Specifies the high limit for input values.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading de‐
(Page 1918) fined in the active design.
UseTagLimitColors P P Specifies whether the configured colors are used when limits
are violated.
VerticalAlignment (Page 1934) P, A P, A Specifies the vertical alignment of the text for the selected ob‐
ject.
Visible (Page 1936) P, A P, A Specifies whether the selected object is visible.
Width (Page 1946) P, A P, A Sets the width of the specified "Ellipsis", "Circle" and "Rectan‐
gle" objects.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1395
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-50 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at run‐
time.
DeactivateDynamic (Page 2126) P Deactivates the trigger of the "ActivateDynamic" method used for the speci‐
fied property in/during Runtime.

3.5.4.2 Objects K-Z (Panels, Comfort Panels, RT Advanced, RT Professional)

Line (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Line" object. The Line object is an element of the ScreenItems list.

Type identifier in VBS


HMILine

WinCC Professional V13 SP2 – Programming reference


1396 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-51 Properties

Properties Read Write Description


Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
BackColor (Page 1543) P, A P, A Specifies the background color of the selected object.
BorderEndStyle (Page 1562) P, A P, A Specifies the type of line ends for the selected object.
BorderStyle (Page 1570) P, A P, A Specifies the type of line ends for the selected object.
Color (Page 1588) P, A P, A Specifies the line color of the selected object.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
EndLeft - - Specifies the X position of the end point.
EndStyle (Page 1617) P, A P, A Specifies how the line end of the selected object is displayed.
EndTop - - Sets the Y position of the end point.
FillStyle A A Defines the fill pattern of the specified object.
Flashing - - Specifies that the text block flashes.
FlashingColorOff (Page 1631) P P Specifies the border line color of the selected object for the flash state
"Off".
FlashingColorOn (Page 1633) P P Specifies the border line color of the selected object for the flash state
"On".
FlashingEnabled (Page 1634) P P Specifies whether the border line of the selected object flashes in
runtime.
FlashingRate (Page 1635) P P Specifies the flash rate of the border line for the selected object.
Height (Page 1649) P, A P, A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P, A P, A Specifies the value of the X coordinate of the object.
LineEndShapeStyle P P Specifies the shape of the line end.
(Page 1690)
LineWidth (Page 1691) P, A P, A Specifies the line thickness of the selected object.
Name (Page 1717) P, A - Returns the object name as STRING.
RotationAngle (Page 1754) P P Specifies the angle of rotation in degrees.
RotationCenterLeft P P Specifies the X coordinate of the pivot point for the object in runtime.
(Page 1754)
RotationCenterTop P P Specifies the Y coordinate of the pivot point for the object in runtime.
(Page 1755)
StartLeft - - Specifies the X position of the starting point.
StartStyle A A Specifies how the line start of the selected object is displayed.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1397
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


StartTop (Page 1801) - - Specifies the vertical distance in pixels between the start point and
the top edge of the screen.
Style (Page 1814) P, A P, A Specifies the line style of the selected object.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P, A P, A Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined in
(Page 1918) the active design.
Visible (Page 1936) P, A P, A Specifies whether the selected object is visible.
Width (Page 1946) P, A P, A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

Table 3-52 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WinCC Professional V13 SP2 – Programming reference


1398 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Listbox (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Listbox" object. The Listbox object is an element of the ScreenItems list.

Type identifier in VBS


HMIListBox

Application
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

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1399
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-53 Properties

Properties Read Write Description


AskOperationMotive (Page 1535) P P Specifies whether the reason for operating this object is logged.
Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
BackColor (Page 1543) P P Specifies the background color of the selected object.
BackFillStyle (Page 1546) P P Defines the fill pattern of the specified object.
BorderBackColor (Page 1558) P P Specifies the background color of the broken border line for the
selected object.
BorderColor (Page 1560) P P Specifies the line color of the object.
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
BorderWidth (Page 1571) P P Specifies the line thickness of the object.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.
CountVisibleItems (Page 1600) P P Specifies the number of lines contained in the selection list.
EdgeStyle (Page 1612) - - Specifies the line style of the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in run‐
time.
FillPatternColor (Page 1627) P P Specifies the color of the fill pattern for the selected object.
FitToLargest - - Specifies that the size of the object depends on the text length
in all languages.
Font (Page 1639) - - Specifies or returns the font.
FontBold (Page 1640) P P Specifies whether the text of the selected object is shown in
bold.
FontItalic (Page 1641) P P Specifies whether the text of the selected object is shown in
italics.
FontName (Page 1642) P P Specifies the font of the selected object.
FontSize (Page 1642) P P Specifies the font size of the text for the selected object.
FontUnderline (Page 1643) P P Specifies whether the text of the selected object is underlined.
ForeColor (Page 1644) P P Specifies the font color of the text for the selected object.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectan‐
gle" objects.
HorizontalAlignment (Page 1663) P P Specifies the horizontal alignment of the text within the selected
object.
Index (Page 1666) P P Specifies the background for grid control elements.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the
screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineEndShapeStyle (Page 1690) P P Specifies the shape of the line end.
LogOperation (Page 1694) P P Specifies whether, after operating this object, an alarm is output
to the alarm system.
Name (Page 1717) P - Returns the object name as STRING.
SelectedIndex (Page 1771) P P Specifies and returns the index whose associated text is high‐
lighted in the combo or list box.
SelectedText (Page 1769) P P Displays the text that is defined with the "Selected field" (SelIn‐
dex) attribute and highlighted in the combo box or list box.

WinCC Professional V13 SP2 – Programming reference


1400 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Text (Page 1824) P P Specifies the label for the text field.
Texts - - Specifies the texts for the check boxes.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the ob‐
ject.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading de‐
(Page 1918) fined in the active design.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rectan‐
gle" objects.

Table 3-54 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1401
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

MediaPlayer (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Media Player" object. The MediaControl object is an element of the
ScreenItems list.

Type Identifier in VBS


HMIMediaControl

Application
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

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

WinCC Professional V13 SP2 – Programming reference


1402 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-55 Properties

Properties Read Write Description


AspectRatio P P Specifies whether the aspect ratio is maintained when the size is
changed.
AutoStart P P Specifies that the Media Player should start automatically.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
FileName P, A P, A Specifies the name of the file to be loaded.
Height (Page 1649) P, A P, A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P, A P, A Specifies the value of the X coordinate of the object.
Name (Page 1717) P, A - Returns the object name as STRING.
PictureSizeMode P P Specifies that the status bar is displayed.
PlayCount A A Plays the files several times.
PlayEndless P P Specifies that the media file should play endlessly.
PopupMenuEnabled P P Specifies that the shortcut menu can be used.
ShowControls P, A P, A Specifies that a toolbar is displayed.
ShowFeatureBackward P P Specifies that the "Backward" button is displayed in runtime.
ShowFeatureForward P P Specifies that the "Forward" button is displayed in runtime.
ShowFeatureFullScreen P P Specifies that the Media Player can be displayed as a full screen.
ShowFeaturePause P P Specifies that the Media Player can be displayed as a full screen
ShowFeaturePlay P P Specifies that the "Play" button is displayed in runtime.
ShowFeatureStop P P Specifies that the "Stop" button is displayed in runtime.
ShowFeatureVolume P P Sets the volume.
ShowStatusBar (Page 1793) A A Specifies whether the status bar is shown.
ShowTracker A A Specifies that the tracker is displayed.
StepSeconds P P Specifies a time in seconds that is to be skipped when the "For‐
ward" or "Backward" button is pressed.
Top (Page 1873) P, A P, A Specifies the value of the Y coordinate of the object.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P, A P, A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1403
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-56 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic P Dynamically activates a trigger and the specified cycle for a property at run‐
(Page 2119) time.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the speci‐
(Page 2126) fied property in/during Runtime.

MultiLineEdit (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "MultiLine text" object. The MultiLineEdit object is an element of the
ScreenItems list.

Type identifier in VBS


HMIMultiLineEdit

WinCC Professional V13 SP2 – Programming reference


1404 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Application
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

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-57 Properties

Properties Read Write Description


Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
BackColor (Page 1543) P P, A Specifies the background color of the selected object.
BorderBackColor (Page 1558) P P Specifies the background color of the broken border line for the
selected object.
BorderColor (Page 1560) P P Specifies the background color of the selected object.
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
BorderWidth (Page 1571) P P Specifies the line thickness of the object.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.
EdgeStyle (Page 1612) - - Specifies the line style of the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
Font (Page 1639) - - Specifies or returns the font.
FontBold (Page 1640) P P Specifies whether the text of the selected object is shown in bold.
FontItalic (Page 1641) P P Specifies whether the text of the selected object is shown in italics.
FontName (Page 1642) P P Specifies the font of the selected object.
FontSize (Page 1642) P P Specifies the font size of the text for the selected object.
FontUnderline (Page 1643) P P Specifies whether the text of the selected object is underlined.
ForeColor (Page 1644) P P Specifies the font color of the text for the selected object.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
HorizontalAlignment P P Specifies the horizontal alignment of the text within the selected
(Page 1663) object.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineEndShapeStyle P P Specifies the shape of the line end.
(Page 1690)
Name (Page 1717) P - Returns the object name as STRING.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1405
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Text (Page 1824) P P Specifies the label for the text field.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined
(Page 1918) in the active design.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

Table 3-58 Methods

Methods Validity Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.
GetSelectionText ??
SetSelection ??
SetSelectionText ??

WinCC Professional V13 SP2 – Programming reference


1406 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

OLEView (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "OLE object" object. The OLEView object is an element of the ScreenItems
list.

Type identifier in VBS


Version-independent ProgID

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-59 Properties

Properties Read Write Description

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1407
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description

Table 3-60 Methods

Methods Can be dynamized Validity Description

WinCC Professional V13 SP2 – Programming reference


1408 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

OnlineTableControl (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Table view" object. The OnlineTableControl object is an element of the
ScreenItems list.

Type identifier in VBS


HMIOnlineTableControl

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-61 Properties

Properties Read Write Description


ApplyProjectSettingsForDesignMode - - Specifies that the project settings are used for the design.
(Page 1535)
AutoCompleteColumns (Page 1538) P P Specifies whether empty columns are shown if the control is
wider than the configured columns.
AutoCompleteRows (Page 1539) P P Specifies whether empty rows are shown if the control is lon‐
ger than the number of configured rows.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1409
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


AutoSelectionColors (Page 1540) P P Specifies whether the colors defined by the system are used
as the selection colors for cells and rows.
AutoSelectionRectColor (Page 1540) P P Specifies whether the selection frame is shown with the color
defined by the system.
BackColor (Page 1543) P P Specifies the background color of the selected object.
BorderColor (Page 1560) P P Specifies the line color of the object.
BorderWidth (Page 1571) P P Specifies the line thickness of the object.
Caption (Page 1578) P P Specifies the text that is displayed in the header of the se‐
lected object.
CellCut (Page 1581) P P Specifies whether the contents of the cells are abbreviated
if the cells are too narrow.
CellSpaceBottom (Page 1582) P P Specifies the bottom margin of the table cells.
CellSpaceLeft (Page 1582) P P Sets the left indent for the table cells.
CellSpaceRight (Page 1583) P P Specifies the right indent of the table cells.
CellSpaceTop (Page 1583) P P Specifies the top margin of the table cells.
Closeable (Page 1587) P P Specifies that the control can be closed in runtime.
ColumnResize (Page 1590) P P Enables changes to the width of columns.
ColumnScrollbar (Page 1591) P P Specifies the scroll bar type.
ColumnTitleAlignment P P Specifies the type of column title alignment.
ColumnTitles (Page 1595) P P Specifies whether the column header is displayed.
ControlDesignMode (Page 1798) P P Specifies the design.
EnableEdit (Page 1616) P P Specifies whether the data shown can be edited in Runtime.
ExportDirectoryChangeable P P Specifies whether the data export directory can be changed
(Page 1620) in runtime.
ExportDirectoryname (Page 1620) P P Specifies the target directory for the exported Runtime data.
ExportFileExtension (Page 1621) P P Specifies the file extension of the export file. Only the "csv"
file extension is currently supported.
ExportFilename (Page 1621) P P Specifies the name of the target file for the exported Runtime
data.
ExportFilenameChangeable P P Specifies whether the export file name can be changed in
(Page 1622) runtime.
ExportFormatGuid (Page 1622) P P Default assignment of the ID number and export provider.
ExportFormatName (Page 1623) P P Specifies the export file format. Only the "csv" file format is
currently available for the export.
ExportParameters (Page 1624) P P Specifies the parameters of the selected format by means of
the "Properties" dialog.
ExportSelection (Page 1624) P P Specifies the file extension of the export file. Only the "csv"
file extension is currently supported.
ExportShowDialog (Page 1625) P P Specifies whether the data export dialog is shown in runtime.
Font (Page 1639) - - Specifies or returns the font.
GridLineColor (Page 1647) P P Specifies the color for the grid lines.
GridLineWidth (Page 1648) P P Specifies the width of the separation lines in pixels.
Height (Page 1649) P - Sets the height of the specified "Ellipse", "Circle" and "Rec‐
tangle" objects.
HorizontalGridLines (Page 1664) P P Specifies whether horizontal separation lines are displayed.

WinCC Professional V13 SP2 – Programming reference


1410 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


IconSpace (Page 1666) P P Specifies the spacing between icons and text in the table
cells.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the
screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineColor (Page 1689) P P Sets the color of the window separation lines.
LineWidth (Page 1691) P P Specifies the line thickness of the selected object.
LoadDataImmediately (Page 1692) P P Specifies whether the tag values are downloaded from the
logs for the time range to be displayed when you call a
screen.
Moveable (Page 1716) P P Specifies whether the window can be moved in runtime.
Name (Page 1717) P - Returns the object name as STRING.
Online (Page 1725) P P Specifies the name of the data source.
PrintJob P P Specifies a print job
RowScrollbar (Page 1756) P P Specifies whether row scroll bars are displayed.
RowTitleAlignment P P Specifies the type of row title alignment.
RowTitles P P Specifies that row headers will be displayed.
RTPersistence (Page 1757) P P Specifies how online configurations of WinCC are retained.
RTPersistencePasswordLevel P P Specifies the authorization required for online configuration
(Page 2007) in runtime.
RTPersistenceType (Page 1758) - - Specifies how online configurations of WinCC are retained.
SelectedCellColor (Page 1769) P P Specifies the background color of the selected cell.
SelectedCellForeColor (Page 1770) P P Specifies the font color of the selected cell.
SelectedRowColor (Page 1771) P P Specifies the background color of the selected row.
SelectedRowForeColor (Page 1772) P P Specifies the font color of the selected row.
SelectedTitleColor (Page 1773) P P Specifies the background color of a selected table header.
SelectedTitleForeColor (Page 1773) P P Specifies the font color of the selected table header.
SelectionColoring (Page 1776) P P Specifies whether selection colors are used for cells or rows.
SelectionRect (Page 1777) P P Specifies whether a selection frame is used for the selected
cells or rows.
SelectionRectColor (Page 1777) P P Specifies the color of the selection rectangle in the alarm
window if SelectionType equals "1".
SelectionRectWidth (Page 1778) P P Specifies the line width of the selection rectangle in the alarm
window if SelectionType equals "1".
SelectionType (Page 1779) P P Specifies the number of lines you can mark.
ShowSortButton (Page 1791) P P Specifies whether the sorting button is shown above the ver‐
tical scroll bar.
ShowSortIcon (Page 1792) P P Specifies whether the sorting icon is displayed.
ShowSortIndex (Page 1792) P P Specifies whether the sorting icon is displayed.
ShowTitle (Page 1795) P P Specifies the layout of the control window's header.
Sizeable (Page 1797) P P Specifies that the size of an object can be changed in run‐
time.
SortSequence (Page 1799) P P Specifies how the sorting order can be changed by mouse
click.
StatusbarBackColor (Page 1802) P P Specifies the background color of the status bar.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1411
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


StatusbarElementAdd (Page 1803) * P P Creates a new, user-defined status bar element.
StatusbarElementAutoSize (Page 1803) P P Specifies whether the width of the selected status bar ele‐
* ment is set automatically.
StatusbarElementCount (Page 1804) * P P Specifies the number of configurable status bar elements.
StatusbarElementIconId (Page 1805) * P P Default assignment of the ID number and icon of a status bar
element.
StatusbarElementId (Page 1805) * P P Unique ID of the selected status bar element.
StatusbarElementIndex (Page 1806) P P References a status bar element. You can use this property
to assign the values of other properties to a specific element
of the status bar.
StatusbarElementName (Page 1807) * P P Displays the object name of the selected status bar element.
StatusbarElementRemove (Page 1807) P P Removes the selected status bar element.
*
StatusbarElementRename (Page 1808) P P Renames the user-defined status bar element that is refer‐
* enced by means of the "StatusbarElementIndex" property.
StatusbarElementRepos * P P Specifies the index that is assigned to the element.
StatusbarElements (Page 1808) - - Specifies the elements that are to be shown in the status bar.
StatusbarElementText * P P Specifies the text of the currently selected status bar ele‐
ment.
StatusbarElementTooltipText P P Specifies the tooltip text for the user-defined status bar ele‐
(Page 1809) * ment.
StatusbarElementUserDefined P P Indicates whether the configuration engineer has added the
(Page 1809) * status bar element as a new user-defined element.
StatusbarElementVisible (Page 1810) * P P In the list, activate the status bar elements that you wish to
display in runtime.
StatusbarElementWidth (Page 1810) * P P Specifies the width of the selected status bar element in pix‐
els.
StatusbarFont - - Status bar font
StatusbarFontColor (Page 1811) P P Specifies the color of the text in the status bar.
StatusbarShowTooltips (Page 1812) P P Specifies whether tooltips are displayed for the elements of
the status bar in runtime.
StatusbarText (Page 1812) P P Default text in the status bar.
StatusbarUseBackColor (Page 1813) P P Specifies whether the background color of the status bar is
shown.
StatusbarVisible (Page 1814) P P Specifies whether the status bar of the control is displayed.
TableColor (Page 1817) P P Specifies the background color of the rows. Use this to open
the color selection dialog.
TableColor2 (Page 1817) P P Specifies the background color of "Row color 2".
TableForeColor (Page 1818) P P
TableForeColor2 (Page 1819) P P Specifies the font color of "Row color 2".
TimeBase (Page 1831) P P Sets the time zone that forms the basis for the display of time
values.
TimeColumnActualize (Page 1832) * P P Specifies whether the values of the selected column are up‐
dated.
TimeColumnAdd (Page 1833) * P P Creates a new time column.
TimeColumnAlign (Page 1833) * P P Specifies how the selected time column is aligned.

WinCC Professional V13 SP2 – Programming reference


1412 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


TimeColumnBackColor (Page 1834) * P P Specifies the background color of the time column selected.
TimeColumnBeginTime (Page 1835) * P P Specifies the starting time of the time range for a selected
time column.
TimeColumnCaption (Page 1835) * P P Specifies the label of the time column.
TimeColumnCount (Page 1836) * P P Specifies the number of configured time columns.
TimeColumnDateFormat (Page 1836) * P P Specifies which date format is used to display the selected
time column.
TimeColumnEndTime (Page 1837) * P P Specifies the end point of the time range for the selected time
column.
TimeColumnForeColor (Page 1837) * P P Specifies the font color of the time column selected.
TimeColumnHideText (Page 1838) * P P Sets text format for displaying the content of a time column.
TimeColumnHideTitleText (Page 1838) P P Sets text format for displaying the time column header.
*
TimeColumnIndex (Page 1839) P P References a configured time column.
TimeColumnLength (Page 1839) * P P Specifies the width of a selected time column.
TimeColumnMeasurePoints P P Specifies the number of measuring points to be displayed in
(Page 1839) * the selected time column.
TimeColumnName (Page 1840) * P P Specifies the name of the selected time column.
TimeColumnRangeType (Page 1840) * P P Specifies the time range used for the selected time column.
TimeColumnRemove (Page 1841) * P P Removes the selected time column from the list.
TimeColumnRename (Page 1841) * P P Renames the time column that is referenced by means of the
"TimeColumnIndex" property.
TimeColumnRepos (Page 1842) * P P Changes the sorting order of the time columns, including the
corresponding value columns.
TimeColumnShowDate (Page 1842) * P P Specifies whether the selected time column is displayed with
date and time.
TimeColumnShowIcon (Page 1843) * P P Specifies whether the contents of the time column are shown
as an icon.
TimeColumnShowTitleIcon (Page 1843) P P Specifies whether the values of the selected column are up‐
* dated.
TimeColumnSort (Page 1844) * P P Specifies how the time column referenced in "TimeColum‐
nIndex" is sorted.
TimeColumnSortIndex (Page 1844) * P P Specifies the sorting order of the time column referenced in
"TimeColumnIndex".
TimeColumnTimeFormat (Page 1845) * P P Defines the time format used to display a selected time col‐
umn.
TimeColumnTimeRangeBase P P Specifies the unit of time for calculating the time range.
(Page 1845) *
TimeColumnTimeRangeFactor P P Specifies the factor for calculating the time range.
(Page 1846) *
TimeColumnUseValueColumnColors P P Specifiess whether the selected time column is displayed in
(Page 1846) * the value column colors.
TimeColumnVisible (Page 1847) * P P The list shows the time columns you have created.
TimeStepBase P P A time range is set via a base and a factor.
TimeStepFactor P P A time range is set via a base and a factor.
TitleColor P P Specifies the color of the header.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1413
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


TitleCut (Page 1848) P P Specifies whether the contents of the fields of a header
should be abbreviated if the column is too narrow.
TitleDarkShadowColor (Page 1849) P P Specifies the color of the dark side of shading.
TitleForeColor (Page 1850) P P Specifies the font color of the table header for the selected
status.
TitleGridLineColor (Page 1850) P P Specifies the color of separation lines in the table header.
TitleLightShadowColor (Page 1851) P P Specifies the color of the bright side of shading.
TitleSort (Page 1852) P P Specifies how sorting by column header is triggered.
TitleStyle (Page 1852) P P Specifies whether a shading color is used for the table head‐
er.
ToolbarAlignment (Page 1859) P P Specifies or returns the position of the toolbar.
ToolbarBackColor (Page 1859) P P Specifies the background color of the toolbar.
ToolbarButtonActive (Page 1860) * P P Specifies whether the function linked to the button is activa‐
ted in runtime.
ToolbarButtonAdd (Page 1861) * P P Creates a new, user-defined button function.
ToolbarButtonBeginGroup (Page 1861) P P Specifies whether a separator is inserted before the selected
* button function.
ToolbarButtonClick P P Clicks a toolbar button.
ToolbarButtonCount (Page 1862) * P P Specifies the number of configurable button functions.
ToolbarButtonEnabled (Page 1863) * P P Specifies whether a user-defined toolbar button can be op‐
erated.
ToolbarButtonHotKey (Page 1863) * P P Shows the hotkey for the selected button function.
ToolbarButtonId (Page 1864) * P P Unique ID number for the selected button function.
ToolbarButtonIndex (Page 1864) P P References a button function.
ToolbarButtonLocked (Page 1865) * P P Specifies whether the clicked, pressed in state is displayed
for a user-defined toolbar button.
ToolbarButtonName (Page 1866) * P P Shows the name of the selected button function.
ToolbarButtonPasswordLevel P P Shows the authorization for the selected button function.
(Page 1866) *
ToolbarButtonRemove (Page 1867) * P P Removes the selected button function from the list.
ToolbarButtonRename (Page 1867) * P P Renames the user-defined toolbar element that is referenced
by means of the "ToolbarButtonIndex" property.
ToolbarButtonRepos (Page 1868) * P P Changes the sequence of button functions.
ToolbarButtons - - Specifies which buttons are available for the toolbar.
ToolbarButtonTooltipText (Page 1868) * P P Specifies the tooltip text for the button.
ToolbarButtonUserDefined (Page 1869) P P Indicates whether the configuration engineer has added the
* toolbar button as a new user-defined button.
ToolbarButtonVisible * P P Specifies that the button is visible.
ToolbarShowTooltips (Page 1870) P P Specifies whether the tooltips for the button functions are
displayed in runtime.
ToolbarUseBackColor (Page 1870) P P Specifies whether the background color for the toolbar is
shown.
ToolbarUseHotKeys (Page 1871) P P Specifies whether the hotkeys for the button functions are
activated in runtime.
ToolbarVisible (Page 1871) P P Specifies whether the toolbar of the control is displayed.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.

WinCC Professional V13 SP2 – Programming reference


1414 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


UseColumnBackColor P P Specifies whether scrolling is enabled.
UseColumnForeColor P P Specifies the font used for printing.
UseSelectedTitleColor (Page 1921) P P Specifies whether a selection color is used for the headers
of selected table cells.
UseTableColor2 (Page 1922) P P Specifies whether a second row color is used for the repre‐
sentation of the table.
ValueColumnAdd * P P Adds a value column.
ValueColumnAlign * P P Specifies the alignment of a column.
ValueColumnAutoPrecisions * P P Specifies whether the number of decimal places to be dis‐
played is determined automatically.
ValueColumnBackColor * P P Specifies the background color.
ValueColumnCaption * P P Specifies a header.
ValueColumnCount * P P Displays the number of value columns.
ValueColumnExponentialFormat * P P Specifies that exponential notation is used in a column.
ValueColumnForeColor * P P Specifies the foreground color for a value column.
ValueColumnHideText * P P Specifies whether the text is displayed.
ValueColumnHideTitleText * P P Specifies whether the text is displayed.
ValueColumnIndex P P The index specifies on which column other properties, e.g.
initial value are based.
ValueColumnLength * P P Specifies the number of displayed characters.
ValueColumnName * P P Specifies the name of a column.
ValueColumnPrecisions * P P Specifies the number of decimal places.
ValueColumnProvider * P P
ValueColumnProviderCLSID * P P Specifies the provider CLSID of the data for a column.
ValueColumnRemove * P P Deletes a value column.
ValueColumnRename * P P Renames a value column.
ValueColumnRepos * P P Specifies that a value column is repositioned.
ValueColumnSelectTagName * P P Specifies a tag.
ValueColumnShowIcon * P P Specifies whether an icon is shown.
ValueColumnShowTitleIcon * P P Specifies whether an icon is shown in the title.
ValueColumnSort * P P Specifies the sorting type of a column.
ValueColumnSortIndex * P P Specifies the sorting order.
ValueColumnTagName * P P Specifies the names of the tags whose values are displayed
in a column.
ValueColumnTimeColumn * P P Specifies the corresponding time column.
ValueColumnVisible * P P Specifies the visibility of a value column.
VerticalGridLines (Page 1935) P P Specifies whether vertical separation lines are displayed.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P - Sets the width of the specified "Ellipse", "Circle" and "Rec‐
tangle" objects.

* not visible in the ES

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1415
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-62 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at run‐
time.
AttachDB (Page 2123) P Executes the "Connect backup" button function of the control.
CalculateStatistic (Page 2123) P Executes the "Calculate statistics" button function of the f(t) trend view and
table view.
CopyRows (Page 2124) P Executes the "Copy rows" button function of the control.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the speci‐
(Page 2126) fied property in/during Runtime.
DetachDB (Page 2128) P, A Executes the "Disconnect backup" button function of the control.
Edit (Page 2129) P Executes the "Edit" button function of the table view.
Export (Page 2129) P, A Executes the "Export log" or "Export data" button function of the control.
GetRow (Page 2141) P Returns the row object defined by its row number in the table-based controls
as "ICCAxDataRow" type.
GetRowCollection (Page 2142) P Returns the list of all row objects of the table-based controls as "ICCAxDa‐
taRowCollection" type.
GetSelectedRow (Page 2149) P Returns the selected row object of a table-based control as "ICCAxDataRow"
type.
GetSelectedRows (Page 2150) P Returns the selected row objects of a table-based control as type "ICCAxDa‐
taRow" for multiple selection.
GetStatusbarElement P, A Returns the element of the control's status bar designated by name or index
(Page 2156) as "ICCAxStatusbarElement" type.
GetStatusbarElementCollection P, A Returns the list of all status bar elements of the control as "ICCAxCollection"
(Page 2157) type.
GetTimeColumn (Page 2162) P Returns the time column object of the table view designated by name or index
as "ICCAxTime Column" type.
GetTimeColumnCollection P Returns the list of all time column objects of the table view as "ICCAxCollec‐
(Page 2163) tion" type.
GetToolbarButton (Page 2164) P, A Returns the button function designated by name or index on the control toolbar
as "ICCAxToolbarButton" type.
GetToolbarButtonCollection P, A Returns the list of all button functions of the control toolbar as "ICCAxCollec‐
(Page 2165) tion" type.
GetValueColumn (Page 2174) P Returns the value column object of the f(t) trend view designated by name or
index as "ICCAxValueColumn" type.
GetValueColumnCollection P Returns the list of all value column objects of the f(t) trend view as "ICCAx‐
(Page 2175) Collection" type.
MoveToFirst (Page 2185) P Executes the "First line" button function of the control.
MoveToLast (Page 2187) P Executes the "Last data record" button function of the control.
MoveToNext (Page 2188) P Executes the "Next data record" button function of the control.
MoveToPrevious (Page 2190) P Executes the "Previous data record" button function of the control.
NextColumn (Page 2191) P Executes the "Next column" button function of the table view.
PreviousColumn (Page 2193) P Executes the "Previous column" button function of the table view.
Print (Page 2194) P, A Executes the "Print" button function of the control.
SelectAll (Page 2209) P Selects all rows in a table-based control.
SelectRow (Page 2210) P Selects a specific row in a table-based control.

WinCC Professional V13 SP2 – Programming reference


1416 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Methods Valid Description


SelectStatisticArea (Page 2209) P Executes the "Set statistics range" button function of the table view.
ShowColumnSelection P Executes the "Select columns" button function of the table view.
(Page 2212)
ShowHelp (Page 2214) P, A Executes the "Help" button function of the control.
ShowPropertyDialog P, A Executes the "Configuration dialog" button function of the control.
(Page 2218)
ShowTagSelection (Page 2222) P, A Executes the "Select data connection" button function of the control.
ShowTimeSelection P, A Executes the "Select time range" button function of the control.
(Page 2223)
StartStopUpdate (Page 2224) P, A Executes the "Start" or "Stop" button function of the control.
UnselectAll (Page 2227) P Removes all selections from the cells of a table-based control.
UnselectRow (Page 2227) P Removes the selections from a specific cell of a table-based control.

OnlineTrendControl (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "f(t) TrendView" object. The OnlineTrendControl object is an element of the
ScreenItems list.

Type identifier in VBS


HMIOnlineTrendControl

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1417
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-63 Properties

Properties Read Write Description


ApplyProjectSettingsForDesignMode - - Specifies that the project settings are used for the design.
(Page 1535)
BackColor (Page 1543) P P Specifies the background color of the selected object.
BorderColor (Page 1560) P P Specifies the line color of the object.
BorderWidth (Page 1571) P P Specifies the line thickness of the object.
Caption (Page 1578) P P Specifies the text that is displayed in the header of the selec‐
ted object.
Closeable (Page 1587) P P Specifies that the control can be closed in runtime.
ConnectTrendWindows (Page 1596) P P Specifies whether the configured trend views are connected.
ControlDesignMode (Page 1798) P P Specifies the design.
ExportDirectoryChangeable P P Specifies whether the data export directory can be changed
(Page 1620) in runtime.
ExportDirectoryname (Page 1620) P P Specifies the target directory for the exported Runtime data.
ExportFileExtension (Page 1621) P P Specifies the file extension of the export file. Only the "csv"
file extension is currently supported.
ExportFilename (Page 1621) P P Specifies the name of the target file for the exported Runtime
data.
ExportFilenameChangeable P P Specifies whether the export file name can be changed in
(Page 1622) runtime.
ExportFormatGuid (Page 1622) P P Default assignment of the ID number and export provider.
ExportFormatName (Page 1623) P P Specifies the export file format. Only the "csv" file format is
currently available for the export.
ExportParameters (Page 1624) P P Specifies the parameters of the selected format by means of
the "Properties" dialog.
ExportSelection (Page 1624) P P Specifies the file extension of the export file. Only the "csv"
file extension is currently supported.
ExportShowDialog (Page 1625) P P Specifies whether the data export dialog is shown in runtime.
Font (Page 1639) - - Specifies or returns the font.
GraphDirection (Page 1647) P P Specifies at which border of the trend window the current val‐
ues are displayed.
Height (Page 1649) P - Sets the height of the specified "Ellipse", "Circle" and "Rec‐
tangle" objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the
screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineColor (Page 1689) P P Sets the color of the window separation lines.

WinCC Professional V13 SP2 – Programming reference


1418 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


LineWidth P P Specifies the line thickness of the selected object.
LoadDataImmediately (Page 1692) P P Specifies whether the tag values are downloaded from the
logs for the time range to be displayed when you call a screen.
Moveable (Page 1716) P P Specifies whether the window can be moved in runtime.
Name (Page 1717) P - Returns the object name as STRING.
Online (Page 1725) P P Specifies the name of the data source.
PercentageAxis P P Specifies that an axis with percentage scaling is shown.
PercentageAxisAlign P P
PercentageAxisColor P P Specifies the color of the percentage axis.
PrintJob P P Specifies a print job
RTPersistence (Page 1757) P P Specifies how online configurations of WinCC are retained.
RTPersistencPasswordLevel P P Specifies the authorization required for online configuration
(Page 2007) in runtime.
RTPersistenceType (Page 1758) - - Specifies how online configurations of WinCC are retained.
ShowRuler (Page 1789) P P Specifies whether a scale gradation (auxiliary line) is shown
for the axis label of the "OnlineTrendControl" object.
ShowRulerInAxis (Page 1790) P P Specifies whether rulers are also displayed in the time axes.
ShowScrollbars (Page 1791) P P Specifies the scroll bar type.
ShowStatisticRuler P P Specifies the SQL statement.
ShowTitle (Page 1795) P P Specifies the layout of the control window's header.
ShowTrendIcon (Page 1796) P P Specifies whether an icon is displayed below the value axes.
Sizeable (Page 1797) P P Specifies that the size of an object can be changed in runtime.
StatusbarBackColor (Page 1802) P P Specifies the background color of the status bar.
StatusbarElementAdd (Page 1803) * P P Creates a new, user-defined status bar element.
StatusbarElementAutoSize P P Specifies whether the width of the selected status bar ele‐
(Page 1803) * ment is set automatically.
StatusbarElementCount (Page 1804) P P Specifies the number of configurable status bar elements.
*
StatusbarElementIconId (Page 1805) P P Default assignment of the ID number and icon of a status bar
* element.
StatusbarElementId (Page 1805) * P P Unique ID of the selected status bar element.
StatusbarElementIndex (Page 1806) P P References a status bar element. You can use this property
to assign the values of other properties to a specific element
of the status bar.
StatusbarElementName (Page 1807) P P Displays the object name of the selected status bar element.
*
StatusbarElementRemove P P Removes the selected status bar element.
(Page 1807) *
StatusbarElementRename P P Renames the user-defined status bar element that is refer‐
(Page 1808) * enced by means of the "StatusbarElementIndex" property.
StatusbarElementRepos * P P Specifies the index that is assigned to the element.
StatusbarElements (Page 1808) - - Specifies the elements that are to be shown in the status bar.
StatusbarElementText * P P Specifies the text of the currently selected status bar element.
StatusbarElementTooltipText P P Specifies the tooltip text for the user-defined status bar ele‐
(Page 1809) * ment.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1419
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


StatusbarElementUserDefined P P Indicates whether the configuration engineer has added the
(Page 1809) * status bar element as a new user-defined element.
StatusbarElementVisible (Page 1810) P P In the list, activate the status bar elements that you wish to
* display in runtime.
StatusbarElementWidth (Page 1810) P P Specifies the width of the selected status bar element in pix‐
* els.
StatusbarFont - - Status bar font
StatusbarFontColor (Page 1811) P P Specifies the color of the text in the status bar.
StatusbarShowTooltips (Page 1812) P P Specifies whether tooltips are displayed for the elements of
the status bar in runtime.
StatusbarText (Page 1812) P P Default text in the status bar.
StatusbarUseBackColor (Page 1813) P P Specifies whether the background color of the status bar is
shown.
StatusbarVisible (Page 1814) P P Specifies whether the status bar of the control is displayed.
TimeAxes - - Specifies the settings for the time axes.
TimeAxisActualize * P P
TimeAxisAdd * P P Inserts an axis.
TimeAxisAlignment * P P Specifies the alignment of an axis.
TimeAxisBeginTime (Page 1829) * P P Specifies the starting time for the display of the selected
trend.
TimeAxisColor * P P Specifies the color of an axis.
TimeAxisCount * P P Displays the number of time axes.
TimeAxisDateFormat * P P Specifies the date format.
TimeAxisEndTime (Page 1830) * P P Specifies the end time for the display of the selected trend.
TimeAxisIndex P P The index specifies on which axis other properties, e.g. initial
value are based.
TimeAxisInTrendColor * P P Specifies that the color of the trend is used for an axis.
TimeAxisLabel (Page 1830) * P P Specifies the header for the time axis. Whether or not the
information is evaluated depends on the "ConfigureTimeAx‐
is(i)" property.
TimeAxisMeasurePoints * P P Specifies the measuring points.
TimeAxisName * P P Specifies the name of an axis.
TimeAxisRangeType * P P Specifies the type of time range.
TimeAxisRemove * P P Deletes a time axis
TimeAxisRename * P P Renames a time axis.
TimeAxisRepos * P P Specifies that the time axis is repositioned
TimeAxisShowDate * P P Specifies that the date is to be displayed.
TimeAxisTimeFormat (Page 1831) * P P Specifies the time format.
TimeAxisTimeRangeBase * P P A time range is set via a base and a factor.
TimeAxisTimeRangeFactor * P P A time range is set via a base and a factor.
TimeAxisTrendWindow * P P Specifies the trend view.
TimeAxisVisible * P P Specifies that the time axis is visible.
TimeBase (Page 1831) P P Sets the time zone that forms the basis for the display of time
values.
ToolbarAlignment (Page 1859) P P Specifies or returns the position of the toolbar.

WinCC Professional V13 SP2 – Programming reference


1420 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


ToolbarBackColor (Page 1859) P P Specifies the background color of the toolbar.
ToolbarButtonActive (Page 1860) * P P Specifies whether the function linked to the button is activated
in runtime.
ToolbarButtonAdd (Page 1861) * P P Creates a new, user-defined button function.
ToolbarButtonBeginGroup P P Specifies whether a separator is inserted before the selected
(Page 1861) * button function.
ToolbarButtonClick P P Clicks a toolbar button.
ToolbarButtonCount (Page 1862) * P P Specifies the number of configurable button functions.
ToolbarButtonEnabled (Page 1863) * P P Specifies whether a user-defined toolbar button can be oper‐
ated.
ToolbarButtonHotKey (Page 1863) * P P Shows the hotkey for the selected button function.
ToolbarButtonId (Page 1864) * P P Unique ID number for the selected button function.
ToolbarButtonIndex (Page 1864) P P References a button function.
ToolbarButtonLocked (Page 1865) * P P Specifies whether the clicked, pressed in state is displayed
for a user-defined toolbar button.
ToolbarButtonName (Page 1866) * P P Shows the name of the selected button function.
ToolbarButtonPasswordLevel P P Shows the authorization for the selected button function.
(Page 1866) *
ToolbarButtonRemove (Page 1867) * P P Removes the selected button function from the list.
ToolbarButtonRename (Page 1867) * P P Renames the user-defined toolbar element that is referenced
by means of the "ToolbarButtonIndex" property.
ToolbarButtonRepos (Page 1868) * P P Changes the sequence of button functions.
ToolbarButtons - - Specifies which buttons are available for the toolbar.
ToolbarButtonTooltipText P P Specifies the tooltip text for the button.
(Page 1868) *
ToolbarButtonUserDefined P P Indicates whether the configuration engineer has added the
(Page 1869) * toolbar button as a new user-defined button.
ToolbarButtonVisible * P P Specifies that the button is visible.
ToolbarShowTooltips (Page 1870) P P Specifies whether the tooltips for the button functions are dis‐
played in runtime.
ToolbarUseBackColor (Page 1870) P P Specifies whether the background color for the toolbar is
shown.
ToolbarUseHotKeys (Page 1871) P P Specifies whether the hotkeys for the button functions are
activated in runtime.
ToolbarVisible (Page 1871) P P Specifies whether the toolbar of the control is displayed.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
TrendAdd (Page 1881) * P P Creates a new trend.
TrendAutoRangeBeginTagName * P P Specifies a tag that defines the initial value.
TrendAutoRangeBeginValue * P P Specifies the initial value for the automatically adjusted dis‐
play range.
TrendAutoRangeEndTagName * P P Specifies a tag that defines the end value.
TrendAutoRangeEndValue * P P Specifies a tag that defines the end value.
TrendAutoRangeSource * P P Specifies the source of the display range.
TrendColor * P P Specifies or returns the trend view color.
TrendCount (Page 1882) * P P Specifies the number of configured trends.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1421
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


TrendExtendedColorSet (Page 1883) P P Specifies whether you can configure the point color and the
* fill color and whether the colors are shown in runtime.
TrendFill (Page 1884) * P P Specifies whether the area below the trend is shown filled.
TrendFillColor (Page 1884) * P P Sets the fill color of the trend.
TrendIndex (Page 1885) P P References a configured trend.
TrendLabel (Page 1886) * P P Specifies the label of the selected trend.
TrendLineStyle (Page 1887) * P P Specifies which line type is used for display of the trend.
TrendLineType (Page 1887) * P P Specifies how the trend is displayed.
TrendLineWidth (Page 1888) * P P Specifies the line thickness of the line displayed.
TrendLowerLimit (Page 1888) * P P Specifies the low limit of a tag.
TrendLowerLimitColor (Page 1889) * P P Specifies the color which indicates tag values below the value
of "TrendLowerLimit".
TrendLowerLimitColoring P P Specifies whether the selection frame is shown with the color
(Page 1889) * defined by the system.
TrendName (Page 1890) * P P Displays the name of the selected trend.
TrendPointColor (Page 1891) * P P Specifies the color of trend points.
TrendPointStyle (Page 1891) * P P Specifies how the points are displayed on the trend.
TrendPointWidth (Page 1892) * P P Specifies the point width in pixels.
TrendProvider (Page 1892) * P P Specifies the data supply for the selected trend.
TrendProviderCLSID * P P Specifies the provider CLSID of the data for a trend.
TrendRemove (Page 1894) * P P Removes selected trends from the list.
TrendRename (Page 1894) * P P Renames the trend that is referenced by means of the "Tren‐
dIndex" property.
TrendRepos (Page 1895) * P P Repositions the selected trend in the sequence in the trend
window.
TrendSelectTagName * P P Specifies a tag.
TrendTagName * P P Specifies the name of the tag for the Y direction.
TrendTimeAxis * P P Specifies the time axis.
TrendTrendWindow (Page 1898) * P P Specifies the trend window in which the selected trend is
shown.
TrendUncertainColor (Page 1899) * P P Values have an uncertain status if the initial value is unknown
after Runtime has been activated, or if a substitute value is
used.
TrendUncertainColoring (Page 1899) P P Values have an uncertain status if the initial value is unknown
* after Runtime has been activated, or if a substitute value is
used.
TrendUpperLimit (Page 1900) * P P Specifies the high limit of a tag. If the tag drops below the
value of "TrendLowerLimit", the values are marked with the
color set in "TrendUpperLimitColor".
TrendUpperLimitColor (Page 1900) * P P Specifies the color which indicates tag values below the value
of "TrendLowerLimit".
TrendUpperLimitColoring P P Specifies whether the selection frame is shown with the color
(Page 1901) * defined by the system.
TrendValueAxis * P P Specifies the value axis.
TrendVisible (Page 1901) * P P The list contains all the trends that you have created.
TrendWindowAdd (Page 1902) * P P Creates a new trend view.

WinCC Professional V13 SP2 – Programming reference


1422 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


TrendWindowCoarseGrid P P Specifies whether grid lines are displayed for the main scal‐
(Page 1902) * ing.
TrendWindowCoarseGridColor P P Specifies the color of the grid lines for the main scaling.
(Page 1903) *
TrendWindowCount * P P Displays the number of trend views.
TrendWindowFineGrid (Page 1904) * P P Specifies whether grid lines are displayed for the secondary
scaling.
TrendWindowFineGridColor P P Specifies the grid color of the main scaling.
(Page 1904) *
TrendWindowForegroundTrendGrid P P Specifies whether only the grid lines for the foreground trend
(Page 1905) * are displayed in the selected trend window.
TrendWindowGridInTrendColor P P Specifies whether the grid lines for the main scaling are dis‐
(Page 1905) * played in the trend color.
TrendWindowHorizontalGrid P P Specifies whether the horizontal grid lines are shown.
(Page 1906) *
TrendWindowIndex (Page 1906) P P References a configured trend window.
TrendWindowName (Page 1907) * P P Specifies the name of the selected trend window.
TrendWindowRemove (Page 1907) * P P Removes the selected trend view from the list.
TrendWindowRename (Page 1907) * P P Changes the name of the trend window which is referenced
by the "TrendWindowIndex" property.
TrendWindowRepos (Page 1908) * P P Changes the order of the trend view.
TrendWindowRulerColor (Page 1908) P P Specifies the ruler color.
*
TrendWindowRulerLayer P P Specifies the display layer of the ruler in the trend view.
(Page 1909) *
TrendWindowRulerStyle (Page 1910) P P Specifies the representation of the ruler.
*
TrendWindowRulerWidth P P Specifies the ruler width in pixels.
(Page 1910) *
TrendWindows - - Specifies the settings for trend views.
TrendWindowSpacePortion P P Specifies the proportion of the selected trend window for dis‐
(Page 1911) * play in the control.
TrendWindowStatisticRulerColor * P P Specifies the color of the statistics ruler.
TrendWindowStatisticRulerStyle * P P Specifies the style of the statistics ruler.
TrendWindowStatisticRulerWidth * P P Specifies the width of the statistics ruler.
TrendWindowVerticalGrid P P Specifies whether the vertical grid lines are displayed.
(Page 1911) *
TrendWindowVisible (Page 1912) * P P The list contains the trend views that you have created.
UseTrendNameAsLabel (Page 1925) P P Specifies whether the "Name" or "Label" property is used as
a designation for the trend in runtime.
ValueAxes - - Specifies the settings for the value axes.
ValueAxisAdd * P P Inserts an axis.
ValueAxisAlignment * P P Specifies the alignment of an axis.
ValueAxisAutoPrecisions * P P Specifies that the number of decimal places displayed for an
axis is adjusted automatically.
ValueAxisAutoRange * P P Specifies that the value range is determined automatically.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1423
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


ValueAxisBeginValue * P P Specifies the initial value of an axis.
ValueAxisColor * P P Specifies the color of a value axis.
ValueAxisCount * P P Shows the number of value axes.
ValueAxisEndValue * P P Specifies the end value of an axis.
ValueAxisExponentialFormat * P P Specifies that the label of an axis uses exponential notation.
ValueAxisIndex P P The index specifies on which axis other properties, e.g. initial
value are based.
ValueAxisInTrendColor * P P Specifies that the color of the trend is used for an axis.
ValueAxisLabel (Page 1932) * P P Specifies the label of the value axis.
ValueAxisName * P P Specifies the name of an axis.
ValueAxisPrecisions * P P Specifies the number of displayed decimal places.
ValueAxisRemove * P P Renames an axis.
ValueAxisRename * P P Renames an axis.
ValueAxisRepos * P P Specifies that the value axis is repositioned.
ValueAxisScalingType (Page 1933) * P P Specifies the type of axis scaling.
ValueAxisTrendWindow * P P Specifies the trend view.
ValueAxisVisible * P P Specifies whether a value axis is visible.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P - Sets the width of the specified "Ellipse", "Circle" and "Rec‐
tangle" objects.

* not visible in the ES

Table 3-64 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at run‐
time.
AttachDB (Page 2123) P, A Executes the "Connect backup" button function of the control.
CalculateStatistic (Page 2123) P Executes the "Calculate statistics" button function of the f(t) trend view and
table view.
DeactivateDynamic (Page 2126) P Deactivates the trigger of the "ActivateDynamic" method used for the speci‐
fied property in/during Runtime.
DetachDB (Page 2128) P, A Executes the "Disconnect backup" button function of the control.
Export (Page 2129) P, A Executes the "Export log" or "Export data" button function of the control.
GetRulerData (Page 2148) P Returns the value of the called trend at the ruler position.
GetStatusbarElement P, A Returns the element of the control's status bar designated by name or index
(Page 2156) as "ICCAxStatusbarElement" type.
GetStatusbarElementCollection P, A Returns the list of all status bar elements of the control as "ICCAxCollection"
(Page 2163) type.
GetTimeAxis (Page 2159) P Returns the time axis object of the f(t) trend view designated by name or index
as "ICCAxTimeAxis" type.
GetTimeAxisCollection P Returns the list of all time axis objects of the f(t) trend view as "ICCAxCollec‐
(Page 2160) tion" type.

WinCC Professional V13 SP2 – Programming reference


1424 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Methods Valid Description


GetToolbarButton (Page 2164) P Returns the button function designated by name or index on the control tool‐
bar as "ICCAxToolbarButton" type.
GetToolbarButtonCollection P Returns the list of all button functions of the control toolbar as "ICCAxCollec‐
(Page 2165) tion" type.
GetTrend (Page 2167) P, A Returns the f(t) or f(x) trend view designated by name or index as "ICCAx‐
Trend" or "ICCAxFunctionTrend" type.
GetTrendCollection (Page 2168) P, A Returns the list of all trends of the f(t) or f(x) trend view as "ICCAxCollection"
type.
GetTrendWindow (Page 2169) P, A Returns the trend window object of the f(t) or f(x) trend view designated by
name or index as "ICCAxTrendWindow" type.
GetTrendWindowCollection P, A Returns the list of all trend window objects of the f(t) or f(x) trend views as
(Page 2170) "ICCAxCollection" type.
GetValueAxis (Page 2171) P Returns the value axis object of the f(t) trend view designated by name or
index as "ICCAxValueAxis" type.
GetValueAxisCollection P Returns the list of all value axis objects of the f(t) trend view as "ICCAxCol‐
(Page 2172) lection" type.
MoveAxis (Page 2185) P, A Executes the "Move axes area" button function of the f(t) and f(x) trend views.
MoveToFirst (Page 2185) P Executes the "First line" button function of the control.
MoveToLast (Page 2187) P Executes the "Last data record" button function of the control.
MoveToNext (Page 2188) P Executes the "Next data record" button function of the control.
MoveToPrevious (Page 2190) P Executes the "Previous data record" button function of the control.
NextTrend (Page 2192) P, A Executes the "Next trend" button function of the f(t) and f(x) trend views.
OneToOneView (Page 2192) P, A Executes the "Original view" button function of the f(t) and f(x) trend views.
PreviousTrend (Page 2194) P, A Executes the "Previous trend" button function of the f(t) and f(x) trend views.
Print (Page 2194) P, A Executes the "Print" button function of the control.
ShowHelp (Page 2214) P, A Executes the "Help" button function of the control.
ShowPercentageAxis P Executes the "Relative axis" button function of the f(t) trend view.
(Page 2218)
ShowPropertyDialog P, A Executes the "Configuration dialog" button function of the control.
(Page 2218)
ShowTagSelection (Page 2222) P, A Executes the "Select data connection" button function of the control.
ShowTimeSelection P, A Executes the "Select time range" button function of the control.
(Page 2223)
ShowTrendSelection P, A Executes the "Select trends" button function of the f(t) and f(x) trend views.
(Page 2224)
StartStopUpdate (Page 2224) P, A Executes the "Start" or "Stop" button function of the control.
ZoomArea (Page 2231) P, A Executes the "Zoom area" button function of the f(t) and f(x) trend views.
ZoomInOut (Page 2232) P, A Executes the "Zoom +/-" button function of the f(t) and f(x) trend views.
ZoomInOutTime (Page 2232) P Executes the "Zoom time axis +/-" button function of the f(t) trend view.
ZoomInOutValues (Page 2233) P Executes the "Zoom value axis +/-" button function of the f(t) trend view.
ZoomMove (Page 2234) P, A Executes the "Move trend area" button function of the f(t) and f(x) trend views.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1425
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

OptionGroup (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Option button" object. The OptionGroup object is an element of the
ScreenItems list.

Type identifier in VBS


HMIOptionGroup

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-65 Properties

Properties Read Write Description


AdaptBorder (Page 1523) P P Specifies whether the border of the specified object is dy‐
namically adapted to the text size.
Authorization (Page 1537) P P Specifies the operating rights of the selected object in run‐
time.
BackColor (Page 1543) P P Specifies the background color of the selected object.
BackFillStyle (Page 1546) P P Defines the fill pattern of the specified object.

WinCC Professional V13 SP2 – Programming reference


1426 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


BackFlashingColorOff (Page 1547) P P Specifies the background color for flash state "Off".
BackFlashingColorOn (Page 1548) P P Specifies the background color for flash state "On".
BackFlashingEnabled (Page 1549) P P Specifies whether the background of the specified object
flashes in runtime.
BackFlashingRate (Page 1550) P P Specifies the flash rate of the background for the selected
object.
BorderBackColor (Page 1558) P P Specifies the background color of the broken border line for
the selected object.
BorderColor (Page 1560) P P Specifies the line color of the object.
BorderFlashingColorOff P P Specifies the border line color of the selected object for the
(Page 1562) flash state "Off".
BorderFlashingColorOn P P Specifies the border line color of the selected object for the
(Page 1564) flash state "On".
BorderFlashingEnabled P P Specifies whether the border line of the selected object flash‐
(Page 1565) es in runtime.
BorderFlashingRate (Page 1566) P P Specifies the flash rate of the border line for the selected
object.
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
BorderWidth (Page 1571) P P Specifies the line thickness of the object.
CheckmarkAlignment (Page 1585) P P Specifies whether the fields are right aligned.
CheckmarkCount (Page 1586) P P Specifies the number of fields.
CornerStyle (Page 1597) - - Specifies the type of border lines for the selected object.
DrawInsideFrame (Page 1610) P P Specifies whether the border line of the selected object with
a line thickness greater than 1 should be drawn within the
border or symmetrically to the border.
EdgeStyle (Page 1612) - - Specifies the line style of the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in
runtime.
FillPatternColor (Page 1627) P P Specifies the color of the fill pattern for the selected object.
Flashing - - Specifies that the text block flashes.
FlashingColorOff (Page 1631) P P Specifies the border line color of the selected object for the
flash state "Off".
FlashingColorOn (Page 1633) P P Specifies the border line color of the selected object for the
flash state "On".
FlashingEnabled (Page 1634) P P Specifies whether the border line of the selected object flash‐
es in runtime.
FlashingRate (Page 1635) P P Specifies the flash rate of the border line for the selected
object.
Font (Page 1639) - - Specifies or returns the font.
FontBold (Page 1640) P P Specifies whether the text of the selected object is shown in
bold.
FontItalic (Page 1641) P P Specifies whether the text of the selected object is shown in
italics.
FontName (Page 1642) P P Specifies the font of the selected object.
FontSize (Page 1642) P P Specifies the font size of the text for the selected object.
FontUnderline (Page 1643) P P Specifies whether the text of the selected object is under‐
lined.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1427
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


ForeColor (Page 1644) P P Specifies the font color of the text for the selected object.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rec‐
tangle" objects.
HorizontalAlignment (Page 1663) P P Specifies the horizontal alignment of the text within the se‐
lected object.
Index (Page 1666) P P Specifies the background for grid control elements.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the
screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineEndShapeStyle (Page 1690) - - Specifies the shape of the line ends.
LogOperation (Page 1694) P P Specifies whether, after operating this object, an alarm is
output to the alarm system.
Name (Page 1717) P - Returns the object name as STRING.
ProcessValue (Page 1747) P P Specifies the default for the value to be displayed.
RelativeFillLevel (Page 1752) P P Specifies the fill percentage for the object.
ShowBadTagState (Page 1784) P P Specifies whether an object is grayed out if its associated tag
has a bad quality code or tag state.
ShowFillLevel (Page 1786) P P Specifies whether the selected object is filled.
Text (Page 1824) P P Specifies the label for the text field.
TextOrientation (Page 1827) P P Specifies the text orientation of the selected object.
Texts - - Specifies the texts for the check boxes.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the ob‐
ject.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading
(Page 1918) defined in the active design.
VerticalAlignment (Page 1934) P P Specifies the vertical alignment of the text for the selected
object.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rec‐
tangle" objects.

Table 3-66 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WinCC Professional V13 SP2 – Programming reference


1428 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Polygon (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Polygon" object. The Polygon object is an element of the ScreenItems list.

Type identifier in VBS


HMIPolygon

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-67 Properties

Properties Read Write Description


ActualPointIndex (Page 1521) P P Specifies the number of the current corner point of the selected
object.
ActualPointLeft (Page 1522) P P Specifies the X coordinate of the current corner point with reference
to the screen origin.
ActualPointTop (Page 1522) P P Specifies the Y coordinate of the current corner point with reference
to the screen origin.
Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1429
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


BackColor (Page 1543) P, A P, A Specifies the background color of the selected object.
BackFillStyle (Page 1546) P, A P, A Defines the fill pattern of the specified object.
BorderBackColor (Page 1558) P P Specifies the background color of the broken border line for the
selected object.
BorderColor (Page 1560) P, A P, A Specifies the line color of the object.
BorderFlashingColorOff P P Specifies the border line color of the selected object for the flash
(Page 1562) state "Off".
BorderFlashingColorOn P P Specifies the border line color of the selected object for the flash
(Page 1564) state "On".
BorderFlashingEnabled P P Specifies whether the border line of the selected object flashes in
(Page 1565) runtime.
BorderFlashingRate P P Specifies the flash rate of the border line for the selected object.
(Page 1566)
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
BorderWidth (Page 1571) P, A P, A Specifies the line thickness of the object.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.
EdgeStyle (Page 1612) A A Specifies the line style of the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
FillPatternColor (Page 1627) P P Specifies the color of the fill pattern for the selected object.
Flashing - - Specifies that the text block flashes.
FlashingColorOff (Page 1631) P P Specifies the border line color of the selected object for the flash
state "Off".
FlashingColorOn (Page 1633) P P Specifies the border line color of the selected object for the flash
state "On".
FlashingEnabled (Page 1634) P P Specifies whether the border line of the selected object flashes in
runtime.
FlashingRate (Page 1635) P P Specifies the flash rate of the border line for the selected object.
Height (Page 1649) P, A P, A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P, A P, A Specifies the value of the X coordinate of the object.
LineEndShapeStyle P P Specifies the shape of the line end.
(Page 1690)
Name (Page 1717) P, A - Returns the object name as STRING.
Points - - Specifies the corner points.
PointsCount (Page 1745) P - Specifies the number of corner points of the polyline or of the poly‐
gon.
RelativeFillLevel (Page 1752) P P Specifies the fill percentage for the object.
RotationAngle (Page 1754) P P Specifies the angle of rotation in degrees.
RotationCenterLeft (Page 1754) P P Specifies the X coordinate of the pivot point for the object in runtime.
RotationCenterTop (Page 1755) P P Specifies the Y coordinate of the pivot point for the object in runtime.
ShowFillLevel (Page 1786) P P Specifies whether the selected object is filled.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P, A P, A Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.

WinCC Professional V13 SP2 – Programming reference


1430 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined
(Page 1918) in the active design.
Visible (Page 1936) P, A P, A Specifies whether the selected object is visible.
Width (Page 1946) P, A P, A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

Table 3-68 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

Polyline (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Polyline" object. The Polyline object is an element of the ScreenItems list.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1431
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Type identifier in VBS


HMIPolyline

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-69 Properties

Properties Read Write Description


ActualPointIndex P P Specifies the number of the current corner point of the selected object.
(Page 1521)
ActualPointLeft (Page 1522) P P Specifies the X coordinate of the current corner point with reference
to the screen origin.
ActualPointTop (Page 1522) P P Specifies the Y coordinate of the current corner point with reference
to the screen origin.
Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
BackColor (Page 1543) P, A P, A Specifies the background color of the selected object.
BorderEndStyle P; A P Specifies the type of line ends for the selected object.
(Page 1562)
BorderStyle (Page 1570) P, A P Specifies the type of border lines for the selected object.
Color (Page 1588) P, A P, A Specifies the line color of the selected object.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
EndStyle (Page 1617) A A Specifies how the line end of the selected object is displayed.
FillStyle A A Defines the fill pattern of the specified object.
Flashing - - Specifies that the text block flashes.
FlashingColorOff P P Specifies the border line color of the selected object for the flash state
(Page 1631) "Off".
FlashingColorOn P P Specifies the border line color of the selected object for the flash state
(Page 1633) "On".
FlashingEnabled P P Specifies whether the border line of the selected object flashes in
(Page 1634) runtime.
FlashingRate (Page 1635) P P Specifies the flash rate of the border line for the selected object.
Height (Page 1649) P, A P, A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P, A P, A Specifies the value of the X coordinate of the object.
LineEndShapeStyle P P Specifies the shape of the line end.
(Page 1690)
LineWidth (Page 1691) P, A P, A Specifies the line thickness of the selected object.
Name (Page 1717) P, A - Returns the object name as STRING.

WinCC Professional V13 SP2 – Programming reference


1432 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Points - - Specifies the corner points.
PointsCount (Page 1745) P - Specifies the number of corner points of the polyline or of the polygon.
RotationAngle (Page 1754) P P Specifies the angle of rotation in degrees.
RotationCenterLeft P P Specifies the X coordinate of the pivot point for the object in runtime.
(Page 1754)
RotationCenterTop P P Specifies the Y coordinate of the pivot point for the object in runtime.
(Page 1755)
StartStyle A A Specifies how the line start of the selected object is displayed.
Style (Page 1814) A A Specifies the line style of the selected object.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P, A P, A Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined in
(Page 1918) the active design.
Visible (Page 1936) P, A P, A Specifies whether the selected object is visible.
Width (Page 1946) P, A P, A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle" ob‐
jects.

Table 3-70 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1433
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ProjectName (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Project name" object. The ProjectName object is an element of the
ScreenItems list.

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-71 Properties

Properties Read Write Description


BackColor - - Specifies the background color of the selected object.
BackFillStyle - - Defines the fill pattern of the specified object.
BorderBackColor (Page 1558) - - Specifies the background color of the broken border line for the se‐
lected object.
BorderColor - - Specifies the line color of the object.
BorderWidth - - Specifies the line thickness of the object.
EdgeStyle (Page 1612) - Specifies the line style of the selected object.
FillPatternColor (Page 1627) - - Specifies the color of the fill pattern for the selected object.
Font (Page 1639) - - Specifies or returns the font.

WinCC Professional V13 SP2 – Programming reference


1434 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


FontBold (Page 1640) - - Specifies whether the text of the selected object is shown in bold.
FontItalic (Page 1641) - - Specifies whether the text of the selected object is shown in italics.
FontName (Page 1642) - - Specifies the font of the selected object.
FontSize (Page 1642) - - Specifies the font size of the text for the selected object.
FontUnderline (Page 1643) - - Specifies whether the text of the selected object is underlined.
ForeColor - - Specifies the font color of the text for the selected object.
Format - - Specifies that the format of the text block is displayed.
Height (Page 1649) - - Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
HorizontalAlignment - - Specifies the horizontal alignment of the text within the selected ob‐
ject.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) - - Specifies the value of the X coordinate of the object.
LineWrap - - Specifies the line break within the object.
Name (Page 1717) - - Returns the object name as STRING.
Top (Page 1873) - - Specifies the value of the Y coordinate of the object.
VerticalAlignment - - Specifies the vertical alignment of the text for the selected object.
Visible (Page 1936) - - Specifies whether the selected object is visible.
Width (Page 1946) - - Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

None of the properties are visible in the ES.

Table 3-72 Methods

Methods Validity Description

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1435
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ProtectedAreaName (Panels, Comfort Panels, RT Advanced)

Description

6FUHHQ

6FUHHQV,WHPV
6FUHHQ,WHP
Represents the "EffectiveRangeName" (RFID)" object. The ProtectedAreaName object is an
element of the ScreenItems list.

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-73 Properties

Properties Read Write Description


Authorization (Page 1537) - - Specifies the operating rights of the selected object in runtime.
Font (Page 1639) - - Specifies or returns the font.
Height (Page 1649) A A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle" ob‐
jects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) A A Specifies the value of the X coordinate of the object.
Name (Page 1717) A - Returns the object name as STRING.
Top (Page 1873) A A Specifies the value of the Y coordinate of the object.
Width (Page 1946) A A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle" ob‐
jects.

Table 3-74 Methods

Methods Valid Description

WinCC Professional V13 SP2 – Programming reference


1436 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

RangeLabelView (Panels, Comfort Panels, RT Advanced)

Description

6FUHHQ

6FUHHQV,WHPV
6FUHHQ,WHP
Represents the "EffectiveRangeName" object. The RangeLabelView object is an element of
the ScreenItems list.

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-75 Properties

Properties Read Write Description


Authorization (Page 1537) - - Specifies the operating rights of the selected object in runtime.
Font (Page 1639) - - Specifies or returns the font.
Height (Page 1649) A A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) A A Specifies the value of the X coordinate of the object.
Name (Page 1717) A - Returns the object name as STRING.
Top (Page 1873) A A Specifies the value of the Y coordinate of the object.
Width (Page 1946) A A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle" ob‐
jects.

Table 3-76 Methods

Methods Valid Description

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1437
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Methods Valid Description

RangeQualityView (Panels, Comfort Panels, RT Advanced)

Description

6FUHHQ

6FUHHQV,WHPV
6FUHHQ,WHP
Represents the "EffectiveRangeSignal" object. The RangeQualityView object is an element of
the ScreenItems list.

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-77 Properties

Properties Read Write Description


Height (Page 1649) A A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) A A Specifies the value of the X coordinate of the object.
Name (Page 1717) A - Returns the object name as STRING.
Top (Page 1873) A A Specifies the value of the Y coordinate of the object.
Width (Page 1946) A A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

WinCC Professional V13 SP2 – Programming reference


1438 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-78 Methods

Methods Valid Description

RecipeView (Panels, Comfort Panels, RT Advanced)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "RecipeView" object. The RecipeView object is an element of the ScreenItems
list.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1439
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

If you change the settings for this object with a user-defined function, the changed settings are
retained even after the screen is called again.

Note
The object "Simple RecipeView" cannot be dynamized with a user-defined function.

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-79 Properties

Properties Read Write Description


AllowEdit - - Enables editing.
Authorization (Page 1537) - - Specifies the operating rights of the selected object in runtime.
BackButtonVisible - - Enables display of the "Back" button.
BackColor A A Specifies the background color of the selected object.
ComboBoxFont - - Sets the font type for selection list.
DataRecordNameCaption - - Sets the caption for the name of the data record.
DataRecordNrCaption - - Sets the caption for the number of the data record.
Display3D - - Sets the 3D view.
DisplayButton2Plc - - Enables the display of the "Write to PLC" button.
DisplayButtonComparison - - Enables the display of the "Synchronization" button.
DisplayButtonDelete - - Enables the display of the "Delete data record" button.
DisplayButtonFromPlc - - Enables the display of the "Read from PLC" button.
DisplayButtonHelp - - Enables the display of the "Tooltip" button.
DisplayButtonNew - - Enables the display of the "Add data record" button.
DisplayButtonSave - - Enables the display of the "Save" button.
DisplayButtonSaveAs - - Enables the display of the "Save As" button.
DisplayComboBox - - Enables the display of the selection list.
DisplayGridlines - - Enables the display of grid lines.
DisplayLabeling - - Enables the display labelings.
DisplayNumbers - - Enables the display of numbers.
DisplaySize * - -
DisplayStatusBar - - Specifies that the status bar is displayed.
DisplayTable - - Enablers the display of the table.
Enabled A A Specifies whether the selected object can be operated in runtime.
EntryNameCaption - - Sets the caption for the name of the recipe element.
EntryValueColFirst - - Sets the "Entry value" column to first place.
EntryValueFieldLength - - Sets the field length for the element value.

WinCC Professional V13 SP2 – Programming reference


1440 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


EntryValuePos - - Sets the position of the first value.
FitToSize - - Specifies that the size of the object should be automatically adap‐
ted to the content.
FixedRecipeNumber * - -
Flashing - - Specifies that the text block flashes.
FocusColor A A Specifies the color for the focus frame of the selected object when
it is in focus.
FocusWidth A A Specifies the border width of the specified object when the object
is in focus.
Font (Page 1639) - - Specifies or returns the font.
ForeColor A A Specifies the font color of the text for the selected object.
HeaderFont - - Sets the header font.
Height (Page 1649) A - Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
KeyboardOnline - - Enables the use of key combinations.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) A A Specifies the value of the X coordinate of the object.
ListAreaHeight - -
ListAreaWidth - -
MenuButtonVisible - - Enables visibility of the menu buttons.
Name (Page 1717) A - Returns the object name as STRING.
NameColumnWidth - -
NumberOfLines - - Sets the number of rows of the selection list for the text list object,
or returns the value.
Recipe - - Sets the recipe.
RecipeNameCaption - - Sets the caption for the name of the recipe.
RecipeNameSelected * - -
RecipeNrCaption - - Specifies that the "Recipe number" column is in first place.
RecipeNrColFirst - - Specifies that the "Recipe number" column is in first place.
RecipeVarSelected * - -
Record * - -
RecordNameSelected * - -
RecordNrColFirst - - Specifies that the "Data record number" column is in first place.
RecordVarSelected * - -
RenameButtonVisible - - Enables the display of the "Rename" button.
SelectionBackColor (Page 1775) A A Specifies the background color of the selected cells.
SelectionForeColor (Page 1776) A A Specifies the foreground color of the selected cells.
StatusFont - -
TableBackColor (Page 1816) A A Specifies the background color of the table cells for the selected
object.
TableForeColor A A
TableGridlineColor (Page 1819) A A Specifies the color for the grid lines.
TableHeaderBackColor A A Specifies the background color in the header of the table of the
(Page 1820) selected object.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1441
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


TableHeaderForeColor A A Specifies the text color in the header of the table of the selected
(Page 1821) object.
Top (Page 1873) A A Specifies the value of the Y coordinate of the object.
ValueCaption - - Sets the labeling for values.
ValueColumnWidth - -
VerticalScrolling - - Sets the display of a scroll bar for the selected object.
ViewType - - Specifies the alarm view type.
ViewTypeForSaveStream * - - Specifies the display type for the Save Stream.
Visible (Page 1936) A A Specifies whether the selected object is visible.
VisibleItems - - Sets the maximum number of visible entries.
Width (Page 1946) A - Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

* not visible in the ES

Table 3-80 Methods

Methods Valid Description

WinCC Professional V13 SP2 – Programming reference


1442 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Rectangle (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Rectangle" object. The Rectangle object is an element of the ScreenItems
list.

Type identifier in VBS


HMIRectangle

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-81 Properties

Properties Read Write Description


Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
BackColor (Page 1543) P, A P, A Specifies the background color of the selected object.
BackFillStyle (Page 1546) P, A P, A Defines the fill pattern of the specified object.
BorderBackColor (Page 1558) P P Specifies the background color of the broken border line for the
selected object.
BorderColor (Page 1560) P, A P, A Specifies the line color of the object.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1443
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


BorderFlashingColorOff P P Specifies the border line color of the selected object for the flash
(Page 1562) state "Off".
BorderFlashingColorOn P P Specifies the border line color of the selected object for the flash
(Page 1564) state "On".
BorderFlashingEnabled P P Specifies whether the border line of the selected object flashes in
(Page 1565) runtime.
BorderFlashingRate P P Specifies the flash rate of the border line for the selected object.
(Page 1566)
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
BorderWidth (Page 1571) P, A P, A Specifies the line thickness of the object.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.
DrawInsideFrame (Page 1610) P P Specifies whether the border line of the selected object with a line
thickness greater than 1 should be drawn within the border or
symmetrically to the border.
EdgeStyle (Page 1612) A A Specifies the line style of the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
FillPatternColor (Page 1627) P P Specifies the color of the fill pattern for the selected object.
Flashing - - Specifies that the text block flashes.
FlashingColorOff (Page 1631) P P Specifies the border line color of the selected object for the flash
state "Off".
FlashingColorOn (Page 1633) P P Specifies the border line color of the selected object for the flash
state "On".
FlashingEnabled (Page 1634) P P Specifies whether the border line of the selected object flashes in
runtime.
FlashingRate (Page 1635) P P Specifies the flash rate of the border line for the selected object.
Height (Page 1649) P, A P, A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P, A P, A Specifies the value of the X coordinate of the object.
LineEndShapeStyle (Page 1690) P P Specifies the shape of the line end.
Name (Page 1717) P, A - Returns the object name as STRING.
RelativeFillLevel (Page 1752) P P Specifies the fill percentage for the object.
RoundCornerHeight P P Sets or returns the corner radius.
(Page 1756)
RoundCornerWidth (Page 1756) P P Sets or returns the corner radius.
ShowFillLevel (Page 1786) P P Specifies whether the selected object is filled.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P, A P, A Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined
(Page 1918) in the active design.
Visible (Page 1936) P, A P, A Specifies whether the selected object is visible.
Width (Page 1946) P, A P, A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

WinCC Professional V13 SP2 – Programming reference


1444 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-82 Methods

Methods Validity Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

RoundButton (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "RoundButton" object. The RoundButton object is an element of the


ScreenItems list.

Type identifier in VBS


HMIRoundButton

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1445
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-83 Properties

Properties Read Write Description


Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
BackColor (Page 1543) P P Specifies the background color of the selected object.
BackFillStyle (Page 1546) P P Defines the fill pattern of the specified object.
BackFlashingColorOff (Page 1547) P P Specifies the background color for flash state "Off".
BackFlashingColorOn (Page 1548) P P Specifies the background color for flash state "On".
BackFlashingEnabled (Page 1549) P P Specifies whether the background of the specified object flash‐
es in runtime.
BackFlashingRate (Page 1550) P P Specifies the flash rate of the background for the selected ob‐
ject.
BorderBackColor (Page 1558) P P Specifies the background color of the broken border line for the
selected object.
BorderBrightColor3D (Page 1559) P P Specifies the border color of the following border parts in the
3D display of the selected object.
BorderColor (Page 1560) P P Specifies the line color of the object.
BorderFlashingColorOff P P Specifies the border line color of the selected object for the flash
(Page 1562) state "Off".
BorderFlashingColorOn P P Specifies the border line color of the selected object for the flash
(Page 1564) state "On".
BorderFlashingEnabled P P Specifies whether the border line of the selected object flashes
(Page 1565) in runtime.
BorderFlashingRate (Page 1566) P P Specifies the flash rate of the border line for the selected object.
BorderShadeColor3D (Page 1569) P P Specifies the border color of the following border parts in the
3D display of the selected object.
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
BorderWidth (Page 1571) P P Specifies the line thickness of the object.
BorderWidth3D (Page 1573) P P Specifies the width of the border for 3D display of the selected
object.
CornerStyle (Page 1597) * - - Specifies the type of border lines for the selected object.
DrawInsideFrame (Page 1610) P P Specifies whether the border line of the selected object with a
line thickness greater than 1 should be drawn within the border
or symmetrically to the border.
EdgeStyle (Page 1612) P P Specifies the line style of the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in run‐
time.
FillPatternColor (Page 1627) P P Specifies the color of the fill pattern for the selected object.
Flashing - - Specifies that the text block flashes.

WinCC Professional V13 SP2 – Programming reference


1446 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


FlashingColorOff (Page 1631) P P Specifies the border line color of the selected object for the flash
state "Off".
FlashingColorOn (Page 1633) P P Specifies the border line color of the selected object for the flash
state "On".
FlashingEnabled (Page 1634) P P Specifies whether the border line of the selected object flashes
in runtime.
FlashingRate (Page 1635) P P Specifies the flash rate of the border line for the selected object.
Font (Page 1639) - - Specifies or returns the font.
FontBold (Page 1640) P P Specifies whether the text of the selected object is shown in
bold.
FontItalic (Page 1641) P P Specifies whether the text of the selected object is shown in
italics.
FontName (Page 1642) P P Specifies the font of the selected object.
FontSize (Page 1642) P P Specifies the font size of the text for the selected object.
FontUnderline (Page 1643) P P Specifies whether the text of the selected object is underlined.
ForeColor (Page 1644) P P Specifies the font color of the text for the selected object.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectan‐
gle" objects.
HorizontalAlignment (Page 1663) P P Specifies the horizontal alignment of the text within the selected
object.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the
screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineEndShapeStyle (Page 1690) * - - Specifies the shape of the line ends.
Mode (Page 1715) P P Specifies the field type of the selected object.
Name (Page 1717) P - Returns the object name as STRING.
PictureAlignment (Page 1742) P P Specifies or returns the display type of the background image
in the process picture.
PictureDeactivated (Page 1743) P P Specifies the picture that is displayed in the "Disabled" state.
PictureOff (Page 1743) P P Specifies the screen to be displayed in the "Off" state.
PictureOn (Page 1744) P P Specifies the screen to be displayed in the "On" state.
Pressed (Page 1746) P P Specifies whether the selected object is displayed in a pressed
state.
Radius P P Sets the radius of the specified "Circle" object.
RelativeFillLevel (Page 1752) P P Specifies the fill percentage for the object.
ShowFillLevel (Page 1786) P P Specifies whether the selected object is filled.
StyleSettings (Page 1815) P P Specifies the display style for the object:
Text (Page 1824) P P Specifies the label for the text field.
TextOrientation (Page 1827) P P Specifies the text orientation of the selected object.
Toggle (Page 1853) P P Specifies whether the selected object engages after it has been
operated in runtime.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the ob‐
ject.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1447
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


TransparentColorDeactivatedPic‐ P P Specifies the color to be set to "transparent" for the "Off" state
ture (Page 1878) of the assigned bitmap object.
TransparentColorPictureOff P P Specifies the color to be set to "transparent" for the "Off" state
(Page 1879) of the assigned bitmap object.
TransparentColorPictureOn P P Specifies the color to be set to "transparent" for the "On" state
(Page 1880) of the assigned bitmap object.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading de‐
(Page 1918) fined in the active design.
UseTransparentColorDeactivated‐ P P Enables the use of the transparency color specified with the
Picture (Page 1923) "TransparentColorDeactivatedPicture" property for the "Disa‐
bled" state.
UseTransparentColorPictureOff P P Specifies whether the transparent color defined in the "Trans‐
(Page 1924) parentColorPictureOff" property is used for the "Off" state.
UseTransparentColorPictureOn P P Specifies whether the transparent color defined in the "Trans‐
(Page 1924) parentColorPictureOn" property is used for the "On" state.
VerticalAlignment (Page 1934) P P Specifies the vertical alignment of the text for the selected ob‐
ject.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rectan‐
gle" objects.

* not visible in the ES

Table 3-84 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at run‐
time.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the speci‐
(Page 2126) fied property in/during Runtime.

WinCC Professional V13 SP2 – Programming reference


1448 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ScreenWindow (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "ScreenWindow" object. The ScreenWindow object is an element of the


ScreenItems list.

Type identifier in VBS


HMIScreenWindow

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-85 Properties

Properties Read Write Description


AdaptScreenToWindow - - Specifies whether or not the screen visualized in a screen window
(Page 1524) is adapted to fit the size of the screen window in runtime.
AdaptWindowToScreen - - Specifies whether or not the screen window is adapted to fit the
(Page 1524) screen it visualizes in runtime.
BorderEnabled (Page 1561) - - TRUE, if the window is visualized with a border in runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1449
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


CaptionText (Page 1580) P P Specifies the text that is displayed in the header of the selected
object.
Flashing * - - Specifies that the text block flashes.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
HorizontalScrollbarPosition P P Sets horizontal positioning of the scroll bar in a screen window with
(Page 1664) slider, or returns its value.
IndependentWindow - - Specifies whether the screen window is embedded in a screen or
displayed as independent screen window.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LeftOffset (Page 1680) P P Sets horizontal shift of the display of a graphic object that is larger
than the screen window.
MenuToolBarConfig - - Loads the specified configuration file with configured menu and
(Page 1697) toolbars, or returns the name of the configuration file.
MonitorNumber - - Sets the monitor number.
Name (Page 1717) P - Returns the object name as STRING.
ScreenName (Page 1766) P P Specifies the screen to be displayed in the screen window, or re‐
turns the screen name.
ShowCaption (Page 1785) - - Hides or shows the caption.
ShowScrollBars (Page 1791) - - Enables the display of scroll bars.
TagPrefix (Page 1821) P P Sets the prefix for all tags that exist in the screen.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
TopOffset (Page 1875) P P Sets or returns the offset of the screen from the top edge of the
screen window.
VerticalScrollbarPosition P P Specifies the vertical positioning of the scroll bar in a screen win‐
(Page 1935) dow with slider, or returns its value.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
WindowCloseEnabled - - Enables closing of the window in runtime.
(Page 1948)
WindowMaximizeEnabled - - TRUE, if the window can be maximized in runtime.
(Page 1948)
WindowMovingEnabled - - TRUE, if the window can be moved in runtime.
(Page 1949)
WindowOnTop (Page 1949) - - TRUE, if the object is always in the foreground in runtime.
WindowSizingEnabled - - Enables resizing of the specified object in runtime.
(Page 1950)
WindowStartupPosition - - ??
ZoomFactor (Page 1970) P P Sets or reads the zoom factor of a screen or screen window.

* not visible in the ES

WinCC Professional V13 SP2 – Programming reference


1450 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-86 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

ScriptDiagnostics (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "ApplicationWindow" object. The ApplicationWindow object is an element of


the ScreenItems list.

Type identifier in VBS


HMIApplicationWindow

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1451
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-87 Properties

Properties Read Write Description


BorderEnabled (Page 1561) - - TRUE, if the window is visualized with a border in runtime.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectangle" ob‐
jects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
Name (Page 1717) P P Returns the object name as STRING.
ShowCaption (Page 1785) - - Hides or shows the caption.
Template (Page 1823) - - Returns the templte for displaying the window content of the "Applica‐
tion window" object.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rectangle" ob‐
jects.
WindowCloseEnabled - - Enables closing of the window in runtime.
(Page 1948)
WindowMaximizeEnabled - - TRUE, if the window can be maximized in runtime.
(Page 1948)
WindowMovingEnabled - - TRUE, if the window can be moved in runtime.
(Page 1949)
WindowOnTop (Page 1949) - - TRUE, if the object is always in the foreground in runtime.
WindowsContents (Page 1950) - - Returns the content of the application window
WindowSizingEnabled - - Enables resizing of the specified object in runtime.
(Page 1950)

Table 3-88 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at run‐
time.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WinCC Professional V13 SP2 – Programming reference


1452 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Slider (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Slider" object. The Slider object is an element of the ScreenItems list.

Type identifier in VBS


HMISlider

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-89 Properties

Properties Read Write Description


Authorization (Page 1537) - - Specifies the operating rights of the selected object in run‐
time.
BackColor (Page 1543) P, A P, A Specifies the background color of the selected object.
BackFillStyle (Page 1546) P P Defines the fill pattern of the specified object.
BackPicture - - Specifies a graphic for the background.
BarBackColor (Page 1551) P, A P, A Specifies the color of the bar background for the selected
object.
BarColor (Page 1554) P, A P, A Sets the color of the slider in the "Slider" object.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1453
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


BorderBrightColor3D (Page 1559) P, A P, A Specifies the border color of the following border parts in the
3D display of the selected object.
BorderInnerStyle3D (Page 1567) P P Specifies the representation of the inner part of the object
border.
BorderInnerWidth3D (Page 1567) P, A P, A Specifies the width of the inner border for 3D presentation of
the selected object.
BorderOuterStyle3D (Page 1568) P P Specifies the representation of the outer part of the object
border.
BorderOuterWidth3D (Page 1568) P, A P, A Sets the width of the outer border for 3D presentation of the
selected object.
BorderShadeColor3D (Page 1569) P, A P, A Specifies the border color of the following border parts in the
3D display of the selected object.
BorderWidth (Page 1571) P, A P, A Specifies the line thickness of the object.
Caption (Page 1578) P, A P, A Specifies the text that is displayed in the header of the selec‐
ted object.
ContinousChange (Page 1597) P P Specifies whether to transfer the value of the "ProcessValue"
when the mouse button is released, or immediately on a
change of the slider position in runtime.
Enabled (Page 1614) P, A P, A Specifies whether the selected object can be operated in
runtime.
Flashing - - Specifies that the text block flashes.
FocusColor (Page 1637) P, A P, A Specifies the color for the focus frame of the selected object
when it is in focus.
FocusWidth (Page 1638) P, A P, A Specifies the border width of the specified object when the
object is in focus.
Font - - Specifies or returns the font.
ForeColor (Page 1644) P, A P, A Specifies the font color of the text for the selected object.
Height (Page 1649) P, A P, A Sets the height of the specified "Ellipsis", "Circle" and "Rec‐
tangle" objects.
LabelColor (Page 1671) P, A P, A Sets the color of the scale labeling in the "Slider" object.
Layer (Page 1675) - - Specifies the value of the X coordinate of the object.
Left (Page 1679) P, A P, A Specifies the value of the X coordinate of the object.
MaximumValue (Page 1697) P, A P, A Specifies the maximum value of the scale in the selected
object.
MinimumValue (Page 1713) P, A P, A Specifies the minimum value of the scale in the selected ob‐
ject.
Name (Page 1717) P, A - Returns the object name as STRING.
PositionFont - - Sets the font type for the labeling.
ProcessValue (Page 1747) P, A P, A Specifies the default for the value to be displayed.
ShowBar (Page 1784) P, A P, A Specifies whether to display the process value along with a
filled bar in the "Slider" object.
ShowPosition (Page 1788) P, A P, A Adds a numerical display of the value of the slider position.
ShowThumb (Page 1794) P, A P, A Displays the slider of the "Slider" object.
ShowTickLabels (Page 1794) P, A P, A Specifies whether the label is shown in the scale.
ShowTicks (Page 1795) P, A P, A Specifies whether the tick marks are displayed in the scale
of the object.

WinCC Professional V13 SP2 – Programming reference


1454 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


ThumbBackColor (Page 1827) P, A P, A Specifies the background color of the slider in the "Slider"
object.
ThumbPicture - - Specifies a graphic object for the slider.
TickStyle (Page 1829) P P Specifies the scale display.
Top (Page 1873) P, A P, A Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the ob‐
ject.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading
(Page 1918) defined in the active design.
Visible (Page 1936) P, A P, A Specifies whether the selected object is visible.
Width (Page 1946) P, A P, A Sets the width of the specified "Ellipsis", "Circle" and "Rec‐
tangle" objects.

Table 3-90 Methods

Methods Validity Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at run‐
time.
DeactivateDynamic (Page 2126) P Deactivates the trigger of the "ActivateDynamic" method used for the speci‐
fied property in/during Runtime.

See also
ObjectName (Page 1997)
Font (Page 1639)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1455
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

SmartClientView (Panels, Comfort Panels, RT Advanced)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Sm@rtClient View" object. The SmartClientView object is an element of the
ScreenItems list.

Type identifier in VBS


HMISmartClientView

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-91 Properties

Properties Read Write Description


AllowMenu (Page 1533) - - Specifies whether the shortcut menu is enabled to control the
Sm@rtClient view.
ConnectionType (Page 1596) - - Specifies the type of connector. You can select one of two connection
types.
ConnectOnStart - - Sets up the connection at startup.
Enabled A A Specifies whether the selected object can be operated in runtime.

WinCC Professional V13 SP2 – Programming reference


1456 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Flashing - - Specifies that the text block flashes.
Font (Page 1639) - - Specifies or returns the font.
Height (Page 1649) A - Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) A A Specifies the value of the X coordinate of the object.
LocalCursor (Page 1693) - - Specifies whether the cursor data is transferred separately in order to
increase the performance.
MachineName (Page 1696) A A Sets the network ID of the device that is to be monitored.
Name (Page 1717) A - Returns the object name as STRING.
Password (Page 1741) A A Sets the password for remote monitoring.
ScaleDenominator - - Sets the scaling numerator on the client.
(Page 1764)
ScaleNumerator (Page 1761) - - Sets the scaling numerator on the client.
Scaling (Page 1765) - - TRUE, if an additional scale is used to visualize the values.
ServerScale (Page 1782) - - Specifies whether the Sm@rtClient view can be zoomed in or out.
Shared (Page 1783) - - Specifies that an HMI device is shared by several Sm@rtClient Views.
ShowControls - - Specifies that a toolbar is displayed.
Top (Page 1873) A A Specifies the value of the Y coordinate of the object.
UseCursorKeyScroll - - Sets the use of the background color of the object for printing.
ViewOnly (Page 1936) A A Enables the use of the Sm@rtClient view for remote monitoring or
remote maintenance.
Visible (Page 1936) * A A Specifies whether the selected object is visible.
Width (Page 1946) A - Sets the width of the specified "Ellipsis", "Circle" and "Rectangle" ob‐
jects.

* not visible in the ES

Table 3-92 Methods

Methods Valid Description


Activate (Page 2116) A Activates the permanent window or the root screen.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1457
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

StatusForce (Panels, Comfort Panels, RT Advanced)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Status/Force" object. The StatusForce object is an element of the


ScreenItems list.
If you change the settings for this object with a user-defined function, the changed settings are
retained even after the screen is called again.

Type identifier in VBS


HMIStatusForce

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-93 Properties

Properties Read Write Description


Appearance - - Specifies the layout for this NC subroutine.
BackColor A A Specifies the background color of the selected object.
ColumnsMoveable - - Specifies that the columns can be moved.
CountVisibleItems (Page 1600) * - - Specifies the number of lines contained in the selection list.
Enabled A A Specifies whether the selected object can be operated in runtime.

WinCC Professional V13 SP2 – Programming reference


1458 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


FitToSize - - Specifies that the size of the object should be automatically adap‐
ted to the content.
Flashing - - Specifies that the text block flashes.
FocusColor A A Specifies the color for the focus frame of the selected object when
it is in focus.
FocusWidth A A Specifies the border width of the specified object when the object
is in focus.
Height (Page 1649) A A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) A A Specifies the value of the X coordinate of the object.
Name (Page 1717) A - Returns the object name as STRING.
PLCFilter - - Sets the controller type.
SelectionBackColor (Page 1775) A A Specifies the background color of the selected cells.
SelectionForeColor (Page 1776) A A Specifies the foreground color of the selected cells.
SetOfVisibleColumns - - Sets the visible columns.
ShowReadButton - - Enables the display of the "Read" button.
ShowTableGridlines A A Enables the display of gridlines in the table of the specified object.
(Page 1793)
ShowWriteButton - - Enables the display of the "Write" button.
TableBackColor (Page 1816) A A Specifies the background color of the table cells for the selected
object.
TableFont - - Specifies the font in the table.
TableForeColor A A ??
TableHeaderBackColor A A Specifies the background color in the header of the table of the
(Page 1820) selected object.
TableHeaderFont - - Specifies the text color of the header.
TableHeaderForeColor A A Specifies the text color in the header of the table of the selected
(Page 1821) object.
Top (Page 1873) A A Specifies the value of the Y coordinate of the object.
Visible (Page 1936) * A A Specifies whether the selected object is visible.
Width (Page 1946) A A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

* not visible in the ES

Table 3-94 Methods

Methods Valid Description


Activate (Page 2116) A Activates the permanent window or the root screen.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1459
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Switch (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Switch" object. The Switch object is an element of the ScreenItems list.

The availability of the following object properties depends on the selected mode:

Property "Switch with text" "Switch with graphic" "Switch"


CaptionColor -- -- x
CaptionText -- -- x
HorizontalAlignment X -- --
InnerBackColorOff -- -- x
InnerBackColorOn -- -- x
TextOn x -- x
TextOff x -- x
VerticalAlignment x -- --

Type identifier in VBS


HMISwitch

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

WinCC Professional V13 SP2 – Programming reference


1460 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-95 Properties

Properties Read Write Description


AboveUpperLimitColor - - Sets the color of the specified object for the "High limit violated"
(Page 1516) event.
Authorization (Page 1537) - - Specifies the operating rights of the selected object in runtime.
AutoSizing - - Specifies that the size of the object should be automatically
adapted to the content.
BackColor (Page 1543) A A Specifies the background color of the selected object.
BackFlashingColorOff - - Specifies the background color for flash state "Off".
(Page 1547) *
BackFlashingColorOn - - Specifies the background color for flash state "On".
(Page 1548) *
BackFlashingEnabled - - Specifies whether the background of the specified object flash‐
(Page 1549) * es in runtime.
BackFlashingRate - - Specifies the flash rate of the background for the selected ob‐
(Page 1550) * ject.
BelowLowerLimitColor - - Sets the color of the specified object for the "Low limit violated"
(Page 1555) event.
BorderColor (Page 1560) * - - Specifies the line color of the object.
BorderFlashingColorOff - - Specifies the border line color of the selected object for the flash
(Page 1562) * state "Off".
BorderFlashingColorOn - - Specifies the border line color of the selected object for the flash
(Page 1564) * state "On".
BorderFlashingEnabled - - Specifies whether the border line of the selected object flashes
(Page 1565) * in runtime.
BorderFlashingRate - - Specifies the flash rate of the border line for the selected object.
(Page 1566) *
BorderStyle3D A A Specifies whether the object has a 3D border shading.
BorderWidth (Page 1571) * - - Specifies the line thickness of the object.
BorderWidth3D (Page 1573) * - - Specifies the width of the border for 3D display of the selected
object.
CaptionColor (Page 1579) A A Specifies the color of the text that is displayed in the header of
the selected object.
CaptionFont - - Specifies the character set for the caption.
CaptionText (Page 1580) A A Specifies the text that is displayed in the header of the selected
object.
CornerStyle (Page 1597) * - - Specifies the type of border lines for the selected object.
EdgeStyle * - - Specifies the line style of the selected object.
Enabled (Page 1614) A A Specifies whether the selected object can be operated in run‐
time.
FitToLargest - - Specifies that the size of the object depends on the text length
in all languages.
Flashing - - Specifies that the text block flashes.
FlashingColorOff - - Specifies the border line color of the selected object for the flash
(Page 1631) * state "Off".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1461
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


FlashingColorOn - - Specifies the border line color of the selected object for the flash
(Page 1633) * state "On".
FlashingEnabled - - Specifies whether the border line of the selected object flashes
(Page 1634) * in runtime.
FlashingOnLimitViolation - - Specifies that flashing is activated when a limit is violated.
FlashingRate (Page 1635) * - - Specifies the flash rate of the border line for the selected object.
FocusColor (Page 1637) A A Specifies the color for the focus frame of the selected object
when it is in focus.
FocusWidth (Page 1638) A A Specifies the border width of the specified object when the ob‐
ject is in focus.
Font (Page 1639) - - Specifies or returns the font.
ForeColor (Page 1644) A A Specifies the font color of the text for the selected object.
Height (Page 1649) A A Sets the height of the specified "Ellipsis", "Circle" and "Rectan‐
gle" objects.
HelpText A - Returns the tooltip that is shown in runtime as user help for the
specified object.
HorizontalAlignment A A Specifies the horizontal alignment of the text within the selected
(Page 1663) object.
InnerBackColorOff A A Sets the color underneath the slider of the "Switch" object for
(Page 1667) the object in OFF state.
InnerBackColorOn A A Sets the color underneath the slider of the "Switch" object for
(Page 1668) the object in ON state.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the
screen.
Left (Page 1679) A A Specifies the value of the X coordinate of the object.
LineEndShapeStyle - - Specifies the shape of the line end.
(Page 1690) *
Mode (Page 1715) - - Specifies the field type of the selected object.
Name (Page 1717) A - Returns the object name as STRING.
OnValue - - Specifies the value for the "ON" state in "two-state" mode.
PictureOff (Page 1743) - - Specifies the screen to be displayed in the "Off" state.
PictureOn (Page 1744) - - Specifies the screen to be displayed in the "On" state.
ProcessValue - - Specifies the default for the value to be displayed.
SwitchOrientation - - Specifies the line color of the object.
TextOff (Page 1825) A A Specifies the text to be displayed in the "Off" state of the selec‐
ted object.
TextOn A A Specifies the text to be displayed in the "On" state of the selec‐
ted object.
TextOrientation (Page 1827) * - - Specifies the text orientation of the selected object.
Top (Page 1873) A A Specifies the value of the Y coordinate of the object.
VerticalAlignment A A Specifies the vertical alignment of the text for the selected ob‐
(Page 1934) ject.
Visible (Page 1936) * A A Specifies whether the selected object is visible.
Width (Page 1946) A A Sets the width of the specified "Ellipsis", "Circle" and "Rectan‐
gle" objects.

* not visible in the ES

WinCC Professional V13 SP2 – Programming reference


1462 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-96 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.

SymbolicIOField (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "SymbolicIOField" object. The SymbolicIOField object is an element of the


ScreenItems list.

The availability of the following object properties depends on the selected mode:

Property "Input" "Output" "Input/Output" "Two states"


BackColor x x x x
BorderColor -- x -- x
BorderWidth -- -- -- x
BorderStyle3D -- x -- --
Enabled x -- x --
HelpText x -- x --
VerticalAlignment -- x -- x
HorizontalAlignment -- x -- x

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1463
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Type identifier in VBS


HMISymbolicIOField

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-97 Properties

Properties Read Write Description


AboveUpperLimitColor (Page 1516) - - Sets the color of the specified object for the "High limit viola‐
ted" event.
AcceptOnExit (Page 1517) P P Specifies whether the input field is confirmed automatically
when it is left.
AdaptBorder (Page 1523) - - Specifies whether the border of the specified object is dynam‐
ically adapted to the text size.
AskOperationMotive (Page 1535) P P Specifies whether the reason for operating this object is log‐
ged.
Authorization (Page 1537) P P Specifies the operating rights of the selected object in run‐
time.
BackColor (Page 1543) P, A P, A Specifies the background color of the selected object.
BackFillStyle (Page 1546) P P Defines the fill pattern of the specified object.
BackFlashingColorOff (Page 1547) P P Specifies the background color for flash state "Off".
BackFlashingColorOn (Page 1548) P P Specifies the background color for flash state "On".
BackFlashingEnabled (Page 1549) P P Specifies whether the background of the specified object
flashes in runtime.
BackFlashingRate (Page 1550) P P Specifies the flash rate of the background for the selected
object.
BelowLowerLimitColor (Page 1555) - - Sets the color of the specified object for the "Low limit violated"
event.
BitNumber (Page 1555) P P Specifies the bit whose status must change to trigger a value
change.
BorderBackColor (Page 1558) P P Specifies the background color of the broken border line for
the selected object.
BorderColor (Page 1560) P, A P, A Specifies the line color of the object.
BorderFlashingColorOff (Page 1562) P P Specifies the border line color of the selected object for the
flash state "Off".
BorderFlashingColorOn (Page 1564) P P Specifies the border line color of the selected object for the
flash state "On".
BorderFlashingEnabled (Page 1565) P P Specifies whether the border line of the selected object flash‐
es in runtime.
BorderFlashingRate (Page 1566) P P Specifies the flash rate of the border line for the selected ob‐
ject.
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.

WinCC Professional V13 SP2 – Programming reference


1464 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


BorderStyle3D A A Specifies whether the object has a 3D border shading.
BorderWidth (Page 1571) P, A P, A Specifies the line thickness of the object.
BottomMargin - - Sets the margin between the text and the bottom edge of the
object.
CaptionBackColor (Page 1579) P P Specifies the background color of the caption for the selected
object.
CaptionColor (Page 1579) P P Specifies the color of the text that is displayed in the header
of the selected object.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.
CountVisibleItems (Page 1600) P P Specifies the number of lines contained in the selection list.
CursorControl (Page 1601) P P Specifies whether the mouse cursor jumps to the next field of
the TAB sequence after leaving a field.
DrawInsideFrame (Page 1610) - - Specifies whether the border line of the selected object with
a line thickness greater than 1 should be drawn within the
border or symmetrically to the border.
EdgeStyle (Page 1612) P P Specifies the line style of the selected object.
EditOnFocus (Page 1613) P P Specifies whether data input is immediately possible if the in‐
put field is selected using the "Tab" key.
Enabled (Page 1614) P, A P, A Specifies whether the selected object can be operated in run‐
time.
FieldLength - - Specifies that the "field length string" field is read-only.
FillPatternColor (Page 1627) P P Specifies the color of the fill pattern for the selected object.
FitToLargest - - Specifies that the size of the object depends on the text length
in all languages.
Flashing - - Specifies that the text block flashes.
FlashingColorOff (Page 1631) P P Specifies the border line color of the selected object for the
flash state "Off".
FlashingColorOn (Page 1633) P P Specifies the border line color of the selected object for the
flash state "On".
FlashingEnabled (Page 1634) P P Specifies whether the border line of the selected object flash‐
es in runtime.
FlashingOnLimitViolation - - Specifies that flashing is activated when a limit is violated.
FlashingRate (Page 1635) P P Specifies the flash rate of the border line for the selected ob‐
ject.
FocusColor (Page 1637) - - Specifies the color for the focus frame of the selected object
when it is in focus.
FocusWidth (Page 1638) - - Specifies the border width of the specified object when the
object is in focus.
Font (Page 1639) - - Specifies or returns the font.
FontBold (Page 1640) P P Specifies whether the text of the selected object is shown in
bold.
FontItalic (Page 1641) P P Specifies whether the text of the selected object is shown in
italics.
FontName (Page 1642) P P Specifies the font of the selected object.
FontSize (Page 1642) P P Specifies the font size of the text for the selected object.
FontUnderline (Page 1643) P P Specifies whether the text of the selected object is underlined.
ForeColor (Page 1644) P, A P, A Specifies the font color of the text for the selected object.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1465
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Height (Page 1649) P, A P, A Sets the height of the specified "Ellipsis", "Circle" and "Rec‐
tangle" objects.
HelpText A - Returns the tooltip that is shown in runtime as user help for
the specified object.
HorizontalAlignment (Page 1663) P, A P, A Specifies the horizontal alignment of the text within the selec‐
ted object.
InputValue (Page 1668) - - Defines the value entered by the user in the IO field.
ItemBorderStyle (Page 1670) P P Sets the separation line style in the selection list of the speci‐
fied object.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the
screen.
Left (Page 1679) P, A P, A Specifies the value of the X coordinate of the object.
LeftMargin - - Sets the margin between the text and the left edge of the ob‐
ject.
LineEndShapeStyle (Page 1690) P P Specifies the shape of the line end.
LogOperation (Page 1694) P P Specifies whether, after operating this object, an alarm is out‐
put to the alarm system.
Mode (Page 1715) P P Specifies the field type of the selected object.
Name (Page 1717) P, A - Returns the object name as STRING.
OnValue - - Specifies the value for the "ON" state in "two-state" mode.
ProcessValue (Page 1747) P P Specifies the default for the value to be displayed.
RightMargin - - Sets the margin between the text and the right edge of the
object.
SelectBackColor (Page 1769) P P Specifies the background color of the selected cells.
SelectForeColor (Page 1774) P P Specifies the foreground color of the selected cells.
SeparatorBackColor (Page 1779) P P Specifies the background color of the broken separation lines
in the selection list of the specified object.
SeparatorColor (Page 1780) P P Sets the color of the separation lines in the selection list of the
specified object.
SeparatorCornerStyle (Page 1781) P P Sets the shape of corners for the object of the type "ScreenI‐
tem" with "SymbolicIOField" format.
SeparatorLineEndShapeStyle P P Sets the shape of line ends for the object of the type "Screen‐
(Page 1782) Item" with "SymbolicIOField" format.
SeparatorStyle (Page 1781) P P Sets the separation line style in the selection list of the speci‐
fied object.
SeparatorWidth (Page 1781) P P Sets the width separation lines in the selection list of the speci‐
fied object.
ShowBadTagState (Page 1784) P P Specifies whether an object is grayed out if its associated tag
has a bad quality code or tag state.
ShowDropDownButton - - Sets the display of a button for the selection list.
ShowDropDownList - - Specifies selection of the entry from a selection list.
TextList (Page 1825) - - Specifies the label for the text field.
TextOff (Page 1825) - - Specifies the text to be displayed in the "Off" state of the se‐
lected object.
TextOn - - Specifies the text to be displayed in the "On" state of the se‐
lected object.
TextOrientation (Page 1827) P P Specifies the text orientation of the selected object.

WinCC Professional V13 SP2 – Programming reference


1466 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P, A P, A Specifies the value of the Y coordinate of the object.
TopMargin - - Sets the margin between the text and the top edge of the ob‐
ject.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the ob‐
ject.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading de‐
(Page 1918) fined in the active design.
VerticalAlignment (Page 1934) P, A P, A Specifies the vertical alignment of the text for the selected
object.
Visible (Page 1936) P, A P, A Specifies whether the selected object is visible.
Width (Page 1946) P, A P, A Sets the width of the specified "Ellipsis", "Circle" and "Rectan‐
gle" objects.

Table 3-98 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1467
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

SymbolLibrary (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "SymbolLibrary" object. The SymbolLibrary object is an element of the


ScreenItems list.

Type identifier in VBS


HMISymbolLibrary

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-99 Properties

Properties Read Write Description


AboveUpperLimitColor - - Sets the color of the specified object for the "High limit violated"
(Page 1516) event.
Authorization (Page 1537) - - Specifies the operating rights of the selected object in runtime.
BackColor (Page 1543) P, A P, A Specifies the background color of the selected object.
BackFillStyle (Page 1546) P P Defines the fill pattern of the specified object.

WinCC Professional V13 SP2 – Programming reference


1468 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


BelowLowerLimitColor - - Sets the color of the specified object for the "Low limit violated"
(Page 1555) event.
BlinkColor (Page 1556) P, A P, A Sets the flashing color for the "SymbolLibrary" object.
BlinkMode (Page 1556) P P Sets the type of flashing graphic for the specified object.
BlinkSpeed (Page 1557) P P Sets the flash rate.
ChangeMouseCursor P P Specifies the appearance of the cursor after its transformation
(Page 1585) in mouse over icon mode in runtime.
Enabled (Page 1614) P, A P, A Specifies whether the selected object can be operated in run‐
time.
FillColorMode (Page 1627) P P Sets the type of foreground for the specified object.
FixedAspectRatio (Page 1631) P P Specifies whether the aspect ratio should be retained on
changes of the icon size, or follow the change dynamically.
Flashing - - Specifies that the text block flashes.
FlashingOnLimitViolation - - Specifies that flashing is activated when a limit is violated.
Flip (Page 1637) P P Flips the symbol on the vertical and / or horizontal center axis
of the icon.
ForeColor (Page 1644) P, A P, A Specifies the font color of the text for the selected object.
Height (Page 1649) P, A P, A Sets the height of the specified "Ellipsis", "Circle" and "Rectan‐
gle" objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P, A P, A Specifies the value of the X coordinate of the object.
Name (Page 1717) P, A - Returns the object name as STRING.
ProcessValue - - Specifies the default for the value to be displayed.
Rotation (Page 1753) P P Specifies the angle of rotation in degrees of the selected object.
Top (Page 1873) P, A P, A Specifies the value of the Y coordinate of the object.
Visible (Page 1936) P, A P, A Specifies whether the selected object is visible.
Width (Page 1946) P, A P, A Sets the width of the specified "Ellipsis", "Circle" and "Rectan‐
gle" objects.

Table 3-100 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1469
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

SystemDiagnoseView (Panels, Comfort Panels, RT Advanced)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "System diagnostic view" object. The SystemDiagnoseView object is an


element of the ScreenItems list.

Type identifier in VBS


HMISysDiagView

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-101 Properties

Properties Read Write Description


Authorization (Page 1537) A A Specifies the operating rights of the selected object in run‐
time.
BackgroundColor A A Specifies the background color.
ComponentInfoText A A Specifies the tooltip of the system diagnostics view in run‐
time.

WinCC Professional V13 SP2 – Programming reference


1470 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Enabled A A Specifies whether the selected object can be operated in
runtime.
Height (Page 1649) A A Sets the height of the specified "Ellipsis", "Circle" and
"Rectangle" objects.
InfoArea_BackgroundColor A A Specifies the background for grid control elements.
InfoArea_ColumnsMovable A A Specifies the mobility of columns.
InfoArea_DefaultTextColor A A Sets the text color.
InfoArea_ErrorTextBackgroundColor A A Specifies the background color of a cell in error case.
InfoArea_ErrorTextColor A A Sets the text color of a cell in error case.
InfoArea_FocusFrameColor A A Sets the color of the focus frame.
InfoArea_FocusFrameWidth A A Sets the line thickness of the focus rectangle.
InfoArea_Font A A Sets the fonts of the grid views.
InfoArea_ShowGridLines A A Sets the grid lines.
InfoArea_TableHeaderBackgroundCol‐ A A Specifies the background color of the table header.
or
InfoArea_TableHeaderTextColor A A Sets the text color of the table header.
InputAddressText A A Sets the input address.
ItemText_AKZ A A Specifies the header for the "AKZ" column.
ItemText_Descriptor A A Specifies the header for the "Descriptor" column.
ItemText_ErrorText A A Specifies the header for the "ErrorText" column.
ItemText_InstallationDate A A Specifies the header for the "InstallationDate" column.
ItemText_LADDR A A Specifies the header for the "LADDR" column.
ItemText_Name A A Sets the labeling of the "Name" column.
ItemText_OKZ A A Specifies the header for the "OKZ" column.
ItemText_OperationState A A Specifies the header for the "OperationState" column.
ItemText_OrderID A A Specifies the header for the "OrderID" column.
ItemText_Rack A A Specifies the header for the "Rack" column.
ItemText_Slot A A Specifies the header for the "Slot" column.
ItemText_SoftwareRevision A A Specifies the header for the "SoftwareRevision" column.
ItemText_State A A Specifies the header for the "State" column.
ItemText_Station A A Specifies the header for the "Station" column.
ItemText_SubAddress A A Specifies the header for the "SubAddress" column.
ItemText_SubSlot A A Specifies the header for the "SubSlot" column.
ItemText_SubSystem A A Specifies the header for the "SubSystem" column.
ItemText_Type A A Specifies the header for the "Type" column.
IV_ShowItem_AKZ A A Enables the display of the "AKZ" column.
IV_ShowItem_Descriptor A A Enables the display of the "Descriptor" column.
IV_ShowItem_ErrorText A A Enables the display of the "ErrorText" column.
IV_ShowItem_InstallationDate A A Enables the display of the "InstallationDate" column.
IV_ShowItem_LADDR A A Enables the display of the "LADDR" column.
IV_ShowItem_Name A A Enables the display of the "Name" column.
IV_ShowItem_OKZ A A Enables the display of the "OKZ" column.
IV_ShowItem_OperationState A A Enables the display of the "OperationState" column.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1471
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


IV_ShowItem_OrderID A A Enables the display of the "OrderID" column.
IV_ShowItem_Rack A A Enables the display of the "Rack" column.
IV_ShowItem_Slot A A Enables the display of the "Slot" column.
IV_ShowItem_SoftwareRevision A A Enables the display of the "SoftwareRevision" column.
IV_ShowItem_State A A Enables the display of the "State" column.
IV_ShowItem_Station A A Enables the display of the "Station" column.
IV_ShowItem_SubAddress A A Enables the display of the "SubAddress" column.
IV_ShowItem_SubSlot A A Enables the display of the "SubSlot" column.
IV_ShowItem_SubSystem A A Enables the display of the "SubSystem" column.
IV_ShowItem_Type A A Enables the display of the "Type" column.
Layer (Page 1675) A - Returns the layer that contains an object as LONG in the
screen.
Left (Page 1679) A A Specifies the value of the X coordinate of the object.
NavigationPath_Font A A Sets the font type of the navigation path.
NavigationPath_TextColor A A Sets the text color of the navigation path.
ObjectName (Page 1997) A - Returns the object name as STRING.
OutputAddressText A A Specifies the text for the output address.
ShowNavigationButtons A A Enables the display of navigation buttons.
ShowPathInformation A A Enables the display of the navigation path.
ShowSplittedView A A Enables a split view.
TableHeaderFont A A Specifies the text color of the header.
Top (Page 1873) A A Specifies the value of the Y coordinate of the object.
Type (Page 2100) A - Returns the type of the specified object as STRING.
Parent (Page 2082) A - Returns the screen in which the specified object is embed‐
ded.
UV_ShowItem_AKZ A A Enables the display of the "AKZ" column.
UV_ShowItem_Descriptor A A Enables the display of the "Descriptor" column.
UV_ShowItem_InstallationDate A A Enables the display of the "InstallationDate" column.
UV_ShowItem_LADDR A A Enables the display of the "LADDR" column.
UV_ShowItem_Name A A Enables the display of the "Name" column.
UV_ShowItem_OKZ A A Enables the display of the "OKZ" column.
UV_ShowItem_OperationState A A Enables the display of the "OperationState" column.
UV_ShowItem_OrderID A A Enables the display of the "OrderID" column.
UV_ShowItem_Rack A A Enables the display of the "Rack" column.
UV_ShowItem_Slot A A Enables the display of the "Slot" column.
UV_ShowItem_SoftwareRevision A A Enables the display of the "SoftwareRevision" column.
UV_ShowItem_State A A Enables the display of the "State" column.
UV_ShowItem_Station A A Enables the display of the "Station" column.
UV_ShowItem_SubAddress A A Enables the display of the "SubAddress" column.
UV_ShowItem_SubSlot A A Enables the display of the "SubSlot" column.
UV_ShowItem_SubSystem A A Enables the display of the "SubSystem" column.
UV_ShowItem_Type A A Enables the display of the "Type" column.

WinCC Professional V13 SP2 – Programming reference


1472 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Visible (Page 1936) A A Specifies whether the selected object is visible.
Width (Page 1946) A A Enables the display of the "Slot" column.

Table 3-102 Methods

Methods Valid Description


Activate (Page 2116) A Activates the permanent window or the root screen.

See also
Name (Page 1717)

SystemDiagnoseWindow (Panels, Comfort Panels, RT Advanced)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "System diagnostic window" object. The SystemDiagnoseWindow object is an


element of the ScreenItems list.

Type identifier in VBS


HMISysDiagWindow

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1473
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-103 Properties

Properties Read Write Description


Authorization (Page 1537) A A Specifies the operating rights of the selected object in
runtime.
BackgroundColor A A Specifies the background color.
Caption (Page 1578) A A Specifies the text that is displayed in the header of the
selected object.
CaptionActive A A Enables display of the caption.
Closable A A Specifies that the control can be closed in runtime.
ComponentInfoText A A Specifies the tooltip of the system diagnostics view in
runtime.
Enabled A A Specifies whether the selected object can be operated
in runtime.
Height (Page 1649) A A Sets the height of the specified "Ellipsis", "Circle" and
"Rectangle" objects.
InfoArea_BackgroundColor A A Specifies the background for grid control elements.
InfoArea_ColumnsMovable A A Specifies the mobility of columns.
InfoArea_DefaultTextColor A A Sets the text color.
InfoArea_ErrorTextBackgroundColor A A Specifies the background color of a cell in error case.
InfoArea_ErrorTextColor A A Sets the text color of a cell in error case.
InfoArea_FocusFrameColor A A Sets the color of the focus frame.
InfoArea_FocusFrameWidth A A Sets the line thickness of the focus rectangle.
InfoArea_Font A A Sets the fonts of the grid views.
InfoArea_ShowGridLines A A Sets the grid lines.
InfoArea_TableHeaderBackgroundColor A A Specifies the background color of the table header.
InfoArea_TableHeaderTextColor A A Sets the text color of the table header.
InputAddressText A A Sets the input address.
ItemText_AKZ A A Specifies the header for the "AKZ" column.
ItemText_Descriptor A A Specifies the header for the "Descriptor" column.
ItemText_ErrorText A A Specifies the header for the "ErrorText" column.
ItemText_InstallationDate A A Specifies the header for the "InstallationDate" column.
ItemText_LADDR A A Specifies the header for the "LADDR" column.
ItemText_Name A A Sets the labeling of the "Name" column.
ItemText_OKZ A A Specifies the header for the "OKZ" column.
ItemText_OperationState A A Specifies the header for the "OperationState" column.
ItemText_OrderID A A Specifies the header for the "OrderID" column.

WinCC Professional V13 SP2 – Programming reference


1474 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


ItemText_Rack A A Specifies the header for the "Rack" column.
ItemText_Slot A A Specifies the header for the "Slot" column.
ItemText_SoftwareRevision A A Specifies the header for the "SoftwareRevision" column.
ItemText_State A A Specifies the header for the "State" column.
ItemText_Station A A Specifies the header for the "Station" column.
ItemText_SubAddress A A Specifies the header for the "SubAddress" column.
ItemText_SubSlot A A Specifies the header for the "SubSlot" column.
ItemText_SubSystem A A Specifies the header for the "SubSystem" column.
ItemText_Type A A Specifies the header for the "Type" column.
IV_ShowItem_AKZ A A Enables the display of the "AKZ" column.
IV_ShowItem_Descriptor A A Enables the display of the "Descriptor" column.
IV_ShowItem_ErrorText A A Enables the display of the "ErrorText" column.
IV_ShowItem_InstallationDate A A Enables the display of the "InstallationDate" column.
IV_ShowItem_LADDR A A Enables the display of the "LADDR" column.
IV_ShowItem_Name A A Enables the display of the "Name" column.
IV_ShowItem_OKZ A A Enables the display of the "OKZ" column.
IV_ShowItem_OperationState A A Enables the display of the "OperationState" column.
IV_ShowItem_OrderID A A Enables the display of the "OrderID" column.
IV_ShowItem_Rack A A Enables the display of the "Rack" column.
IV_ShowItem_Slot A A Enables the display of the "Slot" column.
IV_ShowItem_SoftwareRevision A A Enables the display of the "SoftwareRevision" column.
IV_ShowItem_State A A Enables the display of the "State" column.
IV_ShowItem_Station A A Enables the display of the "Station" column.
IV_ShowItem_SubAddress A A Enables the display of the "SubAddress" column.
IV_ShowItem_SubSlot A A Enables the display of the "SubSlot" column.
IV_ShowItem_SubSystem A A Enables the display of the "SubSystem" column.
IV_ShowItem_Type A A Enables the display of the "Type" column.
Layer (Page 1675) A - Returns the layer that contains an object as LONG in
the screen.
Left (Page 1679) A A Specifies the value of the X coordinate of the object.
Modal A A Specifies that you must acknowledge the alarm view
before continuing with your work.
NavigationPath_Font A A Sets the font type of the navigation path.
NavigationPath_TextColor A A Sets the text color of the navigation path.
ObjectName (Page 1997) A - Returns the object name as STRING.
OutputAddressText A A Specifies the text for the output address.
Resizable A A Enables resizing of the window.
ShowNavigationButtons A A Enables the display of navigation buttons.
ShowPathInformation A A Enables the display of the navigation path.
ShowSplittedView A A Enables a split view.
TableHeaderFont A A Specifies the text color of the header.
Top (Page 1873) A A Specifies the value of the Y coordinate of the object.
Type (Page 2100) A - Returns the type of the specified object as STRING.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1475
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Parent (Page 2082) A - Returns the screen in which the specified object is em‐
bedded.
UV_ShowItem_AKZ A A Enables the display of the "AKZ" column.
UV_ShowItem_Descriptor A A Enables the display of the "Descriptor" column.
UV_ShowItem_InstallationDate A A Enables the display of the "InstallationDate" column.
UV_ShowItem_LADDR A A Enables the display of the "LADDR" column.
UV_ShowItem_Name A A Enables the display of the "Name" column.
UV_ShowItem_OKZ A A Enables the display of the "OKZ" column.
UV_ShowItem_OperationState A A Enables the display of the "OperationState" column.
UV_ShowItem_OrderID A A Enables the display of the "OrderID" column.
UV_ShowItem_Rack A A Enables the display of the "Rack" column.
UV_ShowItem_Slot A A Enables the display of the "Slot" column.
UV_ShowItem_SoftwareRevision A A Enables the display of the "SoftwareRevision" column.
UV_ShowItem_State A A Enables the display of the "State" column.
UV_ShowItem_Station A A Enables the display of the "Station" column.
UV_ShowItem_SubAddress A A Enables the display of the "SubAddress" column.
UV_ShowItem_SubSlot A A Enables the display of the "SubSlot" column.
UV_ShowItem_SubSystem A A Enables the display of the "SubSystem" column.
UV_ShowItem_Type A A Enables the display of the "Type" column.
Visible (Page 1936) A A Specifies whether the selected object is visible.
Width (Page 1946) A A Sets the width of the specified "Ellipsis", "Circle" and
"Rectangle" objects.
WindowMode A A Sets the window mode.

Table 3-104 Methods

Methods Valid Description


Activate (Page 2116) A Activates the permanent window or the root screen.

See also
Name (Page 1717)

WinCC Professional V13 SP2 – Programming reference


1476 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TextField (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "TextField" object. The TextField object is an element of the ScreenItems list.

Type identifier in VBS


HMITextField

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-105 Properties

Properties Read Write Description


AdaptBorder (Page 1523) P P Specifies whether the border of the specified object is dynami‐
cally adapted to the text size.
Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
BackColor (Page 1543) P, A P, A Specifies the background color of the selected object.
BackFillStyle (Page 1546) P P Defines the fill pattern of the specified object.
BackFlashingColorOff (Page 1547) P P Specifies the background color for flash state "Off".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1477
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


BackFlashingColorOn (Page 1548) P P Specifies the background color for flash state "On".
BackFlashingEnabled (Page 1549) P P Specifies whether the background of the specified object flash‐
es in runtime.
BackFlashingRate (Page 1550) P P Specifies the flash rate of the background for the selected ob‐
ject.
BorderBackColor (Page 1558) P P Specifies the background color of the broken border line for the
selected object.
BorderColor (Page 1560) P, A P, A Specifies the line color of the object.
BorderFlashingColorOff P P Specifies the border line color of the selected object for the flash
(Page 1562) state "Off".
BorderFlashingColorOn P P Specifies the border line color of the selected object for the flash
(Page 1564) state "On".
BorderFlashingEnabled P P Specifies whether the border line of the selected object flashes
(Page 1565) in runtime.
BorderFlashingRate (Page 1566) P P Specifies the flash rate of the border line for the selected object.
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
BorderStyle3D A A Specifies whether the object has a 3D border shading.
BorderWidth (Page 1571) P, A P, A Specifies the line thickness of the object.
BottomMargin - - Sets the margin between the text and the bottom edge of the
object.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.
DrawInsideFrame (Page 1610) P P Specifies whether the border line of the selected object with a
line thickness greater than 1 should be drawn within the border
or symmetrically to the border.
EdgeStyle (Page 1612) A A Specifies the line style of the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in run‐
time.
FillPatternColor (Page 1627) P P Specifies the color of the fill pattern for the selected object.
FitToLargest - - Specifies that the size of the object depends on the text length
in all languages.
Flashing - - Specifies that the text block flashes.
FlashingColorOff (Page 1631) P P Specifies the border line color of the selected object for the flash
state "Off".
FlashingColorOn (Page 1633) P P Specifies the border line color of the selected object for the flash
state "On".
FlashingEnabled (Page 1634) P P Specifies whether the border line of the selected object flashes
in runtime.
FlashingRate (Page 1635) P P Specifies the flash rate of the border line for the selected object.
Font (Page 1639) - - Specifies or returns the font.
FontBold (Page 1640) P P Specifies whether the text of the selected object is shown in
bold.
FontItalic (Page 1641) P P Specifies whether the text of the selected object is shown in
italics.
FontName (Page 1642) P P Specifies the font of the selected object.
FontSize (Page 1642) P P Specifies the font size of the text for the selected object.
FontUnderline (Page 1643) P P Specifies whether the text of the selected object is underlined.

WinCC Professional V13 SP2 – Programming reference


1478 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


ForeColor (Page 1644) P, A P, A Specifies the font color of the text for the selected object.
Height (Page 1649) P, A P, A Sets the height of the specified "Ellipsis", "Circle" and "Rectan‐
gle" objects.
HorizontalAlignment (Page 1663) P, A P, A Specifies the horizontal alignment of the text within the selected
object.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the
screen.
Left (Page 1679) P, A P, A Specifies the value of the X coordinate of the object.
LeftMargin - - Sets the margin between the text and the left edge of the object.
LineEndShapeStyle (Page 1690) P P Specifies the shape of the line end.
LineWrap * - - Specifies the line break within the object.
Name (Page 1717) P, A - Returns the object name as STRING.
RelativeFillLevel (Page 1752) P P Specifies the fill percentage for the object.
RightMargin - - Sets the margin between the text and the right edge of the ob‐
ject.
RotationAngle (Page 1754) P P Specifies the angle of rotation in degrees.
RotationCenterLeft (Page 1754) P P Specifies the X coordinate of the pivot point for the object in
runtime.
RotationCenterTop (Page 1755) P P Specifies the Y coordinate of the pivot point for the object in
runtime.
ShowFillLevel (Page 1786) P P Specifies whether the selected object is filled.
Text (Page 1824) P, A P, A Specifies the label for the text field.
TextOrientation (Page 1827) P P Specifies the text orientation of the selected object.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P, A P, A Specifies the value of the Y coordinate of the object.
TopMargin - - Sets the margin between the text and the top edge of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the ob‐
ject.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading de‐
(Page 1918) fined in the active design.
VerticalAlignment (Page 1934) P, A P, A Specifies the vertical alignment of the text for the selected ob‐
ject.
Visible (Page 1936) P, A P, A Specifies whether the selected object is visible.
Width (Page 1946) P, A P, A Sets the width of the specified "Ellipsis", "Circle" and "Rectan‐
gle" objects.

* not visible in the ES

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1479
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-106 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

TrendRulerControl (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Value table" object. The TrendRulerControl object is an element of the
ScreenItems list.

Type identifier in VBS


HMITrendRulerControl

Example
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 Professional V13 SP2 – Programming reference


1480 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-107 Properties

Properties Read Write Description


ApplyProjectSettingsForDesignMode - - Specifies that the project settings are used for the design.
AutoCompleteColumns (Page 1538) P P Specifies whether empty columns are shown if the control
is wider than the configured columns.
AutoCompleteRows (Page 1539) P P Specifies whether empty rows are shown if the control is
longer than the number of configured rows.
AutoPosition P P Sets the automatic repositioning mode.
AutoSelectionColors (Page 1540) P P Specifies whether the colors defined by the system are
used as the selection colors for cells and rows.
AutoSelectionRectColor (Page 1540) P P Specifies whether the selection frame is shown with the
color defined by the system.
AutoShow P P Specifies the automatic display of the value table.
BackColor (Page 1543) P P Specifies the background color of the selected object.
BlockAlign * P P Sets the alignment.
BlockAutoPrecisions * P P Specifies that the number of decimal places displayed for
an axis is adjusted automatically.
BlockCaption * P P Sets the caption.
BlockCount * P P Sets the number of blocks.
BlockDateFormat * P P Specifies the date format.
BlockExponentialFormat * P P Enables the use of the exponential notation.
BlockHideText * P P Specifies whether the text is displayed.
BlockHideTitleText * P P Specifies whether the text is displayed.
BlockId * P P Sets the ID.
BlockIndex P P The index specifies the block to which other properties
such as names are referenced.
BlockLength * P P Specifies the number of displayed characters.
BlockName * P P Sets the name of a block.
BlockPrecisions * P P Specifies the number of displayed decimal places.
Blocks - - Sets the alarm blocks.
BlockShowDate * P P Specifies that the date is to be displayed.
BlockShowIcon * P P Specifies the tooltip text.
BlockShowTitleIcon * P P Enables the display of title as icon.
BlockTimeFormat * P P Specifies the time format.
BlockUseSourceFormat * P P Enables the use of the source format.
BorderColor (Page 1560) P P Specifies the line color of the object.
BorderWidth (Page 1571) P P Specifies the line thickness of the object.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1481
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Caption (Page 1578) P P Specifies the text that is displayed in the header of the
selected object.
CellCut (Page 1581) P P Specifies whether the contents of the cells are abbreviated
if the cells are too narrow.
CellSpaceBottom (Page 1582) P P Specifies the bottom margin of the table cells.
CellSpaceLeft (Page 1582) P P Sets the left indent for the table cells.
CellSpaceRight (Page 1583) P P Specifies the right indent of the table cells.
CellSpaceTop (Page 1583) P P Specifies the top margin of the table cells.
Closeable (Page 1587) P P Specifies that the control can be closed in runtime.
ColumnAdd * P P Adds a column.
ColumnCount * P P Displays the number of columns.
ColumnIndex P P The index specifies on which column other properties, e.g.
initial value are based.
ColumnName * P P Specifies the name of a column.
ColumnRemove * P P Removes a column.
ColumnRepos * P P Repositions the column.
ColumnResize (Page 1590) P P Enables changes to the width of columns.
ColumnScrollbar (Page 1591) P P Specifies the scroll bar type.
ColumnSort * P P Sets the type of sorting.
ColumnSortIndex * P P Specifies the sorting order.
ColumnTitleAlignment P P Specifies the type of column title alignment.
ColumnTitles (Page 1595) P P Specifies whether the column header is displayed.
ColumnVisible * P P Enables the visibility of a column.
ControlDesignMode (Page 1798) P P Specifies the design.
ExportDirectoryChangeable P P Specifies whether the data export directory can be
(Page 1620) changed in runtime.
ExportDirectoryname (Page 1620) P P Specifies the target directory for the exported Runtime da‐
ta.
ExportFileExtension (Page 1621) P P Specifies the file extension of the export file. Only the "csv"
file extension is currently supported.
ExportFilename (Page 1621) P P Specifies the name of the target file for the exported Run‐
time data.
ExportFilenameChangeable P P Specifies whether the export file name can be changed in
(Page 1622) runtime.
ExportFormatGuid (Page 1622) P P Default assignment of the ID number and export provider.
ExportFormatName (Page 1623) P P Specifies the export file format. Only the "csv" file format
is currently available for the export.
ExportParameters (Page 1624) P P Specifies the parameters of the selected format by means
of the "Properties" dialog.
ExportSelection (Page 1624) P P Specifies the file extension of the export file. Only the "csv"
file extension is currently supported.
ExportShowDialog (Page 1625) P P Specifies whether the data export dialog is shown in run‐
time.
Font (Page 1639) - - Specifies or returns the font.
GridLineColor (Page 1647) P P Specifies the color for the grid lines.

WinCC Professional V13 SP2 – Programming reference


1482 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


GridLineWidth (Page 1648) P P Specifies the width of the separation lines in pixels.
Height (Page 1649) P - Sets the height of the specified "Ellipse", "Circle" and "Rec‐
tangle" objects.
HorizontalGridLines (Page 1664) P P Specifies whether horizontal separation lines are dis‐
played.
IconSpace (Page 1666) P P Specifies the spacing between icons and text in the table
cells.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the
screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineColor (Page 1689) P P Sets the color of the window separation lines.
LineWidth (Page 1691) P P Specifies the line thickness of the selected object.
Moveable (Page 1716) P P Specifies whether the window can be moved in runtime.
Name (Page 1717) P - Returns the object name as STRING.
PrintJob P P Specifies a print job
RowScrollbar (Page 1756) P P Specifies whether row scroll bars are displayed.
RowTitleAlignment P P Specifies the type of row title alignment.
RowTitles P P Specifies that row headers will be displayed.
RTPersistence (Page 1757) P P Specifies how online configurations of WinCC are re‐
tained.
RTPersistencePasswordLevel P P Specifies the authorization required for online configura‐
(Page 2007) tion in runtime.
RTPersistenceType (Page 1758) - - Specifies how online configurations of WinCC are re‐
tained.
RulerType P P Sets the ruler type.
SelectedCellColor (Page 1769) P P Specifies the background color of the selected cell.
SelectedCellForeColor (Page 1770) P P Specifies the font color of the selected cell.
SelectedRowColor (Page 1771) P P Specifies the background color of the selected row.
SelectedRowForeColor (Page 1772) P P Specifies the font color of the selected row.
SelectedTitleColor (Page 1773) P P Specifies the background color of a selected table header.
SelectedTitleForeColor (Page 1773) P P Specifies the font color of the selected table header.
SelectionColoring (Page 1776) P P Specifies whether selection colors are used for cells or
rows.
SelectionRect (Page 1777) P P Specifies whether a selection frame is used for the selec‐
ted cells or rows.
SelectionRectColor (Page 1777) P P Specifies the color of the selection rectangle in the alarm
window if SelectionType equals "1".
SelectionRectWidth (Page 1778) P P Specifies the line width of the selection rectangle in the
alarm window if SelectionType equals "1".
SelectionType (Page 1779) P P Specifies the number of lines you can mark.
ShareSpaceWithSourceControl P P Enables the display of the value table in the visualization
range of the data source.
ShowSortButton (Page 1791) P P Specifies whether the sorting button is shown above the
vertical scroll bar.
ShowSortIcon (Page 1792) P P Specifies whether the sorting icon is displayed.
ShowSortIndex (Page 1792) P P

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1483
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


ShowTitle (Page 1795) P P Specifies the layout of the control window's header.
Sizeable (Page 1797) P P Specifies that the size of an object can be changed in run‐
time.
SortSequence (Page 1799) P P Specifies how the sorting order can be changed by mouse
click.
SourceControl P P Sets the data source.
SourceControlType P P Sets the data source type.
StatusbarBackColor (Page 1802) P P Specifies the background color of the status bar.
StatusbarElementAdd (Page 1803) * P P Creates a new, user-defined status bar element.
StatusbarElementAutoSize (Page 1803) P P Specifies whether the width of the selected status bar ele‐
* ment is set automatically.
StatusbarElementCount (Page 1804) * P P Specifies the number of configurable status bar elements.
StatusbarElementIconId (Page 1805) * P P Default assignment of the ID number and icon of a status
bar element.
StatusbarElementId (Page 1805) * P P Unique ID of the selected status bar element.
StatusbarElementIndex (Page 1806) P P References a status bar element. You can use this prop‐
erty to assign the values of other properties to a specific
element of the status bar.
StatusbarElementName (Page 1807) * P P Displays the object name of the selected status bar ele‐
ment.
StatusbarElementRemove (Page 1807) P P Removes the selected status bar element.
*
StatusbarElementRename (Page 1808) P P Renames the user-defined status bar element that is ref‐
* erenced by means of the "StatusbarElementIndex" prop‐
erty.
StatusbarElementRepos * P P Specifies the index that is assigned to the element.
StatusbarElements (Page 1808) - - Specifies the elements that are to be shown in the status
bar.
StatusbarElementText P P Specifies the text of the currently selected status bar ele‐
ment.
StatusbarElementTooltipText P P Specifies the tooltip text for the user-defined status bar
(Page 1809) * element.
StatusbarElementUserDefined P P Indicates whether the configuration engineer has added
(Page 1809) * the status bar element as a new user-defined element.
StatusbarElementVisible (Page 1810) * P P In the list, activate the status bar elements that you wish
to display in runtime.
StatusbarElementWidth (Page 1810) * P P Specifies the width of the selected status bar element in
pixels.
StatusbarFont - - Status bar font
StatusbarFontColor (Page 1811) P P Specifies the color of the text in the status bar.
StatusbarShowTooltips (Page 1812) P P Specifies whether tooltips are displayed for the elements
of the status bar in runtime.
StatusbarText (Page 1812) P P Default text in the status bar.
StatusbarUseBackColor (Page 1813) P P Specifies whether the background color of the status bar
is shown.
StatusbarVisible (Page 1814) P P Specifies whether the status bar of the control is displayed.

WinCC Professional V13 SP2 – Programming reference


1484 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


TableColor (Page 1817) P P Specifies the background color of the rows. Use this to
open the color selection dialog.
TableColor2 (Page 1817) P P Specifies the background color of "Row color 2".
TableForeColor (Page 1818) P P
TableForeColor2 (Page 1819) P P Specifies the font color of "Row color 2".
TimeBase (Page 1831) P P Sets the timebase.
TitleColor P P Specifies the color of the header.
TitleCut (Page 1848) P P Specifies whether the contents of the fields of a header
should be abbreviated if the column is too narrow.
TitleDarkShadowColor (Page 1849) P P Specifies the color of the dark side of shading.
TitleForeColor (Page 1850) P P Specifies the font color of the table header for the selected
status.
TitleGridLineColor (Page 1850) P P Specifies the color of separation lines in the table header.
TitleLightShadowColor (Page 1851) P P Specifies the color of the bright side of shading.
TitleSort (Page 1852) P P Specifies how sorting by column header is triggered.
TitleStyle (Page 1852) P P Specifies whether a shading color is used for the table
header.
ToolbarAlignment (Page 1859) P P Specifies or returns the position of the toolbar.
ToolbarBackColor (Page 1859) P P Specifies the background color of the toolbar.
ToolbarButtonActive (Page 1860) * P P Specifies whether the function linked to the button is acti‐
vated in runtime.
ToolbarButtonAdd (Page 1861) * P P Creates a new, user-defined button function.
ToolbarButtonBeginGroup (Page 1861) P P Specifies whether a separator is inserted before the selec‐
* ted button function.
ToolbarButtonClick P P Clicks a toolbar button.
ToolbarButtonCount (Page 1862) * P P Specifies the number of configurable button functions.
ToolbarButtonEnabled (Page 1863) * P P Specifies whether a user-defined toolbar button can be
operated.
ToolbarButtonHotKey (Page 1863) * P P Shows the hotkey for the selected button function.
ToolbarButtonId (Page 1864) * P P Unique ID number for the selected button function.
ToolbarButtonIndex (Page 1864) P P References a button function.
ToolbarButtonLocked (Page 1865) * P P Specifies whether the clicked, pressed in state is displayed
for a user-defined toolbar button.
ToolbarButtonName (Page 1866) * P P Shows the name of the selected button function.
ToolbarButtonPasswordLevel P P Shows the authorization for the selected button function.
(Page 1866) *
ToolbarButtonRemove (Page 1867) * P P Removes the selected button function from the list.
ToolbarButtonRename (Page 1867) * P P Renames the user-defined toolbar element that is refer‐
enced by means of the "ToolbarButtonIndex" property.
ToolbarButtonRepos (Page 1868) * P P Changes the sequence of button functions.
ToolbarButtons - - Specifies which buttons are available for the toolbar.
ToolbarButtonTooltipText (Page 1868) P P Specifies the tooltip text for the button.
*
ToolbarButtonUserDefined P P Indicates whether the configuration engineer has added
(Page 1869) * the toolbar button as a new user-defined button.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1485
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


ToolbarButtonVisible * P P Specifies that the button is visible.
ToolbarShowTooltips (Page 1870) P P Specifies whether the tooltips for the button functions are
displayed in runtime.
ToolbarUseBackColor (Page 1870) P P Specifies whether the background color for the toolbar is
shown.
ToolbarUseHotKeys (Page 1871) P P Specifies whether the hotkeys for the button functions are
activated in runtime.
ToolbarVisible (Page 1871) P P Specifies whether the toolbar of the control is displayed.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
UseSelectedTitleColor (Page 1921) P P Specifies whether a selection color is used for the headers
of selected table cells.
UseSourceBackColors P P Specifies the use of the background color of the data
source.
UseSourceForeColors P P Specifies the use of the foreground color of the data
source.
UseTableColor2 (Page 1922) P P Specifies whether a second row color is used for the rep‐
resentation of the table.
VerticalGridLines (Page 1935) P P Specifies whether vertical separation lines are displayed.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P - Sets the width of the specified "Ellipse", "Circle" and "Rec‐
tangle" objects.

* not visible in the ES

Table 3-108 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at run‐
time.
DeactivateDynamic (Page 2126) P Deactivates the trigger of the "ActivateDynamic" method used for the speci‐
fied property in/during Runtime.
Export (Page 2129) P, A Executes the "Export log" or "Export data" button function of the control.
GetRow (Page 2141) P Returns the row object defined by its row number in the table-based controls
as "ICCAxDataRow" type.
GetRowCollection (Page 2142) P Returns the list of all row objects of the table-based controls as "ICCAxDa‐
taRowCollection" type.
GetRulerBlock (Page 2144) P Returns the block object of the evaluation table designated by name or index
as "ICCAxRulerBlock" type.
GetRulerBlockCollection P Returns the list of all block objects of the evaluation table as "ICCAxCollec‐
(Page 2145) tion" type.
GetRulerColumn (Page 2146) P Returns the column object of the evaluation table designated by name or
index as "ICCAxRulerColumn" type.
GetRulerColumnCollection P Returns the list of all column objects of the evaluation table as "ICCAxCol‐
(Page 2147) lection" type.
GetSelectedRow (Page 2149) P Returns the selected row object of a table-based control as "ICCAxDataRow"
type.

WinCC Professional V13 SP2 – Programming reference


1486 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Methods Valid Description


GetSelectedRows (Page 2150) P Returns the selected row objects of a table-based control as type "ICCAx‐
DataRow" for multiple selection.
GetStatisticAreaColumn P Returns the column object of the statistic area window of the evaluation table
(Page 2152) designated by name or index as "ICCAxRulerColumn" type.
GetStatisticAreaColumnCollec‐ P Returns the list of all column objects of the statistic area window of the eval‐
tion (Page 2153) uation table as "ICCAxCollection" type.
GetStatisticResultColumn P Returns the column object of the statistic window of the evaluation table
(Page 2154) designated by name or index as "ICCAxRulerColumn" type.
GetStatisticResultColumnCollec‐ P Returns the list of all column objects of the statistic window of the evaluation
tion (Page 2155) table as "ICCAxCollection" type.
GetStatusbarElement P, A Returns the element of the control's status bar designated by name or index
(Page 2156) as "ICCAxStatusbarElement" type.
GetStatusbarElementCollection P, A Returns the list of all status bar elements of the control as "ICCAxCollection"
(Page 2157) type.
GetToolbarButton (Page 2164) P, A Returns the button function designated by name or index on the control tool‐
bar as "ICCAxToolbarButton" type.
GetToolbarButtonCollection P, A Returns the list of all button functions of the control toolbar as "ICCAxCol‐
(Page 2165) lection" type.
Print (Page 2194) P, A Executes the "Print" button function of the control.
SelectAll (Page 2209) P Selects all rows in a table-based control.
SelectRow (Page 2210) P Selects a specific row in a table-based control.
ShowHelp (Page 2214) P, A Executes the "Help" button function of the control.
ShowPropertyDialog P, A Executes the "Configuration dialog" button function of the control.
(Page 2218)
UnselectAll (Page 2227) P Removes all selections from the cells of a table-based control.
UnselectRow (Page 2227) P Removes the selections from a specific cell of a table-based control.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1487
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TrendView (Panels, Comfort Panels, RT Advanced)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "TrendView" object. The TrendView object is an element of the ScreenItems
list.

Type identifier in VBS


HMITrendView

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-109 Properties

Properties Read Write Description


Authorization (Page 1537) - - Specifies the operating rights of the selected object in run‐
time.
AxisXBunchCount - - Sets the step width of the large ticks for the X axis.
AxisXMarkCount - - Sets the step width of the ticks for the X axis.
AxisXNoOfDigits - -
AxisXShowBunchValues - - Enables scale labeling of the interim values for the X axis.

WinCC Professional V13 SP2 – Programming reference


1488 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


AxisXStyle * - -
AxisY1BunchCount - - Sets the step width of the large ticks for the Y axis.
AxisY1MarkCount - - Sets the step width of the large ticks for the left Y axis.
AxisY1ShowBunchValues - - Enables scale labeling of the interim values for the left Y axis.
AxisY2BunchCount - - Sets the step width of the large ticks for the right Y axis.
AxisY2MarkCount - - Sets the step width of the ticks for the right Y axis.
AxisY2ShowBunchValues - - Enables scale labeling of the interim values for the right Y
axis.
BackColor A A Specifies the background color of the selected object.
ColumnsMoveable - - Specifies that the columns can be moved.
CountVisibleItems (Page 1600) - - Specifies the number of lines contained in the selection list.
Enabled A A Specifies whether the selected object can be operated in
runtime.
EnableNavigateButtons - -
EnableNavigateKeys - - Specifies keyboard operation.
FitToSize - - Specifies that the size of the object should be automatically
adapted to the content.
Flashing - - Specifies that the text block flashes.
FocusColor A A Specifies the color for the focus frame of the selected object
when it is in focus.
FocusWidth A A Specifies the border width of the specified object when the
object is in focus.
Font (Page 1639) - - Specifies or returns the font.
Height (Page 1649) A - Sets the height of the specified "Ellipsis", "Circle" and "Rec‐
tangle" objects.
HelpText (Page 1653) A - Returns the tooltip that is shown in runtime as user help for
the specified object.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the
screen.
Left (Page 1679) A A Specifies the value of the X coordinate of the object.
Look3D - - Activates 3D visualization.
Name (Page 1717) A - Returns the object name as STRING.
RulerColor (Page 1759) A A Specifies the color of the scale gradation (auxiliary line) of
the axis labelling in the "OnlineTrendControl" object.
ScaleColor (Page 1760) A A Specifies the color of the scale of the selected object.
SelectionBackColor * - - Specifies the background color of the selected cells.
SelectionForeColor * - - Specifies the foreground color of the selected cells.
ShowRuler A A Specifies whether a scale gradation (auxiliary line) is shown
for the axis label of the "OnlineTrendControl" object.
ShowTableGridLines - -- Enables the display of grid lines in the table.
ShowTimeAxis - - Enables the display of the X axis.
ShowTimeAxisLabeling - - Enables the display of the X axis labeling.
ShowValueAxis1 - - Enables the display of the left Y axis.
ShowValueAxis1Label - - Enables the display of the labeling for left Y axis.
ShowValueAxis2 - - Enables the display of the right Y axis.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1489
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


ShowValueAxis2Label - - Sets the window title.
ShowValueTable - - Enables the display of the table of values.
ShowY1HlpLine - - Enables the display of the auxiliary line.
ShowY2HlpLine - - Enables the display of the auxiliary line.
TableBackColor (Page 1816) A A Specifies the background color of the table cells for the se‐
lected object.
TableFont - - Specifies the font in the table.
TableGridLineColor (Page 1819) A A Sets the color of the gridlines in the table of the specified
object.
TableHeaderBackColor (Page 1820) A A Specifies the background color in the header of the table of
the selected object.
TableHeaderFont - - Specifies the text color of the header.
TableHeaderForeColor (Page 1821) A A Specifies the text color in the header of the table of the se‐
lected object.
TagForExternalTime - - Sets the tag for the external time.
TimeAxisBegin - - Sets the start value for the time axis.
TimeAxisBeginTime - - Specifies the starting time for the display of the selected
trend.
TimeAxisCountPoints - - Sets the number of values for the time axis.
TimeAxisEnd - - Sets the end value for the time axis.
TimeAxisMode - - Sets the time axis mode.
TimeAxisRange (Page 1831) - - Period displayed by the time axis.
TimeAxisSide - - Sets the page for new values on the time axis.
ToolbarButtons - - Specifies which buttons are available for the toolbar.
ToolbarEnabled * - - Enables the use of a toolbar in the trend view.
ToolbarStyle - - Sets the appearance of the toolbar.
Top (Page 1873) A A Specifies the value of the Y coordinate of the object.
TrendsForPrinting * - -
ValueAxis1AutoRange * - - Sets the automatic adaptation of the data area.
ValueAxis1Begin - - Sets the start value for the axis.
ValueAxis1End - - Sets the end value for the axis.
ValueAxis1LabelLength - - Sets the length of axis labeling.
ValueAxis1Style * - -
ValueAxis2AutoRange * - - Sets the automatic adaptation of the data area.
ValueAxis2Begin - - Sets the start value for the axis.
ValueAxis2End - - Sets the end value for the axis.
ValueAxis2LabelLength - - Sets the length of axis labeling.
ValueAxis2Style * - - Sets the automatic adaptation of the data area.
ValueY1HlpLine - - Sets the value for the auxiliary line.
ValueY2HlpLine - - Value for the auxiliary line on the right Y axis.
Visible (Page 1936) A A Specifies whether the selected object is visible.
Width (Page 1946) A - Sets the width of the specified "Ellipsis", "Circle" and "Rec‐
tangle" objects.

* not visible in the ES

WinCC Professional V13 SP2 – Programming reference


1490 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-110 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.

TubeArcObject (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "TubeArc" object. The TubeArcObject is an element of the ScreenItems list.

Type identifier in VBS


HMITubeArcObject

Application
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

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1491
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-111 Properties

Properties Read Write Description


Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
Color (Page 1588) P P Specifies the line color of the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
EndAngle (Page 1616) P P Specifies the angle at which the end point of the selected object de‐
viates from the zero position (0°).
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineWidth (Page 1691) P P Specifies the line thickness of the selected object.
Name (Page 1717) P - Returns the object name as STRING.
RadiusHeight P P Specifies the minor axis of the "Ellipsis" object.
RadiusWidth P P Specifies the major axis of the "Ellipsis" object.
StartAngle (Page 1800) P P Specifies the SQL statement.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined in
(Page 1918) the active design.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

Table 3-112 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WinCC Professional V13 SP2 – Programming reference


1492 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TubeDoubleTeeObject (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "DoubleTee" object. The TubeDoubleTeeObject is an element of the


ScreenItems list.

Type identifier in VBS


HMITubeDoubleTeeObject

Application
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

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1493
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-113 Properties

Properties Read Write Description


Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
Color (Page 1588) P P Specifies the line color of the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineWidth (Page 1691) P P Specifies the line thickness of the selected object.
Name (Page 1717) P - Returns the object name as STRING.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined
(Page 1918) in the active design.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

Table 3-114 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WinCC Professional V13 SP2 – Programming reference


1494 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TubePolyline (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "TubePolyline" object. The TubePolyline object is an element of the


ScreenItems list.

Type identifier in VBS


HMITubePolyline

Application
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

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1495
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-115 Properties

Properties Read Write Description


ActualPointIndex (Page 1521) P P Specifies the number of the current corner point of the selected ob‐
ject.
ActualPointLeft (Page 1522) P P Specifies the X coordinate of the current corner point with reference
to the screen origin.
ActualPointTop (Page 1522) P P Specifies the Y coordinate of the current corner point with reference
to the screen origin.
Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
Color (Page 1588) P P Specifies the line color of the selected object.
CornerStyle (Page 1597) P P Specifies the type of border lines for the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineWidth (Page 1691) P P Specifies the line thickness of the selected object.
Name (Page 1717) P - Returns the object name as STRING.
Points - - Specifies the corner points.
PointsCount (Page 1745) P P Specifies the number of corner points of the polyline or of the polygon.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined in
(Page 1918) the active design.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

Table 3-116 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at run‐
time.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WinCC Professional V13 SP2 – Programming reference


1496 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TubeTeeObject (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Tee" object. The TubeTeeObject is an element of the ScreenItems list.
Object Type of ScreenItem Object. Represents the "T-piece" graphic object.

Type identifier in VBS


HMITubeTeeObject

Application
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

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1497
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-117 Properties

Properties Read Write Description


Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
Color (Page 1588) P P Specifies the line color of the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineWidth (Page 1691) P P Specifies the line thickness of the selected object.
Name (Page 1717) P - Returns the object name as STRING.
RotationAngle (Page 1754) P P Specifies the angle of rotation in degrees.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined in
(Page 1918) the active design.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rectangle" ob‐
jects.

Table 3-118 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WinCC Professional V13 SP2 – Programming reference


1498 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UserArchiveControl (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Displays the "Recipe view" object. The UserArchiveControl object is an element of the
ScreenItems list.

Type identifier in VBS


HMIUserArchiveControl

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-119 Properties

Properties Read Write Description


ApplyProjectSettingsForDesignMode - - Specifies that the project settings are used for the design.
ArchiveName * P P Sets the log name.
ArchiveType P - Sets the log type.
AutoCompleteColumns (Page 1538) P P Specifies whether empty columns are shown if the control
is wider than the configured columns.
AutoCompleteRows (Page 1539) P P Specifies whether empty rows are shown if the control is
longer than the number of configured rows.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1499
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


AutoSelectionColors (Page 1540) P P Specifies whether the colors defined by the system are
used as the selection colors for cells and rows.
AutoSelectionRectColor (Page 1540) P P Specifies whether the selection frame is shown with the
color defined by the system.
BackColor (Page 1543) P P Specifies the background color of the selected object.
Blocks - - Sets the alarm blocks.
BorderColor (Page 1560) P P Specifies the line color of the object.
BorderWidth (Page 1571) P P Specifies the line thickness of the object.
Caption (Page 1578) P P Specifies the text that is displayed in the header of the
selected object.
CellCut (Page 1581) P P Specifies whether the contents of the cells are abbreviated
if the cells are too narrow.
CellSpaceBottom (Page 1582) P P Specifies the bottom margin of the table cells.
CellSpaceLeft (Page 1582) P P Sets the left indent for the table cells.
CellSpaceRight (Page 1583) P P Specifies the right indent of the table cells.
CellSpaceTop (Page 1583) P P Specifies the top margin of the table cells.
Closeable (Page 1587) P P Specifies that the control can be closed in runtime.
ColumnAlign (Page 1589) * P P Specifies how the selected column is aligned.
ColumnAutoPrecisions * P P Specifies that
the number of decimal places displayed for an axis is ad‐
justed automatically.
ColumnCaption * P P Sets the caption.
ColumnCount * P - Displays the number of columns.
ColumnDateFormat (Page 1590) * - P Sets the display format for date information.
ColumnExponentialFormat * P P Specifies that exponential notation is used in a column.
ColumnHideText * P P Specifies whether the text is displayed.
ColumnHideTitleText * P P Specifies whether the text is displayed.
ColumnIndex P P The index specifies on which column other properties, e.g.
initial value are based.
ColumnLeadingZeros * P P Specifies that leading zeros should be displayed.
ColumnLength * P P Specifies the number of displayed characters.
ColumnName * P - Displays the name of the selected column.
ColumnPrecisions * P P Sets the number of decimal places.
ColumnReadonly * P P Sets the read-only mode for the values in the column.
ColumnRepos * P P Repositions the column.
ColumnResize (Page 1590) P P Enables changes to the width of columns.
ColumnScrollbar (Page 1591) P P Specifies the scroll bar type.
ColumnShowDate * P P Specifies that the date is to be displayed.
ColumnShowIcon * P P Enables the display of an icon.
ColumnShowTitleIcon * P P Enables the display of an icon.
ColumnSort * P P Sets the type of sorting.
ColumnSortIndex * P P Specifies the sorting order.
ColumnTimeFormat * - P Sets the display format for time information.
ColumnTitleAlignment P P Specifies the type of column title alignment.

WinCC Professional V13 SP2 – Programming reference


1500 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


ColumnTitles (Page 1595) P P Specifies whether the column header is displayed.
ColumnVisible * P P Enables the visibility of a column.
ControlDesignMode (Page 1798) - P Specifies the design.
DataSource - - Sets the data source.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in
runtime.
EnableDelete P P Enables the deletion of data.
EnableEdit (Page 1616) P P Specifies whether the data shown can be edited in runtime.
EnableInsert P P Enables insertion of data.
ExportDirectoryChangeable P P Specifies whether the data export directory can be
(Page 1620) changed in runtime.
ExportDirectoryname (Page 1620) P P Specifies the target directory for the exported Runtime da‐
ta.
ExportFileExtension (Page 1621) P P Specifies the file extension of the export file. Only the "csv"
file extension is currently supported.
ExportFilename (Page 1621) P P Specifies the name of the target file for the exported Run‐
time data.
ExportFilenameChangeable P P Specifies whether the export file name can be changed in
(Page 1622) runtime.
ExportFormatGuid (Page 1622) P P Default assignment of the ID number and export provider.
ExportFormatName (Page 1623) P P Specifies the export file format. Only the "csv" file format
is currently available for the export.
ExportParameters (Page 1624) - - Specifies the parameters of the selected format by means
of the "Properties" dialog.
ExportSelection (Page 1624) P P Specifies which runtime data of the control is exported.
ExportShowDialog (Page 1625) P P Specifies whether the data export dialog is shown in run‐
time.
Filters - - Specifies database criteria in SQL syntax.
FilterSQL P - Sets an SQL statement for the filter criterion.
Font (Page 1639) - - Specifies or returns the font.
GridLineColor (Page 1647) P P Specifies the color for the grid lines.
GridLineWidth (Page 1648) P P Specifies the width of the separation lines in pixels.
Height (Page 1649) P P Sets the height of the specified "Ellipse", "Circle" and "Rec‐
tangle" objects.
HorizontalGridLines (Page 1664) P P Specifies whether horizontal separation lines are dis‐
played.
IconSpace (Page 1666) P P Specifies the spacing between icons and text in the table
cells.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the
screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineColor (Page 1689) P P Sets the color of the window separation lines.
LineWidth (Page 1691) P P Specifies the line thickness of the selected object.
Moveable (Page 1716) P P Specifies whether the window can be moved in runtime.
ObjectName (Page 1997) P - Returns the object name as STRING.
PrintJobName (Page 2005) P P Specifies a print job.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1501
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


RowScrollbar (Page 1756) P P Specifies whether row scroll bars are displayed.
RowTitleAlignment P P Specifies the type of row title alignment.
RowTitles P P Specifies that row headers will be displayed.
RTPersistence (Page 1757) P P Specifies how online configurations of WinCC are re‐
tained.
RTPersistencePasswordLevel P P Specifies the authorization required for online configura‐
(Page 2007) tion in runtime.
RTPersistenceType (Page 1758) - - Specifies how online configurations of WinCC are re‐
tained.
SelectArchiveName * P P Specifies definition of the log by name.
SelectedCellColor (Page 1769) P P Specifies the background color of the selected cell.
SelectedCellForeColor (Page 1770) P P Specifies the font color of the selected cell.
SelectedRowColor (Page 1771) P P Specifies the background color of the selected row.
SelectedRowForeColor (Page 1772) P P Specifies the font color of the selected row.
SelectedTitleColor (Page 1773) P P Specifies the background color of a selected table header.
SelectedTitleForeColor (Page 1773) P P Specifies the font color of the selected table header.
SelectionColoring (Page 1776) P P Specifies whether selection colors are used for cells or
rows.
SelectionRect (Page 1777) P P Specifies whether a selection frame is used for the selec‐
ted cells or rows.
SelectionRectColor (Page 1777) P P Specifies the color of the selection rectangle in the alarm
window if SelectionType equals "1".
SelectionRectWidth (Page 1778) P P Specifies the line width of the selection rectangle in the
alarm window if SelectionType equals "1".
SelectionType (Page 1779) P P Specifies the number of lines you can mark.
ShowSortButton (Page 1791) P P Specifies whether the sorting button is shown above the
vertical scroll bar.
ShowSortIcon (Page 1792) P P Specifies whether the sorting icon is displayed.
ShowSortIndex (Page 1792) P P Specifies whether a sort index is displayed.
ShowTitle (Page 1795) P P Specifies the layout of the control window's header.
Sizeable P P Specifies that the size of an object can be changed in run‐
time.
SortSequence P P Specifies how the sorting order can be changed by mouse
click.
StatusbarBackColor (Page 1802) P P Specifies the background color of the status bar.
StatusbarElementAdd (Page 1803) * - P Creates a new, user-defined status bar element.
StatusbarElementAutoSize (Page 1803) P P Specifies whether the width of the selected status bar ele‐
* ment is set automatically.
StatusbarElementCount (Page 1804) * P - Specifies the number of configurable status bar elements.
StatusbarElementIconId (Page 1805) * P P Default assignment of the ID number and icon of a status
bar element.
StatusbarElementId (Page 1805) * P - Returns the ID number of the selected status bar element.
StatusbarElementIndex (Page 1806) P P References a status bar element. You can use this prop‐
erty to assign the values of other properties to a specific
element of the status bar.

WinCC Professional V13 SP2 – Programming reference


1502 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


StatusbarElementName (Page 1807) * P P Displays the object name of the selected status bar ele‐
ment.
StatusbarElementRemove (Page 1807) P P Removes the selected status bar element.
*
StatusbarElementRename (Page 1808) P P Renames the user-defined status bar element that is ref‐
* erenced by means of the "StatusbarElementIndex" prop‐
erty.
StatusbarElementRepos * P P Specifies the index that is assigned to the element.
StatusbarElements (Page 1808) - - Specifies the elements that are to be shown in the status
bar.
StatusbarElementText * P P Specifies the text of the currently selected status bar ele‐
ment.
StatusbarElementTooltipText P P Specifies the tooltip text for the user-defined status bar
(Page 1809) * element.
StatusbarElementUserDefined P - Indicates whether the configuration engineer has added
(Page 1809) * the status bar element as a new user-defined element.
StatusbarElementVisible (Page 1810) * P P In the list, activate the status bar elements that you wish
to display in runtime.
StatusbarElementWidth (Page 1810) * P P Specifies the width of the selected status bar element in
pixels.
StatusbarFont - - Status bar font
StatusbarFontColor (Page 1811) P P Specifies the color of the text in the status bar.
StatusbarShowTooltips (Page 1812) P P Specifies whether tooltips are displayed for the elements
of the status bar in runtime.
StatusbarText (Page 1812) P - Returns the standard text of the status bar.
StatusbarUseBackColor (Page 1813) P P Specifies whether the background color of the status bar
is shown.
StatusbarVisible (Page 1814) P P Specifies whether the status bar of the control is dis‐
played.
TableColor (Page 1817) P P Specifies the background color of the rows. Use this to
open the color selection dialog.
TableColor2 (Page 1817) P P Specifies the background color of "Row color 2".
TableForeColor (Page 1818) P P
TableForeColor2 (Page 1819) P P Specifies the font color of "Row color 2".
TimeBase (Page 1831) P P Sets the timebase.
TitleColor P P Specifies the color of the header.
TitleCut (Page 1848) P P Specifies whether the contents of the fields of a header
should be abbreviated if the column is too narrow.
TitleDarkShadowColor (Page 1849) P P Specifies the color of the dark side of shading.
TitleForeColor (Page 1850) P P Specifies the font color of the table header for the selected
status.
TitleGridLineColor (Page 1850) P P Specifies the color of separation lines in the table header.
TitleLightShadowColor (Page 1851) P P Specifies the color of the bright side of shading.
TitleSort (Page 1852) P P Specifies how sorting by column header is triggered.
TitleStyle (Page 1852) P P Specifies whether a shading color is used for the table
header.
ToolbarAlignment (Page 1859) P P Specifies or returns the position of the toolbar.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1503
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


ToolbarBackColor (Page 1859) P P Specifies the background color of the toolbar.
ToolbarButtonActive (Page 1860) * P P Specifies whether the function linked to the button is acti‐
vated in runtime.
ToolbarButtonAdd (Page 1861) * P P Creates a new, user-defined button function.
ToolbarButtonBeginGroup (Page 1861) P P Specifies whether a separator is inserted before the selec‐
* ted button function.
ToolbarButtonClick P P Clicks a toolbar button.
ToolbarButtonCount (Page 1862) * P - Returns the number of buttons contained in the toolbar.
ToolbarButtonEnabled (Page 1863) * P P Specifies whether a user-defined toolbar button can be
operated.
ToolbarButtonHotKey (Page 1863) * P P Shows the hotkey for the selected button function.
ToolbarButtonId (Page 1864) * P P Unique ID number for the selected button function.
ToolbarButtonIndex (Page 1864) P P References a button function.
ToolbarButtonLocked (Page 1865) * P P Specifies whether the clicked, pressed in state is displayed
for a user-defined toolbar button.
ToolbarButtonName (Page 1866) * P - Displays the name of the selected button of the toolbar.
ToolbarButtonPasswordLevel P P Shows the authorization for the selected button function.
(Page 1866) *
ToolbarButtonRemove (Page 1867) * - P Removes the selected button function from the list.
ToolbarButtonRename (Page 1867) * - P Renames the user-defined toolbar element that is refer‐
enced by means of the "ToolbarButtonIndex" property.
ToolbarButtonRepos (Page 1868) * P P Changes the sequence of button functions.
ToolbarButtons - - Specifies which buttons are available for the toolbar.
ToolbarButtonTooltipText (Page 1868) P P Specifies the tooltip text for the button.
*
ToolbarButtonUserDefined P - Indicates whether the configuration engineer has added
(Page 1869) * the toolbar button as a new user-defined button.
ToolbarButtonVisible * P P Specifies that the button is visible.
ToolbarShowTooltips (Page 1870) P P Specifies whether the tooltips for the button functions are
displayed in runtime.
ToolbarUseBackColor (Page 1870) P P Specifies whether the background color for the toolbar is
shown.
ToolbarUseHotKeys (Page 1871) P P Specifies whether the hotkeys for the button functions are
activated in runtime.
ToolbarVisible (Page 1871) P P Specifies whether the toolbar of the control is displayed.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
UseSelectedTitleColor (Page 1921) P P Specifies whether a selection color is used for the headers
of selected table cells.
UseTableColor2 (Page 1922) P P Specifies whether a second row color is used for the rep‐
resentation of the table.
VerticalGridLines (Page 1935) P P Specifies whether vertical separation lines are displayed.
Visibility P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipse", "Circle" and "Rec‐
tangle" objects.

* not visible in the ES

WinCC Professional V13 SP2 – Programming reference


1504 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-120 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property with
VBScript during runtime.
CopyRows (Page 2124) P Executes the "Copy rows" button function of the control.
CutRows (Page 2125) P Executes the "Cut rows" button function of the recipe view.
DeleteRows (Page 2128) P Executes the "Delete rows" button function of the recipe view.
Export (Page 2129) P, A Executes the "Export log" or "Export data" button function of the control.
GetColumn (Page 2130) P Returns the column object of the recipe view designated by name or index as
"ICCAxUAColumn" type.
GetColumnCollection P Returns the list of all column objects of the recipe view as "ICCAxCollection"
(Page 2131) type.
GetRow (Page 2141) P Returns the row object defined by its row number in the table-based controls
as "ICCAxDataRow" type.
GetRowCollection (Page 2142) P Returns the list of all row objects of the table-based controls as "ICCAxDataR‐
owCollection" type.
GetSelectedRow (Page 2149) P Returns the selected row object of a table-based control as "ICCAxDataRow"
type.
GetSelectedRows (Page 2150) P Returns the selected row objects of a table-based control as type "ICCAxDa‐
taRow" for multiple selection.
GetStatusbarElement P, A Returns the element of the control's status bar designated by name or index
(Page 2156) as "ICCAxStatusbarElement" type.
GetStatusbarElementCollec‐ P, A Returns the list of all status bar elements of the control as "ICCAxCollection"
tion (Page 2157) type.
GetToolbarButton (Page 2164) P, A Returns the button function designated by name or index on the control toolbar
as "ICCAxToolbarButton" type.
GetToolbarButtonCollection P, A Returns the list of all button functions of the control toolbar as "ICCAxCollec‐
(Page 2165) tion" type.
MoveToFirst (Page 2185) P Executes the "First line" button function of the control.
MoveToLast (Page 2187) P Executes the "Last data record" button function of the control.
MoveToNext (Page 2188) P Executes the "Next data record" button function of the control.
MoveToPrevious (Page 2190) P Executes the "Previous data record" button function of the control.
PasteRows (Page 2193) P Executes the "Insert rows" button function of the recipe view.
Print (Page 2194) P, A Executes the "Print" button function of the control.
ReadTags (Page 2196) P Executes the "Read tags" button function of the recipe view.
SelectAll (Page 2209) P Selects all rows in a table-based control.
SelectRow (Page 2210) P Selects a specific row in a table-based control.
ServerExport (Page 2211) P Executes the "Export log" button function of the recipe view.
ServerImport (Page 2211) P Executes the "Import log" button function of the recipe view.
ShowHelp (Page 2214) P, A Executes the "Help" button function of the control.
ShowPropertyDialog P, A Executes the "Configuration dialog" button function of the control.
(Page 2218)
ShowSelectArchive P Executes the "Select data connection" button function of the recipe view.
(Page 2219)
ShowSelection (Page 2219) P Executes the "Selection dialog" button function of the recipe view.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1505
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Methods Valid Description


ShowSelectTimeBase P Executes the "Timebase dialog" button function of the recipe view.
(Page 2220)
ShowSort (Page 2221) P Executes the "Sorting dialog" button function of the recipe view.
UnselectAll (Page 2227) P Removes all selections from the cells of a table-based control.
UnselectRow (Page 2227) P Removes the selections from a specific cell of a table-based control.
WriteTags (Page 2231) P Executes the "Write tags" button function of the recipe view.

UserView (Panels, Comfort Panels, RT Advanced)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "UserView" object. The UserView object is an element of the ScreenItems list.

Note
The object "Simple UserView" cannot be dynamized with a user-defined function.

Type identifier in VBS


HMIUserView

WinCC Professional V13 SP2 – Programming reference


1506 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-121 Properties

Properties Read Write Description


Appearance (Page 1299) - - Specifies the layout for this NC subroutine.
Authorization (Page 1537) * - - Specifies the operating rights of the selected object in runtime.
BackColor A A Specifies the background color of the selected object.
Columns - - Specifies the columns to be displayed.
ColumnsMoveable - - Specifies that the columns can be moved.
CountVisibleItems - - Specifies the number of lines contained in the selection list.
(Page 1600)
Enabled A A Specifies whether the selected object can be operated in runtime.
FitToSize - - Specifies that the size of the object should be automatically adapted
to the content.
Flashing - - Specifies that the text block flashes.
Height (Page 1649) A A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) A A Specifies the value of the X coordinate of the object.
Name (Page 1717) A - Returns the object name as STRING.
SelectionBackColor A A Specifies the background color of the selected cells.
(Page 1775)
SelectionForeColor A A Specifies the foreground color of the selected cells.
(Page 1776)
ShowTableGridlines - - Enables the display of gridlines in the table of the specified object.
(Page 1793)
TableBackColor (Page 1816) A A Specifies the background color of the table cells for the selected
object.
TableFont - - Specifies the font in the table.
TableForeColor A A
TableGridlineColor A A Specifies the color for the grid lines.
(Page 1819)
TableHeaderBackColor A A Specifies the background color in the header of the table of the se‐
(Page 1820) lected object.
TableHeaderFont - - Specifies the text color of the header.
TableHeaderForeColor A A Specifies the text color in the header of the table of the selected
(Page 1821) object.
Top (Page 1873) A A Specifies the value of the Y coordinate of the object.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1507
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


Visible (Page 1936) * A A Specifies whether the selected object is visible.
Width (Page 1946) A A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

* not visible in the ES

Table 3-122 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic (Page 2119) P Dynamically activates a trigger and the specified cycle for a property at runtime.
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WindowSlider (RT Professional)

Description

6FUHHQV

6FUHHQ

6FUHHQ,WHPV

6FUHHQ,WHP

Represents the "Window slider" object. The WindowSlider object is an element of the
ScreenItems list.

Type identifier in VBS


HMIWindowSlider

WinCC Professional V13 SP2 – Programming reference


1508 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-123 Properties

Properties Read Write Description


AskOperationMotive (Page 1535) P P Specifies whether the reason for operating this object is logged.
Authorization (Page 1537) P P Specifies the operating rights of the selected object in runtime.
BackColor (Page 1543) P P Specifies the background color of the selected object.
BackColorBottom (Page 1545) P P Specifies the color for the lower / right part of the .
BackColorTop (Page 1545) P P Sets the color for the upper / left part of the slider.
BackFillStyle (Page 1546) P P Defines the fill pattern of the specified object.
BackFlashingColorOff (Page 1547) P P Specifies the background color for flash state "Off".
BackFlashingColorOn (Page 1548) P P Specifies the background color for flash state "On".
BackFlashingEnabled (Page 1549) P P Specifies whether the background of the specified object flashes
in runtime.
BackFlashingRate (Page 1550) P P Specifies the flash rate of the background for the selected object.
BorderBackColor (Page 1558) P P Specifies the background color of the broken border line for the
selected object.
BorderColor (Page 1560) P P Specifies the line color of the object.
BorderFlashingColorOff (Page 1562) P P Specifies the border line color of the selected object for the flash
state "Off".
BorderFlashingColorOn (Page 1564) P P Specifies the border line color of the selected object for the flash
state "On".
BorderFlashingEnabled (Page 1565) P P Specifies whether the border line of the selected object flashes in
runtime.
BorderFlashingRate (Page 1566) P P Specifies the flash rate of the border line for the selected object.
BorderStyle (Page 1570) P P Specifies the type of border lines for the selected object.
BorderWidth (Page 1571) P P Specifies the line thickness of the object.
CornerStyle (Page 1597) - - Specifies the type of border lines for the selected object.
DrawInsideFrame (Page 1610) P P Specifies whether the border line of the selected object with a line
thickness greater than 1 should be drawn within the border or
symmetrically to the border.
EdgeStyle (Page 1612) - - Specifies the line style of the selected object.
Enabled (Page 1614) P P Specifies whether the selected object can be operated in runtime.
FillPatternColor (Page 1627) P P Specifies the color of the fill pattern for the selected object.
Flashing - - Specifies that the text block flashes.
Height (Page 1649) P P Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
HighLimitColor (Page 1654) P P Specifies the color of the top or right scroll button in a scroll bar.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1509
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Properties Read Write Description


JumpToLimitsAfterMouseClick P P Specifies the length of the long tick marks of a scale.
(Page 1670)
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) P P Specifies the value of the X coordinate of the object.
LineEndShapeStyle (Page 1690) - - Specifies the shape of the line end.
LogOperation (Page 1694) P P Specifies whether, after operating this object, an alarm is output
to the alarm system.
LowLimitColor (Page 1695) P P Specifies the color of the bottom or left scroll button in a scroll
bar.
MarginToBorder (Page 1696) P P Specifies the width of the 3D border in pixels.
MaximumValue (Page 1697) P P Specifies the maximum value of the scale in the selected object.
MinimumValue (Page 1713) P P Specifies the minimum value of the scale in the selected object.
Name (Page 1717) P - Returns the object name as STRING.
OperationSteps (Page 1726) P P Specifies by how many steps the slider of the scrollbar is moved
with one mouseclick.
ProcessValue (Page 1747) P P Specifies the default for the value to be displayed.
RelativeFillLevel (Page 1752) P P Specifies the fill percentage for the object.
ShowBadTagState (Page 1784) P P Specifies whether an object is grayed out if its associated tag has
a bad quality code or tag state.
ShowFillLevel (Page 1786) P P Specifies whether the selected object is filled.
StyleSettings (Page 1815) P P Specifies the display style for the object:
TextOrientation (Page 1827) P P Specifies the text orientation of the selected object.
ThumbBackColor (Page 1827) P P Specifies the background color of the slider in the "Slider" object.
ToolTipText (Page 1872) P P Specifies the tooltip text.
Top (Page 1873) P P Specifies the value of the Y coordinate of the object.
Transparency (Page 1876) P P Specifies and returns the transparency percentage of the object.
UseDesignColorScheme P P Specifies the font used for printing.
(Page 1916)
UseDesignShadowSettings P P Specifies whether the object is displayed with the shading defined
(Page 1918) in the active design.
Visible (Page 1936) P P Specifies whether the selected object is visible.
Width (Page 1946) P P Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
WindowsStyle (Page 1950) P P Specifies whether the object is displayed in the general Windows
style.

WinCC Professional V13 SP2 – Programming reference


1510 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-124 Methods

Methods Valid Description


Activate (Page 2116) P, A Activates the permanent window or the root screen.
ActivateDynamic P Dynamically activates a trigger and the specified cycle for a property at runtime.
(Page 2119)
DeactivateDynamic P Deactivates the trigger of the "ActivateDynamic" method used for the specified
(Page 2126) property in/during Runtime.

WLanQualityView (Panels, Comfort Panels, RT Advanced)

Description

6FUHHQ

6FUHHQV,WHPV
6FUHHQ,WHP
Represents the "WLAN reception" object. The WLanQualityView object is an element of the
ScreenItems list.

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-125 Properties

Properties Read Write Description


Height (Page 1649) A A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) A A Specifies the value of the X coordinate of the object.
Name (Page 1717) A - Returns the object name as STRING.
Top (Page 1873) A A Specifies the value of the Y coordinate of the object.
Width (Page 1946) A A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1511
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-126 Methods

Methods Valid Description


????

ZoneLabelView (Panels, Comfort Panels, RT Advanced)

Description

6FUHHQ

6FUHHQV,WHPV
6FUHHQ,WHP
Represents the "Zone name" object. The ZoneLabelView object is an element of the
ScreenItems list.

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-127 Properties

Properties Read Write Description


Font (Page 1639) - - Specifies or returns the font.
Height (Page 1649) A A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) A A Specifies the value of the X coordinate of the object.
Name (Page 1717) A - Returns the object name as STRING.
Top (Page 1873) A A Specifies the value of the Y coordinate of the object.
Width (Page 1946) A A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

WinCC Professional V13 SP2 – Programming reference


1512 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-128 Methods

Methods Valid Description


???

ZoneQualityView (Panels, Comfort Panels, RT Advanced)

Description

6FUHHQ

6FUHHQV,WHPV
6FUHHQ,WHP
Represents the "ZoneSignal" object. The ZoneQualityView object is an element of the
ScreenItems list.

Abbreviation Validity
Pa Panels
A Runtime Advanced
P Runtime Professional

Table 3-129 Properties

Properties Read Write Description


Height (Page 1649) A A Sets the height of the specified "Ellipsis", "Circle" and "Rectangle"
objects.
Layer (Page 1675) - - Returns the layer that contains an object as LONG in the screen.
Left (Page 1679) A A Specifies the value of the X coordinate of the object.
Name (Page 1717) A - Returns the object name as STRING.
Top (Page 1873) A A Specifies the value of the Y coordinate of the object.
Width (Page 1946) A A Sets the width of the specified "Ellipsis", "Circle" and "Rectangle"
objects.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1513
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Table 3-130 Methods

Methods Valid Description


?????

3.5.5 Properties (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.5.1 Properties A (Panels, Comfort Panels, RT Advanced, RT Professional)

AboveUpperLimitColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Defines the color of the specified object for the case "High limit exceeded".
Access in runtime:
● RT Advanced: No access
● RT Professional: Read and write

Syntax
Object.AboveUpperLimitColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● IOField
You have no access in runtime with the following format:
● GraphicIOField
● Switch
● SymbolLibrary
● SymbolicIOField

Color
Optional A value or a constant that specifies the color of the specified object for the "Higher
limit violated" case.

WinCC Professional V13 SP2 – Programming reference


1514 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

AcceptOnExit (RT Professional)

Description
Specifies whether the input field will be confirmed automatically when it is left.
Access in runtime: Read and write

Syntax
Object.AcceptOnExit[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● IOField
● SymbolicIOField

BOOLEAN
Optional TRUE, if the input field will be confirmed automatically when it is left.

AcceptOnFull (RT Professional)

Description
Specifies whether the input field will be left and confirmed automatically when the set number
of values have been entered.
Access in runtime: Read and write

Syntax
Object.AcceptOnFull[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● IOField

BOOLEAN
Optional TRUE, if the input field will be left and confirmed automatically when the set number
of values have been entered.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1515
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

AccessPath (RT Professional)

Description
Returns the storage path of a screen.
Access during runtime: Read

Syntax
Object.AccessPath

Object
Necessary. A "Screen" object.

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
Screen (Page 1299)

ActiveProject (RT Professional)

Description
Returns the specified project.
Access in Runtime: Read

Syntax
Object.ActiveProject

Object
Required A "HMIRuntime" object.

See also
HMIRuntime (Page 1292)
Project (Page 1298)

WinCC Professional V13 SP2 – Programming reference


1516 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ActiveScreen (Panels, Comfort Panels, RT Advanced)

Description
Returns a "Screen" type object, which represents the screen which has the focus at the
moment.

Note
If you query the "ActiveScreen" property in a user-defined function, it may be due to a screen
saver that the property does not return a valid "screen" object but "Nothing". A system message
will be issued.

Access in Runtime: Read

Syntax
Object.ActiveScreen

Object
Required An object of the "HMIRuntime" type.

Comments
Which screen is returned depends on whether the root screen or the permanent window has
the focus.
The ActiveScreen property returns NOTHING if no screen has the focus. That is the case, for
example, when another window has the focus. With the statement "If not [expression] is
nothing" you are able to interrogate whether a screen is to be returned:

VBS example ActiveScreen


Dim objActiveScreen
Set objActiveScreen = HmiRuntime.ActiveScreen
If not objActiveScreen is nothing then
'found an active screen
HmiRuntime.Trace("There is an active screen." & vbCrLf)
Else
'found NO active screen
HmiRuntime.Trace("There is NO active screen." & vbCrLf)
End if

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1517
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ActiveScreen (RT Professional)

Description
Returns an object of type "Screen" which shows the screen that currently has the focus.

Note
If you query the "ActiveScreen" property in a function, it may be due to a ScreenSavers that
the property does not return a valid "Screen" object but "Nothing" and a system alarm is
displayed.

Access during runtime: Read

Syntax
Object.ActiveScreen

Object
Necessary. An object of the "HMIRuntime" type.

Comments
Which screen is returned depends on whether the root screen or the permanent window has
the focus.
The ActiveScreen property returns NOTHING if no screen has the focus. This is the case, for
example, if a different window has the focus. With the instruction "If not [printout] Is Nothing"
you can query whether a screen is going to be returned:

'VBS_Example_ActiveScreen
Dim objActiveScreen
Set objActiveScreen = HmiRuntime.ActiveScreen
If Not objActiveScreen Is Nothing Then
'found an active screen
HmiRuntime.Trace("There is an active screen." & vbCrLf)
Else
'found NO active screen
HmiRuntime.Trace("There is NO active screen." & vbCrLf)
End If

ActiveScreenItem (RT Professional)

Description
References the screen object that currently has the focus.
It is only if the screen of the respective "Screen" object is currently selected and has an input
field that the "ActiveScreenItem" property of the "Screen" object will be occupied with a valid

WinCC Professional V13 SP2 – Programming reference


1518 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

"ScreenItem" object. In all other cases if, for example, another screen from the "Screens" list,
an independent window within WinCC or another application is selected, this property is not
supplied on the screens, i.e. assigned "Nothing".

Application
You use the "ActiveScreenItem" object to address the properties of the object that has the
focus in Runtime.

ActiveScreenItem (Panels, Comfort Panels, RT Advanced)

Description
References the screen object which currently has the focus.
The "ActiveScreenItem" property of the "Screen" object is only assigned a valid "ScreenItem"
object if the screen of the corresponding "Screen" object is active and has an input field. In all
other cases, for example, with a different screen from the "Screens" list, an independent
window within WinCC or a different application will be selected, this property will not apply to
the screens and will be occupied with "Nothing".

Application
The "ActiveScreenItem" object is used to address the object property which has the focus in
runtime.

ActualPointIndex (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the number of the current corner point of the selected object.
Access in runtime: Read and write

Syntax
Object.ActualPointIndex[=Int32]

Object
Required. A "ScreenItem" object with the format:
● Polygon
● Polyline
● Tubepolyline
You have no access in runtime with the following format:
● Line

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1519
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int32
Optional A value or a constant that specifies the number of the current corner point of the
selected object.

ActualPointLeft (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the X coordinate of the current corner point with reference to the screen origin. The
screen source is at the top left of the object. Every corner is identified by an index which is
derived from the number ("PointCount") of the existing corners.
Access in runtime: Read and write

Syntax
Object.ActualPointLeft[=Int32]

Object
Required. A "ScreenItem" object with the format:
● Polygon
● Polyline
● Tubepolyline
You have no access in runtime with the following format:
● Line

Int32
Optional A value or a constant that specifies the X coordinate of the current corner point with
reference to the screen origin.

Comments
Changing the value can have an effect on the properties "Width" (object width) and "Left" (X
coordinate of the object position).

ActualPointTop (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the Y coordinate of the current corner point with reference to the screen origin. The
screen source is at the top left of the object.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1520 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.ActualPointTop[=Int32]

Object
Required. A "ScreenItem" object with the format:
● Polygon
● Polyline
● Tubepolyline
You have no access in runtime with the following format:
● Line

Int32
Optional A value or a constant that specifies the Y coordinate of the current corner point with
reference to the screen origin.

Comments
Changing the value can have an effect on the properties "Height" (object height) and "Top" (X
coordinate of the object position).

AdaptBorder (RT Professional)

Description
Specifies whether the border of the selected object will be dynamically adapted to the text size.
Access in runtime: Read and write

Syntax
Object.AdaptBorder[=BOOLEAN]

Object
Required. A "ScreenItem" object with the format:
● Button
● IOField
● OptionGroup
● SymbolicIOField
● TextField
You have no access in runtime with the following format:
● Checkbox

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1521
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BOOLEAN
Optional TRUE, if the border of the selected object will be dynamically adapted to the text size.

AdaptPicture (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

AdaptScreenToWindow (RT Professional)

Description
Specifies whether or not the screen displayed in a screen window adapts to the size of the
screen window in Runtime.
Access in runtime: Read

Syntax
Object.AdaptScreenToWindow[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Screenwindow

BOOLEAN
TRUE, if the screen adapts to the screen window size.
FALSE, if the screen does not adapt to the screen window size.

AdaptWindowtoScreen (RT Professional)

Description
Specifies whether the screen window adapts to the screen it displays in Runtime.
Access in runtime: Read

Syntax
Object.AdaptWindowtoScreen[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Screenwindow

WinCC Professional V13 SP2 – Programming reference


1522 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BOOLEAN
TRUE, if the screen window size adapts to the screen.
FALSE, if the screen window size does not adapt to the screen.

Address (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the web address that will be opened in the HTML browser.
Access in Runtime: Read and write

Syntax
Object.Address[=STRING]

Object
Required. An object of the "ScreenItem" type with the format:
● HTML-Browser

STRING
Optional A value or a constant that contains the web address.

AddressEnabled (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

AdressPreview (RT Advanced)

Description
No access in runtime.

Alarm (RT Professional)

Description
Specifies the limit for the storage space display as of which an alarm will be reported.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1523
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.Alarm[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● DiscSpaceView

Int32
Optional A value or a constant that specifies the limit for the disk space view as of which an
alarm will be reported.

AlarmClasses (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

AlarmColor (RT Professional)

Description
Specifies the color in which the bars will be shown as soon as the alarm area is reached.
Access in runtime: Read and write

Syntax
Object.AlarmColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● DiscSpaceView

Color
Optional A value or a constant that specifies the color in which the bar will be shown as soon
as the warning area is exceeded.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0-255).
For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBS
color constants such as vbRed and vbGreen.

WinCC Professional V13 SP2 – Programming reference


1524 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

AlarmID (RT Professional)

Description
Returns the AlarmID of the Alarm object. The AlarmID is unique and is assigned by the system.
AlarmID (readonly)

See also
Alarms (list) (Page 1284)

AlarmLog (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

AlarmLogs (RT Professional)

Description
Returns an object of type "AlarmLogs".
Access in Runtime: Read

Syntax
Object.AlarmLogs

Object
Required A "Logging" object.

See also
Logging (Page 1297)

AlarmLowerLimit (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the low limit at which the alarm is triggered.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1525
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.AlarmLowerLimit[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● Bar

DOUBLE
Optional A value or a constant that specifies the low limit at which the alarm is triggered.

Comments
The type of evaluation (percentage or absolute) is defined using the "AlarmLowerLimitRelative"
property.
The "AlarmLowerLimitEnable" property defines whether or not monitoring of this limit is
enabled.

AlarmLowerLimitColor (RT Professional)

Description
Specifies the bar color of the "AlarmLowerLimit" limit.
The "AlarmLowerLimitEnable" property must have the value TRUE if the bar color is to change
once the limit has been reached.
Access in runtime: Read and write

Syntax
Object.AlarmLowerLimitColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Bar
You have no access in runtime with the following format:
● Slider

Color
Optional A value or a constant that specifies the bar color for the "AlarmLowerLimit" limit.

WinCC Professional V13 SP2 – Programming reference


1526 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

AlarmLowerLimitEnabled (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the "AlarmLowerLimit" limit is monitored.
Access in runtime: Read and write

Syntax
Object.AlarmLowerLimitEnabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional TRUE, if the "AlarmLowerLimit" limit is monitored.

Comments
The following values will be defined via the properties "AlarmLowerLimit",
"AlarmLowerLimitColor" and "AlarmLowerLimitRelative":
Limit
Representation upon reaching the limit
Type of evaluation

AlarmLowerLimitRelative (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Establish whether the lower limit at which the interrupt is triggered is evaluated as a percentage
or an absolute value.
Access in runtime: Read and write

Syntax
Object.AlarmLowerLimitRelative[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1527
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional TRUE, if the lower limit at which the interrupt is triggered is evaluated as a percentage.

AlarmSource (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

AlarmUpperLimit (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Establishes the upper limit at which the interrupt will be triggered.
Access in runtime: Read and write

Syntax
Object.AlarmUpperLimit[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● Bar

DOUBLE
Optional A value or a constant that defines the upper limit at which an interrupt will be triggered.

Comments
The type of evaluation (percentage or absolute) is defined using the "AlarmUpperLimitRelative"
property.
The "AlarmUpperLimitEnable" property defines whether or not monitoring of this limit is
enabled.

AlarmUpperLimitColor (RT Professional)

Description
Defines the bar color for the "AlarmUpperLimit" limit.

WinCC Professional V13 SP2 – Programming reference


1528 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

The "AlarmUpperLimitEnable" property must have the value TRUE if the bar color is to change
once the limit has been reached.
Access in runtime: Read and write

Syntax
Object.AlarmUpperLimitColor[=Color]

Object
Required. A "ScreenItem" object with the format:
● Bar
You have no access in runtime with the following format:
● Slider

Color
Optional A value or a constant that defines the bar color for the "AlarmUpperLimit" limit.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

AlarmUpperLimitEnabled (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the "AlarmUpperLimit" limit is monitored.
Access in runtime: Read and write

Syntax
Object.AlarmUpperLimitEnabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional TRUE, if the "AlarmUpperLimit" limit is monitored.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1529
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
The following values will be defined via the properties "AlarmUpperLimit",
"AlarmUpperLimitColor" and "AlarmUpperLimitRelative":
● Limit
● Representation upon reaching the limit
● Type of evaluation

AlarmUpperLimitRelative (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Establish whether the upper limit at which the interrupt is triggered is evaluated as a percentage
or an absolute value.
Access in runtime: Read and write

Syntax
Object.AlarmUpperLimitRelative[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional TRUE, if the high limit at which the interrupt is triggered is evaluated as a percentage.

AllFilters (RT Professional)

Description
No access in runtime.

AllFiltersForHitlist (RT Professional)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


1530 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

AllowEdit (RT Advanced)

Description
No access in runtime.

AllowMenu (RT Advanced)

Description
No access in runtime

Analog (RT Professional)

Description
Specifies whether the clock should be shown as an analog clock.
Access in runtime: Read and write

Syntax
Object.Analog[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Clock

BOOLEAN
Optional TRUE, if the clock should be shown as an analog clock.

AngleMax (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the angle of the scale end of the "Gauge" object.
Access in runtime: Read and write

Syntax
Object.AngleMax[=DOUBLE]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1531
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● Gauge

DOUBLE
Optional A value or a constant that specifies the angle in degrees.

Comments
The start and end of the scale gradations are described with the properties "AngleMin" and
"AngleMax" in angle degrees.
The value of the AngleMin property must always be less than the value of the AngleMax
property. The zero degree angle is located at the 3 o´clock position on the scale. Positive angle
values are counted clockwise.

AngleMin (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the angle of the scale start of the "Gauge" object.
Access in runtime: Read and write

Syntax
Object.AngleMin[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

DOUBLE
Optional A value or a constant that specifies the angle in degrees.

Comments
The start and end of the scale gradations are described with the properties "AngleMin" and
"AngleMax" in angle degrees.
The value of the AngleMin property must always be less than the value of the AngleMax
property.
The zero degree angle is located at the 3 o´clock position on the scale. Positive angle values
are counted clockwise.

WinCC Professional V13 SP2 – Programming reference


1532 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Appearance (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ApplyProjectSettings (RT Professional)

Description
Specifies whether the project settings are applied from the "HMI alarms" editor.
Access in runtime: Read and write

Syntax
Object.ApplyProjectSettings[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

BOOLEAN
TRUE: The alarm text blocks configured in the "HMI alarms" editor are applied in the alarm
view with their properties. The alarm text blocks are displayed with these properties in the
alarm view.
FALSE: The properties are not applied.

ApplyProjectSettingsForDesignMode (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

AskOperationMotive (RT Professional)

Description
Specifies whether the reason for operating this object will be logged. When operating the
specified object in Runtime, a dialog opens in which the operator enters the reason for the
operation in text format.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1533
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.AskOperationMotive[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● ComboBox
● IOField
● ListBox
● SymbolicIOField
● WindowsSlider

BOOLEAN
Optional TRUE, if the reason for operating this object will be logged.

Assignments (RT Professional)

Description
Specifies a list which contains the assignments between the output value and the output text
actually to be output. The assignments are dependent on the set list type. You define the list
type with the ListType property.
Access in runtime: Read and write

Syntax
Object.Assignments[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● SymbolicIOField

STRING
Optional Specifies a list which contains the assignments between the output value and the
output text actually to be output.

AssociatedS7GraphDBTag (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


1534 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Authorization (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the operating rights of the selected object in Runtime.
Access in runtime: Read and write

Syntax
Object.Authorization[=HMIRTAuthorization]

Object
Required. An object of the "ScreenItem" type with the format:
● Bar
● Button
● CheckBox
● Circle
● CircleSegment
● CircularArc
● ComboBox
● DateTimeField
● Ellipse
● EllipseSegment
● EllipticalArc
● GraphicIOField
● GraphicView
● IOField
● Line
● ListBox
● MultiLineEdit
● OptionGroup
● Polygon
● Polyline
● RecipeView
● Rectangle
● RoundButton
● Slider
● StatusForce

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1535
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● Switch
● SymbolLibrary
● SymbolicIOField
● SysDiagControl
● TextField
● TrendView
● TubeArcObject
● TubeDoubleTeeObject
● TubeTeeObject
● Tubepolyline
● UserView
● WindowsSlider
You have no access in runtime with the following format:
● AlarmView
● PLCCodeViewer
● ProtectedAreaNameView
● RangeLabelView
● S7GraphOverview

HMIRTAuthorization
Optional A value or a constant that establishes the operating rights of the specified object in
Runtime.

AutoCompleteColumns (RT Professional)

Description
Adds empty columns if the Control width is greater than the width of columns configured.
Access in runtime: Read and write

Syntax
Object.AutoCompleteColumns[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl

WinCC Professional V13 SP2 – Programming reference


1536 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The empty columns are displayed.
FALSE: The empty columns are not displayed.

AutoCompleteRows (RT Professional)

Description
Enables the insertion of empty rows if the Control length is greater than the number of rows
configured.
Access in runtime: Read and write

Syntax
Object.AutoCompleteRows[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The empty rows are displayed.
FALSE: The empty rows are not displayed.

AutoScroll (RT Professional)

Description
Specifies how the alarm window reacts when new alarms appear.
The specific choice of alarm lines is only possible if "AutoScroll" is not enabled.
The "AutoScroll" property is disabled if the "MsgCtrlFlag" = "-1" attribute is set. The most recent
alarm is shown at the top in the alarm window.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1537
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.AutoScroll[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

BOOLEAN
Optional
TRUE: A new alarm is appended to and selected from the list shown in the alarm window. If
necessary, the visible area of the alarm window can be moved.
FALSE: A new alarm is not selected. The visible area of the alarm window is not altered.

AutoSelectionColors (RT Professional)

Description
Enables the display of default system colors as selection color for cells and rows.
Access in runtime: Read and write

Syntax
Object.AutoSelectionColors[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The system color is used.
FALSE: The customized color is used.

AutoSelectionRectColor (RT Professional)

Description
Specifies whether the selection frame is shown with the specified color.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1538 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.AutoSelectionRectColors[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The system color is used.
FALSE: The customized color is used.

AutoSizing (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

AverageLast15Values (RT Professional)

Description
Specifies whether a mean value is shown from the last 15 values.
Access in Runtime: Read and write

Syntax
Object.AverageLast15Values[=BOOLEAN]

Object
Required. A "ScreenItem" object with the format "Bar".

BOOLEAN
Optional. TRUE, if a mean value is shown from the last 15 values.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1539
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

AxisXBunchCount (RT Advanced)

Description
No access in runtime.

AxisXMarkCount (RT Advanced)

Description
No access in runtime.

AxisXShowBunchValues (RT Advanced)

Description
No access in runtime.

AxisY1BunchCount (RT Advanced)

Description
No access in runtime.

AxisY1MarkCount (RT Advanced)

Description
No access in runtime.

AxisY1ShowBunchValues (RT Advanced)

Description
No access in runtime.

AxisY2BunchCount (RT Advanced)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


1540 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

AxisY2MarkCount (RT Advanced)

Description
No access in runtime.

AxisY2ShowBunchValues (RT Advanced)

Description
No access in runtime.

3.5.5.2 Properties B (Panels, Comfort Panels, RT Advanced, RT Professional)

BackColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the background color of the selected object.
Access in runtime: Read and write

Syntax
Object.BackColor[=Color]

Object
Required. A "ScreenItem" object with the format:
● AlarmControl
● AlarmView
● Bar
● Button
● CheckBox
● Circle
● CircleSegment
● CircularArc
● ComboBox
● DateTimeField
● Ellipse
● EllipseSegment
● EllipticalArc

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1541
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● FunctionTrendControl
● Gauge
● GraphicView
● IOField
● Line
● ListBox
● MultiLineEdit
● OnlineTableControl
● OnlineTrendControl
● OptionGroup
● Polygon
● Polyline
● RecipeView
● Rectangle
● RoundButton
● Slider
● StatusForce
● Switch
● SymbolLibrary
● SymbolicIOField
● TextField
● TrendRulerControl
● TrendView
● TubeArcObject
● UserArchiveControl
● UserView
● WindowsSlider
You have no access in runtime with the following format:
● GraphicIOField

Color
Optional A value or a constant that specifies the background color.

WinCC Professional V13 SP2 – Programming reference


1542 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.
The background color is not visible if the "BorderStyle" property has the value "0".

BackColorBottom (RT Professional)

Description
Specifies the color for the lower / right part of the Slider object.
Access in runtime: Read and write

Syntax
Object.BackColorBottom[=Color]

Object
Required. A "ScreenItem" object with the following format:
● WindowsSlider

Color
Optional A value or a constant that specifies the color for the lower / right part of the Slider
object.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0-255).
For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBS
color constants such as vbRed and vbGreen.

BackColorTop (RT Professional)

Description
Specifies the color for the upper / left part of the Slider object.
Access in runtime: Read and write

Syntax
Object.BackColorTop[=Color]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1543
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● WindowsSlider

Color
Optional A value or a constant that specifies the color for the upper / left part of the Slider
object.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0-255).
For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBS
color constants such as vbRed and vbGreen.

BackFillStyle (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Determines the fill style of the specified object.
Access in runtime: Read and write

Syntax
Object.BackFillStyle[=FillStyle]

Object
Required. A "ScreenItem" object with the following format:
● Bar
● Button
● CheckBox
● Circle
● CircleSegment
● Clock
● ComboBox
● Ellipse
● EllipseSegment
● Gauge
● GraphicView
● IOField
● ListBox

WinCC Professional V13 SP2 – Programming reference


1544 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● OptionGroup
● Polygon
● Rectangle
● RoundButton
● Slider
● SymbolLibrary
● SymbolicIOField
● TextField
● WindowsSlider
You have no access in runtime with the following format:
● DateTimeField
● GraphicIOField
● Switch

FillStyle
Optional A value or a constant that specifies the fill style.
hmiFillStyleTransparent (65536): Transparent fill
hmiFillStyleSolid (0): Object is filled with the specified color
Default setting: hmiFillStyleSolid

BackFlashingColorOff (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the background for the flashing status "off".
Access in runtime:
● RT Advanced: No access
● RT Professional: Read and write

Syntax
Object.BackFlashingColorOff[=Color]

Object
Required. A "ScreenItem" object with the format:
● Bar
● Button
● GraphicView
● IOField

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1545
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● OptionGroup
● RoundButton
● SymbolicIOField
● TextField
● WindowsSlider
You have no access in runtime with the following format:
● CheckBox
● Switch

Color
Optional A value or a constant that specifies the color of the background for the flashing status
"off".

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

BackFlashingColorOn (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the background for the flashing status "on".
Access in runtime:
● RT Advanced: No access
● RT Professional: Read and write

Syntax
Object.BackFlashingColorOn[=Color]

Object
Required. A "ScreenItem" object with the format:
● Bar
● Button
● GraphicView
● IOField
● OptionGroup
● RoundButton

WinCC Professional V13 SP2 – Programming reference


1546 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● SymbolicIOField
● TextField
● WindowsSlider
You have no access in runtime with the following format:
● CheckBox
● Switch

Color
Optional A value or a constant that specifies the color of the background for the flashing status
"on".

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

BackFlashingEnabled (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the background of the specified object will flash in Runtime.
Access in runtime:
● RT Advanced: No access
● RT Professional: Read and write

Syntax
Object.BackFlashingEnabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the format:
● Bar
● Button
● GraphicView
● IOField
● OptionGroup
● RoundButton
● SymbolicIOField

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1547
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● TextField
● WindowsSlider
You have no access in runtime with the following format:
● CheckBox
● Switch

BOOLEAN
Optional TRUE, if the background of the specified object is flashing in Runtime.

BackFlashingRate (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the flash rate of the background for the specified object.
Access in Runtime:
● RT Advanced: No access
● RT Professional: Read and write

Syntax
Object.BackFlashingRate[=FlashingRate]

Object
Required. An object of the "ScreenItem" type with the format:
● Bar
● Button
● GraphicView
● IOField
● OptionGroup
● RoundButton
● SymbolicIOField
● TextField
● WindowsSlider
You have no access in runtime with the following format:
● CheckBox
● Switch

FlashingRate
hmiFlashingRateSlow (0): The length of the flashing interval is 250 ms.

WinCC Professional V13 SP2 – Programming reference


1548 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

hmiFlashingRateMedium (1): The length of the flashing interval is 500 ms.


hmiFlashingRateFast (2): The length of the flashing interval is 1000 ms.

BackgroundColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BarBackColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the bar background for the selected object.
Access in runtime: Read and write

Syntax
Object.BarBackColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Bar
● Slider

Color
Optional A value or a constant that specifies the color of the bar background.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

BarBackFillStyle (RT Professional)

Description
Specifies the fill style for the bar.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1549
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.BarBackFillStyle[=FillStyle]

Object
Required. A "ScreenItem" object with the following format:
● Bar

FillStyle
hmiFillStyleTransparent ( 65536): Transparent fill style
hmiFillStyleSolid ( 0): Solid fill style
hmiFillStyleBackwardDiagonal ( 131075): Diagonal fill style striped towards the top right
hmiFillStyleCross ( 131076): Checked fill style
hmiFillStyleDiagonalCross ( 131077): Diagonal checked fill style
hmiFillStyleForwardDiagonal ( 131074): Diagonal fill style striped towards the top left
hmiFillStyleHorizontal ( 131072): Horizontal striped fill style
hmiFillStyleVertical ( 131073): Vertical striped fill style
hmiFillStylePattern1 ( 196608): Default fill style
hmiFillStylePattern2 ( 196609): Default fill style
hmiFillStylePattern3 ( 196610): Default fill style
hmiFillStylePattern4 ( 196611): Default fill style
hmiFillStylePattern5 ( 196612): Default fill style
hmiFillStylePattern6 ( 196613): Default fill style
hmiFillStylePattern7 ( 196614): Default fill style
hmiFillStylePattern8 ( 196615): Default fill style
hmiFillStylePattern9 ( 196616): Default fill style
hmiFillStylePattern10 ( 196617): Default fill style
hmiFillStylePattern11 ( 196618): Default fill style
hmiFillStylePattern12 ( 196619): Default fill style
hmiFillStylePattern13 ( 196620): Default fill style
hmiFillStylePattern14 ( 196621): Default fill style
hmiFillStylePattern15 ( 196622): Default fill style
hmiFillStylePattern16 ( 196623): Default fill style
hmiFillStylePattern17 ( 196624): Default fill style
hmiFillStylePattern18 ( 196625): Default fill style
hmiFillStylePattern19 ( 196626): Default fill style
hmiFillStylePattern20 ( 196627): Default fill style
hmiFillStylePattern21 ( 196628): Default fill style

WinCC Professional V13 SP2 – Programming reference


1550 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

hmiFillStylePattern22 ( 196629): Default fill style


hmiFillStylePattern23 ( 196630): Default fill style
hmiFillStylePattern24 ( 196631): Default fill style
hmiFillStylePattern25 ( 196632): Default fill style
hmiFillStylePattern26 ( 196633): Default fill style
hmiFillStylePattern27 ( 196634): Default fill style
hmiFillStylePattern28 ( 196635): Default fill style
hmiFillStylePattern29 ( 196636): Default fill style
hmiFillStylePattern30 ( 196637): Default fill style
hmiFillStylePattern31 ( 196638): Default fill style
hmiFillStylePattern32 ( 196639): Default fill style
hmiFillStylePattern33 ( 196640): Default fill style
hmiFillStylePattern34 ( 196641): Default fill style
hmiFillStylePattern35 ( 196642): Default fill style
hmiFillStylePattern36 ( 196643): Default fill style
hmiFillStylePattern37 ( 196644): Default fill style

BarBackFlashingColorOff (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BarBackFlashingColorOn (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BarBackFlashingEnabled (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1551
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BarBackFlashingRate (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BarColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the bar in the "Slider" object.
Access in runtime: Read and write

Syntax
Object.BarColor[=Color]

Object
Required. A "ScreenItem" object with the format:
● Slider

Color
Optional A value or a constant that specifies the color of the slider.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.
The range extends from "RangeMin" to the position of the controller.

BarEdgeStyle (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BaseScreenName (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Reads the name of the current root screen or triggers a root screen change by setting a new
screen name.

WinCC Professional V13 SP2 – Programming reference


1552 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in Runtime: Read and write

Syntax
Object.BaseScreenName[= STRING]

Object
Required An "HMIRuntime" object.

STRING
Optional A value or a constant that contains the screen name.

Comments
You can also use the property to establish which screen is currently being displayed.

BelowLowerLimitColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BitNumber (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the bit whose status must change to trigger a value change.
Access in runtime:
● RT Advanced: No access
● RT Professional: Read and write

Syntax
Object.BitNumber[=Int32]

Object
Required. A "ScreenItem" object with the format:
● SymbolicIOField
You have no access in runtime with the following format:
● Button
● GraphicIOField

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1553
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int32
Optional Specifies the bit whose status must change to trigger a value change.

Comments
The tag being used must be of type BYTE, WORD or DWORD.

BlinkColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color in which the "SymbolLibrary" object will flash.
Access in runtime: Read and write

Syntax
Object.BlinkColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● SymbolLibrary

Color
Optional A value or a constant that specifies the flash color.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

BlinkMode (RT Professional)

Description
Sets the type of flash picture for the specified object.
Access in runtime: Read and write

Syntax
Object.BlinkMode[=SymbolLibraryBlinkMode]

WinCC Professional V13 SP2 – Programming reference


1554 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● SymbolLibrary

SymbolLibraryBlinkMode
hmiSymbolLibraryFlashingNone ( 0): Flashing is switched off.
hmiSymbolLibraryFlashingInvisible ( 1): The flash picture is invisible.
hmiSymbolLibraryFlashingShaded ( 2): The flash picture is given a colored, shaded surface.
The color of the surface corresponds to the settings in the property "BlinkColor".
hmiSymbolLibraryFlashingSolid ( 3): The flash picture is given a colored, unshaded surface.
The color of the surface corresponds to the settings in the property "BlinkColor".

BlinkSpeed (RT Professional)

Description
Specifies the flash rate.
Fast - 250: The length of the flashing rate is 250 ms. Medium - 500: The length of the flashing
rate is 500 ms.
Slow - 1000: The length of the flashing rate is 1000 ms. The default value is medium - 500.
Access in runtime: Read and write

Syntax
Object.BlinkSpeed[=FlashingRate]

Object
Required. A "ScreenItem" object with the following format:
● SymbolLibrary

FlashingRate
hmiFlashingRateSlow ( 0): The length of the flashing rate is 250 ms.
hmiFlashingRateMedium ( 1): The length of the flashing rate is 500 ms.
hmiFlashingRateFast ( 2): The length of the flashing rate is 1000 ms.

Blocks (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1555
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BorderBackColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the background color of the broken border line for the specified object.
Access in runtime:
● RT Advanced: No access
● RT Professional: Read and write

Syntax
Object.BorderBackColor[=Color]

Object
Required. A "ScreenItem" object with the format:
● Bar
● Button
● CheckBox
● Circle
● CircleSegment
● ComboBox
● Ellipse
● EllipseSegment
● GraphicIOField
● GraphicView
● IOField
● ListBox
● MultiLineEdit
● OptionGroup
● Polygon
● Rectangle
● RoundButton
● SymbolicIOField
● TextField
● WindowsSlider
You have no access in runtime with the following format:
● AlarmView
● Clock

WinCC Professional V13 SP2 – Programming reference


1556 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● DateTimeField
● Gauge
● RecipeView
● Slider
● StatusForce
● Switch
● SysDiagControl
● TrendView
● UserView

Color
Optional A value or a constant that specifies the background color of the broken border line
for the specified object.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

BorderBrightColor3D (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the frame color of the following frame parts in case of a 3D display of the specified
object:
● External frame parts at the top and bottom
● Internal frame parts at the top and right
Access in runtime: Read and write

Syntax
Object.BorderBrightColor3D[=Color]

Object
Required. A "ScreenItem" object with the format:
● Button
● RoundButton
● Slider

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1557
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

You have no access in runtime with the following format:


● Switch

Color
Optional A value or a constant that specifies the frame color. Default setting is white.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

BorderColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the line color of the specified object.
Access in runtime: Read and write

Syntax
Object.BorderColor[=Color]

Object
Required. A "ScreenItem" object with the format:
● AlarmControl
● AlarmView
● Bar
● Button
● CheckBox
● Circle
● CircleSegment
● ComboBox
● DateTimeField
● Ellipse
● EllipseSegment
● FunctionTrendControl
● GraphicIOField
● GraphicView
● IOField

WinCC Professional V13 SP2 – Programming reference


1558 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● ListBox
● MultiLineEdit
● OnlineTableControl
● OnlineTrendControl
● OptionGroup
● Polygon
● Rectangle
● RoundButton
● SymbolicIOField
● TextField
● TrendRulerControl
● UserArchiveControl
● WindowsSlider
You have no access in runtime with the following format:
● Clock
● Gauge
● RecipeView
● Slider
● StatusForce
● Switch
● SysDiagControl
● TrendView
● UserView

Color
Optional A value or a constant that specifies the line color.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

BorderEnabled (RT Professional)

Description
Returns whether the window is displayed with a border in runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1559
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in runtime: Read

Syntax
Object.BorderEnabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● ApplicationWindow
● Screenwindow

BOOLEAN
Optional TRUE if the window is displayed with a border in runtime.

BorderEndStyle (RT Professional)

Description
Specifies the type of line-end shapes for the specified object.
Access in runtime: Read and write

Syntax
Object.BorderEndStyle[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Line
● Polyline

Int32
Optional A value or a constant that specifies the type of line-end shapes for the specified object.

BorderFlashingColorOff (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the border line for the selected object for the flashing status "off".
Access in runtime:
● RT Advanced: No access
● RT Professional: Read and write

WinCC Professional V13 SP2 – Programming reference


1560 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.BorderFlashingColorOff[=Color]

Object
Required. A "ScreenItem" object with the format:
● Bar
● Button
● Circle
● CircleSegment
● Ellipse
● EllipseSegment
● GraphicIOField
● GraphicView
● IOField
● OptionGroup
● Polygon
● Rectangle
● RoundButton
● SymbolicIOField
● TextField
● WindowsSlider
You have no access in runtime with the following format:
● CheckBox
● Switch

Color
Optional A value or a constant that specifies the color of the border line of the selected object
for the flashing status "off".

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1561
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BorderFlashingColorOn (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the border line for the selected object for the flashing status "on".
Access in runtime:
● RT Advanced: No access
● RT Professional: Read and write

Syntax
Object.BorderFlashingColorOn[=Color]

Object
Required. A "ScreenItem" object with the format:
● Bar
● Button
● Circle
● CircleSegment
● Ellipse
● EllipseSegment
● GraphicIOField
● GraphicView
● IOField
● OptionGroup
● Polygon
● Rectangle
● RoundButton
● SymbolicIOField
● TextField
● WindowsSlider
You have no access in runtime with the following format:
● CheckBox
● Switch

Color
Optional A value or a constant that specifies the color of the border line of the selected object
for the flashing status "on".

WinCC Professional V13 SP2 – Programming reference


1562 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

BorderFlashingEnabled (RT Professional)

Description
Specifies whether the border line of the selected object will flash in Runtime.
Access in Runtime: Read and write

Syntax
Object.BorderFlashingEnabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the formats "Ellipse", "Circle", "EllipseSegment",
"CircleSegment", "Rectangle", "Polygon", "TextField", "IOField", "SymbolicIOField", "Button",
"Roundbutton", "Switch", "GraphicView", "GraphicIOField", "Bar", "Checkbox", "OptionGroup"
or "WindowSlider".

BOOLEAN
Optional. TRUE, if the border line of the object is flashing.

See also
Ellipse (Page 1361)
Circle (Page 1346)
EllipseSegment (Page 1363)
CircleSegment (Page 1348)
Rectangle (Page 1443)
Polygon (Page 1429)
TextField (Page 1477)
IOField (Page 1392)
SymbolicIOField (Page 1463)
Button (Page 1337)
Switch (Page 1460)
GraphicView (Page 1387)
GraphicIOField (Page 1383)
Bar (Page 1330)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1563
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

CheckBox (Page 1343)


OptionGroup (Page 1426)
WindowSlider (Page 1508)
RoundButton (Page 1445)

BorderFlashingRate (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the flash rate of the border line for the selected object.
Access in runtime:
● RT Advanced: No access
● RT Professional: Read/Write

Syntax
Object.BorderFlashingRate[=FlashingRate]

Object
Required. An object of the "ScreenItem" type with the format:
● Bar
● Button
● Circle
● CircleSegment
● Ellipse
● EllipseSegment
● GraphicIOField
● GraphicView
● IOField
● OptionGroup
● Polygon
● Rectangle
● RoundButton
● SymbolicIOField
● TextField
● WindowsSlider

WinCC Professional V13 SP2 – Programming reference


1564 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

You have no access in runtime with the following format:


● CheckBox
● Switch

FlashingRate
hmiFlashingRateSlow (0): The length of the flashing interval is 250 ms.
hmiFlashingRateMedium (1): The length of the flashing interval is 500 ms.
hmiFlashingRateFast (2): The length of the flashing interval is 1000 ms.

BorderInnerStyle3D (RT Professional)

Description
Specifies the display of the internal part of the object border.
Access in Runtime: Read and write

Syntax
Object.BorderInnerStyle3D[=SliderBorder3DStyle]

Object
Required A "ScreenItem" object with following format:
● Gauge
● Slider

SliderBorder3DStyle
hmiGaugeBorder3DStyleNone (0): There is no inside part of the object border.
hmiGaugeBorder3DStyleRecessed (1): The object border is shown in relief.
hmiGaugeBorder3DStyleRaised (2): The object border is shown raised.
hmiGaugeBorder3DStyleGray (3): The object border has a uniform gray border.
hmiGaugeBorder3DStyleColored (4): The object border has a uniform colored border. The
border color corresponds to the background color.

BorderInnerWidth3D (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the width of the inner border for the 3D presentation of the selected object.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1565
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.BorderInnerWidth3D[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Slider

Int32
Optional A value or a constant that specifies the width of the inner border in pixels.

BorderOuterStyle3D (RT Professional)

Description
Specifies the display of the external part of the object border.
Access in Runtime: Read and write

Syntax
Object.BorderOuterStyle3D[=GaugeBorder3DStyle]

Object
Required A "ScreenItem" object with following format:
● Gauge
● Slider

GaugeBorder3DStyle
hmiGaugeBorder3DStyleNone (0): There is no inside part of the object border.
hmiGaugeBorder3DStyleRecessed (1): The object border is shown in relief.
hmiGaugeBorder3DStyleRaised (2): The object border is shown raised.
hmiGaugeBorder3DStyleGray (3): The object border has a uniform gray border.
hmiGaugeBorder3DStyleColored (4): The object border has a uniform colored border. The
border color corresponds to the background color.

BorderOuterWidth3D (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the width of the outer border for the 3D presentation of the selected object.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1566 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.BorderOuterWidth3D[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Slider

Int32
Optional A value or a constant that specifies the width of the outer border in pixels.

BorderShadeColor3D (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the frame color of the following frame parts in case of a 3D display of the specified
object:
● Internal frame parts at the top and bottom
● External frame parts at the bottom and right
Access in runtime: Read and write

Syntax
Object.BorderShadeColor3D[=Color]

Object
Required. A "ScreenItem" object with the format:
● Button
● RoundButton
● Slider
You have no access in runtime with the following format:
● Switch

Color
Optional A value or a constant that specifies the color of the shading.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1567
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BorderStyle (RT Professional)

Description
Specifies the type of border lines for the specified object.
Access in runtime: Read and write

Syntax
Object.BorderStyle[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Bar
● Button
● CheckBox
● ComboBox
● GraphicIOField
● IOField
● ListBox
● MultiLineEdit
● OptionGroup
● RoundButton
● SymbolicIOField
● WindowsSlider

Int32
Optional A value or a constant that specifies the type of border lines for the specified object.
0 = filled line
1 = broken line
2 = dotted line
3 = dashed and dotted line
4 = dash - dot - dot line

BorderStyle3D (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Determines whether the given object has 3D border shading.

WinCC Professional V13 SP2 – Programming reference


1568 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in runtime:
● RT Advanced: Read and write
● RT Professional: No access

Syntax
Object.BorderStyle3D[=BOOLEAN]

Object
Required. A "ScreenItem" object with the format:
● DateTimeField
● IOField
● Switch
● TextField
You have no access in runtime with the following format:
● Bar
● Button
● GraphicIOField
● GraphicView
● SymbolicIOField

BOOLEAN
Optional TRUE if the object has a 3D border shadow.

BorderWidth (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the line weight of the selected object.
Access in runtime: Read and write

Syntax
Object.BorderWidth[=Int32]

Object
Required. A "ScreenItem" object with the format:
● AlarmControl
● AlarmView
● Bar

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1569
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● Button
● CheckBox
● Circle
● CircleSegment
● ComboBox
● Ellipse
● EllipseSegment
● FunctionTrendControl
● Gauge
● GraphicIOField
● GraphicView
● IOField
● ListBox
● MultiLineEdit
● OnlineTableControl
● OnlineTrendControl
● OptionGroup
● Polygon
● Rectangle
● RoundButton
● Slider
● SymbolicIOField
● TextField
● TrendRulerControl
● UserArchiveControl
● WindowsSlider
You have no access in runtime with the following format:
● Clock
● DateTimeField
● RecipeView
● StatusForce
● Switch
● SysDiagControl
● TrendView
● UserView

WinCC Professional V13 SP2 – Programming reference


1570 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int32
Optional A value or a constant that specifies the line weight in pixels.

BorderWidth3D (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the width of the inner border for the 3D presentation of the selected object.
Access in runtime:
● RT Advanced: No access
● RT Professional: Read and write

Syntax
Object.BorderWidth3D[=Int32]

Object
Required. A "ScreenItem" object with the format:
● Button
● Gauge
● RoundButton
You have no access in runtime with the following format:
● Bar
● IOField
● Switch

Int32
Optional A value or constant that determines the width of the inside border for 3D display in
pixels.

BottomMargin (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BusyText (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1571
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ButtonBackColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ButtonBackFillStyle (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ButtonBarElements (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ButtonBarStyle (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ButtonBorderBackColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ButtonBorderColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ButtonBorderWidth (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


1572 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ButtonCornerRadius (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ButtonEdgeStyle (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ButtonFirstGradientColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ButtonFirstGradientOffset (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ButtonMiddleGradientColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ButtonSecondGradientColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ButtonSecondGradientOffset (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1573
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BV_ColumnWidth_Date (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BV_ColumnWidth_Event (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BV_ColumnWidth_EventSeverity (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BV_ColumnWidth_EventState (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BV_ColumnWidth_Number (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BV_ColumnWidth_Time (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BV_ItemText_Date (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


1574 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BV_ItemText_Event (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BV_ItemText_EventSeverity (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BV_ItemText_EventState (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BV_ItemText_Number (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BV_ItemText_Time (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BV_ShowItem_Date (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BV_ShowItem_Event (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1575
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BV_ShowItem_EventSeverity (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BV_ShowItem_EventState (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BV_ShowItem_Number (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

BV_ShowItem_Time (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

3.5.5.3 Properties C (Panels, Comfort Panels, RT Advanced, RT Professional)

Caption (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the text that will be displayed in the title line of the selected object.
Access in runtime: Read and write

Syntax
Object.Caption[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl

WinCC Professional V13 SP2 – Programming reference


1576 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● OnlineTrendControl
● TrendRulerControl
● Slider
● UserArchiveControl

STRING
Optional A value or a constant that contains the text that will be shown in the title line.

CaptionBackColor (RT Professional)

Description
Specifies the background color of the title line for the selected object.
Access in runtime: Read and write

Syntax
Object.CaptionBackColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● SymbolicIOField

Color
Optional A value or a constant that specifies the background color of the title line for the
selected object.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0-255).
For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBS
color constants such as vbRed and vbGreen.

CaptionColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the text that will be displayed in the title line of the selected object.
Access in runtime: Read and write

Syntax
Object.CaptionColor[=Color]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1577
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the format:
● Gauge
● Switch
● SymbolicIOField

Color
Optional A value or a constant that specifies the text color.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

CaptionText (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the text that will be displayed in the title line of the selected object.
Access in Runtime: Read and write

Syntax
Object.CaptionText[= STRING]

Object
Required. An object of the "ScreenItem" type with the format:
● Gauge
● ScreenWindow
● Switch

STRING
Optional A value or a constant that contains the text that will be shown in the title line.

WinCC Professional V13 SP2 – Programming reference


1578 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

CaptionTop (RT Professional)

Description
Specifies the distance of the instrument labels to the upper edge of the selected object. You
can position the instrument labels only in line with the vertical diameter of the scale. The value
of the attribute refers to the height of the specified object. The height specifies the upper edge
of the specified object and the lower edge of the lettering.
Access in runtime: Read and write

Syntax
Object.CaptionTop[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

DOUBLE
Optional A value or a constant that specifies the distance of the instrument labels to the upper
edge of the selected object.
Value range from 0 to 1
0: The lower edge of the lettering is positioned on the upper limit of the selected object. The
text is no longer visible as it is positioned outside of the selected object.
1: The lower edge of the lettering is positioned on the lower limit of the selected object.

CellCut (RT Professional)

Description
Specifies whether the contents of the cells are abbreviated if the cells are too narrow.
Access in runtime: Read and write

Syntax
Object.CellCut[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1579
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BOOLEAN
TRUE, if the contents are abbreviated.

CellSpaceBottom (RT Professional)

Description
Defines the bottom margin of the table cells.
Access in runtime: Read and write

Syntax
Object.CellSpaceBottom[=Int32]

Object
Required. A "ScreenItem" object with the following formats:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchivControl

Int32
Optional A value or constant that defines the bottom margin used in the table cells.

CellSpaceLeft (RT Professional)

Description
Specifies the left indent used in the table cells.
Access in runtime: Read and write

Syntax
Object.CellSpaceLeft[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

WinCC Professional V13 SP2 – Programming reference


1580 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int32
Optional A value or parameter that defines the left indent in the table cells.

CellSpaceRight (RT Professional)

Description
Specifies the right indent used in the table cells.
Access in runtime: Read and write

Syntax
Object.CellSpaceRight[=Int32]

Object
Required. A "ScreenItem" object with the following formats:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

Int32
Optional A value or constant that defines the right indent used in the table cells.

CellSpaceTop (RT Professional)

Description
Defines the top margin of the table cells.
Access in runtime: Read and write

Syntax
Object.CellSpaceTop[=Int32]

Object
Required. A "ScreenItem" object with the following formats:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1581
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int32
Optional A value or constant that defines the top margin used in the table cells.

CenterColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the center of the "Gauge" object.
Access in runtime: Read and write

Syntax
Object.CenterColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

Color
Optional A value or a constant that specifies the color of the center.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

CenterSize (RT Professional)

Description
Specifies the diameter of the scale center point.
Access in runtime: Read and write

Syntax
Object.CenterSize[=SINGLE]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

WinCC Professional V13 SP2 – Programming reference


1582 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

SINGLE
Optional A value or a constant that specifies the diameter of the round scale center point.
Value range from 0.03 to 1
1: The diameter corresponds to the smaller value of the geometry attribute "Width" or "Height".

ChangeMouseCursor (RT Professional)

Description
Specifies how the appearance of the cursor changes in Runtime when it is above the icon.
Access in runtime: Read and write

Syntax
Object.ChangeMouseCursor[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● SymbolLibrary

BOOLEAN
Optional TRUE, if the mouse cursor has the appearance of an arrow even when it is positioned
above the icon.
FALSE, if the mouse cursor has the appearance of a 3D arrow with a green lightning symbol.
This indicates in Runtime that the respective objective can be operated.

CheckMarkAlignment (RT Professional)

Description
Specifies whether the fields are right aligned.
Access in runtime: Read and write

Syntax
Object.CheckMarkAlignment[=ContentAlignment]

Object
Required. An object of the "ScreenItem" type with the format:
● OptionGroup
You have no access in runtime with the following format:
● CheckBox

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1583
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ContentAlignment
(0): The fields are arranged left aligned.
(1): The fields are arranged right aligned.

CheckMarkCount (RT Professional)

Description
Specifies the number of fields.
Access in runtime: Read and write

Syntax
Object.CheckMarkCount[=Int32]

Object
Required. A "ScreenItem" object with the format:
● OptionGroup
You have no access in runtime with the following format:
● CheckBox

Int32
Optional A value or a constant that specifies the number of fields. Value range from 0 to 31

ClearOnError (RT Professional)

Description
Specifies whether an invalid input in this object will be deleted automatically.
Access in runtime: Read and write

Syntax
Object.ClearOnError[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● IOField

BOOLEAN
Optional TRUE, if an invalid input in this object will be deleted automatically.

WinCC Professional V13 SP2 – Programming reference


1584 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ClearOnFocus (RT Professional)

Description
Specifies whether the field entry will be deleted as soon as the I/O field is activated.
Access in runtime: Read and write

Syntax
Object.ClearOnFocus[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● IOField

BOOLEAN
Optional TRUE, if the field entry is deleted as soon as the I/O field is activated.

Closeable (RT Professional)

Description
Specifies whether the window can be closed in Runtime.
Access in Runtime: Read and write

Syntax
Object.Closeable[=BOOLEAN]

Object
Required. A "ScreenItem" object with the format "UserArchiveControl".

BOOLEAN
Optional. TRUE, if the window can be closed in Runtime.

See also
AlarmControl (Page 1316)
UserArchiveControl (Page 1499)
SystemDiagnoseWindow (Page 1473)
TrendRulerControl (Page 1480)
FunctionTrendControl (Page 1373)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1585
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

OnlineTableControl (Page 1409)


OnlineTrendControl (Page 1417)

Color (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the line color of the specified object.
Access in runtime: Read and write

Syntax
Object.Color[=Color]

Object
Required. A "ScreenItem" object with the following format:
● CircularArc
● EllipticalArc
● Line
● Polyline
● TubeArcObject
● TubeDoubleTeeObject
● Tubepolyline
● TubeTeeObject

Color
Optional A value or a constant that specifies the line color.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

ColorChangeHysteresis (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies hysteresis as a percentage of the display value.
The "ColorChangeHysteresisEnable" property must have the value TRUE so that the
hysteresis can be calculated.

WinCC Professional V13 SP2 – Programming reference


1586 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in runtime: Read and write

Syntax
Object.ColorChangeHysteresis[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● Bar

DOUBLE
Optional A value or a constant that specifies the hysteresis as a percentage of the display
value.

ColorChangeHysteresisEnabled (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Determines whether the object will be displayed with a hysteresis.
Access in runtime: Read and write

Syntax
Object.ColorChangeHysteresisEnabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional TRUE, if the object will be displayed with a hysteresis.

ColumnAlignment (RT Professional)

Description
Specifies how the selected column is aligned.
The following settings are possible:

Value Description Explanation


0 Left The column selected is displayed left-justified.
1 Centered The column selected is displayed centered.
2 Right The column selected is displayed right-justified.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1587
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

The attribute can be assigned dynamic properties by means of the name ColumnAlignment.
The data type is LONG.

ColumnDateFormat (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Defines the date format to be used for visualization. The "ColumnIndex" property is used to
reference the date column of the recipe view. The attribute can be assigned dynamic properties
by means of the name ColumnDateFormat.
Access in Runtime: Write

Syntax
Object.ColumnDateFormat(=String)

Object
Required An object of the "ScreenItem" type with the characteristic "UserArchiveControl".

String
The following date formats are available:

Value Explanation
dd.MM.yy Day.Month.Year, e.g., 24.12.13.
dd.yyyyd.MM Day.Month.Year, e.g., 24.12.2013.
dd/MM/yy Day/Month/Year, e.g., 24/12/13.
dd/MM/yyyy Day/Month/Year, e.g., 24/12/2013.

See also
UserArchiveControl (Page 1499)

ColumnResize (RT Professional)

Description
Enables changes to the width of columns.
Access in runtime: Read and write

Syntax
Object.ColumnResize[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


1588 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: You can change the width of the columns.
FALSE: You cannot change the width of the columns.

Columns (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ColumnScrollbar (RT Professional)

Description
Enables the display of column scroll bars.
Access in Runtime: Read

Syntax
Object.ColumnScrollbar[=Scrollbar]

Object
Required An object of the "ScreenItem" type with the format "AlarmControl",
"TrendRulerControl", "OnlineTableControl", "UserArchivControl".

Scrollbar
0 = (No) The column scrollbars are not displayed.
1 = (if required) The column scrollbars are displayed if the space requirement of the control is
greater in vertical direction than the available display area.
2 = (always) The column scrollbars are always displayed.

See also
UserArchiveControl (Page 1499)
TrendRulerControl (Page 1480)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1589
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

OnlineTableControl (Page 1409)


AlarmControl (Page 1316)

ColumnSettings (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ColumnSettingsBufferView (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ColumnsMoveable (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ColumnTextAckGroup (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ColumnTextAlarmState (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ColumnTextAlarmText (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


1590 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ColumnTextClassName (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ColumnTextDate (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ColumnTextDevice (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ColumnTextDiagnosable (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ColumnTextNumber (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ColumnTextTime (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ColumnTimeFormat (RT Professional)

Description
Defines the time format to be used for visualization. The "ColumnIndex" property is used to
reference the time column of the recipe view. The attribute can be assigned dynamic properties
by means of the name ColumnTimeFormat.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1591
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in Runtime: Write

Syntax
Object.ColumnTimeFormat(=String)

Object
Required. An object of the "ScreenItem" type with the characteristic "UserArchiveControl".

String
The following time formats are available:

Value Explanation
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.

ColumnTitleAlignment (RT Professional)

Description
Specifies the type of column title alignment.
Access in Runtime: Read

Syntax
Object.ColumnTitleAlignment[=GridColumnHeaderHorizontalAlignment]

Object
Required. An object of the "ScreenItem" type with the format "AlarmControl",
"TrendRulerControl", "OnlineTableControl", "UserArchivControl".

GridColumnHeaderHorizontalAlignment
0 = The column headers are shown left aligned.
1 = The column headers are shown centered.
2 = The column headers are shown right aligned.
3 = The column headers are aligned as the corresponding content.

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


1592 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ColumnTitles (RT Professional)

Description
Enables the display of the column header.
Access in runtime: Read and write

Syntax
Object.ColumnTitles[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchivControl

BOOLEAN
TRUE: The column header is displayed.
FALSEThe column header is not displayed.

ComboboxFont (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

Dublette_CompatibilityMode (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ComputerName (RT Professional)

Description
Returns the name of the computer on which the alarm object was triggered.
ComputerName (readonly)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1593
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ConnectionType (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

No access in runtime

ConnectOnStart (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ConnectTrendWindows (RT Professional)

Description
Specifies whether the configured trend views are connected. The requirement is that you have
configured several trend views.
The connected trend views have the following properties:
● A common X axis
● A scrollbar
● A ruler
Access in runtime: Read and write

Syntax
Object.ConnectTrendWindows[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

BOOLEAN
TRUE: All configured trend views are connected.
FALSE: The trend views are displayed separately.

Context (RT Professional)

Description
Reads or sets the alarm object server prefix.

WinCC Professional V13 SP2 – Programming reference


1594 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ContinousChange (RT Professional)

Description
Specifies whether the value of the "ProcessValue" property will be transferred when the mouse
button is released or as soon as the slider position changes in Runtime.
Access in runtime: Read and write

Syntax
Object.ContinousChange[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Slider

BOOLEAN
Optional TRUE, if the value of the property "ProcessValue" will be transferred when the mouse
button is released or as soon as the slider position changes in Runtime.

CornerRadius (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

CornerStyle (RT Professional)

Description
Specifies the type of border lines for the specified object.
Access in Runtime: Read-only

Syntax
Object.CornerStyle[=Int]

Object
Required. An object of the "ScreenItem" type with the format:
● Bar
● Button
● CheckBox
● Circle

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1595
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● CircleSegment
● CircularArc
● ComboBox
● EllipseSegment
● GraphicIOField
● GraphicView
● IOField
● Line
● ListBox
● MultiLineEdit
● OptionGroup
● Polygon
● Polyline
● Rectangle
● RoundButton
● SymbolicIOField
● TextField
● Tubepolyline
● WindowsSlider
You have no access in runtime with the following format:
● Ellipse
● EllipticalArc
● Switch
● TubeArcObject

Int
Optional A value or a constant that specifies the type of border lines for the specified object.
0 = filled line
1 = broken line
2 = dotted line
3 = dashed and dotted line
4 = dash - dot - dot line

WinCC Professional V13 SP2 – Programming reference


1596 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Count (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Returns the number of elements in the specified list.
Access in Runtime: Read

Syntax
Object.Count

Object
Required A "Collection" object.

CountDivisions (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the number of segments in which the bar will be divided by the large marking lengths
of the scale.
Access in runtime: Read and write

Syntax
Object.CountDivisions[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Bar

Int32
Optional A value or a constant that specifies the number of segments in which the bar will be
divided by the large marking lengths of the scale.
0-100: An object can be divided into a maximum of 100 segments
= 0: The optimum number of segments will be established automatically.

See also
Bar (Page 1330)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1597
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

CountOfLinesPerAlarms (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

CountOfVisibleAlarms (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

CountSubDivisions (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

CountVisibleItems (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies how many lines the selection list will contain. If the number of configured texts is
greater than this value, then the selection list will have a vertical scroll bar.
Access in runtime:
● RT Advanced: No access
● RT Professional: Read and write

Syntax
Object.CountVisibleItems[=Int32]

Object
Required. A "ScreenItem" object with the format:
● ComboBox
● ListBox
● SymbolicIOField
You have no access in runtime with the following format:
● StatusForce
● TrendView
● UserView

WinCC Professional V13 SP2 – Programming reference


1598 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int32
Optional A value or a constant that specifies how many lines the selection list will contain.

CurrentContext (RT Professional)

Description
Returns a character string depending on the use of the function.
If the function is contained in a screen in the screen window, CurrentContext returns the
symbolic server name which supplies the screen. Example: "WinCCProject_MyComputer::"
If the function is contained in the main screen, an empty character string is returned.
Access in Runtime: Read

Syntax
Object.CurrentContext

Object
Required A "HMIRuntime" object.

See also
HMIRuntime (Page 1292)

CursorControl (RT Professional)

Description
Specifies whether the mouse cursor jumps to the next field of the TAB sequence after leaving
the field.
Access in runtime: Read and write

Syntax
Object.CursorControl[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● IOField
● SymbolicIOField

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1599
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BOOLEAN
Optional TRUE, if the mouse cursor jumps to the next field of the TAB-order after leaving the
field.

Comments
For this purpose, the "CursorMode" property must be set to TRUE.

Curves (RT Advanced)

Description
No access in runtime.

3.5.5.4 Properties D (Panels, Comfort Panels, RT Advanced, RT Professional)

DangerRangeColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the warning range of the scale of the "Gauge" object.
The "DangerRangeVisible" property must have the value TRUE so that the warning range is
displayed.
Access in runtime: Read and write

Syntax
Object.DangerRangeColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

Color
Optional A value or a constant that specifies the color of the warning range.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

WinCC Professional V13 SP2 – Programming reference


1600 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

DangerRangeStart (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies at which scale value the warning range of the "Gauge" object will start.
The "DangerRangeColor" property must have the value TRUE so that the warning range is
displayed.
Access in runtime: Read and write

Syntax
Object.DangerRangeStart[=SINGLE]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

SINGLE
Optional A value or a constant that specifies the scale value for the start of the warning range.

Comments
The range extends from the value "Gefahr" through to the end of the scale.

DangerRangeVisible (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the warning range in the scale of the "Gauge" object will be displayed.
Access in runtime: Read and write

Syntax
Object.DangerRangeVisible[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

BOOLEAN
Optional TRUE, if the warning range will be displayed in the scale.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1601
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
Specifies the color of the warning range with the "DangerRangeColor" property.
Specifies the start of the warning range with the "DangerRangeStart" property.

DataFormat (RT Professional)

Description
Returns the data type of the I/O field object.
Access in runtime: Read

Syntax
Object.DataFormat[=IOFieldDataFormat]

Object
Required. An object of the "ScreenItem" type with the following format:
● IOField

IOFieldDataFormat
Optional. A value or a constant that returns the data type of the I/O field object.
Value range from 0 to 3.
● 0: Binary
● 1: Decimal
● 2: String
● 3: Hexadecimal

DataLogs (RT Professional)

Description
Returns an object of type "DataLogs".
Access in Runtime: Read

Syntax
Object.DataLogs

Object
Required A "Logging" object.

WinCC Professional V13 SP2 – Programming reference


1602 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
Logging (Page 1297)

DataRecordNameCaption (RT Advanced)

Description
No access in runtime.

DataRecordNrCaption (RT Advanced)

Description
No access in runtime.

DataSet (RT Professional)

Description
Returns an object of type "DataSet".
Access in Runtime: Read

Syntax
Object.DataSet

Object
Required A "Screen" object.

See also
HMIRuntime (Page 1292)
Screen (Page 1299)

DialColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the dial for the selected object.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1603
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.DialColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Clock
● Gauge

Color
Optional A value or a constant that specifies the color of the dial.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

DialFillStyle (RT Professional)

Description
Specifies the type of background of the selected object.
Access in Runtime: Read and write

Syntax
Object.DialFillStyle[=GaugeFillStyle]

Object
Required A "ScreenItem" object with following format:
● Gauge

GaugeFillStyle
hmiGaugeBackStyleSolid (0): The rectangular background of the display is filled with the
specified border color. The scale is filled with the specified background color.
hmiGaugeBackStyleFrameTransparent (1): The rectangular background of the Gauge is
transparent. The scale is filled with the specified background color. As a result, a circular
display can be shown.
hmiGaugeBackStyleTransparent (2): The rectangular background and the scale are
transparent.

WinCC Professional V13 SP2 – Programming reference


1604 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

DialSize (RT Professional)

Description
Specifies the diameter of the scale in relation to the smaller value of the geometry attributes
"Width" and "Height".
Access in runtime: Read and write

Syntax
Object.DialSize[=SINGLE]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

SINGLE
Optional A value or a constant that specifies the diameter of the scale in relation to the smaller
value of the geometry attributes "Width" and "Height".

DisplayButton2Plc (RT Advanced)

Description
No access in runtime.

DisplayButtonComparison (RT Advanced)

Description
No access in runtime.

DisplayButtonDelete (RT Advanced)

Description
No access in runtime.

DisplayButtonFromPlc (RT Advanced)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1605
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

DisplayButtonHelp (RT Advanced)

Description
No access in runtime.

DisplayButtonNew (RT Advanced)

Description
No access in runtime.

DisplayButtonSave (RT Advanced)

Description
No access in runtime.

DisplayButtonSaveAs (RT Advanced)

Description
No access in runtime.

DisplayComboBox (RT Advanced)

Description
No access in runtime.

DisplayGridLines (RT Advanced)

Description
No access in runtime.

DisplayLabeling (RT Advanced)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


1606 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

DisplayNumbers (RT Advanced)

Description
No access in runtime.

DisplayOptions (RT Professional)

Description
Specifies whether alarms whose view was suppressed are displayed.
Access in Runtime: Read and write

Syntax
Object.DisplayOptions[=AlarmDisplayOptions]

Object
Required. An object of the "ScreenItem" type with the format:
● AlarmControl

AlarmDisplayOptions
0: All messages
1: Only displayed messages
2: Only hidden messages

DisplayStatusBar (RT Advanced)

Description
No access in runtime.

DisplayTable (RT Advanced)

Description
No access in runtime.

DoubleClickAction (RT Professional)

Description
Specifies the action to be executed in Runtime by double-clicking on a message line.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1607
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in Runtime: Read and write

Syntax
Object.DoubleClickAction[=AlarmControlActions]

Object
Required A "ScreenItem" object with following format:
● AlarmControl

AlarmControlActions

Value Description Explanation


0 None No action.
1 Loop-in-alarm Calls the "Loop-in-alarm" function.
2 Open comments dialog Calls the "Comments dialog" button function.
3 Open Infotext dialog Calls the "Infotext dialog" button function.
4 Column-dependent The action is determined by the column in which you dou‐
ble-clicked.

DrawInsideFrame (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the border line of the selected object should be illustrated with a line weight
greater than 1 within the border or symmetrically to the border.
Access in runtime:
● RT Advanced: No access
● RT Professional: Read and write

Syntax
Object.DrawInsideFrame[=BOOLEAN]

Object
Required. A "ScreenItem" object with the format:
● Bar
● Button
● Circle
● CircleSegment
● CircularArc
● Ellipse
● EllipseSegment

WinCC Professional V13 SP2 – Programming reference


1608 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● EllipticalArc
● GraphicIOField
● GraphicView
● OptionGroup
● Rectangle
● RoundButton
● SymbolicIOField
● TextField
● WindowsSlider
You have no access in runtime with the following format:
● CheckBox
● Switch
● TubeArcObject

BOOLEAN
Optional TRUE, if the border line of the specified object will be illustrated with a line weight
greater than 1 within the border.

Drive (RT Professional)

Description
Specifies the characters of the drive that is to be monitored.
Access in runtime: Read and write

Syntax
Object.Drive[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● DiscSpaceView

STRING
Optional A value or a constant that specifies the characters of the drive that is to be monitored.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1609
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.5.5 Properties E-F (Panels, Comfort Panels, RT Advanced, RT Professional)

EdgeStyle (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the line style of the selected object.
Access in runtime: Read and write

Syntax
Object.EdgeStyle[=LineStyle]

Object
Required. A "ScreenItem" object with the format:
● Bar
● Button
● CheckBox
● Circle
● CircleSegment
● ComboBox
● Ellipse
● EllipseSegment
● GraphicIOField
● GraphicView
● IOField
● ListBox
● MultiLineEdit
● OptionGroup
● Polygon
● Rectangle
● RoundButton
● SymbolicIOField
● TextField
● WindowsSlider
You have no access in runtime with the following format:
● AlarmView
● Clock

WinCC Professional V13 SP2 – Programming reference


1610 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● DateTimeField
● Gauge
● RecipeView
● Slider
● StatusForce
● Switch
● SysDiagControl
● TrendView
● UserView

LineStyle
Optional A value or a constant that specifies the line style. Value range from -1 to 4.
The objects "Ellipse", "Circle", "Rectangle" and "Polygon" support the line styles:
● hmiLineStyleSolid (0): solid line
● hmiLineStyleDash (1): broken line
● hmiLineStyleDot (2): dotted line
● hmiLineStyleDashDot (3): dash - dot line
● hmiLineStyleDashDotDot (4): dash - dot - dot line
The objects "TextField" and "IOField" support only the line styles:
● hmiLineStyleNone (-1): no line
● hmiLineStyleSolid (0): solid line
Default setting: hmiLineStyleSolid

EditOnFocus (RT Professional)

Description
Specifies whether the data input is immediately possible if the input field is selected using the
<Tab> key.
Access in runtime: Read and write

Syntax
Object.EditOnFocus[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● IOField
● SymbolicIOField

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1611
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BOOLEAN
Optional TRUE, if the data input is immediately possible and the input field has been selected
using the <Tab> key.

Enabled (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the selected object can be operated in Runtime.
Access in runtime: Read and write

Syntax
Object.Enabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● AlarmView
● Bar
● Button
● ChannelDiagnose
● CheckBox
● Circle
● CircleSegment
● CircularArc
● Clock
● ComboBox
● DateTimeField
● DiscSpaceView
● Ellipse
● EllipseSegment
● EllipticalArc
● FunctionTrendControl
● Gauge
● GraphicIOField
● GraphicView
● HTML-Browser

WinCC Professional V13 SP2 – Programming reference


1612 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● IOField
● Line
● ListBox
● MediaPlayer
● MultiLineEdit
● OnlineTableControl
● OnlineTrendControl
● OptionGroup
● PLCCodeViewer
● Polygon
● Polyline
● RecipeView
● Rectangle
● RoundButton
● S7GraphOverview
● Slider
● SmartClientView
● StatusForce
● Switch
● SymbolicIOField
● SymbolLibrary
● SysDiagControl
● TextField
● TrendRulerControl
● TrendView
● TubeArcObject
● TubeDoubleTeeObject
● Tubepolyline
● TubeTeeObject
● UserArchiveControl
● UserView
● WindowsSlider

BOOLEAN
Optional TRUE, if the specified object can be operated in Runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1613
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

EnableEdit (RT Professional)

Description
Enables editing of the data displayed during runtime.
Access in runtime: Read and write

Syntax
Object.EnableEdit[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl
● UserArchiveControl

BOOLEAN
TRUE: The data can be changed in Runtime.
FALSE: The data cannot be changed.

EnableNavigateKeys (RT Advanced)

Description
No access in runtime.

EndAngle (RT Professional)

Description
Specifies the angle at which the end point of the selected object deviates from the zero position
(0°).
Access in runtime: Read and write

Syntax
Object.EndAngle[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● CircleSegment
● CircularArc
● EllipseSegment

WinCC Professional V13 SP2 – Programming reference


1614 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● EllipticalArc
● TubeArcObject

Int32
Optional A value or a constant that specifies the angle at which the end point of the selected
object deviates from the zero position (0°).

EndLeft (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

EndStyle (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies how the line-end shapes of the selected object will be displayed.
Access in runtime: Read and write

Syntax
Object.EndStyle[=LineEndStyle]

Object
Required. A "ScreenItem" object with the following format:
● Line
● Polyline

LineEndStyle
Optional A value or a constant that specifies the line-end shapes. Value range from 0 to 6.
hmiLineEndStyleNone (0): The line has no end symbol.
hmiLineEndStyleArrow (1): The line ends with an arrow.
hmiLineEndStyleFilledArrow (2): The line ends with a filled arrowhead.
hmiLineEndStyleFilledArrowReversed (3): The line ends with a reversed arrow.
hmiLineEndStyleLine (4): The line ends with a vertical line.
hmiLineEndStyleCircle (5): The line ends with a circle.
hmiLineEndStyleFilledCircle (6): The line ends with a filled circle.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1615
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

EndTop (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

EntryNameCaption (RT Advanced)

Description
No access in runtime.

ErrorDescription (RT Professional)

Description
Returns one of the following error descriptions in English:

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)

To obtain an error description, first of all carry out the Read method.

Note
If the error occurs when accessing via the TagSet object, evaluate the ErrorDescription
property for each tag of the TagSet object.

Access in Runtime: Read

Syntax
Object.ErrorDescription

Object
Required A "Tag" object.

WinCC Professional V13 SP2 – Programming reference


1616 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example
The following example shows the error description for the "Tag1" tag:

'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:

HMIRuntime.Trace "ErrorDescription: " & group("Motor1").ErrorDescription & vbNewLine

See also
Tag (Page 1310)
TagSet (list) (Page 1314)

EvenRowBackColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ExportDelimiter (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1617
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ExportDirectoryChangeable (RT Professional)

Description
Enables changing of the directory for data export in Runtime.

Syntax
Object.ExportDirectoryChangeable=[BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The directory for data export can be changed in runtime.
FALSE: The directory for data export cannot be changed in runtime.

ExportDirectoryname (RT Professional)

Description
Defines the directory to which the exported Runtime data is written.
Access in runtime: Read and write

Syntax
Object.ExportDirectoryname[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl

WinCC Professional V13 SP2 – Programming reference


1618 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● TrendRulerControl
● UserArchiveControl

STRING
Optional A value or a constant which specifies the directory.

ExportFileExtension (RT Professional)

Description
Specifies the file extension of the export file. Only the file extension "csv" is supported.
Access in runtime: Read and write

Syntax
Object.ExportFileExtension[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

STRING
Optional Specifies the file extension of the export file.

ExportFilename (RT Professional)

Description
Defines the name of the file which is to receive the exported Runtime data.
Access in runtime: Read and write

Syntax
Object.ExportFilename[=STRING]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1619
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

STRING
Optional Defines the name of the file which is to receive the exported Runtime data.

ExportFilenameChangeable (RT Professional)

Description
Enables renaming of the export file in Runtime.

Syntax
Object.ExportFilenameChangeable[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The file name of the export file can be changed in runtime.
FALSE: The file name of the export file cannot be changed in runtime.

ExportFormatGuid (RT Professional)

Description
Specifies the assignment of ID number and export provider.

WinCC Professional V13 SP2 – Programming reference


1620 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in runtime: Read and write

Syntax
Object.ExportFormatGuid[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

STRING
Optional A value or constant that specifies the assignment of ID number and export provider.

ExportFormatName (RT Professional)

Description
Defines the export file format. Only the "csv" file format is currently available for the export.
Access in runtime: Read and write

Syntax
Object.ExportFormatName[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

STRING
Optional A value or a constant that defines the file format for export.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1621
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ExportParameters (RT Professional)

Description
Specifies the parameters of the selected format by means of the properties dialog.
Access in runtime: Read and write

Syntax
Object.ExportParameters

Object
Required. A "ScreenItem" object with the format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

ExportParameters
Optional A value or constant that specifies the parameters of the selected format in the
Properties dialog.

ExportSelection (RT Professional)

Description
Specifies which runtime data of the control is exported.
Access in Runtime: Read and write

Syntax
Object.ExportSelection[=ExportRange]

Object
Required A "ScreenItem" object with following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl

WinCC Professional V13 SP2 – Programming reference


1622 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● TrendRulerControl
● UserArchiveControl

ExportRange

Value Description Explanation


0 all All Runtime data of the control is exported.
1 Selection Selected Runtime data of the control is exported.

ExportShowDialog (RT Professional)

Description
Enables the display of the export dialog during runtime.
Access in runtime: Read and write

Syntax
Object.ExportShowDialog[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
Optional TRUE, if the dialog box is shown in Runtime.

ExtendedZoomingEnable (RT Professional)

Description
Specifies whether the operator can zoom the screen in or out in runtime by turning the mouse
wheel.
Access during runtime: Read and write

Syntax
Object.ExtendedZoomingEnable[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1623
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Necessary. A "Screen" object.

BOOLEAN
Optional TRUE, if the operator can zoom the screen in and out in runtime.

Example
The following example shows how the extended zoom can be enabled for the NewPDL1
screen:

'VBS155
Dim objScreen
Set objScreen = HMIRuntime.Screens("NewPDL1")
objScreen.ExtendedZoomingEnable = 1

See also
Screen (Page 1299)

FieldLength (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies that the "field length string" field is read-only.
Access in Runtime: Read and write

Syntax
Object.FieldLength[=BOOLEAN]

Object
Required. A "ScreenItem" object with the format "IOField".

BOOLEAN
Optional. TRUE, if the "field length string" can only be read.

Used for the following object types


IOField

See also
IOField (Page 1392)

WinCC Professional V13 SP2 – Programming reference


1624 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

FieldLength (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

FillColorMode (RT Professional)

Description
Specifies the type of foreground for the selected object.
Access in Runtime: Read and write

Syntax
Object.FillColorMode[=SymbolLibraryColorMode]

Object
Required A "ScreenItem" object with following format:
● SymbolLibrary

SymbolLibraryColorMode
hmiSymbolLibraryAppearanceOriginal (0): The surface is gray.
hmiSymbolLibraryAppearanceShaded (1): The display is shaded.
hmiSymbolLibraryAppearanceSolid (2): The display is solid.
hmiSymbolLibraryAppearanceTransparent (3): The display is gray.

FillPatternColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the fill pattern for the selected object.
Access in runtime:
● RT Advanced: No access
● RT Professional: Read and write

Syntax
Object.FillPatternColor[=Color]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1625
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the format:
● Bar
● Button
● CheckBox
● Circle
● CircleSegment
● ComboBox
● Ellipse
● EllipseSegment
● GraphicView
● IOField
● ListBox
● OptionGroup
● Polygon
● Rectangle
● RoundButton
● SymbolicIOField
● TextField
● WindowsSlider
You have no access in runtime with the following format:
● AlarmControl
● DateTimeField
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

Color
Optional A value or a constant that establishes the color of the fill pattern for the specified
object.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

WinCC Professional V13 SP2 – Programming reference


1626 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

FillStyle (RT Advanced)

Description
Determines the fill style of the specified object.
Access in runtime: Read and write

Syntax
Object.FillStyle[=LineFillStyle]

Object
Required. A "ScreenItem" object with the following format:
● Line
● Polyline

LineFillStyle
Optional A value or a constant that specifies the fill style.
hmiLineFillStyleTransparent (0): Transparent fill
hmiLineFillStyleSolid (1): Object is filled with the specified color
Default setting: hmiLineFillStyleSolid

FillstyleAlignment (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the alignment within the specified object.

Filter (Panels, Comfort Panels, RT Advanced, RT Professional)

Description

No access in runtime.

FilterTag (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1627
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

FilterText (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

FirstConnectedObjectIndex (RT Professional)

Description
Specifies the index number of the upper connector point.
Access in Runtime: Read and write

Syntax
Object.FirstConnectedObjectIndex[=Int]
Object
Required A "ScreenItem" object with the format "Connector".

Int
Int

See also
Connector (Page 1355)

FirstConnectedObjectName (RT Professional)

Description
Specifies the object name of the object that is docked at the upper connector point.
Access in Runtime: Read and write

Syntax
Object.FirstConnectedObjectName[=String]

Object
Required A "ScreenItem" object with the format "Connector".

String
String

WinCC Professional V13 SP2 – Programming reference


1628 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
Connector (Page 1355)

FitToLargest (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

FitToSize (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

FixedAspectRatio (RT Professional)

Description
Specifies whether the aspect ratio should be maintained or changed when the symbol size is
altered.
Access in runtime: Read and write

Syntax
Object.FixedAspectRatio[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● SymbolLibrary

BOOLEAN
Optional TRUE, if the aspect ratio should be maintained when the symbol size is altered.

FlashingColorOff (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the border line for the selected object for the flashing status "off".
Access in runtime:
● RT Advanced: No access
● RT Professional: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1629
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.FlashingColorOff[=Color]

Object
Required. A "ScreenItem" object with the format:
● Button
● Circle
● CircleSegment
● CircularArc
● Ellipse
● EllipseSegment
● EllipticalArc
● IOField
● Line
● OptionGroup
● Polygon
● Polyline
● Rectangle
● RoundButton
● SymbolicIOField
● TextField
You have no access in runtime with the following format:
● Bar
● CheckBox
● Switch
● TubeArcObject

Color
Optional A value or a constant that specifies the color of the border line of the selected object
for the flashing status "off".

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

WinCC Professional V13 SP2 – Programming reference


1630 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

FlashingColorOn (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the border line for the selected object for the flashing status "on".
Access in runtime:
● RT Advanced: No access
● RT Professional: Read and write

Syntax
Object.FlashingColorOn[=Color]

Object
Required. A "ScreenItem" object with the format:
● Button
● Circle
● CircleSegment
● CircularArc
● Ellipse
● EllipseSegment
● EllipticalArc
● IOField
● Line
● OptionGroup
● Polygon
● Polyline
● Rectangle
● RoundButton
● SymbolicIOField
● TextField
You have no access in runtime with the following format:
● Bar
● CheckBox
● Switch
● TubeArcObject

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1631
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Color
Optional A value or a constant that specifies the color of the border line of the selected object
for the flashing status "on".

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

FlashingEnabled (RT Professional)

Description
Specifies whether the border line of the selected object will flash in Runtime.
Access in Runtime: Read and write

Syntax
Object.FlashingEnabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the formats "Line", "Polyline", "Ellipse", "Circle",
"EllipseSegment", "CircleSegment", "EllipticalArc", "CircularArc", "Rectangle", "Polygon",
"TextField", "IOField", "SymbolicIOField", "Button", "Switch", "GraphicIOField", "Bar",
"Checkbox", "OptionGroup" or "Connector".

BOOLEAN
Optional. TRUE, if the border line of the object is flashing.

See also
Line (Page 1396)
Polyline (Page 1431)
Ellipse (Page 1361)
Circle (Page 1346)
EllipseSegment (Page 1363)
CircleSegment (Page 1348)
EllipticalArc (Page 1366)
CircularArc (Page 1351)
Rectangle (Page 1443)
Polygon (Page 1429)

WinCC Professional V13 SP2 – Programming reference


1632 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TextField (Page 1477)


IOField (Page 1392)
SymbolicIOField (Page 1463)
Button (Page 1337)
Switch (Page 1460)
GraphicIOField (Page 1383)
Bar (Page 1330)
CheckBox (Page 1343)
OptionGroup (Page 1426)
Connector (Page 1355)
RoundButton (Page 1445)

FlashingOnLimitViolation (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

FlashingRate (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the flash rate of the border line for the selected object.
Access in runtime:
● RT Advanced: No access
● RT Professional: Read/Write

Syntax
Object.FlashingRate[=FlashingRate]

Object
Required. An object of the "ScreenItem" type with the format:
● Button
● Circle
● CircleSegment
● CircularArc
● Ellipse
● EllipseSegment

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1633
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● EllipticalArc
● GraphicIOField
● IOField
● Line
● OptionGroup
● Polygon
● Polyline
● Rectangle
● RoundButton
● SymbolicIOField
● TextField
You have no access in runtime with the following format:
● Bar
● CheckBox
● Switch
● TubeArcObject

FlashingRate
hmiFlashingRateSlow (0): The length of the flashing interval is 1000 ms.
hmiFlashingRateMedium (1): The length of the flashing interval is 500 ms.
hmiFlashingRateFast (2): The length of the flashing interval is 250 ms.

FlashTransparentColor (RT Professional)

Description
Specifies the color of the bitmap object of a flashing graphic that is set to "transparent".
Access in Runtime: Read and write

Syntax
Object.FlashTransparentColor[=Color]

Object
Required A "ScreenItem" object with the format "GraphicIOField".

Color
Optional A value or a constant that specifies the color of the bitmap object of a flashing graphic
that is set to "transparent".

WinCC Professional V13 SP2 – Programming reference


1634 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
GraphicIOField (Page 1383)

Flip (RT Professional)

Description
Flips the symbol on the vertical and / or horizontal center axis of the symbol.
Access in Runtime: Read and write

Syntax
Object.Flip[=SymbolLibraryFlip]

Object
Required A "ScreenItem" object with following format:
● SymbolLibrary

SymbolLibraryFlip
hmiSymbolLibraryFlipNone (0): The symbol is not flipped.
hmiSymbolLibraryFlipHorizontal (1): The symbol is flipped horizontally.
hmiSymbolLibraryFlipVertical (2): The symbol is flipped vertically.
hmiSymbolLibraryFlipBoth (3): The symbol is flipped horizontally and vertically.

FocusColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies that the color for the focus border of the selected object is currently active.
Access in runtime: Read and write

Syntax
Object.FocusColor[=Color]

Object
Required. A "ScreenItem" object with the format:
● AlarmView
● RecipeView
● Slider
● StatusForce

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1635
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● Switch
● TrendView
You have no access in runtime with the following format:
● Button
● GraphicIOField
● SymbolicIOField

Color
Optional A value or a constant that specifies the color of the focus border.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

FocusWidth (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the border width of the specified object if the object is currently active.
Access in runtime: Read and write

Syntax
Object.FocusWidth[=Int32]

Object
Required. A "ScreenItem" object with the format:
● AlarmView
● RecipeView
● Slider
● StatusForce
● Switch
● TrendView
You have no access in runtime with the following format:
● Button
● GraphicIOField
● SymbolicIOField

WinCC Professional V13 SP2 – Programming reference


1636 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int32
Optional A value or a constant that specifies the border width in pixels. Value range from 1 to
10.

Font (RT Professional)

Description
Specifies or returns the font.
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.
Access during runtime: Read and write

Syntax
Object.Font[=Font]

Object
Required. An object of the "ScreenItem" type with the format:
AlarmControl
Clock
FunctionTrendControl
OnlineTableControl
OnlineTrendControl
Slider
TrendRulerControl
UserArchiveControl
You have no access in runtime with the following format:
● Bar
● Button
● CheckBox
● ComboBox

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1637
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● DateTimeField
● IOField
● ListBox
● MultiLineEdit
● OptionGroup
● ProtectedAreaNameView
● RangeLabelView
● RecipeView
● RoundButton
● SmartClientView
● Switch
● SymbolicIOField
● TextField
● TrendView
● ZoneLabelView

Font
Font

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

FontBold (RT Professional)

Description
Specifies whether the text of the selected object should be shown in bold.
Access in runtime: Read and write

Syntax
Object.FontBold[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


1638 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● TextField
● Bar
● Button
● CheckBox
● ComboBox
● IOField
● ListBox
● MultiLineEdit
● OptionGroup
● RoundButton
● SymbolicIOField

BOOLEAN
Optional TRUE, if the text of the selected object should be shown in bold.

FontItalic (RT Professional)

Description
Specifies whether the text of the selected object should be shown in italic.
Access in runtime: Read and write

Syntax
Object.FontItalic[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● TextField
● Button
● CheckBox
● ComboBox
● IOField
● ListBox
● MultiLineEdit
● OptionGroup

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1639
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● RoundButton
● SymbolicIOField

BOOLEAN
Optional TRUE, if the text of the selected object should be shown in italic.

FontName (RT Professional)

Description
Specifies the font of the selected object.
Access in runtime: Read and write

Syntax
Object.FontName[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● TextField
● Bar
● Button
● CheckBox
● ComboBox
● IOField
● ListBox
● MultiLineEdit
● OptionGroup
● RoundButton
● SymbolicIOField

STRING
Optional A value or a constant that specifies the font of the selected object.

FontSize (RT Professional)

Description
Specifies the font size of the text for the selected object.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1640 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.FontSize[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● TextField
● Bar
● Button
● CheckBox
● ComboBox
● IOField
● ListBox
● MultiLineEdit
● OptionGroup
● RoundButton
● SymbolicIOField

Int32
Optional A value or a constant that specifies the font size of the text for the selected object.

FontUnderline (RT Professional)

Description
Specifies whether the text of the selected object should be underlined.
Access in runtime: Read and write

Syntax
Object.FontUnderline[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● TextField
● Button
● CheckBox
● ComboBox
● IOField
● ListBox

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1641
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● MultiLineEdit
● OptionGroup
● RoundButton
● SymbolicIOField

BOOLEAN
Optional TRUE, if the text of the selected object should be shown underlined.

ForeColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the font color of the text for the selected object.
Access in runtime: Read and write

Syntax
Object.ForeColor[=Color]

Object
Required. A "ScreenItem" object with the format:
● Bar
● Button
● CheckBox
● ComboBox
● DateTimeField
● IOField
● ListBox
● MultiLineEdit
● OptionGroup
● RecipeView
● RoundButton
● Slider
● Switch
● SymbolLibrary
● SymbolicIOField
● TextField
You have no access in runtime with the following format:
● AlarmView

WinCC Professional V13 SP2 – Programming reference


1642 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Color
Optional A value or a constant that specifies the font color of the text for the selected object.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

ForeColorTransparency (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

FormatPattern (RT Professional)

Description
Specifies the format of the output value.
Access in runtime: Read

Syntax
Object.FormatPattern[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● IOField

STRING
Optional A value or a constant that specifies the format of the output value.

Free (RT Professional)

Description
Returns the size of the free disk space.
Access in runtime: Read and write

Syntax
Object.Free[=DOUBLE]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1643
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● DiscSpaceView

DOUBLE
Optional A value or a constant that returns the size of the free disk space.

FreePercent (RT Professional)

Description
Returns the measured values for the free disk space as a percentage. The values can be
queried in Runtime. The values cannot be predefined.
Access in runtime: Read and write

Syntax
Object.FreePercent[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● DiscSpaceView

Int32
Optional A value or a constant that returns the measured values for the free disk space as a
percentage.

3.5.5.6 Properties G-H (Panels, Comfort Panels, RT Advanced, RT Professional)

Gradation (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the value difference between two main marking lengths of the "Gauge" object.
Access in runtime: Read and write

Syntax
Object.Gradation[=SINGLE]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

WinCC Professional V13 SP2 – Programming reference


1644 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

SINGLE
Optional A value or a constant that specifies the value difference.

GraphDirection (RT Professional)

Description
Specifies at which border of the trend view the current values are displayed.
Access in Runtime: Read and write

Syntax
Object.GraphDirection[=GraphDirection]

Object
Required A "ScreenItem" object with following format:
● FunctionTrendControl
● OnlineTrendControl

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

GridLineColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color for the grid lines.
Access in runtime: Read and write

Syntax
Object.GridLineColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● AlarmView
● OnlineTableControl

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1645
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● TrendRulerControl
● UserArchiveControl
You have no access in runtime with the following format:
● TrendView

Color
Optional A value or a constant that specifies the color of the grid lines.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

GridlineFillColor (RT Advanced)

Description
No access in runtime.

GridlineStyle (RT Advanced)

Description
No access in runtime.

GridLineWidth (RT Professional)

Description
Defines the line weight of the row/column dividers in pixels.
Access in runtime: Read and write

Syntax
Object.GridLineWidth[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl

WinCC Professional V13 SP2 – Programming reference


1646 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● TrendRulerControl
● UserArchiveControl

Int32
Optional A value or a constant which specifies the width of the grid line.

HeaderFont (RT Advanced)

Description
No access in runtime.

Height (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the height of the specified object.
Access in runtime: Read and write

Syntax
Object.Height[=Int32]

Object
Required. A "ScreenItem" object with the format:
● AlarmControl
● AlarmView
● ApplicationWindow
● Bar
● BatteryView
● Button
● ChannelDiagnose
● CheckBox
● Circle
● CircleSegment
● CircularArc
● Clock
● ComboBox
● DateTimeField
● DiscSpaceView

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1647
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● Ellipse
● EllipseSegment
● EllipticalArc
● FunctionTrendControl
● Gauge
● GraphicIOField
● GraphicView
● HTML-Browser
● IOField
● Line
● ListBox
● MediaPlayer
● MultiLineEdit
● OnlineTableControl
● OnlineTrendControl
● OptionGroup
● PLCCodeViewer
● Polygon
● Polyline
● ProtectedAreaNameView
● RangeLabelView
● RangeQualityView
● RecipeView
● Rectangle
● RoundButton
● Screenwindow
● Slider
● SmartClientView
● StatusForce
● Switch
● SymbolLibrary
● SymbolicIOField
● SysDiagControl
● TextField
● TrendRulerControl

WinCC Professional V13 SP2 – Programming reference


1648 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● TrendView
● TubeArcObject
● TubeDoubleTeeObject
● TubeTeeObject
● Tubepolyline
● UserArchiveControl
● UserView
● WLanQualityView
● WindowsSlider
● ZoneLabelView
● ZoneQualityView
You have no access in runtime with the following format:
● S7GraphOverview

Int32
Optional A value or a constant that specifies the height in pixels.

Example
The following example halves the height of all objects of the image "NewPDL1", whose name
starts 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

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1649
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
Line (Page 1396)
Polyline (Page 1431)
Ellipse (Page 1361)
Circle (Page 1346)
EllipseSegment (Page 1363)
CircleSegment (Page 1348)
EllipticalArc (Page 1366)
CircularArc (Page 1351)
Rectangle (Page 1443)
Polygon (Page 1429)
TextField (Page 1477)
IOField (Page 1392)
SymbolicIOField (Page 1463)
Button (Page 1337)
Switch (Page 1460)
GraphicView (Page 1387)
GraphicIOField (Page 1383)
Bar (Page 1330)
Clock (Page 1353)
Gauge (Page 1380)
Slider (Page 1453)
SymbolLibrary (Page 1468)
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)
AlarmControl (Page 1316)
HTMLBrowser (Page 1391)
CheckBox (Page 1343)
OptionGroup (Page 1426)
WindowSlider (Page 1508)
Connector (Page 1355)
ScreenWindow (Page 1449)
DiskSpaceView (Page 1359)
ChannelDiagnose (Page 1341)

WinCC Professional V13 SP2 – Programming reference


1650 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ScriptDiagnostics (Page 1451)


Group (Page 1389)
ForeignControl (Page 1368)
ProtectedAreaName (Page 1436)
UserView (Page 1506)
TubeTeeObject (Page 1497)
TubePolyline (Page 1495)
TubeDoubleTeeObject (Page 1493)
TubeArcObject (Page 1491)
MultiLineEdit (Page 1404)
MediaPlayer (Page 1402)
Listbox (Page 1399)
DateTimeField (Page 1357)
UserArchiveControl (Page 1499)
TrendRulerControl (Page 1480)
ProjectName (Page 1434)
AlarmView (Page 1327)
BatteryView (Page 1336)
RangeLabelView (Page 1437)
ZoneQualityView (Page 1513)
ZoneLabelView (Page 1512)
WLanQualityView (Page 1511)
TrendView (Page 1488)
SystemDiagnoseWindow (Page 1473)
SystemDiagnoseView (Page 1470)
StatusForce (Page 1458)
SmartClientView (Page 1456)
RecipeView (Page 1439)
RangeQualityView (Page 1438)

HelpText (Panels, Comfort Panels, RT Advanced)

Description
Returns the tooltip that is shown in Runtime as an operating aid for the specified object.
Access in runtime: Read

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1651
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.HelpText[=STRING]

Object
Required. An object of the "ScreenItem" type with the format:
● Button
● DateTimeField
● GraphicIOField
● IOField
● Switch
● SymbolicIOField
● TrendView

STRING
Optional. A value or constant that specifies the contents of the tooltip that is shown in runtime
as an operator aid for the specified object.

HiddenInput (RT Professional)

Description
Specifies whether the input value or a * for each character will be shown during the input.
Access in runtime: Read and write

Syntax
Object.HiddenInput[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● IOField

BOOLEAN
Optional TRUE, if the input value is not shown during the input. An * is shown for each character.

HighLimitColor (RT Professional)

Description
Specifies the color of the top or right scroll button in a scroll bar.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1652 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.HighLimitColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● WindowsSlider

Color
Optional A value or a constant that specifies the color of the top or right scroll button in a scroll
bar.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

Hitlist (RT Professional)

Description
No access in runtime.

HitlistColumnAdd (RT Professional)

Description
Transfers the selected alarm text block from the list of available alarm text blocks to the list of
selected alarm text blocks.
Access in runtime: Read and write

Syntax
Object.HitlistColumnAdd[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

STRING
Optional Transfers the selected alarm text block from the list of available alarm text blocks to
the list of selected alarm text blocks.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1653
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

HitlistColumnCount (RT Professional)

Description
Specifies the number of alarm text blocks displayed in the hit list in Runtime.
Access in runtime: Read and write

Syntax
Object.HitlistColumnCount[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

Int32
Optional Specifies the number of alarm text blocks displayed in the hit list in Runtime.

HitlistColumnIndex (RT Professional)

Description
References a alarm text block selected for the hit list. Using this attribute you can assign the
values of other attributes to a specific alarm text block of the hit list.
Values between 0 and "HitlistColumnCount" minus 1 are valid for "HitlistColumnIndex". The
attribute "HitlistColumnCount" defines the number of alarm text blocks selected for the hit list.
The "HitlistColumnIndex" attribute can be dynamized with the HitlistColumnRepos attribute.
Access in runtime: Read and write

Syntax
Object.HitlistColumnIndex[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

Int32
Optional References a alarm text block selected for the hit list.

WinCC Professional V13 SP2 – Programming reference


1654 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

HitlistColumnName (RT Professional)

Description
Specifies the name of the alarm text block of the hit list that is referenced with the
"HitlistColumnIndex" attribute. You cannot edit this name.
Access in runtime: Read and write

Syntax
Object.HitlistColumnName[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

STRING
Optional Specifies the name of the alarm text block of the hit list that is referenced with the
"HitlistColumnIndex" attribute.

HitlistColumnRemove (RT Professional)

Description
Removes the marked alarm text block from the list of selected alarm text blocks and inserts it
in the list of existing alarm text blocks.
Access in runtime: Read and write

Syntax
Object.HitlistColumnRemove[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

STRING
Optional Removes the marked alarm text block from the list of selected alarm text blocks and
inserts it in the list of existing alarm text blocks.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1655
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

HitlistColumnRepos (RT Professional)

Description
Changes the order of the alarm text blocks. The "Up" and "Down" commands move the
selected alarm text block accordingly in the list. This moves the alarm text block in Runtime
Control towards the front or towards the back.
Access in runtime: Read and write

Syntax
Object.HitlistColumnRepos[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

Int32
Optional Changes the order of the alarm text blocks.

HitlistColumnSort (RT Professional)

Description
Specifies the sorting order in the hit list for the alarm text block that is referenced in
"HitlistColumnIndex".
Access in Runtime: Read and write

Syntax
Object.HitlistColumnSort[=SortMode]

Object
Required A "ScreenItem" object with following format:
● AlarmControl

SortMode
0: No sorting.
1: Ascending sorting from the lowest to highest value
2 Descending sorting from the highest to lowest value

WinCC Professional V13 SP2 – Programming reference


1656 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

HitlistColumnSortIndex (RT Professional)

Description
Defines the sorting order of the alarm text block referenced in "HitlistColumnIndex" in the hit
list. If you set the value to "0", the sorting criterion is removed in "HitlistColumnSort".
Access in runtime: Read and write

Syntax
Object.HitlistColumnSortIndex[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

Int32
Optional Defines the sorting order of the alarm text block referenced in "HitlistColumnIndex"
in the hit list. If you set the value to "0", the sorting criterion is removed in "HitlistColumnSort".

HitlistColumnVisible (RT Professional)

Description
Specifies a list with the selected alarm text blocks of the hit list which are used in the control
in Runtime.
Access in runtime: Read and write

Syntax
Object.HitlistColumnVisible[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

BOOLEAN
Optional Specifies a list with the selected alarm text blocks of the hit list which are used in the
control in Runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1657
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

HitlistDefaultSort (RT Professional)

Description
Defines the default sorting order in the table columns of the hit list.
Access in Runtime: Read and write

Syntax
Object.HitlistDefaultSort[=SortMode]

Object
Required A "ScreenItem" object with following format:
● AlarmControl

SortMode
0: The list is sorted in ascending order of frequency.
1:: The list is sorted in descending order of frequency.

HitlistMaxSourceItems (RT Professional)

Description
Specifies the maximum number of data records that can be used from the alarm log to create
the hit list. The value can be anything between "0 - 10000".
Access in runtime: Read and write

Syntax
Object.HitlistMaxSourceItems[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

Int32
Optional A value or a constant that specifies the maximum number of data records that can
be used from the alarm log to create the hit list.

WinCC Professional V13 SP2 – Programming reference


1658 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

HitlistMaxSourceItemsWarn (RT Professional)

Description
Specifies whether a warning should be given if the maximum number of data records that is
defined in "HitlistMaxSourceItems" is reached.
Access in Runtime: Read and write

Syntax
Object.HitlistMaxSourceItemsWarn[=BOOLEAN]

Object
Required. A "ScreenItem" object with the format "AlarmControl".

BOOLEAN
Optional. TRUE, if a warning is given as soon as the maximum number of data records that is
defined in "HitlistMaxSourceItems" is reached.

See also
AlarmControl (Page 1316)

HitListRelTimeFactor (RT Professional)

Description
Specifies the time factor which, alongside the time type "HitlistRelTimeFactorType",
determines the time period in which the statistics of the hit list will be created.
If you do not wish to specify a period of time, set the time factor to "0".
Access in Runtime: Read and write

Syntax
Object.HitlistRelTimeFactor[=Long]

Object
Required. A "ScreenItem" object with the format "AlarmControl".

Long
Optional. A value or a constant that specifies the time factor.

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1659
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

HitlistRelTimeFactorType (RT Professional)

Description
Specifies the time type which, alongside the time factor "HitlistRelTimeFactor", determines the
time period in which the statistics of the hit list will be created.
Access in Runtime: Read and write

Syntax
Object.HitlistRelTimeFactorType[=AlarmViewAdvancedTimeFactorUnit]

Object
Required. A "ScreenItem" object with the format "AlarmControl".

AlarmViewAdvancedTimeFactorUnit
hmiAlarmViewAdvancedTimeFactorUnitMinute ( 0): The time range for the statistics will be
measured in minutes.
hmiAlarmViewAdvancedTimeFactorUnitHour ( 1): The time range for the statistics will be
measured in hours.
hmiAlarmViewAdvancedFactorUnitDay ( 2): The time range for the statistics will be measured
in days.
hmiAlarmViewAdvancedTimeFactorUnitWeek ( 3): The time range for the statistics will be
measured in weeks.
hmiAlarmViewAdvancedTimeFactorUnitMonth ( 4): The time range for the statistics will be
measured in months.

See also
AlarmControl (Page 1316)

HitListRelTime (RT Professional)

Description
Sets a time range for the statistics.
If you do not wish to specify a time period, set the time factor to "0".
Access in runtime: Read and write

Syntax
Object.HitListRelTime [=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


1660 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

BOOLEAN
TRUE: If no time range is specified in the selection, the specified time range is used for the
statistics.
FALSE: The specified time range is not used.

HorizontalAlignment (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the horizontal alignment of the text within the specified object.
Access in runtime: Read and write

Syntax
Object.HorizontalAlignment[=HorizontalAlignment]

Object
Required. A "ScreenItem" object with the following format:
● Button
● CheckBox
● ComboBox
● DateTimeField
● IOField
● ListBox
● MultiLineEdit
● OptionGroup
● RoundButton
● Switch
● SymbolicIOField
● TextField

HorizontalAlignment
Optional A value or a constant that specifies the horizontal alignment of the text.
hmiAlignmentLeft (0):The text is arranged flush left in the object.
hmiAlignmentCentered (1): The text is arranged horizontally centered in the object.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1661
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

hmiAlignmentRight (2): The text is arranged flush right in the object.

HorizontalGridLines (RT Professional)

Description
Defines whether horizontal separating lines will be displayed.
Access in runtime: Read and write

Syntax
Object.HorizontalGridLines[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: Horizontal grid lines are displayed.
FALSE: Horizontal grid lines are not displayed.

HorizontalScrollBarPosition (RT Professional)

Description
Specifies the horizontal offset of the scroll bar in a screen window with scroll bar.
The picture is displayed in the picture window by positioning the horizontal and vertical scroll
bars. If you wish to display the screen as a cutout where the scroll bars are located at the left
and top edge of the screen, use the OffsetLeft" and "OffsetTop" properties as the source of
this cutout.
Access in runtime: Read and write

Syntax
Object.HorizontalScrollBarPosition[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● ScreenWindow

WinCC Professional V13 SP2 – Programming reference


1662 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int32
Optional A value or constant that specifies the horizontal offset of the scroll bar in a screen
window with scroll bar.

Hotkey (RT Professional)

Description
Returns the function key related to the mouse operation in respect of a button object.
Read only access.

See also
Button (Page 1337)

HourNeedleHeight (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the length of the hour hand in the "Clock" object.
Access in runtime: Read and write

Syntax
Object.HourNeedleHeight[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Clock

Int32
Optional A value or a constant that specifies the length of the hour hand.
Specify the length of the hour hand as a percentage relating to the radius of the clock face.

HourNeedleWidth (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the width of the hour hand in the "Clock" object.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1663
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.HourNeedleWidth[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Clock

Int32
Optional A value or a constant that specifies the width of the hour hand.
Specify the width of the hour hand as a percentage relating to double the length of the clock
face.

3.5.5.7 Properties I-J (Panels, Comfort Panels, RT Advanced, RT Professional)

IconSpace (RT Professional)

Description
Defines the spacing between the icons and text in the table cells. The value is active if and
icon and text are displayed.
Access in runtime: Read and write

Syntax
Object.IconSpace[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

Int32
Optional Value that specifies the spacing.

Index (RT Professional)

Description
Specifies the index for the selected text field.

WinCC Professional V13 SP2 – Programming reference


1664 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in runtime: Read and write

Syntax
Object.Index[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● CheckBox
● ComboBox
● ListBox
● OptionGroup

Int32
Optional A value or a constant that specifies the index of the selected text field.

InnerBackColorOff (RT Advanced)

Description
Specifies the color under the slider of the "Switch" object if the object is in OFF status.
Access in runtime: Read and write

Syntax
Object.InnerBackColorOff[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Switch

Color
Optional A value or a constant that specifies the color for the OFF status.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1665
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

InnerBackColorOn (RT Advanced)

Description
Specifies the color under the slider of the "Switch" object if the object is in ON status.
Access in runtime: Read and write

Syntax
Object.InnerBackColorOn[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Switch

Color
Optional A value or a constant that specifies the color for the ON status.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

InputValue (RT Professional)

Description
Defines the value entered by the user in the IO 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 "input value" and "output value" properties. The
direct connection is only useful when no tag connection is configured at the output value but
the user still wants to query the specified value, for example with a script.
Access in runtime: Read and write

Syntax
Object.InputValue[=Object]

Object
Required. A "ScreenItem" object with the following format:
● IOField
● SymbolicIOField

WinCC Professional V13 SP2 – Programming reference


1666 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Optional A value or a constant that specifies the input value.

Instance (RT Professional)

Description
Returns an instance of the alarm object.

IntegerDigits (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Establishes the number of integer digits (0 to 20).
Access in runtime: Read and write

Syntax
Object.IntegerDigits[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Bar

Int32
Optional A value or a constant that specifies the number of integer digits (0 to 20).

Interval (RT Professional)

Description
Specifies the time interval for updating the displayed measured value. You enter the value in
minutes.
Access in runtime: Read and write

Syntax
Object.Interval[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● DiscSpaceView

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1667
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int32
Optional A value or a constant that specifies the time interval for updating the measured values.

ItemBorderStyle (RT Professional)

Description
Specifies the line style of the separation lines in the selection list of the selected object.
Access in runtime: Read and write

Syntax
Object.ItemBorderStyle[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● SymbolicIOField

Int32
hmiLineStyleNone (-1): The selection list has no separation lines.
hmiLineStyleSolid ( 0): The selection list has solid separation lines.
hmiLineStyleDash ( 1): The selection list has broken separation lines.
hmiLineStyleDot ( 2): The selection list has dotted separation lines.
hmiLineStyleDashDot ( 3): The selection list has dash - dot lines as separation lines.
hmiLineStyleDashDotDot ( 4): The selection list has dash - dot - dot lines as separation lines.

JumpToLimitsAfterMouseClick (RT Professional)

Description
Specifies whether the slider will be set to the associated end value. The end value is the
minimum or maximum value. To set the slider to the end value, users click on the area outside
of the current slider setting.
Access in runtime: Read and write

Syntax
Object.JumpToLimitsAfterMouseClick[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● WindowsSlider

WinCC Professional V13 SP2 – Programming reference


1668 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BOOLEAN
Optional TRUE, if the slider will be set to the associated end value.

3.5.5.8 Properties K-L (Panels, Comfort Panels, RT Advanced, RT Professional)

LabelColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the scale label in the "Slider" object.
Access in runtime: Read and write

Syntax
Object.LabelColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Slider

Color
Optional A value or a constant that specifies the color of the scale label.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

Language (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Determines the current Runtime language.
Access in Runtime: Read and write

Syntax
Object.Language[= LONG]

Object
Required A "HMIRuntime" object.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1669
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

LONG
Optional A value or a constant that specifies the national code.

Comments
Specify the Runtime language in VBS with a national code, e.g. 1031 for German, 2057 for
English etc.. Refer to the VBScript basics under the topic "Current local ID (LCID) diagram"
for an overview of all the national codes.

See also
HMIRuntime (Page 1292)

LargeTicksBold (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the long marking lengths of a scale are shown in bold.
Access in runtime: Read and write

Syntax
Object.LargeTicksBold[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional TRUE, if the long marking lengths of a scale are shown in bold.

LargeTicksSize (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the length of the long marking lengths of a scale.
Access in runtime: Read and write

Syntax
Object.LargeTicksSize[=Int32]

WinCC Professional V13 SP2 – Programming reference


1670 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● Bar

Int32
Optional A value or a constant that specifies the length of the long marking lengths of a scale.

LastConnectedObjectIndex (RT Professional)

Description
Specifies the index number of the connection point for the last, connected object.
Access in Runtime: Read and write

Syntax
Object.LastConnectedObjectIndex[=Int]

Object
Required A "ScreenItem" object with the format "Connector".

Int
Int

See also
Connector (Page 1355)

LastConnectedObjectName (RT Professional)

Description
Specifies the object name of the object that is docked at the lower connector point.
Access in Runtime: Read and write

Syntax
Object.LastConnectedObjectName[=String]

Object
Required A "ScreenItem" object with the format "Connector".

String
String

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1671
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
Connector (Page 1355)

LastError (RT Professional)

Description
Returns an error code regarding the success of the last operation, e.g. information on a tag
write or read process:

Code in hexadecimal notation Description


0x00000000 OK
0x80040001 Execution error
0x80040002 Tag error
0x80040003 Server not available.
0x80040004 Multi Tag Error; error in one or several tags

To obtain an error description, first of all carry out the Read method.

Note
If the error occurs when accessing via the TagSet object, evaluate the LastError property for
each tag of the TagSet object.

To obtain a statement about the quality of the supplied value, use the "QualityCode" property.
To obtain a description of the error, use the "ErrorDescription" property.
Access during runtime: Read

Syntax
Object.LastError

Object
Necessary. A "Tag" object.

Example
The following example shows the error code for the "Tag1" tag:

'VBS77
Dim objTag
Set objTag = HMIRuntime.Tags("Tag1")
objTag.Read
MsgBox objTag.LastError

WinCC Professional V13 SP2 – Programming reference


1672 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

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:

HMIRuntime.Trace "LastError: " & group("Motor1").LastError & vbNewLine

See also
Tag (Page 1310)
TagSet (list) (Page 1314)

Layer (RT Advanced, RT Professional)

Description
Returns the layer that contains an object as LONG in the screen. 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.
Access during runtime: Read

Syntax
Object.Layer

Object
Necessary. A "ScreenItem" object.

Note
The Layer property specifies the layer in which the object is located. The layer "0" is output as
layer "0".
When accessed, the layers are counted up from 1 in VBS. Therefore, address the level "1"
with layers(2).

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1673
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example
The following example displays the name and layer of all objects in the screen "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 (Page 1302)
HTMLBrowser (Page 1391)
Group (Page 1389)
ForeignControl (Page 1368)
DateTimeField (Page 1357)
ZoneQualityView (Page 1513)
ZoneLabelView (Page 1512)
WLanQualityView (Page 1511)
ProtectedAreaName (Page 1436)
RangeLabelView (Page 1437)
RangeQualityView (Page 1438)
ScreenWindow (Page 1449)
ScriptDiagnostics (Page 1451)
Slider (Page 1453)
SmartClientView (Page 1456)
StatusForce (Page 1458)
SymbolLibrary (Page 1468)
BatteryView (Page 1336)
ChannelDiagnose (Page 1341)
CheckBox (Page 1343)
GraphicIOField (Page 1383)

WinCC Professional V13 SP2 – Programming reference


1674 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Button (Page 1337)


Bar (Page 1330)
WindowSlider (Page 1508)
UserView (Page 1506)
TubeTeeObject (Page 1497)
TubePolyline (Page 1495)
TubeDoubleTeeObject (Page 1493)
TubeArcObject (Page 1491)
Switch (Page 1460)
Rectangle (Page 1443)
MultiLineEdit (Page 1404)
MediaPlayer (Page 1402)
Line (Page 1396)
Listbox (Page 1399)
AlarmView (Page 1327)
Circle (Page 1346)
CircleSegment (Page 1348)
CircularArc (Page 1351)
Clock (Page 1353)
Connector (Page 1355)
DiskSpaceView (Page 1359)
Ellipse (Page 1361)
EllipseSegment (Page 1363)
EllipticalArc (Page 1366)
Gauge (Page 1380)
GraphicView (Page 1387)
Polygon (Page 1429)
Polyline (Page 1431)
RoundButton (Page 1445)
SymbolicIOField (Page 1463)
IOField (Page 1392)
TextField (Page 1477)
OptionGroup (Page 1426)
RecipeView (Page 1439)
TrendView (Page 1488)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1675
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UserArchiveControl (Page 1499)


SystemDiagnoseWindow (Page 1473)
SystemDiagnoseView (Page 1470)
TrendRulerControl (Page 1480)
ProjectName (Page 1434)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)
OnlineTrendControl (Page 1417)
AlarmControl (Page 1316)

LayerDeclutteringEnable (RT Professional)

Description
Indicates whether the layers of a screen can be shown or hidden dependent on the set
minimum and maximum zoom.
Access during runtime: Read

Syntax
Object.LayerDeclutteringEnable

Object
Necessary. A "Screen" object.

Example:
The example outputs the LayerDecluttering property of the "NewPDL1" screen as Trace.

'VBS156
Dim objScreen
Set objScreen = HMIRuntime.Screens("NewPDL1")
HMIRuntime.Trace "Enable: " & objScreen.LayerDeclutteringEnable & vbNewLine

See also
Screen (Page 1299)

WinCC Professional V13 SP2 – Programming reference


1676 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Layers (RT Professional)

Description
Returns an object of type "Layers".
Access in Runtime: Read

Syntax
Object.Layers

Object
Required A "Screen" object.

See also
Screen (Page 1299)

Left (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the value of the X coordinate of the selected object.
Access in runtime: Read and write

Syntax
Object.Left[=DOUBLE]

Object
Required. A "ScreenItem" object. This property is a standard property of the ScreenItem-
Objekts and is therefore available for all formats.

DOUBLE
Optional A value or a constant that contains the value of the X coordinate in pixels (measured
from the top left edge of the screen).

Comments
The X coordinate refers to the top left corner of the rectangle that surrounds the object. The
screen limits are also monitored in runtime. If the assigned coordinate value exceeds the
display size, the user-defined function is interrupted with an error message.

Used for the following object types:


AUTOHOTSPOT

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1677
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

AUTOHOTSPOT
AUTOHOTSPOT

LeftOffset (RT Professional)

Description
Specifies the distance between the screen and the left screen window margin.
The picture is displayed as a cutout of the picture window. The picture scroll bars are located
at the left and upper edge of the picture. If you wish to display the screen in the screen window
with horizontal and vertical offset of the screen scroll bars, use the
"HorizontalScrollBarPosition" and "VerticalScrollBarPosition properties for the offset.
Access in runtime: Read and write

Syntax
Object.LeftOffset[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Screenwindow

Int32
Optional A value or a constant that specifies the distance between the screen and the left
screen window margin.

Limit4LowerLimit (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the lower limit for ""Reserve4".
The "Limit4LowerLimitEnabled" property must be set to TRUE so that the limit "Reserve4""
can be monitored.
Access in runtime: Read and write

Syntax
Object.Limit4LowerLimit[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● Bar

WinCC Professional V13 SP2 – Programming reference


1678 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

DOUBLE
Optional A value or a constant that specifies the low limit for "Reserve4".

Comments
The "Limit4LowerLimitRelative" property specifies whether the object is evaluated as a
percentage or absolutely.

Limit4LowerLimitColor (RT Professional)

Description
Specifies the color for the lower limit "Reserve4".
The "Limit4LowerLimitEnabled" property must have the value TRUE if the bar color is to
change once the limit has been reached.
Access in runtime: Read and write

Syntax
Object.Limit4LowerLimitColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Bar

Color
Optional A value or a constant that specifies the color for the lower limit ""Reserve4".

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

Limit4LowerLimitEnabled (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the lower limit ""Reserve4"" is to be monitored.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1679
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.Limit4LowerLimitEnabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional TRUE, if the lower limit ""Reserve4" is to be monitored.

Comments
The following values will be specified with the properties ""Limit4LowerLimit",
"Limit4LowerLimitColor" and "Limit4LowerLimitRelative"":
● Limit
● Representation upon reaching the limit
● Type of evaluation

Limit4LowerLimitRelative (RT Professional)

Description
Specifies whether the lower limit "Reserve4" is evaluated as a percentage or as an absolute
value.
Access in runtime: Read and write

Syntax
Object.Limit4LowerLimitRelative[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional
TRUE: The lower limit "Reserve4" is evaluated as a percentage.
FALSE: The lower limit "Reserve4" is evaluated as an absolute value.

WinCC Professional V13 SP2 – Programming reference


1680 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Limit4UpperLimit (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the lower limit for "Reserve4".
The "Limit4UpperLimitEnabled"" property must be set to TRUE so that the limit ""Reserve4"
can be monitored.
Access in runtime: Read and write

Syntax
Object.Limit4UpperLimit[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● Bar

DOUBLE
Optional A value or a constant that specifies the upper limit for "Reserve4".

Comments
The "Limit4UpperLimitRelative" property specifies whether the object is evaluated as a
percentage or absolutely.

Limit4UpperLimitColor (RT Professional)

Description
Specifies the color for the upper limit ""Reserve4".
The "Limit4UpperLimitEnabled"" property must have the value TRUE if the bar color is to
change once the limit has been reached.
Access in runtime: Read and write

Syntax
Object.Limit4UpperLimitColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Bar

Color
Optional A value or a constant that specifies the color for the upper limit "Reserve4".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1681
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

Limit4UpperLimitEnabled (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the upper limit "Reserve4" is to be monitored.
Access in runtime: Read and write

Syntax
Object.Limit4UpperLimitEnabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional TRUE, if the upper limit ""Reserve4" is to be monitored.

Comments
The following values are defined via the properties ""Limit4UpperLimit",
"Limit4UpperLimitColor" and "Limit4UpperLimitRelative":
● Limit
● Representation upon reaching the limit
● Type of evaluation

Limit4UpperLimitRelative (RT Professional)

Description
Specifies whether the upper limit "Reserve4" is to be evaluated as a percentage or as an
absolute value.
Access in runtime: Read and write

Syntax
Object.Limit4UpperLimitRelative[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


1682 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional
TRUE: The lower limit "Reserve4" is evaluated as a percentage.
FALSE: The lower limit "Reserve4" is evaluated as an absolute value.

Limit5LowerLimit (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the lower limit for "Reserve5"".
The "Limit5LowerLimitEnabled" property must be set to TRUE so that the limit ""Reserve5"
can be monitored.
Access in runtime: Read and write

Syntax
Object.Limit5LowerLimit[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● Bar

DOUBLE
Optional A value or a constant that specifies the lower limit for "Reserve5"".

Comments
The "Limit5LowerLimitRelative" property specifies whether the object is evaluated as a
percentage or absolutely.

Limit5LowerLimitColor (RT Professional)

Description
Specifies the color for the lower limit ""Reserve5"".
The "Limit5LowerLimitEnabled" property must have the value TRUE if the bar color is to
change once the limit has been reached.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1683
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.Limit5LowerLimitColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Bar

Color
Optional A value or a constant that specifies the color for the lower limit ""Reserve5".

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

Limit5LowerLimitEnabled (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the lower limit "Reserve5" is to be monitored.
Access in runtime: Read and write

Syntax
Object.Limit5LowerLimitEnabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional TRUE, if the lower limit ""Reserve5" is to be monitored.

Comments
The following values will be defined via the properties "Limit5LowerLimit",
"Limit5LowerLimitColor" and "Limit5LowerLimitRelative":
● Limit
● Representation upon reaching the limit
● Type of evaluation

WinCC Professional V13 SP2 – Programming reference


1684 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Limit5LowerLimitRelative (RT Professional)

Description
Specifies whether the lower limit ""Reserve5" is to be evaluated as a percentage or as an
absolute value.
Access in runtime: Read and write

Syntax
Object.Limit5LowerLimitRelative[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional
TRUE: The lower limit "Reserve5" is evaluated as a percentage.
FALSE: The lower limit "Reserve5" is evaluated as an absolute value.

Limit5UpperLimit (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the lower limit for "Reserve5".
The ""Limit5UpperLimitEnabled" property must be set to TRUE so that the limit ""Reserve5"
can be monitored.
Access in runtime: Read and write

Syntax
Object.Limit5UpperLimit[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● Bar

DOUBLE
Optional A value or a constant that specifies the upper limit for ""Reserve5".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1685
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
The "TypeLimitHigh5" property specifies whether the object is evaluated as a percentage or
absolutely.

Limit5UpperLimitColor (RT Professional)

Description
Specifies the color for the upper limit "Reserve5"".
The "Limit5UpperLimitEnabled" property must have the value TRUE if the bar color is to
change once the limit has been reached.
Access in runtime: Read and write

Syntax
Object.Limit5UpperLimitColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Bar

Color
Optional A value or a constant that specifies the color for the upper limit ""Reserve5".

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

Limit5UpperLimitEnabled (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the upper limit "Reserve5" is to be monitored.
Access in runtime: Read and write

Syntax
Object.Limit5UpperLimitEnabled[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


1686 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional TRUE, if the upper limit ""Reserve5"" is to be monitored.

Limit5UpperLimitRelative (RT Professional)

Description
Specifies whether the upper limit "Reserve5" is to be evaluated as a percentage or as an
absolute value.
Access in runtime: Read and write

Syntax
Object.Limit5UpperLimitRelative[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional
TRUE: The higher limit "Reserve5" is evaluated as a percentage.
FALSE: The higher limit "Reserve5" is evaluated as an absolute value.

LineColor (RT Professional)

Description
Defines the color of the window separation lines. Open the "Color selection" dialog by clicking
the button.
Access in runtime: Read and write

Syntax
Object.LineColor[=Color]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1687
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

Color
Optional A value or a constant that specifies the color of the window separation lines.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

LineEndShapeStyle (RT Professional)

Description
Specifies the shape of the line ends.
Access in runtime: Read and write

Syntax
Object.LineEndShapeStyle[=LineEndShapeStyle]

Object
Required. An object of the "ScreenItem" type with the following format:
● Bar
● Button
● CheckBox
● Circle
● CircleSegment
● CircularArc
● ComboBox
● Ellipse
● EllipseSegment

WinCC Professional V13 SP2 – Programming reference


1688 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● EllipticalArc
● GraphicIOField
● GraphicView
● IOField
● Line
● ListBox
● MultiLineEdit
● OptionGroup
● Polygon
● Polyline
● Rectangle
● RoundButton
● SymbolicIOField
● TextField
● WindowsSlider
● Switch
You have no access in runtime with the following formats:
● Switch
● TubeArcObect

LineEndShapeStyle
Optional. A value or a constant that specifies the form of the line ends.

LineWidth (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the line weight of the selected object.
Access in runtime: Read and write

Syntax
Object.LineWidth[=Int32]

Object
Required. A "ScreenItem" object with the format:
● AlarmControl
● CircularArc
● EllipticalArc

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1689
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● FunctionTrendControl
● Line
● OnlineTableControl
● OnlineTrendControl
● Polyline
● TrendRulerControl
● TubeArcObject
● TubeDoubleTeeObject
● TubeTeeObject
● Tubepolyline
● UserArchiveControl
You have no access in runtime with the following format:
● Polygon

Int32
Optional A value or a constant that specifies the line weight in pixels.

LoadDataImmediately (RT Professional)

Description
Specifies whether in the event of a screen refresh the tag values should be downloaded from
the archives for the time range that is to be shown.
Access in runtime: Read and write

Syntax
Object.LoadDataImmediately[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl

BOOLEAN
Optional TRUE, if in the event of a screen the tag values should be downloaded from the
archives for the time range that is to be shown.

WinCC Professional V13 SP2 – Programming reference


1690 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

LocalCursor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

LockSquaredExtent (RT Professional)

Description
Specifies whether the size of the clock can be adjusted with the mouse.
Access in runtime: Read and write

Syntax
Object.LockSquaredExtent[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Clock
● Gauge

BOOLEAN
Optional TRUE, if the size of the clock can be adjusted by dragging the mouse on the selection
points to the desired aspect ratio.

Logging (RT Professional)

Description
Returns an object of type "Logging".
Access in Runtime: Read

Syntax
Object.Logging

Object
Required A "HMIRuntime" object.

See also
HMIRuntime (Page 1292)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1691
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

LogOperation (RT Professional)

Description
Specifies whether, after operating this object, an alarm is output on the alarm system.
Access in runtime: Read and write

Syntax
Object.LogOperation[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● CheckBox
● ComboBox
● IOField
● ListBox
● OptionGroup
● SymbolicIOField
● WindowsSlider

BOOLEAN
Optional TRUE, if, after operating this object, an alarm is output on the alarm system.

LongTermArchiveConsistency (RT Professional)

Description
This setting defines how alarms are displayed in the historical alarm list (long-term).
Access in runtime: Read and write

Syntax
Object.LongTermArchiveConsistency[= BOOLEAN]

Object
Required. An object of the "ScreenItem" type with the following format:
● AlarmControl

WinCC Professional V13 SP2 – Programming reference


1692 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BOOLEAN

Value Explanation
TRUE The 1000 most recent alarms are displayed on the client of all servers or the redundant
server pair in the historical alarm list (long-term)
FALSE 1000 alarms are displayed in the historical alarm list (long-term) on the single-user system,
server or client for each server, or for each redundant server pair.

LowerLimit (RT Professional)

Description
Specifies the lower limit for input values.
Access in runtime: Read and write

Syntax
Object.LowerLimit[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● IOField

DOUBLE
Optional A value or a constant that specifies the lower limit for input values.

LowLimitColor (RT Professional)

Description
Specifies the color of the bottom or left scroll button in a scroll bar.
Access in runtime: Read and write

Syntax
Object.LowLimitColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● WindowsSlider

Color
Optional A value or a constant that specifies the color of the bottom or left scroll button in a
scroll bar.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1693
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

3.5.5.9 Properties M-N (Panels, Comfort Panels, RT Advanced, RT Professional)

MachineName (RT Advanced)

Description
Specifies the network code of the device that is to be monitored.
Enter the name or the port of the device as the network code.
Access in runtime: Read and write

Syntax
Object.MachineName[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● SmartClientView

STRING
Optional A value or a constant that contains the network code.

MarginToBorder (RT Professional)

Description
Specifies the width of the 3D border in pixels. The value of the width is dependent on the size
of the object.
Access in runtime: Read and write

Syntax
Object.MarginToBorder[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● WindowsSlider

WinCC Professional V13 SP2 – Programming reference


1694 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int32
Optional A value or a constant that specifies the width of the 3D border in pixels.

MaximumValue (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the maximum value of the scale in the selected object.
Access in runtime: Read and write

Syntax
Object.MaximumValue[=DOUBLE | Int32 | SINGLE]

Object
Required. A "ScreenItem" object with the format:
● Bar
● Gauge
● Slider
● WindowsSlider

DOUBLE | Int32 | SINGLE


Optional A value or a constant that specifies the maximum value. The data type depends on
the format.
● DOUBLE: Bar
● Int32: Slider, WindowsSlider
● SINGLE: Gauge

MenuToolBarConfig (RT Professional)

Description
Loads the given configuration file with configured menu and toolbars or returns the name of
the configuration file.
Access in Runtime: Read and write

Syntax
Object.MenuToolBarConfig[=HmiObjectHandle]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1695
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. An object of the "ScreenItem" type with the format:
● Screenwindow

HmiObjectHandle
Optional The configuration file with user-defined menu and toolbars.

MessageBlockAlignment (RT Professional)

Description
Aligns the contents of a selected message block in the table.
Access in Runtime: Read and write

Syntax
Object.MessageBlockAlignment [=HorizontalAlignment]

Object
Required. An object of the "ScreenItem" type with the format "AlarmContro",
"TrendRulerControl", "OnlineTableControl", "UserArchiveControl".

HorizontalAlignment

Value Description Explanation


0 Left Aligns the contents of a selected message block to the left.
1 Centered Aligns the contents of a selected message block to the center.
2 Right Aligns the contents of a selected message block to the right.

See also
AlarmControl (Page 1316)

MessageBlockAutoPrecisions (RT Professional)

Description
Enables automatic setting of the number of decimal places.
Access in runtime: Read and write

Syntax
Object.MessageBlockAutoPrecisions[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


1696 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

BOOLEAN
TRUE: The number of decimal places is specified automatically.
FALSE: The value in the "Decimal places" field is effective.

MessageBlockCaption (RT Professional)

Description
Specifies the caption of the column header in the alarm view for the selected alarm text block.
You can only edit the labels after having disabled the "Apply project settings" option. The
entered caption is effective in all Runtime languages.
Access in runtime: Read and write

Syntax
Object.MessageBlockCaption[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

STRING
Optional Specifies the caption of the column header in the alarm view for the selected alarm
text block.

MessageBlockCount (RT Professional)

Description
Specifies the number of existing alarm text blocks that are available for the alarm list and hit
list.
Access in runtime: Read and write

Syntax
Object.MessageBlockCount[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1697
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int32
Optional Specifies the number of existing alarm text blocks that are available for the alarm list
and hit list.

MessageBlockDateFormat (RT Professional)

Description
Defines the date format for displaying messages.
Access in runtime: Read and write

Syntax
Object.MessageBlockDateFormat[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

STRING

Value Explanation
Automatic The date format is set automatically.
dd.MM.yy Day.Month.Year, e.g. 24.12.10.
dd.MM.yyyy Day.Month.Year, e.g. 24.12.2010.
dd/MM/yy Day/Month/Year, e.g. 24/12/10.
dd/MM/yyyy Day/Month/Year, e.g. 24/12/2010.

MessageBlockExponentialFormat (RT Professional)

Description
Specifies the exponential notation for visualization of the values of a selected alarm text block.
Access in runtime: Read and write

Syntax
Object.MessageBlockExponentialFormat[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

WinCC Professional V13 SP2 – Programming reference


1698 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BOOLEAN
TRUE: The values are displayed in exponential format.
FALSE: The values are displayed in decimal format.

MessageBlockFlashOn (RT Professional)

Description
Enables flashing of the selected alarm text block in Runtime after a message was activated.
Access in runtime: Read and write

Syntax
Object.MessageBlockFlashOn[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

BOOLEAN
TRUE: The content of the alarm text block flashes.
FALSE: The content of the alarm text block does not flash.

MessageBlockHideText (RT Professional)

Description
Enables the textual display of the content of a selected alarm text block.
Access in runtime: Read and write

Syntax
Object.MessageBlockHideText[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

BOOLEAN
TRUE: The content is not shown as a text. The option is not activated.
FALSE: The content is shown as a text. The option is activated.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1699
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

MessageBlockHideTitleText (RT Professional)

Description
Specifies whether the header of the selected alarm text block is displayed as a text.
Access in runtime: Read and write

Syntax
Object.MessageBlockHideTitleText[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

BOOLEAN
TRUE: The header is not shown as text. The option is not activated.
FALSE: The header is shown as text. The option is activated.

MessageBlockId (RT Professional)

Description
Specifies the assignment of ID number and alarm text block in the alarm view.
Access in runtime: Read and write

Syntax
Object.MessageBlockId[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

Int32
Optional Specifies the assignment of ID number and alarm text block in the alarm view.

MessageBlockIndex (RT Professional)

Description
References an existing alarm text block. You can assign the values of other attributes to a
certain alarm text block by using the attribute. Values between 0 and "MessageBlockCount
minus 1 are valid for "MessageBlockIndex".

WinCC Professional V13 SP2 – Programming reference


1700 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

The "MessageBlockIndex" attribute can be dynamized with the MessageBlockRepos attribute.


Access in runtime: Read and write

Syntax
Object.MessageBlockIndex[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

Int32
Optional References an existing alarm text block. Values between 0 and "MessageBlockCount
minus 1 are valid for "MessageBlockIndex".

MessageBlockLeadingZeros (RT Professional)

Description
Enables the display of selected alarm text blocks with leading zero format.
Access in Runtime: Read and write

Syntax
Object.MessageBlockLeadingZeros[=Int32]

Object
Required A "ScreenItem" object with following format:
● AlarmControl

Int32
TRUE: Leading zeros are displayed. You specify the number of leading zeros in the properties.
FALSE: Leading zeros are not displayed.

MessageBlockLength (RT Professional)

Description
Defines the length of the alarm text block selected based on the number of characters. You
can only enter a value if the "Apply project settings" field is disabled.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1701
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.MessageBlockLength[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

Int32
Optional Value which specifies the length of the alarm text block.

MessageBlockName (RT Professional)

Description
Specifies the name for the selected alarm text block.
Access in Runtime: Read and write

Syntax
Object.MessageBlockName[=STRING]

Object
Required A "ScreenItem" object with the format "AlarmControl".

STRING
Optional Specifies the name for the selected alarm text block.

MessageBlockPrecisions (RT Professional)

Description
Specifies the decimal precision of the values of a selected alarm text block. You can only enter
the value if the "Automatic" option is deactivated.
Access in runtime: Read and write

Syntax
Object.MessageBlockPrecisions[=Int16]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

WinCC Professional V13 SP2 – Programming reference


1702 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int16
Optional Specifies the number of decimal places.

MessageBlockSelected (RT Professional)

Description
The available alarm text blocks can be used in Runtime control for the alarm list or hit list.
Select the "Alarm text blocks" tab to activate existing alarm text blocks as required in the
Control. Select the "Hitlist" and "Alarm list" tabs to configure the hit list and alarm list based on
the available blocks.
Access in Runtime: Read and write

Syntax
Object.MessageBlockSelected[=BOOLEAN]

Object
Required A "ScreenItem" object with following format:
● AlarmControl

BOOLEAN
Optional Select the "Alarm text blocks" tab to activate existing alarm text blocks as required in
the Control. Select the "Hitlist" and "Alarm list" tabs to configure the hit list and alarm list based
on the available blocks.

MessageBlockShowDate (RT Professional)

Description
Enables the display of a date in the "Time" alarm text block in addition to the time.
Access in runtime: Read and write

Syntax
Object.MessageBlockShowDate[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

BOOLEAN
TRUE: The date and the time are displayed.
FALSE: The time is displayed.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1703
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

MessageBlockShowIcon (RT Professional)

Description
Enables the display of the content of a selected alarm text block as icon.
Access in runtime: Read and write

Syntax
Object.MessageBlockShowIcon[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

BOOLEAN
TRUE: The content is shown as a symbol.
FALSE: The content is not shown as a symbol.

MessageBlockShowTitleIcon (RT Professional)

Description
Specifies whether the header of the selected alarm text block is displayed as a text.
Access in runtime: Read and write

Syntax
Object.MessageBlockShowTitleIcon[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

BOOLEAN
TRUE: The header is shown as a symbol.
FALSE: The header is not shown as a symbol.

WinCC Professional V13 SP2 – Programming reference


1704 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

MessageBlockTextId (RT Professional)

Description
Specifies the caption of the selected alarm text block using a Text ID which was derived from
the text library. The caption is adapted automatically if a user changes the Runtime language.
You can only enter a text ID after having disabled the "Apply project settings" option.
Access in runtime: Read and write

Syntax
Object.MessageBlockTextId[=Int32]

Object
Required. A "ScreenItem" object with the format "AlarmControl".

Int32
Optional Specifies the name of the selected alarm text block using a text ID number.

MessageBlockTimeFormat (RT Professional)

Description
Defines which time format or duration format is used for displaying the messages.
Access in runtime: Read and write

Syntax
Object.MessageBlockTimeFormat[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

STRING
The following time formats are available:

Value Explanation
Automatic The time format is set automatically.
HH:mm:ss Hours:Minutes:Seconds, e.g. 15:35:44
HH:mm:ss.ms Hours:Minutes:Seconds.Milliseconds, 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.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1705
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

The following duration formats are available:

Value Explanation
Automatic The duration format is determined automatically.
d H:mm:ss Day Hours:Minutes:Seconds, e.g. 1 2:03:55.
H:mm:ss. Hours:Minutes:Seconds, e.g. 26:03:55.
m:ss Minutes:Seconds, Example: 1563:55.
s Seconds, e.g. 93835.

MessageBlockType (RT Professional)

Description
Specifies the number of available message blocks which are available for the message list
and hit list.
Access in runtime: Read

Syntax
Object.MessageBlockType[=AlarmBlockType]

Object
Required. An object of the "ScreenItem" type with the following format:
● AlarmControl

AlarmBlockType

Value Description Description


0 System block The message block belongs to the system block category
1 Text block The message block belongs to the user text block category
2 Process value The message block belongs to the process value block category
block
3 Hitlist block The message block belongs to the message blocks of the hitlist.

MessageColumnAdd (RT Professional)

Description
Adds the selected alarm text block from the list of existing alarm text blocks to the list of selected
alarm text blocks.
Access in runtime: Read and write

Syntax
Object.MessageColumnAdd[=STRING]

WinCC Professional V13 SP2 – Programming reference


1706 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

STRING
Optional Applies the selected alarm text block from the list of existing alarm text blocks to the
list of selected alarm text blocks.

MessageColumnCount (RT Professional)

Description
Specifies the number of selected alarm text blocks displayed in the alarm list in Runtime.
Access in runtime: Read and write

Syntax
Object.MessageColumnCount[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

Int32
Optional Specifies the number of selected alarm text blocks displayed in the alarm list in
Runtime.

MessageColumnIndex (RT Professional)

Description
References a alarm text block selected for the alarm list. Using this attribute you can assign
the values of other attributes to a specific alarm text block of the alarm list.
Valid values for "MessageColumnIndex" are between 0 and "MessageColumnCount" minus
1. The "MessageColumnIndex" attribute can be dynamized by the attribute
MessageColumnRepos.
Access in runtime: Read and write

Syntax
Object.MessageColumnIndex[=Int32]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1707
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

Int32
Optional References a alarm text block selected for the alarm list. Valid values for
"MessageColumnIndex" are between 0 and "MessageColumnCount" minus 1.

MessageColumnName (RT Professional)

Description
Specifies the name of the alarm text block in the alarm list which is referenced with the
"MessageColumnIndex" property.
Access in runtime: Read and write

Syntax
Object.MessageColumnName[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

STRING
Optional Specifies the name of the alarm text block in the alarm list which is referenced with
the "MessageColumnIndex" property.

MessageColumnRemove (RT Professional)

Description
Removes the marked alarm text block from the list of selected alarm text blocks and inserts it
in the list of existing alarm text blocks.
Access in runtime: Read and write

Syntax
Object.MessageColumnRemove[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

WinCC Professional V13 SP2 – Programming reference


1708 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

STRING
Optional Removes the marked alarm text block from the list of selected alarm text blocks and
inserts it in the list of existing alarm text blocks.

MessageColumnRepos (RT Professional)

Description
Specifies the order of the alarm text blocks. The "Up" and "Down" commands move the
selected alarm text block accordingly in the list. This places the alarm text block further forward
or back in the alarm view in Runtime.
Access in runtime: Read and write

Syntax
Object.MessageColumnRepos[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

Int32
Optional Value which specifies the order of the alarm text blocks in the list.

MessageColumnSort (RT Professional)

Description
Defines the sorting order of the alarm text block referenced in "MessageColumnIndex" .
Access in Runtime: Read and write

Syntax
Object.MessageColumnSort[=SortMode]

Object
Required A "ScreenItem" object with following format:
● AlarmControl

SortMode
0: No sorting.
1: Ascending sorting from the lowest to highest value
2 Descending sorting from the highest to lowest value

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1709
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

MessageColumnSortIndex (RT Professional)

Description
Defines the sorting order of the alarm text block referenced in "MessageColumnIndex". If you
set the value to "0", the sorting criterion is removed in "MessageColumnSort".
Access in runtime: Read and write

Syntax
Object.MessageColumnSortIndex[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

Int32
Optional Defines the sorting order of the alarm text block referenced in
"MessageColumnIndex".

MessageColumnVisible (RT Professional)

Description
Specifies whether alarm text blocks are displayed in the alarm view.
Access in runtime: Read and write

Syntax
Object.MessageColumnVisible[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

BOOLEAN
Optional
TRUE: Alarm text blocks are displayed in the alarm view.
FALSE: Alarm text blocks are not displayed in the alarm view.

WinCC Professional V13 SP2 – Programming reference


1710 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

MessageListType (RT Professional)

Description
This setting defines which alarm lists are displayed in the picture.
Access in runtime: Read and write

Syntax
Object.MessageListType[=AlarmListType]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

AlarmListType

Value Description Explanation


0 Alarm list The currently active messages are displayed after a picture was
called.
1 Short-term archive list A short-term archive list displays the logged messages after the
picture was called. The display is updated immediately on activation
of new messages.
2 Long-term archive list A long-term archive list displays the logged messages after a picture
was called.
3 Lock list Only the currently locked messages are displayed after a picture
was called.
4 Hit list The configured statistics data is displayed after a picture was called.
5 List of messages to be The messages to be hidden are displayed at the call of a picture.
hidden

MinimumValue (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the minimum value of the scale in the selected object.
Access in runtime: Read and write

Syntax
Object.MinimumValue[=DOUBLE | Int32 | SINGLE]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1711
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the format:
● Bar
● Gauge
● Slider
● WindowsSlider

DOUBLE | Int32 | SINGLE


Optional A value or a constant that specifies the minimum value. The data type depends on
the format.
● DOUBLE: Bar
● Int32: Slider, WindowsSlider
● SINGLE: Gauge

MinuteNeedleHeight (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the length of the minute hand in the "Clock" object.
Access in runtime: Read and write

Syntax
Object.MinuteNeedleHeight[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Clock

Int32
Optional A value or a constant that specifies the length of the minute hand.
Specify the length of the minute hand as a percentage relating to the radius of the clock face.

MinuteNeedleWidth (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the width of the minute hand in the "Clock" object.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1712 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.MinuteNeedleWidth[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Clock

Int32
Optional A value or a constant that specifies the width of the minute hand.
Specify the width as a percentage relating to double the length of the minute hand.

Mode (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the field type of the selected object.
Access in Runtime:
● RT Advanced: No access
● RT Professional: Read and write

Syntax
Object.Mode[=IOFieldType]

Object
Required A "ScreenItem" object with following format:
● Button
● IOField
● RoundButton
● SymbolicIOField
You have no access in runtime with the following format:
● DateTimeField
● GraphicIOField
● Switch

IOFieldType
hmiIOFieldInput (1): Input field
hmiIOFieldOutput (0): Output field
hmiIOFieldInOutput (2): Input and output field

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1713
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Moveable (RT Professional)

Description
Specifies whether the window can be moved in Runtime.
Access in Runtime: Read and write

Syntax
Object.Moveable[=BOOLEAN]

Object
Required. A "ScreenItem" object with the format "UserArchiveControl".

BOOLEAN
Optional. TRUE, if the window can be moved in Runtime.

See also
AlarmControl (Page 1316)
UserArchiveControl (Page 1499)
TrendRulerControl (Page 1480)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)
OnlineTrendControl (Page 1417)

MsgFilterSQL (RT Professional)

Description
Specifies one or more SQL statements for the customized selection of the messages. Several
customized selections are connected with "OR". If you have configured a fixed selection
"DefaultMsgFilterSQL", the SQL statements of "DefaultMsgFilterSQL" and "MsgFilterSQL" are
connected with "AND".
Access in runtime: Read and write

Syntax
Object.MsgFilterSQL[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

WinCC Professional V13 SP2 – Programming reference


1714 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

STRING
Optional A value or constant that specifies the SQL statements for user-defined selection of
messages.

Name (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Returns the object name as STRING. The returned value is dependent upon the used object.
Access during runtime: Read

Syntax
Object.Name[=STRING]

Object
Required. An object of the "ScreenItem" type with the format:
● BatteryView
● Clock
● Ellipse
● Gauge
● Slider
You have no access in runtime with the following format:
● AlarmControl
● AlarmView
● ApplicationWindow
● Bar
● Button
● ChannelDiagnose
● CheckBox
● Circle
● CircleSegment
● CircularArc
● ComboBox
● DateTimeField
● DiscSpaceView
● EllipseSegment
● EllipticalArc

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1715
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● FunctionTrendControl
● GraphicIOField
● GraphicView
● HTML-Browser
● IOField
● Line
● ListBox
● MediaPlayer
● MultiLineEdit
● OnlineTableControl
● OnlineTrendControl
● OptionGroup
● PLCCodeViewer
● Polygon
● Polyline
● ProtectedAreaNameView
● RangeLabelView
● RangeQualityView
● RecipeView
● Rectangle
● RoundButton
● S7GraphOverview
● Screenwindow
● SmartClientView
● StatusForce
● Switch
● SymbolLibrary
● SymbolicIOField
● SysDiagControl
● TextField
● TrendRulerControl
● TrendView
● TubeArcObject
● TubeDoubleTeeObject
● TubeTeeObject

WinCC Professional V13 SP2 – Programming reference


1716 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● Tubepolyline
● UserArchiveControl
● UserView
● WLanQualityView
● WindowsSlider
● ZoneLabelView
● ZoneQualityView

Comments
Dependent on the specified object, the following object names will be returned:
● Tag: Name of the tag without server and tag prefix.
● Project: Name of the current Runtime project.
● DataItem: Name of the DataItem object.
● Layer: Name of the layer.
● FunctionTrendControl : Name of the trend referenced by the "Index" property.
Note
Use the "Name" property to address a tag in the Tags" list. Tag names are structured in
WinCC according to the following scheme:
<Tag prefix><Name of tag>
If you only specify the tag name, the tag prefix is applied from the screen window shortcut.

Example
The following example returns the name of the current Runtime project as Trace:

'VBS160
HMIRuntime.Trace "Name: " & HMIRuntime.ActiveProject.Name & vbNewLine

NeedleBorderColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the line color of the pointer in the "Clock" object.
Access in runtime: Read and write

Syntax
Object.NeedleBorderColor[=Color]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1717
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● Clock

Color
Optional A value or a constant that specifies the line color of the pointer.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

NeedleColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the hand color of the "Clock" object.
You must have configured the "NeedleFillStyle" property as "Transparent" for the pointer color
to be shown.
Access in runtime: Read and write

Syntax
Object.NeedleColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Clock

Color
Optional A value or a constant that specifies the pointer color.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

WinCC Professional V13 SP2 – Programming reference


1718 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

NeedleFillStyle (RT Professional)

Description
Specifies whether the pointers are displayed as filled or transparent:
Access in runtime: Read and write

Syntax
Object.NeedleFillStyle[=THmiFillStyle]

Object
Required. A "ScreenItem" object with the following format:
● Clock

THmiFillStyle
hmiFillStyleTransparent (65536): The pointers are filled in the pointer fill color and shown with
a border in the foreground color.
hmiFillStyleSolid (0): The pointers are displayed as transparent with a border in the foreground
color.

NormalRangeColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the normal range on the scale of the "Gauge" object.
The "NormalRangeVisible" property must have the value TRUE for the normal range to be
displayed.
Access in runtime: Read and write

Syntax
Object.NormalRangeColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

Color
Optional A value or a constant that specifies the color of the normal range.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1719
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

NormalRangeVisible (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the normal range in the scale of the "Gauge" object is displayed.
Access in runtime: Read and write

Syntax
Object.NormalRangeVisible[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

BOOLEAN
Optional TRUE, if the normal range will be displayed in the scale.

Comments
Specify the color of the normal range with the "NormalRangeColor" property.

3.5.5.10 Properties O-P (Panels, Comfort Panels, RT Advanced, RT Professional)

Object (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
If you use a Control that is not a standard WinCC control, it could be that the properties provided
by the Control have the same names as the general ScreenItem properties. In this case, the
ScreenItem properties take priority. You can access the "hidden" properties of an outside
provider Controls with the additional "object" property.
Access in runtime:
● RT Advanced: No access
● RT Professional: Read and write

WinCC Professional V13 SP2 – Programming reference


1720 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.Object

Object
Required. An object of the "ScreenItem" type with the format:
● AlarmControl
● AlarmView
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
You have no access in runtime with the following format:
● RecipeView
● SmartClientView
● StatusForce
● SymbolLibrary
● UserArchiveControl

Application example
To do this, address the properties of an outside provider control in the following way:
Control.object.type
If you are using only the form Control.type, the properties of the ScreenItem object will be used
in case of identical names.

ObjectSizeDeclutteringEnable (RT Professional)

Description
Specifies whether only the objects within a set size range are displayed.
Access during runtime: Read

Syntax
Object.ObjectSizeDeclutteringEnable

Object
Necessary. A "Screen" object.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1721
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example
The example outputs the Decluttering properties of the screen "NewPDL1" as Trace.

'VBS157
Dim objScreen
Set objScreen = HMIRuntime.Screens("NewPDL1")
HMIRuntime.Trace "Min: " & objScreen.ObjectSizeDeclutteringMin & vbNewLine
HMIRuntime.Trace "Max: " & objScreen.ObjectSizeDeclutteringMax & vbNewLine
HMIRuntime.Trace "Enable: " & objScreen.LayerDeclutteringEnable & vbNewLine

See also
Screen (Page 1299)

ObjectSizeDeclutteringMax (RT Professional)

Description
Returns the upper size range for the display suppression of objects of the specified screen as
LONG.
Access during runtime: Read

Syntax
Object.ObjectSizeDeclutteringMax

Object
Necessary. A "Screen" object.

Example
The example outputs the Decluttering properties of the screen "NewPDL1" as Trace.

'VBS157
Dim objScreen
Set objScreen = HMIRuntime.Screens("NewPDL1")
HMIRuntime.Trace "Min: " & objScreen.ObjectSizeDeclutteringMin & vbNewLine
HMIRuntime.Trace "Max: " & objScreen.ObjectSizeDeclutteringMax & vbNewLine
HMIRuntime.Trace "Enable: " & objScreen.LayerDeclutteringEnable & vbNewLine

See also
Screen (Page 1299)

WinCC Professional V13 SP2 – Programming reference


1722 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ObjectSizeDeclutteringMin (RT Professional)

Description
Returns the lower size range for the display suppression of objects of the specified screen as
LONG.
Access during runtime: Read

Syntax
Object.ObjectSizeDeclutteringMin

Object
Necessary. A "Screen" object.

Example
The example outputs the Decluttering properties of the screen "NewPDL1" as Trace.

'VBS157
Dim objScreen
Set objScreen = HMIRuntime.Screens("NewPDL1")
HMIRuntime.Trace "Min: " & objScreen.ObjectSizeDeclutteringMin & vbNewLine
HMIRuntime.Trace "Max: " & objScreen.ObjectSizeDeclutteringMax & vbNewLine
HMIRuntime.Trace "Enable: " & objScreen.LayerDeclutteringEnable & vbNewLine

See also
Screen (Page 1299)

OCXState (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

Online (RT Professional)

Description
Specifies start and stop of the updating.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1723
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.Online[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTrendControl
● FunctionTrendControl
● OnlineTableControl

BOOLEAN
Optional
TRUE: The updated display is stopped. The values are buffered and updated when the button
is clicked again.
FALSE: The updated display is continued.

OperationSteps (RT Professional)

Description
Specifies by how many steps the slider of the scrollbar is moved with one mouse click.
Access in runtime: Read and write

Syntax
Object.OperationSteps[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● WindowSlider

Int32
Optional A value or a constant which specifies by how many steps the slider of the scrollbar
is moved with one mouse-click.

OperatorMessageId (RT Professional)

Description
Specifies the assignment of ID number and trigger event in the alarm view.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1724 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.OperatorMessageId[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

Int32

Value Description Explanation


0 Lock Trigger event "Lock"
1 Unlock "Unlock" Trigger Event
2 Hide Trigger event "Hide"
3 Unhide Trigger event "Unhide"
4 Ackn Trigger event "Acknowledge"

OperatorMessageIndex (RT Professional)

Description
References an operator message event. You can assign the values of other properties to a
specific operator message by using the property.
Access in runtime: Read and write

Syntax
Object.OperatorMessageIndex[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

Int32

Value Explanation
0 Message event "Lock"
1 "Unlock" Message Event
2 Message event "Hide"
3 Message event "Unhide"
4 Message event "Acknowledge"

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1725
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

OperatorMessageName (RT Professional)

Description
Specifies the name which is referenced with the "OperatorMessageIndex" event in message
events for operator messages.
Access in runtime: Read and write

Syntax
Object.OperatorMessageName[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

STRING

Value Explanation
Lock Message event "Lock"
Unlock Message event "Enable"
Hide Message event "Hide"
Unhide Message event "Unhide"
Quit Message event "Ackn."

OperatorMessageNumber (RT Professional)

Description
Specifies a message number for the operator message of the selected message event if you
do not use the operator message of WinCC.
Access in runtime: Read and write

Syntax
Object.OperatorMessageNumber[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

Int32
Optional Specifies a message number for the operator message of the selected message
event.

WinCC Professional V13 SP2 – Programming reference


1726 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

OperatorMessageSelected (RT Professional)

Description
Activates the message events in the list that trigger operator messages.
Access in runtime: Read and write

Syntax
Object.OperatorMessageSelected[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

BOOLEAN
Optional Activates the message events in the list that trigger operator messages.

OperatorMessageSource1 (RT Professional)

Description
Specifies a alarm text block of the operated message to be added to "Process value block 1"
of the operator message configured here.
An operator message is to be generated to indicate that a message was locked. The content
of "User text block 1" of the locked message, e.g. "Motor faulty" should be displayed in "Process
value block 1" of the operator message. Select "1" at process value as the alarm text block
lock of the operated alarm "User text block 1".
Access in runtime: Read and write

Syntax
Object.OperatorMessageSource1[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

STRING
Optional Specifies a alarm text block of the operated message to be added to "Process value
block 1" of the operator message configured here.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1727
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

OperatorMessageSource2 (RT Professional)

Description
Specifies a alarm text block of the operated message to be added to "Process value block 2"
of the operator message configured here.
An operator message is to be generated to indicate that a message was locked. The content
of "User text block 1" of the locked message, e.g. "Motor faulty" should be displayed in "Process
value block 2" of the operator message. Select "2" at process value as the alarm text block of
the operated alarm "User text block 1".
Access in runtime: Read and write

Syntax
Object.OperatorMessageSource2[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

STRING
Optional Specifies a alarm text block of the operated message to be added to "Process value
block 2" of the operator message configured here.

OperatorMessageSource3 (RT Professional)

Description
Specifies a alarm text block of the operated message to be added to "Process value block 3"
of the operator message configured here.
An operator message is to be generated to indicate that a message was locked. The content
of "User text block 1" of the locked message, e.g. "Motor faulty" should be displayed in "Process
value block 3" of the operator message. Select "3" at process value as the alarm text block of
the operated alarm "User text block 1".
Access in runtime: Read and write

Syntax
Object.OperatorMessageSource3[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

WinCC Professional V13 SP2 – Programming reference


1728 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

STRING
Optional Specifies a alarm text block of the operated message to be added to "Process value
block 3" of the operator message configured here.

OperatorMessageSource4 (RT Professional)

Description
Specifies a alarm text block of the operated message to be added to "Process value block 4"
of the operator message configured here.
An operator message is to be generated to indicate that a message was locked. The content
of "User text block 4" of the locked message, e.g. "Motor faulty" should be displayed in "Process
value block 4" of the operator message. Select "4" at process value as the alarm text block of
the operated alarm "User text block 1".
Access in runtime: Read and write

Syntax
Object.OperatorMessageSource4[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

STRING
Optional Specifies a alarm text block of the operated message to be added to "Process value
block 4" of the operator message configured here.

OperatorMessageSource5 (RT Professional)

Description
Specifies a alarm text block of the operated message to be added to "Process value block 5"
of the operator message configured here.
An operator message is to be generated to indicate that a message was locked. The content
of "User text block 1" of the locked message, e.g. "Motor faulty", is to be displayed in "Process
value block 5" of the operator message. Select "5" at process value as the alarm text block of
the operated alarm "User text block 1".
Access in runtime: Read and write

Syntax
Object.OperatorMessageSource5[=STRING]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1729
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

STRING
Optional Specifies a alarm text block of the operated message to be added to "Process value
block 5" of the operator message configured here.

OperatorMessageSource6 (RT Professional)

Description
Specifies a alarm text block of the operated message to be added to "Process value block 6"
of the operator message configured here.
An operator message is to be generated to indicate that a message was locked. The content
of "User text block 1" of the locked message, e.g. "Motor faulty", is to be displayed in "Process
value block 6" of the operator message. Select "6" at process value as the alarm text block of
the operated alarm "User text block 1".
Access in runtime: Read and write

Syntax
Object.OperatorMessageSource6[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

STRING
Optional Specifies a alarm text block of the operated message to be added to "Process value
block 6" of the operator message configured here.

OperatorMessageSource7 (RT Professional)

Description
Specifies a alarm text block of the operated message to be added to "Process value block 7"
of the operator message configured here.
An operator message is to be generated to indicate that a message was locked. The content
of "User text block 1" of the locked message, e.g. "Motor faulty", is to be displayed in "Process
value block 7" of the operator message. Select "7" at process value as the alarm text block of
the operated alarm "User text block 1".
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1730 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.OperatorMessageSource7[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

STRING
Optional Specifies a alarm text block of the operated message to be added to "Process value
block 7" of the operator message configured here.

OperatorMessageSource8 (RT Professional)

Description
Specifies a alarm text block of the operated message to be added to "Process value block 8"
of the operator message configured here.
An operator message is to be generated to indicate that a message was locked. The content
of "User text block 1" of the locked message, e.g. "Motor faulty", is to be displayed in "Process
value block 8" of the operator message. Select "8" at process value as the alarm text block of
the operated alarm "User text block 1".
Access in runtime: Read and write

Syntax
Object.OperatorMessageSource8[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

STRING
Optional Specifies a alarm text block of the operated message to be added to "Process value
block 8" of the operator message configured here.

OperatorMessageSource9 (RT Professional)

Description
Specifies a alarm text block of the operated message to be added to "Process value block 9"
of the operator message configured here.
An operator message is to be generated to indicate that a message was locked. The content
of "User text block 1" of the locked message, e.g. "Motor faulty", is to be displayed in "Process

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1731
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

value block 9" of the operator message. Select "9" at process value as the alarm text block of
the operated alarm "User text block 1".
Access in runtime: Read and write

Syntax
Object.OperatorMessageSource9[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

STRING
Optional Specifies a alarm text block of the operated message to be added to "Process value
block 9" of the operator message configured here.

OperatorMessageSource10 (RT Professional)

Description
Specifies a alarm text block of the operated message to be added to "Process value block 10"
of the operator message configured here.
An operator message is to be generated to indicate that a message was locked. The content
of "User text block 1" of the locked message, e.g. "Motor faulty", is to be displayed in "Process
value block 10" of the operator message. Select "10" at process value as the alarm text block
of the operated alarm "User text block 1".
Access in runtime: Read and write

Syntax
Object.OperatorMessageSource10[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

STRING
Specifies a alarm text block of the operated message to be added to "Process value block 10"
of the operator message configured here.

WinCC Professional V13 SP2 – Programming reference


1732 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

OperatorMessageSourceType1 (RT Professional)

Description
Specifies the format of the source content for the transfer.

Syntax
Object.OperatorMessageType1[=Type]

Object
Required A "ScreenItem" object with the format "AlarmControl".

Type

Value Description Description


0 Text Transfer the source content in text format.
1 Value Transfer the source content as value.

See also
AlarmControl (Page 1316)

OperatorMessageSourceType2 (RT Professional)

Description
Specifies in what format the content of the source is transferred.

Syntax
Object.OperatorMessageType2[=Type]

Object
Required A "ScreenItem" object with the format "AlarmControl".

Type

Value Description Explanation


0 Text The content of the source is transferred as a text.
1 Value The content of the source is transferred as a value.

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1733
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

OperatorMessageSourceType3 (RT Professional)

Description
Specifies in what format the content of the source is transferred.

Syntax
Object.OperatorMessageType1[=Type]

Object
Required A "ScreenItem" object with the format "AlarmControl".

Type

Value Description Explanation


0 Text The content of the source is transferred as a text.
1 Value The content of the source is transferred as a value.

See also
AlarmControl (Page 1316)

OperatorMessageSourceType4 (RT Professional)

Description
Specifies in what format the content of the source is transferred.

Syntax
Object.OperatorMessageType4[=Type]

Object
Required A "ScreenItem" object with the format "AlarmControl".

Type

Value Description Explanation


0 Text The content of the source is transferred as a text.
1 Value The content of the source is transferred as a value.

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


1734 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

OperatorMessageSourceType5 (RT Professional)

Description
Specifies in what format the content of the source is transferred.

Syntax
Object.OperatorMessageType5[=Type]

Object
Required A "ScreenItem" object with the format "AlarmControl".

Type

Value Description Explanation


0 Text The content of the source is transferred as a text.
1 Value The content of the source is transferred as a value.

See also
AlarmControl (Page 1316)

OperatorMessageSourceType6 (RT Professional)

Description
Specifies in what format the content of the source is transferred.

Syntax
Object.OperatorMessageType6[=Type]

Object
Required A "ScreenItem" object with the format "AlarmControl".

Type

Value Description Explanation


0 Text The content of the source is transferred as a text.
1 Value The content of the source is transferred as a value.

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1735
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

OperatorMessageSourceType7 (RT Professional)

Description
Specifies in what format the content of the source is transferred.

Syntax
Object.OperatorMessageType7[=Type]

Object
Required A "ScreenItem" object with the format "AlarmControl".

Type

Value Description Explanation


0 Text The content of the source is transferred as a text.
1 Value The content of the source is transferred as a value.

See also
AlarmControl (Page 1316)

OperatorMessageSourceType8 (RT Professional)

Description
Specifies in what format the content of the source is transferred.

Syntax
Object.OperatorMessageType8[=Type]

Object
Required A "ScreenItem" object with the format "AlarmControl".

Type

Value Description Explanation


0 Text The content of the source is transferred as a text.
1 Value The content of the source is transferred as a value.

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


1736 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

OperatorMessageSourceType9 (RT Professional)

Description
Specifies in what format the content of the source is transferred.

Syntax
Object.OperatorMessageType9[=Type]

Object
Required A "ScreenItem" object with the format "AlarmControl".

Type

Value Description Explanation


0 Text The content of the source is transferred as a text.
1 Value The content of the source is transferred as a value.

See also
AlarmControl (Page 1316)

OperatorMessageSourceType10 (RT Professional)

Description
Specifies in what format the content of the source is transferred.

Syntax
Object.OperatorMessageType10[=Type]

Object
Required A "ScreenItem" object with the format "AlarmControl".

Type

Value Description Explanation


0 Text The content of the source is transferred as a text.
1 Value The content of the source is transferred as a value.

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1737
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

PageMode (RT Professional)

Description
Enables paging is in the long-term archive list. Allows you to display all messages of the short-
term archive in the long-term archive list. Use the "PageModeMessageNumber" property to
determine the number of messages displayed per page.
The page up/down buttons of the toolbar can be used if paging is enabled.
Access in runtime: Read and write

Syntax
Object.PageMode[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

BOOLEAN
TRUE: Scrolling in the long-term log list is possible.
FALSE: Scrolling in the long-term log list is not possible.

PageModeMessageNumber (RT Professional)

Description
Defines the number of messages shown per page when paging the long-term archive list.
Access in runtime: Read and write

Syntax
Object.PageModeMessageNumber[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

Int32
Optional A value or constant that specifies the number of messages per page.

WinCC Professional V13 SP2 – Programming reference


1738 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Path (RT Professional)

Description
Returns the path of the current project without the file names as STRING. For a WinCC client
without its own path, the path is returned in UNC format, otherwise the local path is returned.
Access during runtime: Read

Syntax
Object.Path

Object
Necessary. A "Project" object.

Example
The following example returns the project path as Trace:

'VBS161
HMIRuntime.Trace "Path: " & HMIRuntime.ActiveProject.Path & vbNewLine

See also
Project (Page 1298)

Password (RT Advanced)

Description
Determines the password for the loading of the remote monitor.
Access in runtime: Read and write

Syntax
Object.Password[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● SmartClientView

STRING
Optional A value or constant that contains the password for establishing remote monitoring.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1739
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

PicAlignment (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the alignment within the specified object.

Picture (RT Professional)

Description
Specifies the screen that will be displayed in the graphics object in Runtime.
Access in Runtime: Read and write

Syntax
Object.Picture[=Image]

Object
Required A ""ScreenItem" object with following format:
● GraphicView
● Clock

Image
Optional A value or a constant that specifies the screen that will be displayed in the graphics
object in Runtime.

Comments
The picture (*.BMP or *.DIB) must be located in the "GraCS" folder of the current project so
that it can be integrated.

PictureAlignment (RT Professional)

Description
Specifies the display type for the background screen in the process image.
Access in runtime: Read and write

Syntax
Object.PictureAlignment[=PictureAlignment]

WinCC Professional V13 SP2 – Programming reference


1740 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● Button
● RoundButton

PictureAlignment
Optional A value or a constant that specifies the display type for the background screen in the
process image.

PictureDeactivated (RT Professional)

Description
Specifies the picture that is displayed in the "Deactivated" state.
Access in Runtime: Read and write

Syntax
Object.PictureDeactivated[=Image]

Object
Required A ""ScreenItem" object with following format:
● Roundbutton

Image
Optional A value or a constant that specifies the picture that will be displayed in the
"Deactivated" status.

Comments
The picture must be located in the "GraCS" folder of the current project in order to integrate it.

PictureOff (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the picture that is displayed in the "Off" status.
Access in runtime:
● RT Advanced: No access
● RT Professional: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1741
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.PictureOff[=HmiObjectHandle]

Object
Required. A "ScreenItem" object with the format:
● Button
● GraphicIOField
● RoundButton
You have no access in runtime with the following format:
● Switch

HmiObjectHandle
Optional A value or a constant that specifies the picture that will be displayed in the "Off" status.

Comments
The picture (*.BMP or *.DIB) must be in the "GraCS" folder of the current project so that you
can integrate it.

PictureOn (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the screen that will be displayed in the "on" state.
Access in runtime:
● RT Advanced: No access
● RT Professional: Read and write

Syntax
Object.PictureOn[=HmiObjectHandle]

Object
Required. A "ScreenItem" object with the format:
● Button
● GraphicIOField
● RoundButton
You have no access in runtime with the following format:
● Switch

WinCC Professional V13 SP2 – Programming reference


1742 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

HmiObjectHandle
Optional A value or a constant that specifies the screen that will be displayed in the "on" state.

Comments
The screen (*.BMP or *.DIB) must be in the "GraCS" folder of the current project in order to
be able to integrate it.

PointerColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the pointer color of the "Gauge" object.
Access in runtime: Read and write

Syntax
Object.PointerColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

Color
Optional A value or a constant that specifies the pointer color.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

PointsCount (RT Professional)

Description
Specifies the number of corner points of the polyline or of the polygon.
Access in runtime: Read and write

Syntax
Object.PointsCount[=Int32]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1743
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the format:
● Polygon
● Polyline
● Tubepolyline
You have no access in runtime with the following format:
● Line

Int32
Optional A value or a constant that specifies the number of corner points of the polyline.

Precision (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the number of decimal places (0 to 20).
Access in runtime: Read and write

Syntax
Object.Precision[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Bar

Int32
Optional A value or a constant that specifies the number of decimal places (0 to 20).

Pressed (RT Professional)

Description
Specifies whether the selected object is displayed in a pressed state.
Access in runtime: Read and write

Syntax
Object.Pressed[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


1744 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● Button
● RoundButton

BOOLEAN
Optional TRUE, if the selected object is displayed in a pressed state.

ProcessValue (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the default for the value to be displayed.
This value will be used in runtime if the associated tag is not connected or has not been updated
when the screen starts.
Access in runtime: Read and write

Syntax
Object.ProcessValue[=DOUBLE | Int32 | Object | SINGLE]

Object
Required. A "ScreenItem" object with the format:
● Bar
● Gauge
● GraphicIOField
● IOField
● OptionGroup
● Slider
● SymbolicIOField
● WindowsSlider
You have no access in runtime with the following format:
● Button
● CheckBox
● DateTimeField
● Switch
● SymbolLibrary

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1745
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

DOUBLE | Int32 | SINGLE


Optional A value or a constant that includes the default value. The data type depends on the
format.
● DOUBLE: Bar
● Int32: GraphicIOField, OptionGroup, Slider, SymbolicIOField, WindowsSlider
● Object: IOField
● SINGLE: Gauge

Comments
If you want to assign the "ProcessValue" SmartTags property, then you must formulate the
assignment as follows:
'Examples for the assignment of SmartTags

'Example 1
IOField.ProcessValue = SmartTags("TagName").Value
'Example 2
HmiRuntime.Screens("Screen_1").ScreenItems("IOField_1").ProcessValue =
SmartTags("Tag_1").Value

ProgID (RT Professional)

Description
In the case of non-WinCC controls, the version-independent ProgID is returned as the type.

See also
ForeignControl (Page 1368)

3.5.5.11 Properties Q-R (Panels, Comfort Panels, RT Advanced, RT Professional)

QualityCode (RT Professional)

Description
Returns the quality of a tag value after reading the tag as SHORT. After a tag has been written,
the value is invalid.
Access during runtime: Read

WinCC Professional V13 SP2 – Programming reference


1746 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.QualityCode

Object
Necessary. An object of the "HMIRuntime" type.

Example
The following example indicates the quality of the read value when no errors have occurred
during the reading process:

'VBS83
Dim objTag
Dim lngLastErr
Set objTag = HMIRuntime.Tags("Tag1")
objTag.Read
lngLastErr = objTag.LastError
If 0 = lngLastErr Then
MsgBox objTag.QualityCode
End If

See also
Tag (Page 1310)

Radius (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Determines the radius of the given object "Circle."
Access in runtime: Read and write

Syntax
Object.Radius[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Circle
● CircleSegment
● CircularArc
● RoundButton

Int32
Optional A value or constant which determines the radius in pixels.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1747
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

RadiusHeight (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the secondary axis of the specified object.
Access in runtime: Read and write

Syntax
Object.RadiusHeight[=Int32]

Object
Required. A "ScreenItem" object with the format:
● Ellipse
● EllipseSegment
● EllipticalArc
● TubeArcObject
You have no access in runtime with the following format:
● Circle

Int32
Optional A value or constant which determines the secondary axis in pixels.

RadiusWidth (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the main axis of the specified object.
Access in runtime: Read and write

Syntax
Object.RadiusWidth[=Int32]

Object
Required. A "ScreenItem" object with the format:
● Ellipse
● EllipseSegment
● EllipticalArc
● TubeArcObject

WinCC Professional V13 SP2 – Programming reference


1748 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

You have no access in runtime with the following format:


● Circle

Int32
Optional A value or constant which determines the main axis in pixels.

RecipeName (RT Advanced)

Description
Returns the name of the recipe that is currently being displayed in the "Recipe view".
Access in runtime: Read

Syntax
Object.RecipeName[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● RecipeView

STRING
Optional A value or a constant that returns the name of the recipe.

RecipeNumber (RT Advanced)

Description
Returns the number of the recipe that is currently being displayed in the "Recipe view".
Access in runtime: Read

Syntax
Object.RecipeNumber[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● RecipeView

Int32
Optional A value or a constant that returns the number of the recipe.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1749
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

RecordName (RT Advanced)

Description
Returns the name of the recipe data record that is currently being displayed in the "Recipe
view".
Access in runtime: Read

Syntax
Object.RecordName[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● RecipeView

STRING
Optional A value or a constant that returns the name of the recipe data record.

RecordNumber (RT Advanced)

Description
Returns the number of the recipe data record that is currently being displayed in the "Recipe
view".
Access in runtime: Read

Syntax
Object.RecordNumber[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● RecipeView

Int32
Optional A value or a constant that returns the number of the recipe data record.

RelativeFillLevel (RT Professional)

Description
Specifies the fill percentage for the object.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1750 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.RelativeFillLevel[=Int32]

Object
Required. A "ScreenItem" object with the format:
● Button
● Circle
● CircleSegment
● Ellipse
● EllipseSegment
● GraphicView
● OptionGroup
● Polygon
● Rectangle
● RoundButton
● TextField
● WindowsSlider
You have no access in runtime with the following format:
● CheckBox

Int32
Optional A value or a constant that specifies the fill percentage of the object.

Rotation (RT Professional)

Description
Specifies the angle of rotation in degrees of the selected object. The angle of rotation is
measured counterclockwise.
Access in runtime: Read and write

Syntax
Object.Rotation[=SymbolLibraryRotation]

Object
Required. A "ScreenItem" object with the following format:
● SymbolLibrary

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1751
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

SymbolLibraryRotation
hmiSymbolLibraryRotationNone (0): The object rotates by 0 degrees.
hmiSymbolLibraryRotation90Degree (90): The object rotates by 90 degrees.
hmiSymbolLibraryRotation180Degree (180): The object rotates by 180 degrees.
hmiSymbolLibraryRotation270Degree (270): The object rotates by 270 degrees.

RotationAngle (RT Professional)

Description
Specifies the angle of rotation in degrees.
Access in runtime: Read and write

Syntax
Object.RotationAngle[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Line
● Polygon
● Polyline
● TextField
● TubeTeeObject

Int32
Optional A value or a constant that specifies the angle of rotation in degrees.

Comments
In Runtime the object rotates clockwise on the reference point.

RotationCenterLeft (RT Professional)

Description
Establishes the X coordinates of the pivot point to rotate the object in Runtime.
Access in Runtime: Read and write

Syntax
Object.RotationCenterLeft[=Int32]

WinCC Professional V13 SP2 – Programming reference


1752 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. An object of the "ScreenItem" type with the format:
● Line
● Polygon
● Polyline
● TextField

Int32
Optional A value or a constant that specifies the X coordinates of the pivot point to rotate the
object in runtime.

Comments
The value of the X coordinate is relative to the object width. Specify the value as a percentage
from the left edge of the rectangle that surrounds the object.

RotationCenterTop (RT Professional)

Description
Specifies the Y coordinates of the pivot point to rotate the object in Runtime.
Access in Runtime: Read and write

Syntax
Object.RotationCenterTop[=Int32]

Object
Required. An object of the "ScreenItem" type with the format:
● Line
● Polygon
● Polyline
● TextField

Int32
Optional A value or a constant that specifies the Y coordinates of the pivot point to rotate the
object in Runtime.

Comments
The value of the Y coordinate is relative to the object width. Specify the value as a percentage
from the upper edge of the rectangle that surrounds the object.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1753
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

RoundCornerHeight (RT Professional)

Description
Specifies the corner radius. Enter the value as a percentage of half the height of the object.
Access in runtime: Read and write

Syntax
Object.RoundCornerHeight[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Rectangle

Int32
Optional A value or a constant that specifies the corner radius.

RoundCornerWidth (RT Professional)

Description
Specifies the corner radius. Enter the value as a percentage of half the width of the object.
Access in runtime: Read and write

Syntax
Object.RoundCornerWidth[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Rectangle

Int32
Optional A value or a constant that specifies the corner radius.

RowScrollbar (RT Professional)

Description
Enables the display of row scroll bars.
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1754 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.RowScrollbar[=ScrollbarVisibility]

Object
Required A "ScreenItem" object with following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

ScrollbarVisibility

Value Description Explanation


0 No No row scroll bars.
1 as required Row scroll bars are displayed if horizontal space requirements of the con‐
trol are greater than the actually available display area.
2 always Row scroll bars are always displayed.

RowTitleAlignment (RT Professional)

Description
Specifies the type of row label alignment.
The following settings are available:

Value Description Explanation


0 Left The row headers are aligned left.
1 Centered The row headers are aligned to center.
2 Right The row headers are aligned right.

The attribute can be assigned dynamic properties by means of the name RowTitleAlignment .

See also
AlarmControl (Page 1316)

RTPersistence (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies how online configurations of WinCC are retained.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1755
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.RTPersistence[=RTPersistence]

Object
Required. An object of the "ScreenItem" type with the format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl
You have no access in runtime with the following format:
● SysDiagControl
● UserView

RTPersistence

Value Description Explanation


0 Discard The current online configurations are discarded at the next picture change.
1 Retain The current online configurations are retained at the next picture change.
2 Reset All online configurations made are lost. The picture is set to the contents
found in the configuration system.

RTPersistenceType (RT Professional)

Description
Specifies how online configurations of WinCC are retained.

Syntax
Object.RTPersistenceType[=RTPersistenceType]

Object
Required. An object of the "ScreenItem" type with the format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

WinCC Professional V13 SP2 – Programming reference


1756 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

You have no access in runtime with the following format:


● SysDiagControl
● UserView

RTPersistenceType

Value Description Explanation


0 Do not retain Online configurations are not retained. These are lost at
the next picture change.
1 Retain during Runtime Online configurations are retained during Runtime. These
are lost on exiting.
2 Retain permanently Online configurations are retained permanently. These
are also available after restart.

RulerColor (RT Advanced)

Description
Specifies the color of the scale gradation (help line) of the axis label in the "OnlineTrendControl"
object.
Access in runtime: Read and write

Syntax
Object.RulerColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● TrendView

Color
Optional A value or a constant that specifies the color of the scale gradation.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1757
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.5.12 Properties S (Panels, Comfort Panels, RT Advanced, RT Professional)

ScaleColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the scale of the selected object.
Access in runtime: Read and write

Syntax
Object.ScaleColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● TrendView
● Bar

Color
Optional A value or a constant that specifies the color of the scale.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.
ScreenItem object with the format "Bar": For the color to be displayed, the property
""ShowScale" must have the value TRUE.

ScaleGradation (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the distance between two large marking lengths of the scale.
Access in runtime: Read and write

Syntax
Object.ScaleGradation[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● Bar

WinCC Professional V13 SP2 – Programming reference


1758 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

DOUBLE
Optional A value or a constant that specifies the distance between two large marking lengths
of the scale.

ScaleLabelColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the label for the scale gradation of the "Gauge" object.
Access in runtime: Read and write

Syntax
Object.ScaleLabelColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

Color
Optional A value or a constant that specifies the label color of the scale gradation.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

ScaleNumerator (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ScalePosition (RT Professional)

Description
Specifies the position of the scale of the selected object. The "ShowScale" property must be
set to TRUE so that the scale can be displayed.
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1759
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.ScalePosition[=ScalePosition]

Object
Required. An object of the "ScreenItem" type with the format:
● Bar
You have no access in runtime with the following format:
● Slider

ScalePosition
hmiScalePositionLeftUp (0): For a vertical bar, the scale is displayed at the top. For a horizontal
bar the scale will be shown at the left.
hmiScalePositionRightDown (1): For a vertical bar, the scale is displayed at the bottom. For a
horizontal bar the scale will be shown at the right.

ScaleTickColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the scale gradation of the "Gauge" object.
Access in runtime: Read and write

Syntax
Object.ScaleTickColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
Gauge

Color
Optional A value or a constant that specifies the color of the scale gradation.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

WinCC Professional V13 SP2 – Programming reference


1760 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ScaleTickLabelPosition (RT Professional)

Description
Specifies the diameter of the assumed circle on which the label of the scale divisions is located.
Access in runtime: Read and write

Syntax
Object.ScaleTickLabelPosition[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

DOUBLE
Optional A value or a constant that specifies the diameter of the assumed circle on which the
label of the scale division is located.
Value range from 0 to 1
0: The label is located in the center of the scale.
1: The diameter of the assumed circle for the label is the smaller value of the geometry
properties "Width" and "Height". A part of the label can lie outside the object limits and is
therefore invisible.

ScaleTickLength (RT Professional)

Description
Specifies the length of the main markings for the scale division. The value refers to half the
smaller value of the geometry properties "Width" and "Height".
The length of the marking lengths for the fine divisions is 0.5* scale width.
Access in runtime: Read and write

Syntax
Object.ScaleTickLength[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

DOUBLE
Optional A value or a constant that specifies the length of the main markings of the scale.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1761
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Value range 0 to scale end value


0: There are no scale divisions. The divisions of the scale in the areas are not visible.
Scale end value: The scale division ranges from the mid-point of the scale disc to the value
specified by the scale end value.

ScaleTickPosition (RT Professional)

Description
Specifies the diameter of the assumed circle on which the scale divisions are located.
The main markings of the scale divisions lie with their outward-facing ends on this circle.
Access in runtime: Read and write

Syntax
Object.ScaleTickPosition[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

DOUBLE
Optional A value or a constant that specifies the diameter of the assumed circle on which the
scale divisions are located.
Value range from 0 to 1
0: The scale divisions are located in the center of the scale.
1: The diameter of the assumed circle for the label is the scale divisions is the smaller value
of the geometry properties ""Width" and "Height".

ScaleDenominator (Panels, Comfort Panels, RT Advanced)

Description
Defines the counter for scaling on the client.

Syntax
Object.ScaleDenominator=[Int]

Object
Required. A "ScreenItem" object with the format "SmartClientView".

WinCC Professional V13 SP2 – Programming reference


1762 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int
Optional. A value or a constant that specifies the value.

See also
SmartClientView (Page 1456)

Scaling (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ScalingType (RT Professional)

Description
Specifies the type of bar scaling.
Access in Runtime: Read and write

Syntax
Object.ScalingType[=BarScalingType]

Object
Required A "ScreenItem" object with following format:
● Bar

BarScalingType
Optional A value or a constant that specifies the type of bar scaling.
● hmiBarScalingLinear (0): Linear
The large marks are distributed evenly over the scale. The distance between the large
marks corresponds to the value of the "axis section" attribute.
● hmiBarScalingLogarithmic (1): Logarithmic
The distribution of the large marks on the scale follows a logarithmic function.
The representation of low values is very strongly highlighted.
● hmiBarScalingNegativeLogarithmic (2): Negative logarithmic
The distribution of the large marks on the scale follows a negative logarithmic function. The
representation of high values is very strongly highlighted.
● hmiBarScalingAutomatic (3): Automatic
The large marks are distributed evenly over the scale. The distance between the large
marks is specified automatically.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1763
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● hmiBarScalingTangent (4): Tangents


The distribution of the large marks on the scale highlights the representation of the low and
high values.
● hmiBarScalingQuadratic (5): Square
The distribution of the large marks follows a square function. The representation of high
values is highlighted.
● hmiBarScalingCubic (6): Cubic
The distribution of the large marks on the scale follows a cubic function. This highlights the
representation of large values.

Comments
For the color to be displayed, the property "ShowScale" must have the value TRUE.

See also
Bar (Page 1330)

ScreenItems (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Returns the ScreenItems list.
Access in Runtime: Read

Syntax
Object.ScreenItems

Object
Required A "ScreenItems"." object.

ScreenName (RT Professional)

Description
Specifies the screen to be displayed in the screen window in runtime.
Access in runtime: Read and write

Syntax
Object.ScreenName[=HmiObjectHandle]

WinCC Professional V13 SP2 – Programming reference


1764 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● ScreenWindow

HmiObjectHandle
Optional A value or a constant that specifies the screen to be displayed in the screen window
in runtime.

Screens (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Returns the Screens list. The Screens list contains two elements: The first element with the
index 0 represents the permanent window. The second element with the index 1 represents
the root screen. Alternatively, the two elements can be addressed by means of their names.
Use "Overview" for the permanent window and "Base" for the root screen.
Note
The alarm window and the alarm indicator are not contained in the Screens list, even if they
have the focus in Runtime.
Access in Runtime: Read

Syntax
Object.Screens

Object
Required A "Screens" object.

SecondNeedleHeight (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the length of the second hand in the "Clock" object.
Access in runtime: Read and write

Syntax
Object.SecondNeedleHeight[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Clock

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1765
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int32
Optional A value or a constant that specifies the length of the second hand.
Specify the length of the second hand as a percentage relating to the radius of the clock face.

SecondNeedleWidth (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the width of the second hand in the "Clock" object.
Access in runtime: Read and write

Syntax
Object.SecondNeedleWidth[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Clock

Int32
Optional A value or a constant that specifies the width of the second hand. Specify the width
as a percentage relating to double the length of the second hand.

SegmentColoring (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the type of color change that should be displayed in the "Bar" if the limits are
exceeded.
Access in runtime: Read and write

Syntax
Object.SegmentColoring[=THmiBarColorType]

Object
Required. A "ScreenItem" object with the following format:
● Bar

THmiBarColorType
Optional A value or a constant that specifies the type of color change. Value range from 0 to
1.
hmiBarColorEntire (0): Color change applied to the entire bar.

WinCC Professional V13 SP2 – Programming reference


1766 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

hmiBarColorSegmented (1): Color change applied to segments.

SelectedText (RT Professional)

Description
Shows the text defined with the "Selected field" (SelIndex) attribute which is highlighted in the
combobox or list box.

See also
Listbox (Page 1399)

SelectBackColor (RT Professional)

Description
Specifies the background color of the selected text entry for the selected object.
Access in runtime: Read and write

Syntax
Object.SelectBackColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● SymbolicIOField

Color
Optional A value or a constant that specifies the background color of the selected text entry
of the selected object.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

SelectedCellColor (RT Professional)

Description
Specifies the background color of the selected cell. You open a color selection dialog box with
the button.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1767
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in runtime: Read and write

Syntax
Object.SelectedCellColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

Color
Optional A value or a constant which specifies the background color.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

SelectedCellForeColor (RT Professional)

Description
Specifies the font color of the selected cell. You open a color selection dialog box with the
button.
Access in runtime: Read and write

Syntax
Object.SelectedCellForeColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

WinCC Professional V13 SP2 – Programming reference


1768 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Color
Optional A value or a constant which specifies the font color.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

SelectedIndex (RT Professional)

Description
Defines the index of which the associated text is highlighted in the combo box or list box.
The maximum value is the number of lines (NumberLines) of the object.
Access in runtime: Read and write

Syntax
Object.SelectedIndex[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● ComboBox
● ListBox

Int32
Optional A value or a constant that specifies the index of the text highlighted.

SelectedRowColor (RT Professional)

Description
Specifies the background color of the selected row. You open a color selection dialog box with
the button.
Access in runtime: Read and write

Syntax
Object.SelectedRowColor[=Color]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1769
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

Color
Optional A value or a constant which specifies the background color.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

SelectedRowForeColor (RT Professional)

Description
Specifies the font color of the selected row. You open a color selection dialog box with the
button.
Access in runtime: Read and write

Syntax
Object.SelectedRowForeColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

Color
Optional A value or a constant which specifies the font color.

WinCC Professional V13 SP2 – Programming reference


1770 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

SelectedTitleColor (RT Professional)

Description
Specifies the background color of the selected table header. You open a color selection dialog
box with the button.
The setting is only effective in Runtime when the "Marking color" option is activated.
Access in runtime: Read and write

Syntax
Object.SelectedTitleColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

Color
Optional A value or a constant which specifies the background color.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

SelectedTitleForeColor (RT Professional)

Description
Specifies the font color of the selected table header. You open a color selection dialog box
with the button.
The setting is only effective in Runtime when the "Marking color" option is activated.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1771
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in runtime: Read and write

Syntax
Object.SelectedTitleForeColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

Color
Optional A value or a constant which specifies the font color.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

See also
UserArchiveControl (Page 1499)
TrendRulerControl (Page 1480)
OnlineTableControl (Page 1409)
AlarmControl (Page 1316)

SelectForeColor (RT Professional)

Description
Specifies the color of the selected text entry for the selected object.
Access in runtime: Read and write

Syntax
Object.SelectForeColor[=Color]

WinCC Professional V13 SP2 – Programming reference


1772 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● SymbolicIOField

Color
Optional A value or a constant that specifies the color of the selected text entry of the selected
object.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

SelectionBackColor (RT Advanced)

Description
Determines the background color of the selected cells.
Access in runtime: Read and write

Syntax
Object.SelectionBackColor[=Color]

Object
Required. A "ScreenItem" object with the format:
● AlarmView
● RecipeView
● StatusForce
● UserView
You have no access in runtime with the following format:
● TrendView

Color
Optional A value or constant that specifies the background color of the selected row.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1773
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

SelectionColoring (RT Professional)

Description
Enables the use of selection colors for cells or rows.
Access in Runtime: Read and write

Syntax
Object.SelectionColoring[=GridSelectionColoring]

Object
Required A "ScreenItem" object with following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

GridSelectionColoring

Value Description Explanation


0 None No selection colors for cells and rows.
1 Cell Selection color for cell.
2 Row Selection color for row.
3 Cell and row Selection colors for cell and row.

SelectionForeColor (RT Advanced)

Description
Determines the foreground color of the selected cells.
Access in runtime: Read and write

Syntax
Object.SelectionForeColor[=Color]

Object
Required. A "ScreenItem" object with the format:
● AlarmView
● RecipeView
● StatusForce
● UserView

WinCC Professional V13 SP2 – Programming reference


1774 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

You have no access in runtime with the following format:


● TrendView

Color
Optional A value or constant that specifies the background color of the selected row.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

SelectionRect (RT Professional)

Description
Enables the use of a selection border for selected cells or rows.
Access in Runtime: Read and write

Syntax
Object.SelectionRect[=GridSelectionBorder]

Object
Required A "ScreenItem" object with following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

GridSelectionBorder

Value Description Explanation


0 None No selection border is drawn for selected cells or rows.
1 Cell A selection border is drawn for the selected cell.
2 Row A selection border is drawn for the selected row.

SelectionRectColor (RT Professional)

Description
Specifies the color of the rectangle in the alarm window if SelectionType is "1".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1775
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in runtime: Read and write

Syntax
Object.SelectionRectColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

Color
Optional A value or a constant which specifies the color.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

SelectionRectWidth (RT Professional)

Description
Specifies the line width of the selection rectangle in the alarm window if SelectionType equals
"1".
Access in runtime: Read and write

Syntax
Object.SelectionRectWidth[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

WinCC Professional V13 SP2 – Programming reference


1776 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int32
Optional A value or a constant which specifies the line width.

SelectionType (RT Professional)

Description
Specifies the number of lines you can mark.
Access in runtime: Read and write

Syntax
Object.SelectionType[=GridSelectionType]

Object
Required. A "ScreenItem" object with the format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

GridSelectionType
Optional A value or a constant that specifies the number of lines that you can select.
The following settings are available:

Value Description Explanation


0 None No line is selected.
1 Single selection One line can be selected.
2 Multiple selection Several lines can be selected.

SeparatorBackColor (RT Professional)

Description
Specifies the background color of the broken separation lines in the selection list of the
specified object.
Access in runtime: Read and write

Syntax
Object.SeparatorBackColor[=Color]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1777
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● SymbolicIOField

Color
Optional A value or a constant that specifies the background color of the broken separation
lines in the selection list of the specified object.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

SeparatorColor (RT Professional)

Description
Specifies the color of the separation lines in the selection list of the specified object.
Access in runtime: Read and write

Syntax
Object.SeparatorColor[=Color]

Object
Required. A "ScreenItem" object with the format:
● SymbolicIOField
You have no access in runtime with the following format:
● S7GraphOverview

Color
Optional A value or a constant that specifies the color of the separation lines in the selection
list of the specified object.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

WinCC Professional V13 SP2 – Programming reference


1778 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

SeparatorCornerStyle (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime

SeparatorStyle (RT Professional)

Description
Specifies the line style of the separation lines in the selection list of the selected object.
Access in runtime: Read and write

Syntax
Object.SeparatorStyle[=LineStyle]

Object
Required. A "ScreenItem" object with the following format:
● SymbolicIOField

LineStyle
hmiLineStyleNone (-1): The selection list has no separation lines.
hmiLineStyleSolid (0): The selection list has solid separation lines.
hmiLineStyleDash (1): The selection list has dashed separation lines.
hmiLineStyleDot (2): The selection list has dotted separation lines.
hmiLineStyleDashDot (3): The selection list has dash - dot lines as separation lines.
hmiLineStyleDashDotDot (4): The selection list has dash - dot - dot lines as separation lines.

SeparatorWidth (RT Professional)

Description
Specifies the width of the separation lines in the selection list of the specified object.
Access in runtime: Read and write

Syntax
Object.SeparatorWidth[=Int32]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1779
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● SymbolicIOField

Int32
Optional A value or a constant that specifies the width of the separation lines in the selection
list of the specified object.

SeparatorLineEndShapeStyle (RT Professional)

Description
Specifies the shape of the line ends for the object of the type "ScreenItem" with the format
"SymbolicIOField".

See also
SymbolicIOField (Page 1463)

ServerScale (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ServerNames (RT Professional)

Description
Specifies the servers of a distributed system from which the alarm view draws data. The
information is given in form of: NameServer1;NameServer2;NameServer3.
Access in runtime: Read and write

Syntax
Object.ServerNames[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

STRING
Optional A value or a constant that specifies the server of a distributed system from which the
alarm window receives information.

WinCC Professional V13 SP2 – Programming reference


1780 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ServerPrefix (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime

Shared (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

ShiftDecimalPoint (RT Professional)

Description
Specifies that the "Shift decimal point" field can only be read.
Access in Runtime: Read and write

Syntax
Object.ShiftDecimalPoint[=BOOLEAN]

Object
Required. A "ScreenItem" object with the format "IOField".

BOOLEAN
Optional. TRUE, if the "Shift decimal point" field can only be read.

See also
IOField (Page 1392)

ShowAlarmsFromDate (RT Advanced)

Description
Specifies that only those message events are displayed that are saved in this tag.
Access in runtime: Read and write

Syntax
Object.ShowAlarmsFromDate[=HmiObjectHandle]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1781
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the format:
● AlarmView

HmiObjectHandle
Optional A value or a constant which specifies that only those message events are displayed
that are saved in this tag.

ShowBadTagState (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Defines whether the object is grayed out when a bad quality code or tag status is detected.
Access in runtime: Read and write

Syntax
Object.ShowBadTagState[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar
● IOField
● OptionGroup
● SymbolicIOField
● WindowsSlider
You have no access in runtime with the following formats:
● CheckBox

BOOLEAN

TRUE If the quality code or the the tag status are poor, the object is grayed out or the
settings for the grid color are used.
FALSE If the quality code or the the tag status are poor, the object is not grayed out or
the settings for the grid color are not used.

ShowBar (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the displayed process value in the "Slider" object is also shown by a filled
bar.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1782 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.ShowBar[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Slider

BOOLEAN
Optional TRUE, if the process value is also shown by a filled bar.

ShowCaption (RT Professional)

Description
Specifies whether the title line is hidden or shown.
Access in runtime: Read and write

Syntax
Object.ShowCaption[=BOOLEAN]

Object
Required. A "ScreenItem" object with the format:
● ApplicationWindow
● Screenwindow
You have no access in runtime with the following format:
● Switch

BOOLEAN
Optional TRUE, if the title line is shown.

ShowDecimalPoint (RT Professional)

Description
Specifies whether the scale is identified with decimal figures (decimal point and one decimal
place) or with whole integers.
Access in runtime: Read and write

Syntax
Object.ShowDecimalPoint[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1783
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● Gauge

BOOLEAN
Optional TRUE, if the scale is identified with decimal figures (decimal point and one decimal
place).

ShowFillLevel (RT Professional)

Description
Specifies whether the selected object is filled.
Access in runtime: Read and write

Syntax
Object.ShowFillLevel[=BOOLEAN]

Object
Required. A "ScreenItem" object with the format:
● Button
● Circle
● CircleSegment
● Ellipse
● EllipseSegment
● GraphicView
● OptionGroup
● Polygon
● Rectangle
● RoundButton
● TextField
● WindowsSlider
You have no access in runtime with the following format:
● CheckBox

BOOLEAN
Optional TRUE, if the selected object is filled.

WinCC Professional V13 SP2 – Programming reference


1784 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ShowFocusRectangle (RT Professional)

Description
Specifies whether the button is given a selection border when it is activated in Runtime.
Access in runtime: Read and write

Syntax
Object.ShowFocusRectangle[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Clock

BOOLEAN
Optional TRUE, if the button is given a selection border when it is activated in Runtime.

ShowLargeTicksOnly (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether only large scale marks are shown.
Access in runtime: Read and write

Syntax
Object.ShowLargeTicksOnly[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional TRUE if only large scale marks are shown.

ShowLimitMarkers (RT Professional)

Description
Specifies whether the limit value is shown as a scale value.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1785
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.ShowLimitMarkers[=BOOLEAN]

Object
Required. A "ScreenItem" object with the format:
● Bar
You have no access in runtime with the following format:
● Slider

BOOLEAN
Optional TRUE, if the limit value is shown as a scale value.

ShowPeakValuePointer (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether a slave pointer will be used for the selected object.
The slave pointer shows the maximum pointer deflection provided in Runtime while the process
screen is loaded. If you reload the process screen, the slave pointer will be reset.
Access in runtime: Read and write

Syntax
Object.ShowPeakValuePointer[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

BOOLEAN
Optional TRUE, if the slave pointer is used.

ShowPosition (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the value of the current slider position should also be displayed numerically.
The value is then displayed beneath the slider.
Access in runtime: Read and write

Syntax
Object.ShowPosition[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


1786 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● Slider

BOOLEAN
Optional TRUE if the value is also shown numerically.

RowTitles (RT Professional)

Description
Specifies whether the message view contains a column with consecutive numbering of the
existing messages.
Access in Runtime: Read and write

Syntax
Object.RowTitles[=BOOLEAN]

Object
Required. A "ScreenItem" object with the format "AlarmControl".

BOOLEAN
Optional. TRUE, if the message view contains a column with consecutive numbering of the
existing messages.

See also
AlarmControl (Page 1316)

ShowRuler (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether a scale division (help line) is displayed for an axis label of the object
"OnlineTrendControl".
Access in runtime: Read and write

Syntax
Object.ShowRuler[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1787
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl
● TrendView

BOOLEAN
Optional TRUE, if the scale gradation is shown.

ShowRulerInAxis (RT Professional)

Description
Enables the display of rulers in the time axis.
Access in runtime: Read and write

Syntax
Object.ShowRulerInAxis[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

BOOLEAN
TRUE: The rulers are also displayed in the time axes.
FALSE: The rulers are not displayed in the time axes.

ShowScale (RT Professional)

Description
Specifies whether the values will also be shown in a scale.
Access in runtime: Read and write

Syntax
Object.ShowScale[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


1788 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the format:
● Bar
You have no access in runtime with the following format:
● Slider

BOOLEAN
Optional TRUE, if the values will also be shown in a scale.

ShowScrollbars (RT Professional)

Description
Enables the display of scroll bars.
Access in runtime: Read and write

Syntax
Object.ShowScrollbars[=BOOLEAN]

Object
Required. An object of the "ScreenItem" type with the format:
● FunctionTrendControl
● OnlineTrendControl
● Screenwindow

ShowScrollbars
Optional. TRUE if scroll bars are shown.

ShowSortButton (RT Professional)

Description
Enables the display of a sorting button above the vertical scroll bar. Click this sorting button
to sort the selected column based on the configured sorting criteria. The sorting button is not
displayed if the table does not contain a vertical scroll bar.
Access in runtime: Read and write

Syntax
Object.ShowSortButton[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1789
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The sorting key is displayed. You can sort the selected column.
FALSE: The sorting key is not displayed.

ShowSortIcon (RT Professional)

Description
Enables the display of the sorting icon.
Access in runtime: Read and write

Syntax
Object.ShowSortIcon[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The sorting icon is displayed.
FALSE: The sorting icon is not displayed.

ShowSortIndex (RT Professional)

Description
Specifies whether a sort index is displayed.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1790 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.ShowSortIndex[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: A sort index is displayed.
FALSE: A sort index is not displayed.

ShowStatusBar (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the status bar is shown.
Access in runtime: Read and write

Syntax
Object.ShowStatusBar[=BOOLEAN]

Object
Required. A "ScreenItem" object with the format:
● HTML-Browser
You have no access in runtime with the following format:
● MediaPlayer

BOOLEAN
Optional TRUE, if the status bar is shown.

ShowTableGridlines (RT Advanced)

Description
Determines whether gridlines are shown in the table of the given object.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1791
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.ShowTableGridlines[=BOOLEAN]

Object
Required. A "ScreenItem" object with the format:
● StatusForce
You have no access in runtime with the following format:
● TrendView
● UserView

BOOLEAN
Optional TRUE if gridlines in the table are shown.

ShowThumb (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the slider of the "Slider" object will be displayed.
Access in runtime: Read and write

Syntax
Object.ShowThumb[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Slider

BOOLEAN
Optional TRUE, if the slider is shown.

ShowTickLabels (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the label is shown in the scale.
Access in runtime: Read and write

Syntax
Object.ShowTickLabels[= BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


1792 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. An object of the "ScreenItem" type with the format:
● Slider
You have no access in runtime with the following format:
● Bar

BOOLEAN
Optional TRUE, if the label is shown.

Comments
The increments for the measured value are automatically established dependent upon the
specified measurement range and the size of the object.

ShowTicks (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the marking lengths are shown in the scale of the selected object.
Access in runtime: Read and write

Syntax
Object.ShowTicks[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Clock
● Slider

BOOLEAN
Optional TRUE, if the marking lengths are shown.

ShowTitle (RT Professional)

Description
Defines representation the Control window header.
Access in Runtime: Read and write

Syntax
Object.ShowTitle[=WindowHeaderStyle]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1793
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required A "ScreenItem" object with following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

WindowHeaderStyle

Value Designation Description


0 No No window title.
1 Normal The window title consists of a WinCC icon and text. The text is entered in the
"Text" field.
2 Narrow The window title consists only of text. The text is entered in the "Text" field.

ShowToolBar (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the toolbar is shown.
Access in runtime: Read and write

Syntax
Object.ShowToolBar[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● HTMLBrowser

BOOLEAN
Optional TRUE, if a toolbar will be displayed.

ShowTrendIcon (RT Professional)

Description
Enables the display of an icon below the value axes. The icon indicates the trend currently
displayed in the foreground.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1794 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.ShowTrendIcon[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

BOOLEAN
TRUE: The icon is displayed.
FALSE: The icon is not displayed.

ShowTrendIndicator (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the tendency (increasing or falling) of the measurement value that is to be
monitored is shown with a small arrow.
Access in runtime: Read and write

Syntax
Object.ShowTrendIndicator[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional TRUE, if the tendency (increasing or falling) of the measurement value that is to be
monitored is shown with a small arrow.

Sizeable (RT Professional)

Description
TRUE, when it should be possible to change the size of the object in Runtime. BOOLEAN write-
read access.
In the case of application window and picture window: Read only access

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1795
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
TrendRulerControl (Page 1480)
OnlineTableControl (Page 1409)
OnlineTrendControl (Page 1417)
AlarmControl (Page 1316)

ControlDesignMode (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
The control style can be defined in this selection field.
Access in Runtime: Write

Syntax
Object.ControlDesignMode[=RTControlModes]

Object
Required. An object of the "ScreenItem" type with the format "MessageView",
"OnlineTableControl", "OnlineTrendControl", "FunctionTrendControl", "RecipeView",
"RulerControl".

RTControlModes
The following settings are available:

Value Designation Description


Project setting The style corresponds to the project settings in WinCC Ex‐
plorer.
0 Classic "Classic" WinCC style
1 Standard New WinCC V7 style

SmartTags (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Returns the SmartTags list.
Access in Runtime: Read

Syntax
Object.SmartTags

Object
Required A ""HMIRuntime" object.

WinCC Professional V13 SP2 – Programming reference


1796 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

SortByTimeDirection (RT Advanced)

Description
Specifies whether the last incoming message is shown at the top of the "AlarmControl" object
(ascending sorting order).
Access in Runtime: Read and write

Syntax
Object.SortByTimeDirection[=SortByTimeDirection]

Object
Required A "ScreenItems" object with following format:
● AlarmView

SortByTimeDirection
Optional TRUE, if the last incoming alarm is shown at the top.

SortByTimeEnabled (RT Advanced)

Description
Specifies whether the sorting of the messages can be altered according to the time in the
"AlarmView" object.
Access in runtime: Read and write

Syntax
Object.SortByTimeEnabled[=BOOLEAN]

Object
Required. A "ScreenItems" object with the following format:
● AlarmView

BOOLEAN
Optional TRUE, if the sorting can be altered by the device operator.

SortSequence (RT Professional)

Description
Specifies how to change the sorting order by mouse click.
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1797
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.SortSequence[=GridSortSequence]

Object
Required. An object of the "ScreenItem" type with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveConrol

GridSortSequence

Value Description Explanation


0 Up/down/none You can toggle between ascending, descending and no sorting by means
of mouse click.
1 Up/down You can toggle between ascending and descending sorting order by
means of mouse click.

StartAngle (RT Professional)

Description
Specifies the angle at which the start point of the selected object deviates from the zero position
(0°).
Access in runtime: Read and write

Syntax
Object.StartAngle[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● CircleSegment
● CircularArc
● EllipseSegment
● EllipticalArc
● TubeArcObject

Int32
Optional A value or a constant that specifies the angle at which the start point of the specified
object deviates from the zero position (0°).

WinCC Professional V13 SP2 – Programming reference


1798 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

StartStyle (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Determines how the line start of the given object is displayed.
Access in runtime: Read and write

Syntax
Object.StartStyle[=LineEndStyle]

Object
Required. A "ScreenItem" object with the following format:
● Line
● Polyline

LineEndStyle
Optional A value or constant which determines the line start. Value range from 0 to 6.
hmiLineEndStyleNone (0): The line has no start symbol.
hmiLineEndStyleArrow (1): The line starts with an arrow.
hmiLineEndStyleFilledArrow (2): The line starts with a filled arrow.
hmiLineEndStyleFilledArrowReversed (3): The line starts with a reversed arrow.
hmiLineEndStyleLine (4): The line starts with a vertical line.
hmiLineEndStyleCircle (5): The line starts with a circle.
hmiLineEndStyleFilledCircle (6): The line starts with a filled circle.

StartTop (RT Professional)

Description
No access in runtime.

StartValue (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Defines the absolute value of the zero point of the scale indicator.
Access in runtime: Read and write

Syntax
Object.StartValue[=DOUBLE]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1799
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● Bar

DOUBLE
Optional A value or a constant that specifies the absolute value of the zero point for the scale
indicator.

State (RT Professional)

Description
Returns the status of a message.
The following table shows the possible states of a message:

State Alarm Log Status


1 Came In
2 Went Out
5 Came in and comment
6 Gone and comment

StatusbarBackColor (RT Professional)

Description
Specifies the background color for status bars. You open a color selection dialog box with the
button. Enable the "Display" option to active the setting.
Access in runtime: Read and write

Syntax
Object.StatusbarBackColor[=Color]

Object
Required. A "ScreenItem" object with the format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

WinCC Professional V13 SP2 – Programming reference


1800 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Color
Optional A value or a constant that specifies the background color of the status bar.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

StatusbarElementAdd (RT Professional)

Description
Creates a new, user-defined status bar element. You can change the name assigned by
WinCC in the "Object name" field.
Access in runtime: Read and write

Syntax
Object.StatusbarElementAdd[=STRING]

Object
Required. A "ScreenItem" object with the format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

STRING
Optional A value or a constant that specifies a new, user-defined element in the status bar.

StatusbarElementAutoSize (RT Professional)

Description
Enables autosizing of the width of a status bar element selected.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1801
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.StatusbarElementAutoSize[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The width of the selected element is set automatically.
FALSE: The width of the selected element is not set automatically.

See also
UserArchiveControl (Page 1499)
TrendRulerControl (Page 1480)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)
OnlineTrendControl (Page 1417)
AlarmControl (Page 1316)

StatusbarElementCount (RT Professional)

Description
Specifies the number of configurable status bar elements.
Access in runtime: Read and write

Syntax
Object.StatusbarElementCount[=Int32]

Object
Required. A "ScreenItem" object with the format:
● AlarmControl
● FunctionTrendControl

WinCC Professional V13 SP2 – Programming reference


1802 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

Int32
Optional A value or a constant that specifies the number of configurable status bar elements.

StatusbarElementIconId (RT Professional)

Description
Specifies the ID number and symbol assignment of a status bar element.
Access in runtime: Read and write

Syntax
Object.StatusbarElementIconId[=Int32]

Object
Required. A "ScreenItem" object with the format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

Int32
Optional A value or constant that specifies the ID number and symbol assignment of a status
bar element.

StatusbarElementID (RT Professional)

Description
Specifies the ID number of the selected status bar element.
Access in runtime: Read and write

Syntax
Object.StatusbarElementID[=Int32]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1803
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

Int32
Optional A value or constant that specifies the ID number of the selected status bar element.

StatusbarElementIndex (RT Professional)

Description
Specifies the reference for a status bar element.
Values between 0 and "StatusbarElementCount minus 1 are valid for "StatusbarElementIndex".
Access in runtime: Read and write

Syntax
Object.StatusbarElementIndex[=Int32]

Object
Required. A "ScreenItem" object with the format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

Int32
Optional A value or a constant that specifies the reference for a status bar element.

WinCC Professional V13 SP2 – Programming reference


1804 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

StatusbarElementName (RT Professional)

Description
Specifies the object name of the selected status bar element.
You can rename the objects of custom status bar elements. The "StatusbarElementName"
property for user-defined elements can be dynamized with the "StatusbarElementRename"
property.
Access in runtime: Read and write

Syntax
Object.StatusbarElementName[=STRING]

Object
Required. A "ScreenItem" object with the format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

STRING
Optional A value or constant that specifies the object name of the selected status bar element.

StatusbarElementRemove (RT Professional)

Description
Removes the selected user-defined status bar element.
Access in runtime: Read and write

Syntax
Object.StatusbarElementRemove[=STRING]

Object
Required. A "ScreenItem" object with the format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1805
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

STRING
Optional A value or a constant that specifies the name of the user-defined status bar element
to be removed.

StatusbarElementRename (RT Professional)

Description
Changes the name of the user-defined status bar element that is referenced by the
"StatusbarElementIndex" property.
The property with the name "StatusbarElementRename" can be dynamized for user-defined
elements. With "StatusbarElementRename" you also dynamize the "StatusbarElementName"
property.
Access in runtime: Read and write

Syntax
Object.StatusbarElementRename[=STRING]

Object
Required. An object of the "ScreenItem" type with the format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

STRING
Optional. A value or constant that specifies the new object name of the selected status bar
element.

StatusbarElements (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the elements that are to be shown in the status bar.
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


1806 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

StatusbarElementTooltipText (RT Professional)

Description
Specifies the tooltip text for the selected user-defined status bar element.
Access in runtime: Read and write

Syntax
Object.StatusbarElementTooltipText[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

STRING
Optional A value or a constant that specifies the tooltip text for the selected user-defined status
bar element.

StatusbarElementUserDefined (RT Professional)

Description
Specifies whether the configuration engineer has added the status bar element as a new user-
defined element.
Access in runtime: Read and write

Syntax
Object.StatusbarElementUserDefined[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1807
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The element of the status bar is customized.
FALSE: The element of the status bar is specified by the system.

StatusbarElementVisible (RT Professional)

Description
Specifies whether the selected user-defined status bar element is displayed in runtime.
In the list, select the status bar elements that you want to display in runtime.
Click a list entry to adapt the properties, or to change its position in the status bar of the Control
by means of the "Up" and "Down" buttons.
Access in runtime: Read and write

Syntax
Object.StatusbarElementVisible[=BOOLEAN]

Object
Required. An object of the "ScreenItem" type with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The selected user-defined status bar element is displayed.
FALSE: The selected user-defined status bar element is not displayed.

StatusbarElementWidth (RT Professional)

Description
Defines the width of the selected status bar element in pixels.
You can define the width if the "Automatic" option is not activated.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1808 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.StatusbarElementWidth[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

Int32
Optional A value or constant that defines the width of the selected user-defined status bar
element in pixels.

StatusbarFontColor (RT Professional)

Description
Specifies the color of the texts in the status bar.
Access in runtime: Read and write

Syntax
Object.StatusbarFontColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

Color
Optional A value or constant that specifies the color of the texts in the status bar.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1809
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

StatusbarShowTooltips (RT Professional)

Description
Enables the display of tooltips for the status bar elements in Runtime.
Access in runtime: Read and write

Syntax
Object.StatusbarShowTooltips[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The tooltips are displayed.
FALSE: The tooltips are not displayed.

StatusbarText (RT Professional)

Description
Specifies the default text in the status bar.
Access in runtime: Read and write

Syntax
Object.StatusbarText[=STRING]

WinCC Professional V13 SP2 – Programming reference


1810 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

STRING
Optional A value or a constant that specifies the default text in the status bar.

StatusbarUseBackColor (RT Professional)

Description
Sets a background color for the status bar.
Access in runtime: Read and write

Syntax
Object.StatusbarUseBackColor[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The background color of the status bar is displayed.
FALSE: The background color of the status bar is not displayed.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1811
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

StatusbarVisible (RT Professional)

Description
Enables the display of the status bar of a control.
Access in Runtime: Read and write

Syntax
Object.StatusbarVisible[=BOOLEAN]

Object
Required A "ScreenItem" object with following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The status bar is displayed.
FALSE: The status bar is not displayed.

Style (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the line style of the selected object.
Access in runtime: Read and write

Syntax
Object.Style[=LineStyle]

Object
Required. A "ScreenItem" object with the following format:
● CircularArc
● EllipticalArc
● Line
● Polyline

WinCC Professional V13 SP2 – Programming reference


1812 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

LineStyle
Optional A value or a constant that specifies the line style. Value range from 0 to 4.
hmiLineStyleSolid (0): solid line
hmiLineStyleDash (1): broken line
hmiLineStyleDot (2): dotted line
hmiLineStyleDashDot (3): dash - dot line
hmiLineStyleDashDotDot (4): dash - dot - dot line
Default setting: hmiLineStyleSolid

StyleSettings (RT Professional)

Description
Defines the style in which the object is displayed.
Access in runtime: Read and write

Syntax
Object.StyleSettings[=WinCCStyle]

Object
Required. An object of the "ScreenItem" type with the following format:
● Button
● RoundButton
● WindowsSlider

WinCCStyle
Optional. A value or a constant that specifies the style in which the object is displayed.

User Defined Shows the object according to the respective settings.


Global Shows the object in a globally defined design.
Windows Style Shows the object in Windows style.

SwapFirstWithLastConnection (RT Professional)

Description
Specifies whether the text in the object is shown horizontally.
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1813
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.SwapFirstWithLastConnection[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "Connector".".

BOOLEAN
Optional TRUE, if the text in the object is shown horizontally.

See also
Connector (Page 1355)

3.5.5.13 Properties T (Panels, Comfort Panels, RT Advanced, RT Professional)

TableBackColor (RT Advanced)

Description
Determines the background color of the table cells of the given object.
Access in runtime: Read and write

Syntax
Object.TableBackColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● AlarmView
● RecipeView
● StatusForce
● TrendView
● UserView

Color
Optional A value or constant which determines the background color of the table cells.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

WinCC Professional V13 SP2 – Programming reference


1814 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TableColor (RT Professional)

Description
Specifies the background color of the rows.
You open a color selection dialog box with the button.
Access in runtime: Read and write

Syntax
Object.TableColor[=Color]

Object
Required. An object of the "ScreenItem" type with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

Color
Optional. A value or constant that specifies the background color of the table rows.

Comments
You can use the "RGB" function to define the colors in RGB format (red, green, blue). Enter
the corresponding decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBScript
color constants such as vbRed and vbGreen.

TableColor2 (RT Professional)

Description
Specifies the second background color of the rows.
You open a color selection dialog box with the button.
The settings are only active in Runtime if the "Row color 2" option is enabled. "Row color 1"
and "Row color 2" are then used alternately for the row background.
Access in runtime: Read and write

Syntax
Object.TableColor2[=Color]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1815
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. An object of the "ScreenItem" type with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

Color
Optional. A value or constant that specifies the second background color of the table rows.

Comments
You can use the "RGB" function to define the colors in RGB format (red, green, blue). Enter
the corresponding decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBScript
color constants such as vbRed and vbGreen.

TableForeColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the text color used in the table cells of the selected object.
Access in runtime: Read and write

Syntax
Object.TableForeColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● AlarmView
● OnlineTableControl
● RecipeView
● StatusForce
● TrendRulerControl
● UserArchiveControl
● UserView

Color
Optional A value or a constant that specifies the text color used in the table cells.

WinCC Professional V13 SP2 – Programming reference


1816 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

TableForeColor2 (RT Professional)

Description
Specifies the second font color.
You open a color selection dialog box with the button.
The settings are only active in Runtime if the "Row color 2" option is enabled. The "Row color
1" and "Row color 2" font colors are then used alternately.
Access in runtime: Read and write

Syntax
Object.TableForeColor2[=Color]

Object
Required. An object of the "ScreenItem" type with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

Color
Optional. A value or a constant that specifies the second font color used in the table cells.

Comments
You can use the "RGB" function to define the color in RGB format (red, green blue). Enter the
corresponding decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBS color
constants such as vbRed and vbGreen.

TableGridLineColor (RT Advanced)

Description
Determines the color of the gridlines in the table of the given object.
Access during runtime: Read and Write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1817
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.TableGridLineColor[=Color]

Object
Required. An object of the "ScreenItem" type with the format:
● RecipeView
● TrendView
● UserView
You have no access in runtime with the following format:
● StatusForce
● SysDiagControl

Color
Optional A value or constant which determines the color of the gridlines of the table.

Comments
You can use the "RGB" function to define the color in RGB format (red, green blue). Enter the
corresponding decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBScript
color constants such as vbRed and vbGreen.

TableHeaderBackColor (RT Advanced)

Description
Specifies the background color in the header of the table of the selected object.
Access in runtime: Read and write

Syntax
Object.TableHeaderBackColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● AlarmView
● RecipeView
● StatusForce
● TrendView
● UserView

WinCC Professional V13 SP2 – Programming reference


1818 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Color
Optional A value or a constant that specifies the background color in the header.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

TableHeaderForeColor (RT Advanced)

Description
Specifies the text color in the header of the table of the selected object.
Access in runtime: Read and write

Syntax
Object.TableHeaderForeColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● AlarmView
● RecipeView
● StatusForce
● TrendView
● UserView

Color
Optional A value or a constant that specifies the text color in the header.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

TagPrefix (RT Professional)

Description
Specifies a prefix for all tags used in the screen.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1819
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

A tag prefix can be assigned for a screen window. This prefix is then prefixed to all tags used
in the screen. In this way, a picture that is embedded in a picture window retains access to its
own tags while another accesses other tags.
The change to the tag prefix does not become effective until the screen is reloaded. This
happens automatically upon screen change; otherwise, the screen name must be reassigned.
The prefix is freely definable but must match the name of the structure tag.
Access in runtime: Read and write

Syntax
Object.TagPrefix[= STRING]

Object
Required. An object of the "ScreenItem" type with the following format:
● Screenwindow

STRING
Optional. A value or a constant that specifies the tag prefix.

Example
The "InOutput" screen should be displayed in the screen window. The "InOutput" screen
contains three I/O fields that are linked to a structure tag. The structure tag consists of the
elements IO1, IO2, IO3; one element for each I/O field.
Three such structure tags with the structure names Struct1, Struct2 and Struct3 are defined
in the project, for example.
In this case, the tag prefix is the structure name with a following period. For example, if you
specify Struct2. as the tag prefix (the period is necessary for addressing the elements of the
structure tags as structure elements with the correct syntax), the I/O fields in the "InOutput"
screen are linked to the elements of structure tag Struct2:
Tag prefix: "Struct2."
● Output value (first I/O field): EA1
● Output value (second I/O field): EA2
● Output value (third I/O field): EA3
The current tag binding in the screen window is therefore
● Output value (first I/O field): Struct2.EA1
● Output value (second I/O field): Struct2.EA2
● Output value (third I/O field): Struct2.EA3

WinCC Professional V13 SP2 – Programming reference


1820 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Tags (RT Professional)

Description
Returns an object of type "Tags".
Access during runtime: Read

Syntax
Object.Tags

Object
Necessary. An object of the "HMIRuntime" type.

Example
The following example accesses the tag "Tag1":

'VBS86
Dim objTag
Set objTag = HMIRuntime.Tags("Tag1")

See also
HMIRuntime (Page 1292)

Template (RT Professional)

Description
Specifies the template for displaying window content in the "Application window" object.
Access in runtime: Read and write

Syntax
Object.Template[=TemplateType]

Object
Required. An object of the "ScreenItem" type with the following format:
● ApplicationWindow

TemplateType
Optional. A value or a constant that specifies the template.
The following templates are possible depending on the property value:

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1821
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Window Contents = Global Script


● "GSC diagnostics"
The application window is supplied by applications of the Global Script. The results of the
diagnosis system are displayed.
● "GSC Runtime"
The application window is supplied by applications of the Global Script. The analysis results
regarding characteristics in Runtime are displayed.

Window Contents = Print Jobs


● "All Jobs":
The application window is supplied by the logging system. The available reports are
displayed as a list.
● "All Jobs - Context Menu":
The application window is supplied by the logging system. The available reports are
displayed as a list. The shortcut menu enables the selection of print options, display of a
print preview as well as a printout of the log.
● "Job Detail View":
The application window is supplied by the logging system. The available reports are
displayed in a selection menu. Detailed information is displayed for the selected report.
● "Selected Jobs - Context Menu":
The application window is supplied by the logging system. The available reports are
displayed as a list. This list only contains reports which you have activated the option "Mark
for print job list" in the "Print Job Properties" dialog. The shortcut menu enables the selection
of print options, display of a print preview as well as a printout of the log.

Text (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the labeling for the text field.
Access in runtime: Read and write

Syntax
Object.Text[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● TextField
● CheckBox
● ComboBox
● ListBox
● MultiLineEdit

WinCC Professional V13 SP2 – Programming reference


1822 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● OptionGroup
● RoundButton

STRING
Optional A value or a constant that specifies the labeling.

TextList (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Returns a list containing the output text actually to be output for each output value.
The assignments are dependent on the set list type. You define the list type with the "ListType"
property.
Access in runtime:
● RT Advanced: No access
● RT Professional: Read

Syntax
Object.TextList[=HmiObjectHandle]

Object
Required. A "ScreenItem" object with the following format:
● SymbolicIOField
You have no access in runtime with the following formats:
● Button

HmiObjectHandle
A list which contains the assignments between the output value and the output text actually to
be output.

TextOff (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the text that will be displayed in the "off" status of the selected object.
Access in runtime: Read and write

Syntax
Object.TextOff[=STRING]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1823
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● Button
● Switch
You have no access in runtime with the following formats:
● SymbolicIOField

STRING
Optional A value or a constant that specifies the labeling for the "off" status.

Comments
The property is only available if the referenced object "SymbolicIOField", Button" or "Switch"
is of the "Text" type.

TextOn (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the text that will be displayed in the "on" status of the selected object.
Access in runtime: Read and write

Syntax
Object.TextOn[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● Switch
You have no access in runtime with the following formats:
● Button
● SymbolicIOField

STRING
Optional A value or a constant that specifies the labeling for the "on" status.

Comments
The property is only available if the referenced object "SymbolicIOField", Button" or "Switch"
is of the "Text" type.

WinCC Professional V13 SP2 – Programming reference


1824 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TextOrientation (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the text direction (orientation) of the selected object.
Access in runtime:
● RT Advanced: No access
● RT Professional: Read/Write

Syntax
Object.TextOrientation[=TextOrientation]

Object
Required. An object of the "ScreenItem" type with the following format:
● Button
● IOField
● OptionGroup
● RoundButton
● SymbolicIOField
● TextField
● WindowSlider
You have no access in runtime with the following formats:
● CheckBox
● DateTimeField
● Switch

TextOrientation
hmiTextHorizontal (0): The text is shown horizontally.
hmiTextRotated90Degree (-1): The text is shown vertically and left justified.
hmiTextRotated270Degree (1): The text is shown vertically and right-justified.

ThumbBackColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the background color of the slider in the ""Slider" object.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1825
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.ThumbBackColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Slider
● WindowsSlider

Color
Optional A value or a constant that specifies the background color of the slider.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

TicksColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the hour markers on the face of the "Clock" object.
Access in runtime: Read and write

Syntax
Object.TicksColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Clock

Color
Optional A value or a constant that specifies the color of the hour markers.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBScript color constants such as vbRed and vbGreen.

WinCC Professional V13 SP2 – Programming reference


1826 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TickStyle (RT Professional)

Description
Specifies the scale display.
Access in runtime: Read and write

Syntax
Object.TickStyle[=SliderTickStyle]

Object
Required. A "ScreenItem" object with the following format:
● Slider
You have no access in runtime with the following formats:
● Clock

SliderTickStyle
hmiSliderTickStyleNone (0): The object has no scale.
hmiSliderTickStyleEffect1(1): The scale consists of main gradations only. The scale is black
on a white background.
hmiSliderTickStyleEffect2 (2): The scale consists of main gradations only. The scale is white
on a black background.
hmiSliderTickStyleNormal (3): The scale consists of simple gradations.

Comments
Because of automatic scaling, two scale marks may in some cases be positioned directly
adjacent to one another (this looks like a thicker scale mark). You can correct this effect by
slightly lengthening or shortening the slider object.
You you can also completely suppress the display of the scale ("WithAxes").

TimeAxisBeginTime(i) (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the start time for the display of the selected trend. The ""UseTimeRange(i)" and
"ShareTimeAxis" properties determine whether or not the information is evaluated.
Access in runtime: Read and write

Syntax
Object.TimeAxisBeginTime(i)[=DateTime]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1827
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● OnlineTrendControl
You have no access in runtime with the following format:
● TrendView

DateTime
Optional A value or a constant that specifies the start time for the display of the specified trend.

TimeAxisEndTime (RT Professional)

Description
Specifies the end time for the display of the selected trend. Whether or not the information is
evaluated depends on the "Autorange", "UseTimeRange(i)" and "ShareTimeAxis" properties.
Access in runtime: Read and write

Syntax
Object.TimeAxisEndTime[=DateTime]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTrendControl

DateTime
Optional A value or a constant that specifies the end time for the display of the specified trend.

TimeAxisLabel(i) (RT Professional)

Description
Specifies the labeling of the time axis. Whether or not the information is evaluated depends
on the "ConfigureTimeAxis(i)" property.
Access in runtime: Read and write

Syntax
Object.TimeAxisLabel(i)[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTrendControl

WinCC Professional V13 SP2 – Programming reference


1828 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

STRING
Optional A value or a constant that specifies the labeling of the time axis.

Comments
The parameter i indicates the number of the trend.

TimeAxisRange (RT Advanced)

Description
No access in runtime.

TimeAxisTimeFormat(i) (RT Professional)

Description
Specifies the format of the information along the time axis for the selected trend.
Access in runtime: Read and write

Syntax
Object.TimeAxisTimeFormat(i)[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTrendControl

STRING
Optional A value or a constant which defines the format for the time axis.

Comments
The parameter i indicates the number of the trend.

TimeBase (RT Professional)

Description
Specifies the time zone in which the time values will be displayed.
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1829
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.TimeBase[=TimeBase]

Object
Required A "ScreenItem" object with following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● UserArchiveControl

TimeBase
hmiTimeBaseLocalTimezone (0): Local time
hmiTimeBaseServerTimezone (1): Time zone of the server
hmiTimeBaseUTC (2): UTC (Universal Time Coordinated)
hmiTimeBaseProjectSetting (3): Project settings

Comments
Set the time mode in accordance with the computer settings on the properties page of the
computer in WinCC Explorer.

TimeColumnActualize (RT Professional)

Description
Specifies whether the values of the selected column are updated.
Access in runtime: Read and write

Syntax
Object.TimeColumnActualize[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

BOOLEAN
TRUE: The time column is actualized.
FALSE: The time column is not actualized. This setting can be useful when comparing tables.

WinCC Professional V13 SP2 – Programming reference


1830 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TimeColumnAdd (RT Professional)

Description
Creates a new time column.
Access in runtime: Read and write

Syntax
Object.TimeColumnAdd[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

STRING
Optional A value or constant which specifies a new time column.

TimeColumnAlignment (RT Professional)

Description
Defines the mode of alignment of the time column selected.
Access in runtime: Read and write

Syntax
Object.TimeColumnAlignment [=HorizontalAlignment]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

HorizontalAlignment

Value Description Explanation


0 Left The time column selected is displayed on the left.
1 Centered The time column selected is aligned to center.
2 Right The time column selected is displayed on the right.

See also
OnlineTableControl (Page 1409)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1831
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TimeColumnAlignment(i) (RT Professional)

Description
Specifies the alignment of the time column of a column pair i. The parameter i indicates the
number of the column pair.
Access in Runtime: Read and write

Syntax
Object.TimeColumnAlignment(i)[=AlignmentHorizontal]

Object
Required A "ScreenItem" object with the format "TableView".".

AlignmentHorizontal
hmiAlignmentLeft ( 0): The text is shown left justified.
hmiAlignmentCentered ( 1): The text is shown centered.
hmiAlignmentRight ( 2): The text is shown right justified.

See also
OnlineTableControl (Page 1409)

TimeColumnBackColor (RT Professional)

Description
Specifies the background color of the selected time column.
The setting is effective:
● When the option "in the colors of the value column" is not activated.
● When the "Font color" option is activated in the "Use column color" area of the "General"
tab.
Access in runtime: Read and write

Syntax
Object.TimeColumnBackColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

WinCC Professional V13 SP2 – Programming reference


1832 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Color
Optional A value or a constant that specifies the background color of the selected time column.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

TimeColumnBeginTime (RT Professional)

Description
Defines the start of the time range for a selected time column.
Access in runtime: Read and write

Syntax
Object.TimeColumnBeginTime[=DateTime]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

DateTime
Optional A value or a constant that specifies the starting time for the selected time column.

TimeColumnCaption (RT Professional)

Description
Defines the caption of the time column.
Access in runtime: Read and write

Syntax
Object.TimeColumnCaption[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1833
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

STRING
Optional A value or a constant that specifies the caption of the time column.

TimeColumnCount (RT Professional)

Description
Specifies the number of configured time columns.
Access in runtime: Read and write

Syntax
Object.TimeColumnCount[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

Int32
Optional A value or a constant that specifies the number of configured time columns.

TimeColumnDateFormat (RT Professional)

Description
Defines the date format for visualizing a selected time column.
Access in runtime: Read and write

Syntax
Object.TimeColumnDateFormat[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

STRING
The following date formats are available:

Value Explanation
dd.MM.yy Day.Month.Year, e.g., 24.12.13.
dd.yyyyd.MM Day.Month.Year, e.g., 24.12.2013.
dd/MM/yy Day/Month/Year, e.g., 24/12/13.
dd/MM/yyyy Day/Month/Year, e.g., 24/12/2013.

WinCC Professional V13 SP2 – Programming reference


1834 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TimeColumnEndTime (RT Professional)

Description
Defines the end of the time range of a selected time column.
Access in runtime: Read and write

Syntax
Object.TimeColumnBeginTime[=DateTime]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

DateTime
Optional A value or constant that specifies the end time.

TimeColumnForeColor (RT Professional)

Description
Specifies the font color of the selected time column.
The setting is effective:
● When the option "in the colors of the value column" is not activated.
● When the "Font color" option is activated in the "Use column color" area of the "General"
tab.
Access in runtime: Read and write

Syntax
Object.TimeColumnForeColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
OnlineTableControl

Color
Optional A value or a constant that specifies the font color of the selected time column.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1835
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

TimeColumnHideText (RT Professional)

Description
Sets text format for displaying the content of a time column.
Access in runtime: Read and write

Syntax
Object.TimeColumnHideText[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

BOOLEAN
TRUE: The content is not shown as a text.
FALSE: The content is shown as a text.

TimeColumnHideTitleText (RT Professional)

Description
Sets text format for displaying the time column header.
Access in runtime: Read and write

Syntax
Object.TimeColumnHideTitleText[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

BOOLEAN
TRUE: The header is not shown as text.
FALSE: The header is shown as text.

WinCC Professional V13 SP2 – Programming reference


1836 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TimeColumnIndex (RT Professional)

Description
References a configured time column. You can assign the values of other properties to a
specific time column by using the property.
Valid values for "TimeColumnIndex" are between 0 and "TimeColumnCount" minus 1. The
"TimeColumnCount" property indicates the number of configured time columns.

Syntax
Object.TimeColumnIndex[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

Int32
Optional A value or constant which references a configured time span.

TimeColumnLength (RT Professional)

Description
Specifies the width of a selected time column.
Access in runtime: Read and write

Syntax
Object.TimeColumnLength[=Int32]

Object
Required. A "ScreenItem" object with the format:
● OnlineTableControl

Int32
Optional A value or a constant that specifies the width of the selected time column.

TimeColumnMeasurePoints (RT Professional)

Description
Defines the number of measurement points to be displayed in the time column selected.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1837
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.TimeColumnMeasurePoints[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

Int32
Optional A value or constant that specifies the number of measurement points.

TimeColumnName (RT Professional)

Description
Specifies the name of a selected time column.
Access in runtime: Read and write

Syntax
Object.TimeColumnName[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

STRING
Optional A value or a constant that specifies the name of the selected time column.

TimeColumnRangeType (RT Professional)

Description
Defines the time range setting for the time column selected.
Access in Runtime: Read and write

Syntax
Object.TimeColumnRangeType[=TimeRangeMode]

Object
Required A "ScreenItem" object with following format:
● OnlineTableControl

WinCC Professional V13 SP2 – Programming reference


1838 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TimeRangeMode

Value Description Explanation


0 Time range Defines the start time and time range of the time column.
1 Start to end time Defines the start and end time for the time column.
2 Number of measurement Defines the start time and the number of measurement points
points for the time column.

TimeColumnRemove (RT Professional)

Description
Removes the selected time column from the list.
Access in runtime: Read and write

Syntax
Object.TimeColumnRemove[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

STRING
Optional Removes the selected time column from the list.

TimeColumnRename (RT Professional)

Description
Changes the name of the time column which is referenced by the "TimeColumnIndex" property.
With "TimeColumnRename" you also dynamize the "TimeColumnName" property.
Access in runtime: Read and write

Syntax
Object.TimeColumnRename[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1839
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

STRING
Optional Changes the name of the time column which is referenced by the "TimeColumnIndex"
property.

TimeColumnRepos (RT Professional)

Description
Repositions the order of time columns and of corresponding value columns. "Up" and "Down"
move the time column selected up or down in the list. This moves the time column and
corresponding value columns in the table towards the front or towards the back.
Access in runtime: Read and write

Syntax
Object.TimeColumnRepos[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

Int32
Optional Value or constant that changes the order of time columns and corresponding value
columns.

TimeColumnShowDate (RT Professional)

Description
Enables the display of the date and time in the time column selected.
Access in runtime: Read and write

Syntax
Object.TimeColumnShowDate[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

BOOLEAN
TRUE: The date and the time are displayed. The date format is defined in the "Date format"
field.
FALSE: The date is not displayed. Only the time is displayed.

WinCC Professional V13 SP2 – Programming reference


1840 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TimeColumnShowIcon (RT Professional)

Description
Enables the display of time column contents as icon.
Access in runtime: Read and write

Syntax
Object.TimeColumnActualize[=BOOLEAN]

Object
Required. An object of the "ScreenItem" type with the format:
● OnlineTableControl

BOOLEAN
TRUE: The content is shown as a symbol.
FALSE: The content is not shown as an icon.

TimeColumnShowTitleIcon (RT Professional)

Description
Specifies whether the header is shown as a symbol.
Access in runtime: Read and write

Syntax
Object.TimeColumnShowTitleIcon[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

BOOLEAN
TRUE: The header is shown as a symbol.
FALSE: The header is not shown as a symbol.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1841
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TimeColumnSort (RT Professional)

Description
Specifies how the time column referenced in "TimeColumnIndex" is sorted.
Access in Runtime: Read and write

Syntax
Object.TimeColumnSort[=SortMode]

Object
Required A "ScreenItem" object with following format:
● OnlineTableControl

SortMode

Value Description Explanation


0 No No sorting
1 Ascending Ascending order, starting at the lowest value.
2 Descending Descending order, starting at the highest value.

TimeColumnSortIndex (RT Professional)

Description
Specifies the sorting order of the time column referenced in "TimeColumnIndex". If you set the
value to "0", the sorting criterion is removed in "TimeColumnSort".

Syntax
Object.TimeColumnSortIndex[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

Int32
Optional Value or constant that specifies the sorting order of the time column referenced in
"TimeColumnIndex". If you set the value to "0", the sorting criterion is removed in
"TimeColumnSort".

WinCC Professional V13 SP2 – Programming reference


1842 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TimeColumnTimeFormat (RT Professional)

Description
Defines the time format for visualizing a selected time column.
Access in runtime: Read and write

Syntax
Object.TimeColumnTimeFormat[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

STRING

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.

TimeColumnTimeRangeBase (RT Professional)

Description
Specifies the time unit for calculating the time range.
Access in Runtime: Read and write

Syntax
Object.TimeColumnTimeRangeBase[=TagLoggingTimeUnit]

Object
Required A "ScreenItem" object with following format:
● OnlineTableControl

TagLoggingTimeUnit

Value Description
500 500 ms
1000 1 second
60000 1 minute

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1843
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Value Description
3600000 1 hour
86400000 1 day

TimeColumnTimeRangeFactor (RT Professional)

Description
Defines the factor for calculating the time range. Only integer factors are valid.
Access in runtime: Read and write

Syntax
Object.TimeColumnTimeRangeFactor[=Int16]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

Int16
Optional A value or a constant that specifies the factor to determine the time range.

TimeColumnUseValueColumnColors (RT Professional)

Description
Defines whether the selected time column will be displayed in the value column colors.
Access in runtime: Read and write

Syntax
Object.TimeColumnUseValueColumnColors[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

BOOLEAN
TRUE: The selected time column is displayed in the colors of the value column. The settings
in the "Font color" and "Background color" fields are disabled.
FALSE: The selected time column is displayed in the colors which are specified in the "Font
color" and "Background color" fields.

WinCC Professional V13 SP2 – Programming reference


1844 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TimeColumnVisible (RT Professional)

Description
The list shows the time columns you created. Select the time columns to be displayed in the
table from the list.
Click a time column entry in the list to adapt the properties and to define the time range of the
time column.
Access in Runtime: Read and write

Syntax
Object.TimeColumnVisible[=BOOLEAN]

Object
Required A "ScreenItem" object with following format:
● OnlineTableControl

BOOLEAN
Optional. TRUE if the time column is displayed in the table.

Timestamp (RT Professional)

Description
Returns the time stamp of the last read access of a tag in local time as DATE.
Access in Runtime: Read

Syntax
Object.TimeStamp

Object
Required A "Tag" object.

Comments
To show the TimeStamp property in plain text, use the VBS function "FormatDateTime(Date[,
NamedFormat])". The output is dependent on the language setting. To adjust the language,
use the VBS function "SetLocale´()".
If you want to return the time stamp sorted by date, day and time, use the NamedFormat
parameter or the VBS functions like Year, WeekDay, Day, Hour, Minute, Second. The name
of a week day can be obtained using the VBS function WeekdayName.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1845
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Examples
The following example issues the time stamp of the tag "Tag11" with the aid of the function
"FormatDateTime":

'VBS87
Dim objTag
Dim lngCount
lngCount = 0
Set objTag = HMIRuntime.Tags("Tag11")
objTag.Read
SetLocale("en-gb")
MsgBox FormatDateTime(objTag.TimeStamp) 'Output: e.g. 06/08/2002 9:07:50
MsgBox Year(objTag.TimeStamp) 'Output: e.g. 2002
MsgBox Month(objTag.TimeStamp) 'Output: e.g. 8
MsgBox Weekday(objTag.TimeStamp) 'Output: e.g. 3
MsgBox WeekdayName(Weekday(objTag.TimeStamp)) 'Output: e.g. Tuesday
MsgBox Day(objTag.TimeStamp) 'Output: e.g. 6
MsgBox Hour(objTag.TimeStamp) 'Output: e.g. 9
MsgBox Minute(objTag.TimeStamp) 'Output: e.g. 7
MsgBox Second(objTag.TimeStamp) 'Output: e.g. 50
For lngCount = 0 To 4
MsgBox FormatDateTime(objTag.TimeStamp, lngCount)
Next
'lngCount = 0: Output: e.g. 06/08/2002 9:07:50
'lngCount = 1: Output: e.g. 06 August 2002
'lngCount = 2: Output: e.g. 06/08/2002
'lngCount = 3: Output: e.g. 9:07:50
'lngCount = 4: Output: e.g. 9:07

The following example issues the time stamp of the tag "Tag1":

'VBS88
Dim objTag
Set objTag = HMIRuntime.Tags("Tag1")
objTag.Read
MsgBox objTag.TimeStamp

See also
Tag (Page 1310)

TitleCut (RT Professional)

Description
Specifies whether the content of the fields in a title bar is to be shortened if the column is too
narrow.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1846 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.TitleCut[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
Optional TRUE if the column headers in the title bar are shortened if the column is too narrow.

TitleDarkShadowColor (RT Professional)

Description
Specifies the color for the dark side of the shading.
You open a color selection with the button. The settings are only active if the "Shading Color"
option is enabled.
Access in runtime: Read and write

Syntax
Object.TitleDarkShadowColor[=Color]

Object
Required. An object of the "ScreenItem" type with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

Color
Optional. A value or a constant that specifies the color for the dark side of the shading.

Comments
You can use the "RGB" function to define the colors in RGB format (red, green, blue). Enter
the corresponding decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBScript
color constants such as vbRed and vbGreen.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1847
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TitleForeColor (RT Professional)

Description
Specifies the font color of the table header for the selected status.
You open a color selection dialog box with the button.
Access in runtime: Read and write

Syntax
Object.TitleForeColor[=Color]

Object
Required. An object of the "ScreenItem" type with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

Color
Optional. A value or constant that specifies the font color in the title bar of the table.

Comments
You can use the "RGB" function to define the colors in RGB format (red, green, blue). Enter
the corresponding decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBScript
color constants such as vbRed and vbGreen.

TitleGridLineColor (RT Professional)

Description
Specifies the color of the separation lines in the title bar of the table.
You open a color selection dialog box with the button.
Access in runtime: Read and write

Syntax
Object.TitleGridLineColor[=Color]

WinCC Professional V13 SP2 – Programming reference


1848 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. An object of the "ScreenItem" type with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

Color
Optional. A value or a constant that specifies the color of the separation lines in the title bar of
the table.

Comments
You can use the "RGB" function to define the colors in RGB format (red, green, blue). Enter
the corresponding decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBScript
color constants such as vbRed and vbGreen.

TitleLightShadowColor (RT Professional)

Description
Specifies the color for the light side of the shading.
You open a color selection dialog box with the button. The setting is only effective when the
"Shading color" option is activated.
Access in runtime: Read and write

Syntax
Object.TitleLightShadowColor[=Color]

Object
Required. An object of the "ScreenItem" type with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

Color
Optional. A value or a constant that specifies the color for the light side of the shading.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1849
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
You can use the "RGB" function to define the colors in RGB format (red, green, blue). Enter
the corresponding decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBScript
color constants such as vbRed and vbGreen.

TitleSort (RT Professional)

Description
Defines how to trigger sorting by column title. The "Auto-scrolling" option must be disabled to
sort by column title.
Access in Runtime: Read and write

Syntax
Object.TitleSort[=GridSortTrigger]

Object
Required An object of the type "ScreenItem" with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

GridSortTrigger

Value Description Explanation


0 No Sorting by column header is disabled.
1 With click Sorting is triggered by clicking in the column header.
2 With double-click Sorting is triggered by double-clicking in the column title.

TitleStyle (RT Professional)

Description
Specifies whether to set a shading color for the table header.
Access in Runtime: Read and write

Syntax
Object.TitleStyle[=GridHeaderStyle]

WinCC Professional V13 SP2 – Programming reference


1850 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required A "ScreenItem" object with following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

GridHeaderStyle

Value Description Explanation


0 Flat Disables the use of shading colors. Flat header style.
1 Button Enables the use of shading colors. 3D representation of the header.

Toggle (RT Professional)

Description
Specifies whether the selected object engages after it has been operated in Runtime.
Access in runtime: Read and write

Syntax
Object.Toggle[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Button
● RoundButton

BOOLEAN
Optional TRUE, if the selected object engages after it has been operated in Runtime.

Tolerance (RT Professional)

Description
Specifies the limit for the disk space view as of which a deviation will be reported.
Access in runtime: Read and write

Syntax
Object.Tolerance[=Int32]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1851
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● DiscSpaceView

Int32
Optional A value or a constant that specifies the limit for the disk space view as of which a
deviation will be reported.

ToleranceColor (RT Professional)

Description
Specifies the colors in which the bars of the storage space display will be shown as soon as
the tolerance range is exceeded.
Access in runtime: Read and write

Syntax
Object.ToleranceColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● DiscSpaceView

Color
Optional A value or a constant that specifies the colors in which the bars of the storage space
display will be shown as soon as the tolerance range is exceeded.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

ToleranceLowerLimit (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Sets the low limit for tolerance 1.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1852 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.ToleranceLowerLimit[=DOUBLE]

Object
Required. A "ScreenItem" object with the format:
● Bar

DOUBLE
Optional A value or a constant that specifies the low limit for tolerance 1.

Comments
The following values will be defined via the properties "ToleranceLowerLimit",
"ToleranceLowerLimitColor" and "ToleranceLowerLimitRelative":
● Limit
● Representation upon reaching the limit
● Type of evaluation

ToleranceLowerLimitColor (RT Professional)

Description
Specifies the color for the lower limit "ToleranceLowerLimit"".
Access in runtime: Read and write

Syntax
Object.ToleranceLowerLimitColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Bar

Color
Optional A value or a constant that specifies the color for the lower limit "ToleranceLowerLimit"
".

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1853
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

The "ToleranceLowerLimitEnabled" property must have the value TRUE if the bar color is to
change once the limit has been reached.

ToleranceLowerLimitEnabled (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the "ToleranceLowerLimit" limit is monitored. The limit, the display when the
limit has been reached, and the type of evaluation are set with the properties
"ToleranceLowerLimit", "ToleranceLowerLimitColor" and "ToleranceLowerLimitRelative".
Access in runtime: Read and write

Syntax
Object.ToleranceLowerLimitEnabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional TRUE, if the "ToleranceLowerLimit" limit is monitored.

ToleranceLowerLimitRelative (RT Professional)

Description
Specifies whether the lower limit "ToleranceLowerLimit" is evaluated as a percentage or as an
absolute value.
Access in runtime: Read and write

Syntax
Object.ToleranceLowerLimitRelative[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional
TRUE: The lower limit "ToleranceLowerLimit" is evaluated as a percentage.
FALSE: The lower limit "ToleranceLowerLimit" is evaluated as an absolute value.

WinCC Professional V13 SP2 – Programming reference


1854 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ToleranceUpperLimit (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Sets the high limit for tolerance 1.
Access in runtime: Read and write

Syntax
Object.ToleranceUpperLimit[=DOUBLE]

Object
Required. A "ScreenItem" object with the format:
● Bar

DOUBLE
Optional A value or a constant that specifies the high limit for tolerance 1.

Comments
The following values will be specified via the properties "ToleranceUpperLimit",
"ToleranceUpperLimitColor" and "ToleranceUpperLimitRelative":
● Limit
● Representation upon reaching the limit
● Type of evaluation

ToleranceUpperLimitColor (RT Professional)

Description
Specifies the color for the upper limit "ToleranceUpperLimit".
Access in runtime: Read and write

Syntax
Object.ToleranceUpperLimitColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Bar

Color
Optional A value or a constant that specifies the color for the upper limit
"ToleranceUpperLimit"".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1855
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

ToleranceUpperLimitEnabled (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the "ToleranceUpperLimit"" limit is to be monitored.
Access in runtime: Read and write

Syntax
Object.ToleranceUpperLimitEnabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional TRUE, if the "ToleranceUpperLimit" limit is to be monitored.

Comments
The following values will be specified with the properties "ToleranceUpperLimit",",
"ToleranceUpperLimitColor" and "ToleranceUpperLimitRelative":
● Limit
● Representation upon reaching the limit
● Type of evaluation

ToleranceUpperLimitRelative (RT Professional)

Description
Specifies whether the higher limit "ToleranceUpperLimit"" is to be evaluated as a percentage
or as an absolute value.
Access in runtime: Read and write

Syntax
Object.ToleranceUpperLimitRelative[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


1856 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional
TRUE: The higher limit "ToleranceUpperLimit" is evaluated as a percentage.
FALSE: The higher limit "ToleranceUpperLimit" is evaluated as an absolute value.

ToolbarAlignment (RT Professional)

Description
Specifies the position of the toolbar.
Access in runtime: Read and write

Syntax
Object.ToolbarAlignment[=ToolbarPosition]

Object
Required. An object of the "ScreenItem" type with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl
You have no access in runtime with the following format:
● SysDiagControl

ToolbarPosition
Optional. A value or a constant that specifies the position of the toolbar.

ToolbarBackColor (RT Professional)

Description
Background color - ToolbarBackColor
Specifies the background color of the toolbar. Open the "Color selection" dialog by clicking the
button.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1857
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

The background color you configured is only displayed if the "Display" option is enabled.
Access in runtime: Read and write

Syntax
Object.ToolbarBackColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

Color
Optional A value or a constant that specifies the background color of the toolbar.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

ToolbarButtonActive (RT Professional)

Description
Activates a button function in Runtime. Clicking the button in Runtime triggers the
corresponding function.
Access in runtime: Read and write

Syntax
Object.ToolbarButtonActive[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl

WinCC Professional V13 SP2 – Programming reference


1858 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The function connected to the key is active.
FALSE: The function connected to the key is not active. You can connect your own functions
to the key by local scripts.

ToolbarButtonAdd (RT Professional)

Description
Creates a new, user-defined key function.
You can change the name assigned by WinCC in the "Object name" field.
Access in runtime: Read and write

Syntax
Object.ToolbarButtonAdd[=STRING]

Object
Required. An object of the "ScreenItem" type with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

STRING
Optional. A value or a constant that specifies the name of the new key function.

ToolbarButtonBeginGroup (RT Professional)

Description
Inserts a leading separator (vertical line) for the selected button function on the toolbar. These
separators can be used to group the icons of the button functions.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1859
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.ToolbarButtonBeginGroup[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The separator is inserted in front of the selected key function.
FALSE: The separator is not inserted in front of the selected key function.

ToolbarButtonCount (RT Professional)

Description
Specifies the number of buttons in the toolbar.
Access in runtime: Read and write

Syntax
Object.ToolbarButtonCount[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

Int32
Optional A value or a constant that specifies the number of buttons in the toolbar.

WinCC Professional V13 SP2 – Programming reference


1860 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ToolbarButtonEnabled (RT Professional)

Description
Enables operation of custom toolbar buttons.
Access in runtime: Read and write

Syntax
Object.ToolbarButtonEnabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
Optional TRUE if operation is enabled for the selected user-defined key in the toolbar.

ToolbarButtonHotKey (RT Professional)

Description
Specifies the hotkey for the selected button function.
You create or edit a hotkey by clicking in the "Hotkey" field and pressing the key or key shortcut
required.
Access in runtime: Read and write

Syntax
Object.ToolbarButtonHotKey[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1861
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● TrendRulerControl
● UserArchiveControl

Int32
Optional A value or a constant that specifies the hotkey for the selected key function.

ToolbarButtonID (RT Professional)

Description
Specifies a unique ID number for the selected button function.
WinCC sets this read only ID.
Access in runtime: Read and write

Syntax
Object.ToolbarButtonID[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

Int32
Optional A value or constant that specifies the ID number of the selected key function.

ToolbarButtonIndex (RT Professional)

Description
References a button function.
Using this attribute you can assign the values of other attributes to a specific button function.
Values between 0 and "ToolbarButtonCount" minus 1 are valid for "ToolbarButtonIndex". The
attribute "ToolbarButtonCount" specifies the number of configurable key functions.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1862 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.ToolbarButtonIndex[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

Int32
Optional A value or a constant that specifies the number of the selected key function.

ToolbarButtonLocked (RT Professional)

Description
Enables/disables display of the locked, pressed state for a user-defined toolbar button.
Access in runtime: Read and write

Syntax
Object.ToolbarButtonLocked[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
Optional TRUE if the pressed state is displayed for the selected user-defined button in the
toolbar.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1863
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ToolbarButtonName (RT Professional)

Description
Specifies the name of the selected user-defined button.
You can change the name of a user-defined button. The "ToolbarButtonName" property for
user-defined buttons can be dynamized with the "ToolbarButtonRename" property.
Access in runtime: Read and write

Syntax
Object.ToolbarButtonName[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

STRING
Optional A value or a constant that specifies the name of the selected user-defined button.

ToolbarButtonAuthorization (RT Professional)

Description
Shows the authorization for a button function selected. You can edit the authorization using
the selection button. The authorizations are configured in the user administration.

See also
UserArchiveControl (Page 1499)
TrendRulerControl (Page 1480)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)
OnlineTrendControl (Page 1417)

WinCC Professional V13 SP2 – Programming reference


1864 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ToolbarButtonRemove (RT Professional)

Description
Removes the selected user-defined button.
Access in runtime: Read and write

Syntax
Object.ToolbarButtonRemove[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

STRING
Optional A value or a constant that specifies the name of the user-defined button to be
removed.

ToolbarButtonRename (RT Professional)

Description
Returns the name of the user-defined toolbar button that is being referenced via the
"ToolbarButtonID" property.
With "ToolbarButtonRename" you also dynamize the "ToolbarButtonName" property.
Access in Runtime: Read and write

Syntax
Object.ToolbarButtonRename[=STRING]

Object
Required. An object of the "ScreenItem" type with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1865
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

STRING
Optional. A value or a constant that specifies the new name of the selected user-defined button.

ToolbarButtonRepos (RT Professional)

Description
Changes the sorting order of user-defined key functions in the toolbar.
"Up" and "Down" move the button function selected up or down in the list. This moves the
button function in the toolbar of a Control towards the front or towards the back.
Access in runtime: Read and write

Syntax
Object.ToolbarButtonRepos[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

Int32
Optional A value or a constant that specifies the position of the selected user-defined button
in the toolbar.

ToolbarButtonTooltipText (RT Professional)

Description
Specifies the tooltip text for the user-defined button in the toolbar.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1866 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.ToolbarButtonTooltipText[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

STRING
Optional A value or a constant that specifies the tooltip text for the selected user-defined button.

ToolbarButtonUserDefined (RT Professional)

Description
Specifies whether the project engineer has added the toolbar button as new user-defined
button.
Access in runtime: Read and write

Syntax
Object.ToolbarButtonUserDefined[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

Boolean
TRUE: The key of the toolbar is customized.
FALSE: The key of the toolbar is specified by the system.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1867
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ToolbarShowTooltips (RT Professional)

Description
Enables the display of tooltips for the button functions in Runtime. The property can be
dynamized with the ToolbarShowTooltips name. The property for specifying the tooltip text is
"ToolbarButtonTooltipText".
Access in runtime: Read and write

Syntax
Object.ToolbarShowTooltips[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The tooltips are displayed.
FALSE: The tooltips are not displayed.

ToolbarUseBackColor (RT Professional)

Description
Enables the display of the background color for a toolbar.
Access in runtime: Read and write

Syntax
Object.ToolbarUseBackColor[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl

WinCC Professional V13 SP2 – Programming reference


1868 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The background color of the toolbar is displayed.
FALSE: The background color of the toolbar is not displayed.

ToolbarUseHotKeys (RT Professional)

Description
Activates the hotkeys for button functions in Runtime. You insert the hotkeys for button
functions in the "Hotkey" field.
Access in runtime: Read and write

Syntax
Object.ToolbarUseHotKeys[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The hotkeys are activated.
FALSE: The hotkeys are not activated.

ToolbarVisible (RT Professional)

Description
Specifies whether the toolbar of the control is displayed.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1869
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.ToolbarVisible[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● FunctionTrendControl
● OnlineTableControl
● OnlineTrendControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The toolbar is displayed.
FALSE: The toolbar is not displayed.

ToolTipText (RT Advanced, RT Professional)

Description
Specifies the tooltip text.
Access in Runtime: Read and write

Syntax
Object.ToolTipText[=STRING]

ToolTipText
Required. An object of the "ScreenItem" type with the format:
● Bar
● Button
● CheckBox
● Circle
● CircleSegment
● CircularArc
● ComboBox
● Ellipse
● EllipseSegment
● EllipticalArc

WinCC Professional V13 SP2 – Programming reference


1870 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● GraphicIOField
● GraphicView
● IOField
● Line
● ListBox
● MultiLineEdit
● OptionGroup
● Polygon
● Polyline
● Rectangle
● RoundButton
● StatusForce
● Switch
● SymbolicIOField
● TextField
● TubeArcObject

STRING
Optional A value or a constant that specifies the tooltip text.

Top (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the value of the Y coordinate of the selected object.
Access in runtime: Read and write

Syntax
Object.Top[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● AlarmView
● ApplicationWindow
● Bar
● BatteryView
● Button

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1871
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● ChannelDiagnose
● CheckBox
● Circle
● CircleSegment
● CircularArc
● Clock
● ComboBox
● DateTimeField
● DiscSpaceView
● Ellipse
● EllipseSegment
● EllipticalArc
● FunctionTrendControl
● Gauge
● GraphicIOField
● GraphicView
● HTML-Browser
● IOField
● Line
● ListBox
● MediaPlayer
● MultiLineEdit
● OnlineTableControl
● OnlineTrendControl
● OptionGroup
● PLCCodeViewer
● Polygon
● Polyline
● ProtectedAreaNameView
● RangeLabelView
● RangeQualityView
● RecipeView
● Rectangle
● RoundButton
● Screenwindow

WinCC Professional V13 SP2 – Programming reference


1872 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● Slider
● SmartClientView
● StatusForce
● Switch
● SymbolLibrary
● SymbolicIOField
● SysDiagControl
● TextField
● TrendRulerControl
● TrendView
● TubeArcObject
● TubeDoubleTeeObject
● TubeTeeObject
● Tubepolyline
● UserArchiveControl
● UserView
● WLanQualityView
● WindowsSlider
● ZoneLabelView
● ZoneQualityView
You have no access in runtime with the following format:
● S7GraphOverview

Int32
Optional A value or a constant that contains the value of the Y coordinate in pixels (measured
from the top left edge of the screen).

Comments
The Y coordinate refers to the top left corner of the rectangle that surrounds the object. The
screen limits are also monitored in runtime. If the assigned coordinate value exceeds the
display size, the user-defined function is interrupted with an error message.

TopOffset (RT Professional)

Description
Specifies the distance between the screen and the top screen window margin.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1873
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

The picture is displayed as a cutout of the picture window. The picture scroll bars are located
at the left and upper edge of the picture. If you wish to display the screen in the screen window
with horizontal and vertical offset of the screen scroll bars, use the
"HorizontalScrollBarPosition" and "VerticalScrollBarPosition properties for the offset.
Access in runtime: Read and write

Syntax
Object.TopOffset[=Int32]

Object
Required. An object of the "ScreenItem" type with the following format:
● Screenwindow

Int32
Optional. A value or a constant that specifies the distance between the screen and the top
screen window margin.

Total (RT Professional)

Description
Specifies the memory capacity.
Access in runtime: Read and write

Syntax
Object.Total[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● DiskSpaceView

DOUBLE
Optional A value or a constant that specifies the memory capacity.

Transparency (RT Professional)

Description
Defines the object transparency in percent.
0 = no transparency; 100 = complete transparency (invisible).
The text and fields of the graphic objects are only transparent with "100."

WinCC Professional V13 SP2 – Programming reference


1874 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

In runtime, a completely transparent object (invisible) is also functional.


Access in runtime: Read and write

Syntax
Object.Transparency[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Bar
● Button
● CheckBox
● Circle
● CircleSegment
● CircularArc
● Clock
● ComboBox
● Ellipse
● EllipseSegment
● EllipticalArc
● Gauge
● GraphicIOField
● GraphicView
● IOField
● Line
● ListBox
● MultiLineEdit
● OptionGroup
● Polygon
● Polyline
● Rectangle
● RoundButton
● Slider
● SymbolicIOField
● TextField
● TubeArcObject
● TubeDoubleTeeObject

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1875
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● TubeTeeObject
● Tubepolyline
● WindowsSlider

Int32
Optional A value or constant that specifies the transparency of the object in percent.

TransparentColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies which color of the allocated graphic (*.bmp, *dib) of the specified object will be set
to "transparent".
The "UseTransparentColor" property must have the value TRUE so that the color will be shown
as transparent.
Access in runtime: Read and write

Syntax
Object.TransparentColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● GraphicView
● GraphicIOField

Color
Optional A value or a constant that specifies the color that will be shown transparent.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

TransparentColorDeactivatedPicture (RT Professional)

Description
Sets the color of the assigned bitmap object to "transparent" for the "disabled" status.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1876 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.TransparentColorDeactivatedPicture[=Color]

Object
Required. A "ScreenItem" object with the following format:
● RoundButton

Color
Optional A value or a constant that specifies which color of the allocated bitmap object will be
set to transparent" for the status "disabled".

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.
The "PicDeactUseTransColor" property must have the value TRUE so that the color can be
set to "transparent".

TransparentColorPictureOff (RT Professional)

Description
Specifies which color of the allocated bitmap object will be set to transparent" for the "off"
status.
Access in runtime: Read and write

Syntax
Object.TransparentColorPictureOff[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Button
● RoundButton

Color
Optional A value or a constant that specifies which color of the allocated bitmap object will be
set to transparent" for the "off" status.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1877
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

TransparentColorPictureOn (RT Professional)

Description
Specifies which color of the allocated bitmap object will be set to transparent" for the "on"
status.
Access in runtime: Read and write

Syntax
Object.TransparentColorPictureOn[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Button
● RoundButton

Color
Optional A value or a constant that specifies which color of the allocated bitmap object will be
set to "transparent" for the "on" status.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.
The "PicDownUseTransColor" property must have the value TRUE so that the color can be
set to "transparent".

TrendActualize (RT Professional)

Description
Enables the update of a selected trend.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1878 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.TrendActualize[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

BOOLEAN
TRUE: The selected trend is always actualized.
FALSE: The selected trend is not actualized. This setting is useful when a logged trend is
compared with a current trend.

TrendAdd (RT Professional)

Description
Creates a new trend.
Access in runtime: Read and write

Syntax
Object.TrendAdd[=STRING]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl
● OnlineTrendControl

STRING
Optional. The name of the new trend.

TrendBeginTime (RT Professional)

Description
Defines the start time of the time range for data transfer to the selected trend.
Access in runtime: Read and write

Syntax
Object.TrendBeginTime[=DateTime]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1879
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

DateTime
Optional Defines the start time for data supply for the selected trend.

TrendColor (RT Professional)

Description
Specifies or returns the object color.
The trend indicator shows the trend (rising or falling) in the measurement value to be monitored
with a small arrow. In order to activate the trend display, the "Trend" property must be set to
"TRUE".
Access in runtime: Read and write

Syntax
Object.TrendColor[=Color]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl
● OnlineTrendControl

Color
Optional. A value or a constant that specifies the color of the object.

Comments
You can use the "RGB" function to define the color in RGB format (red, green blue). Enter the
corresponding decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBS color
constants such as vbRed and vbGreen.

TrendCount (RT Professional)

Description
Specifies the number of configured trends.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1880 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.TrendCount[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

Int32
Optional A value or a constant that specifies the number of trends in the selected object.

TrendEndTime (RT Professional)

Description
Defines the end of the time range for data connections of a selected trend.
Access in runtime: Read and write

Syntax
Object.TrendEndTime[=DateTime]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

DateTime
Optional Specifies the end time for data supply for the selected trend.

TrendExtendedColorSet (RT Professional)

Description
Enables configuration of the point and fill colors and the display of colors in Runtime.
Access in runtime: Read and write

Syntax
Object.TrendExtendedColorSet[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1881
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

BOOLEAN
TRUE: The settings in the "Point color" and "Fill color" fields are configurable and effective in
Runtime.
FALSE: The settings in the "Point color" and "Fill color" fields are configurable and not effective
in Runtime.

See also
FunctionTrendControl (Page 1373)
OnlineTrendControl (Page 1417)

TrendFill (RT Professional)

Description
Specifies if the area beneath the trend is to be filled.
Access in runtime: Read and write

Syntax
Object.TrendFill[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

BOOLEAN
TRUE: The area beneath the trend is shown filled. f the "Advanced" option is disabled, the
trend color is used as fill color.
FALSE: The trend is not shown filled.

TrendFillColor (RT Professional)

Description
Defines the fill color of the trend.

WinCC Professional V13 SP2 – Programming reference


1882 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

The settings are only active if the "Filled" option is enabled. Open the "Color selection" dialog
by clicking the button.
The settings are only active if the "Advanced" option is enabled.
Access in runtime: Read and write

Syntax
Object.TrendFillColor[=Color]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl
● OnlineTrendControl

Color
Optional. A value or a constant that specifies the fill color of the selected trend.

Comments
You can use the "RGB" function to define the color in RGB format (red, green blue). Enter the
corresponding decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBS color
constants such as vbRed and vbGreen.

TrendIndex (RT Professional)

Description
References a configured trend. You can assign the values of other properties to a specific
trend using this property. The index must always be set before you change the properties of
a trend in runtime.
Values of between 0 and "TrendCount" minus 1 are valid for "TrendIndex". The property
"TrendCount" specifies the number of configured trends.
Access in runtime: Read and write

Syntax
Object.TrendIndex[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1883
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int32
Optional A value or a constant that specifies the number of the selected trend.

TrendIndicatorColor (RT Professional)

Description
Specifies the color for the trend indicator. The trend indicator represents the tendency (rising
or falling) of the measurement value that is to be monitored with a small arrow. To activate the
trend indicator, the property "ShowTrendIndicator" must have the value "TRUE".
Access in runtime: Read and write

Syntax
Object.TrendIndicatorColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Bar

Color
Optional A value or a constant that specifies the color of the trend indicator.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

TrendLabel (RT Professional)

Description
Defines the label of the trend selected. The label is displayed in runtime if the value at the
"UseTrendNameAsLabel" attribute is "FALSE".
Access in runtime: Read and write

Syntax
Object.TrendLabel[=STRING]

WinCC Professional V13 SP2 – Programming reference


1884 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl
● OnlineTrendControl

STRING
Optional. A value or a constant that specifies the label of the selected trend.

TrendLineStyle (RT Professional)

Example
Defines the line style for trend visualization.
Access in Runtime: Read and write

Syntax
Object.TrendLineStyle[=LineStyle]

Object
Required. An object of the "ScreenItem" type with the format:
● FunctionTrendControl
● OnlineTrendControl

LineStyle

Value Description Explanation


0 Solid The trend is visualized as solid line.
1 Dashed The trend is visualized as dashed line.
2 Dots The trend is visualized as dotted line.
3 Dash dot The trend is visualized as dot-dash line.
4 Dash Dot Dot The trend is visualized as dash-dot-dot line.

TrendLineType (RT Professional)

Description
Defines how to visualize a trend.
Access in Runtime: Read and write

Syntax
Object.TrendLineType[=TrendLineTypeScada]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1885
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. An object of the "ScreenItem" type with the format:
FunctionTrendControl
OnlineTrendControl

TrendLineTypeScada

Value Description Explanation


0 None Only the dots are displayed.
1 Line Visualizes a trend with linear interconnection of points.
2 Stepped Visualizes a stepped trend and its interconnected points.

TrendLineWidth (RT Professional)

Description
Defines the line weight of the selected trend in pixels.
Access in runtime: Read and write

Syntax
Object.TrendLineWidth[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

Int32
Optional A value or a constant that specifies the line weight of the selected trend in pixels.

TrendLowerLimit (RT Professional)

Description
Specifies the low limit of a tag. If the tag drops below the value of "TrendLowerLimit", the values
are marked in the color set in "TrendLowerLimitColor". The specification is effective if the
"TrendLowerLimitColoring" property has the value "TRUE".
Access in runtime: Read and write

Syntax
Object.TrendLowerLimit[=DOUBLE]

WinCC Professional V13 SP2 – Programming reference


1886 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl
● OnlineTrendControl

DOUBLE
Optional. A value or a constant that specifies the lower limit for a tag.

TrendLowerLimitColor (RT Professional)

Description
Specifies the color which marks tag values which are below the value of "TrendLowerLimit".
The setting is effective if the "TrendLowerLimitColoring" attribute has the value "TRUE".

Syntax
Object.TrendLowerLimitColor[=Color]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl
● OnlineTrendControl

Color
Optional. A value or a constant that specifies the color of tag values below the
"TrendLowerLimit" value.

Comments
You can use the "RGB" function to define the color in RGB format (red, green blue). Enter the
corresponding decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBS color
constants such as vbRed and vbGreen.

TrendLowerLimitColoring (RT Professional)

Description
Specifies if the "TrendLowerLimitColor" attribute is used to identify tag values which are less
than the value at "TrendLowerLimit".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1887
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.TrendLowerLimitColoring[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

BOOLEAN
TRUE: The "TrendLowerLimitColor" property is effective.
FALSE: The "TrendLowerLimitColor" property is not effective.

TrendMeasurePoints (RT Professional)

Description
Defines the number of measurement points for visualization of selected trends.
Defines the number of value pairs provided to the trend from a user archive.
Access in runtime: Read and write

Syntax
Object.TrendMeasurePoints[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

Int32
Optional A value or a constant that specifies the number of measurement points or value pairs
for the selected trend.

TrendName (RT Professional)

Description
Displays the name of the selected trend. The name is defined on the "Trends" tab. The
"TrendName" property can be dynamized with the "TrendRename" property.
Access in runtime: Read and write

Syntax
Object.TrendName[=STRING]

WinCC Professional V13 SP2 – Programming reference


1888 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

STRING
Optional A value or a constant that specifies the name of the selected trend.

TrendPointColor (RT Professional)

Description
Defines the color of the dots in the selected trend.
Open the "Color selection" dialog by clicking the button.
The settings are only active if the "Advanced" option is enabled.
Access in runtime: Read and write

Syntax
Object.TrendPointColor[=Color]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl
● OnlineTrendControl

Color
Optional. A value or a constant that specifies the color of the dots in the selected trend.

Comments
You can use the "RGB" function to define the color in RGB format (red, green blue). Enter the
corresponding decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBS color
constants such as vbRed and vbGreen.

TrendPointStyle (RT Professional)

Description
Defines the dot style for trend visualization.
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1889
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.TrendPointStyle[=PointStyle]

Object
Required A "ScreenItem" object with following format:
● FunctionTrendControl
● OnlineTrendControl

PointStyle

Value Description Explanation


0 None The points are not displayed.
1 Dots The trend points are visualized with a size of one pixel. The setting
in the "Dot width" field is disabled.
2 Squares The dots are displayed as square. The setting in the "Dot width"
field is active.
3 Circles The dots are displayed as circles. The setting in the "Dot width" field
is active.

TrendPointWidth (RT Professional)

Description
Specifies the dot weight in pixels. You can only define the dot weight for "square" and "circular"
dots.
Access in runtime: Read and write

Syntax
Object.TrendPointWidth[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

Int32
Optional A value or a constant that specifies the dot weight of the selected trend in pixels.

TrendProvider (RT Professional)

Description
Specifies the data source for a selected trend.

WinCC Professional V13 SP2 – Programming reference


1890 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in Runtime: Read and write

Syntax
Object.TrendProvider[=Provider]

Object
Required A "ScreenItem" object with following format:
● FunctionTrendControl
● OnlineTrendControl

Provider

Value Description Explanation


0 None No data source configured for implementation in Runtime by means of
a user-defined function.
1 Archive tags Data source with archive tags of a process value archive.
2 HMI tags Data supply with tag values of HMI tags
3 Recipe data Data supply with columns of a recipe

TrendRangeType (RT Professional)

Description
Specifies the time range for which the trend is supplied with data.
You can only define the number of measuring points if you select user archives as the data
source.
Access in Runtime: Read and write

Syntax
Object.TrendRangeType[=RangeType]

Object
Required A "ScreenItem" object with following format:
● FunctionTrendControl

RangeType

Value Description Explanation


0 Time range Defines the start time and the time range for the data connec‐
tion.
1 Start to end time Defines the start and end time for the data connection.
2 Number of measurement Defines the start time and the number of measurement points
points for the data connection.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1891
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TrendRemove (RT Professional)

Description
Removes selected trends from the list.
Access in runtime: Read and write

Syntax
Object.TrendRemove[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

STRING
Optional A value or a constant that specifies the name of the trend to be removed.

TrendRename (RT Professional)

Description
Changes the name of the trend referenced by the "TrendIndex" property.
With "TrendRename", you also dynamize the "TrendName" property.
Access in runtime: Read and write

Syntax
Object.TrendRename[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

STRING
Optional A value or a constant that specifies the new name of the selected trend.

WinCC Professional V13 SP2 – Programming reference


1892 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TrendRepos (RT Professional)

Description
Repositions the trend in the trend window.
"Up" and "Down" move the selected trend up or down in the list. This moves the trend towards
the foreground or background for visualization in Runtime.
Access in runtime: Read and write

Syntax
Object.TrendRepos[=Int32]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl
● OnlineTrendControl

Int32
Optional. A value or a constant that specifies the new position of the selected trend.

TrendSelectTagNameX (RT Professional)

Description
Opens the dialog box for selecting the tag name for the data supply of the X axis in the f(x)
trend view. Programmers can use the property to let the user select a tag name with a button
for example.
Access in runtime: Read and write

Syntax
Object.TrendSelectTagNameX[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

BOOLEAN
TRUE:
FALSE:

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1893
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TrendSelectTagNameY (RT Professional)

Description
Opens the dialog for selecting the tag name for data supply of the Y-axis in the f(x) trend view.
Programmers can use the property to let the user select a tag name with a button for example.
Access in runtime: Read and write

Syntax
Object.TrendSelectTagNameY[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

BOOLEAN
TRUE:
FALSE:

TrendTagNameX (RT Professional)

Description
Specifies the name of the connected HMI tag or column for the X-axis. You select an HMI tag
or a column with the selection button.
Access in runtime: Read and write

Syntax
Object.TrendTagNameX[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

STRING
Optional A value or a constant that specifies the name of the HMI tag or column for the X axis.

WinCC Professional V13 SP2 – Programming reference


1894 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TrendTagNameY (RT Professional)

Description
Specifies the name of the connected HMI tag or column for the Y-axis. You select an HMI tag
or a column with the selection button.
Access in runtime: Read and write

Syntax
Object.TrendTagNameY[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

STRING
Optional A value or a constant that specifies the name of the HMI tag or column for the Y axis.

TrendTimeRangeBase (RT Professional)

Description
Specifies the time unit for calculating the time range.
Access in Runtime: Read and write

Syntax
Object.TrendTimeRangeBase[=TagLoggingTimeUnit]

Object
Required A "ScreenItem" object with following format:
● FunctionTrendControl

TagLoggingTimeUnit

Value Description
500 500 ms
1000 1 second
60000 1 minute
3600000 1 hour
86400000 1 day

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1895
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TrendTimeRangeFactor (RT Professional)

Description
Defines the factor for calculating the time range. Only integer factors are valid.
Access in runtime: Read and write

Syntax
Object.TimeRangeFactor[=Int32]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl

Int32
Optional. A value or a constant that specifies the factor for determining the time range.

TrendTrendWindow (RT Professional)

Description
Defines the trend window for visualizing the trend selected.
Define the available trend windows in the "Trend window" tab.
Access in runtime: Read and write

Syntax
Object.TrendTrendWindow[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

STRING
Optional A value or constant that specifies the name of the trend window for the selected trend.

WinCC Professional V13 SP2 – Programming reference


1896 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TrendUncertainColor (RT Professional)

Description
Value are in uncertain state if the initial value is unknown after runtime has been activated, or
if a substitute value is used.
With the "TrendUncertainColor" property you specify the color which is used for marking these
values. Whether or not the information is evaluated depends on the "TrendUncertainColoring"
property.
Access in runtime: Read and write

Syntax
Object.TrendUncertainColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

Color
Optional A value or a constant that specifies the color of the values of uncertain status in the
selected trend.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

TrendUncertainColoring (RT Professional)

Description
Value are in uncertain state if the initial value is unknown after runtime has been activated, or
if a substitute value is used. The "TrendUncertainColoring" attribute is used to enable
identification of such values based on the color set in "TrendUncertainColor".
Access in runtime: Read and write

Syntax
Object.TrendUncertainColoring[=BOOLEAN]
Object

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1897
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Required. A "ScreenItem" object with the following format:


● FunctionTrendControl
● OnlineTrendControl

BOOLEAN
TRUE: The setting of the "TrendUncertainColor" property is effective.
FALSE: The setting of the "TrendUncertainColor" property is not effective.

TrendUpperLimit (RT Professional)

Description
Specifies the high limit of a tag.
If the tag drops below the value of "TrendUpperLimit", the values are shown in the color set in
"TrendUpperLimitColor". The specification is effective if the "TrendUpperLimitColoring"
attribute has the value "TRUE".
Access in runtime: Read and write

Syntax
Object.TrendUpperLimit[=DOUBLE]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl
● OnlineTrendControl

DOUBLE
Optional. A value or a constant that specifies the higher limit for values in the selected trend.

TrendUpperLimitColor (RT Professional)

Description
Specifies the color that marks tag values that are below the value of "TrendLowerLimit". The
setting is effective if the "TrendUpperLimitColoring" attribute has the value "TRUE".
Access in runtime: Read and write

Syntax
Object.TrendUpperLimitColor[=Color]

WinCC Professional V13 SP2 – Programming reference


1898 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl
● OnlineTrendControl

Color
Optional. A value or a constant that specifies the color for values below the limit for the selected
trend.

Comments
You can use the "RGB" function to define the color in RGB format (red, green blue). Enter the
corresponding decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBS color
constants such as vbRed and vbGreen.

TrendUpperLimitColoring (RT Professional)

Description
Specifies whether the selection frame is shown with the specified color.
Access in runtime: Read and write

Syntax
Object.TrendUpperLimitColoring[=BOOLEAN]

Object
Required. A "ScreenItem" object with the format:
● FunctionTrendControl
● OnlineTrendControl

BOOLEAN
TRUE: The setting for the "TrendUpperLimitColor" attribute is effective.
FALSE: The setting for the "TrendUpperLimitColor" attribute is not effective.

TrendVisible (RT Professional)

Description
Specifies whether or not the selected trend is displayed.
The list contains all the trends that you have created.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1899
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Select the trends to be displayed in the trend window from the list.
Click a trend entry in the list to adapt the properties and to assign axes and trend windows to
the trend.
Access in runtime: Read and write

Syntax
Object.TrendVisible[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

BOOLEAN
TRUE: The selected trend is displayed.
FALSE: The selected trend is not displayed.

TrendWindowAdd (RT Professional)

Description
Creates a new trend view.
Access in runtime: Read and write

Syntax
Object.TrendWindowAdd[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

STRING
Optional A value or a constant that specifies the name of the new trend view.

TrendWindowCoarseGrid (RT Professional)

Description
Enables the display of grid lines for the main scale.

WinCC Professional V13 SP2 – Programming reference


1900 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in runtime: Read and write

Syntax
Object.TrendWindowCoarseGrid[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

BOOLEAN
TRUE: The grid lines for the main scaling are displayed.
FALSE: The grid lines for the main scaling are not displayed.

TrendWindowCoarseGridColor (RT Professional)

Description
Specifies the grid color of the main scale.
Open the "Color selection" dialog by clicking the button.
Access in runtime: Read and write

Syntax
Object.TrendWindowCoarseGridColor[=Color]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl
● OnlineTrendControl

Color
Optional. A value or a constant that specifies the grid line color for the main scale.

Comments
You can use the "RGB" function to define the color in RGB format (red, green blue). Enter the
corresponding decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBS color
constants such as vbRed and vbGreen.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1901
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TrendWindowFineGrid (RT Professional)

Description
Enables the display of grid lines for the secondary scale.
Access in runtime: Read and write

Syntax
Object.TrendWindowFineGrid[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

BOOLEAN
TRUE: The grid lines for the auxiliary scaling are displayed.
FALSE: The grid lines for the auxiliary scaling are not displayed.

TrendWindowFineGridColor (RT Professional)

Description
Specifies the grid color of the main scale.
Open the "Color selection" dialog by clicking the button.
Access in runtime: Read and write

Syntax
Object.TrendWindowFineGridColor[=Color]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl
● OnlineTrendControl

Color
Optional. A value or a constant that specifies the grid line color for the auxiliary scale.

WinCC Professional V13 SP2 – Programming reference


1902 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
You can use the "RGB" function to define the color in RGB format (red, green blue). Enter the
corresponding decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBS color
constants such as vbRed and vbGreen.

TrendWindowForegroundTrendGrid (RT Professional)

Description
Enables the display of grid lines only for the foreground trend in the trend window.
Access in runtime: Read and write

Syntax
Object.TrendWindowForegroundTrendGrid[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

BOOLEAN
TRUE: The grid lines for the foreground trend are displayed in the trend window.
FALSE: The grid lines for the foreground trend are not displayed in the trend window.

TrendWindowGridInTrendColor (RT Professional)

Description
Sets the trend color for the visualization of the grid lines for the main scale.
Access in runtime: Read and write

Syntax
Object.TrendWindowGridInTrendColor[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

BOOLEAN
TRUE: The grid lines are displayed in the trend color.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1903
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

FALSE: The grid lines are displayed with the color set in the "Color" field.

TrendWindowHorizontalGrid (RT Professional)

Description
Enables the display of horizontal grid lines.
Access in runtime: Read and write

Syntax
Object.TrendWindowHorizontalGrid[=BOOLEAN]

Object
● FunctionTrendControl

BOOLEAN
TRUE: The horizontal grid lines are displayed.
FALSE: The horizontal grid lines are not displayed.

TrendWindowIndex (RT Professional)

Description
References a configured trend view. You can assign the values of other properties to a specific
trend window by using the property.
Values of between 0 and "TrendWindowCount" minus 1 are valid for "TrendWindowIndex".
The property "TrendWindowCount" specifies the number of configured trend windows.
Access in runtime: Read and write

Syntax
Object.TrendWindowIndex[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

Int32
Optional A value or a constant that specifies the number of the selected trend window.

WinCC Professional V13 SP2 – Programming reference


1904 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TrendWindowName (RT Professional)

Description
Defines the name of the trend window selected.
Access in runtime: Read and write

Syntax
Object.TrendWindowName[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

STRING
Optional A value or a constant that specifies the name of the selected trend window.

TrendWindowRemove (RT Professional)

Description
Removes the selected trend view from the list.
Access in runtime: Read and write

Syntax
Object.TrendWindowRemove[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

STRING
Optional A value or a constant that specifies the name of the trend window to be removed.

TrendWindowRename (RT Professional)

Description
Changes the name of the trend window referenced by the "TrendWindowIndex" property.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1905
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

With "TrendWindowRename", you also dynamize the ""TrendWindowName" property.


Access in runtime: Read and write

Syntax
Object.TrendWindowRename[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

STRING
Optional A value or a constant that specifies the new name of the selected trend view.

TrendWindowRepos (RT Professional)

Description
Changes the order of the trend view.
"Up" and "Down" move the selected trend up or down in the list. The sorting order in the list
defines the position in the Control. The first trend view is shown in the lowest position, the last
trend view in the highest position.
Access in runtime: Read and write

Syntax
Object.TrendWindwRepos[=Int32]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl
● OnlineTrendControl

Int32
Optional. A value or a constant that specifies the new position of the selected trend view.

TrendWindowRulerColor (RT Professional)

Description
Specifies the ruler color.

WinCC Professional V13 SP2 – Programming reference


1906 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Open the "Color selection" dialog by clicking the button. The color can be configured and
displayed if "1 - graphic" is set for visualization.
Access in runtime: Read and write

Syntax
Object.TrendWindowRulerColor[=Color]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl
● OnlineTrendControl

Color
Optional. A value or a constant that specifies the color of the ruler.

Comments
You can use the "RGB" function to define the color in RGB format (red, green blue). Enter the
corresponding decimal value for each of the three RGB values (range from 0 to 255). For
example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the VBS color
constants such as vbRed and vbGreen.

TrendWindowRulerLayer (RT Professional)

Description
Specifies the display layer of the ruler in the trend view.
Access in Runtime: Read and write

Syntax
Object.TrendWindowRulerLayer[=RulerLayer]

Object
Required A "ScreenItem" object with following format:
● FunctionTrendControl
● OnlineTrendControl

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1907
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

RulerLayer

Value Description Explanation


0 Under grid The ruler is visualized on a layer under the grid.
1 Between grid and The ruler is positioned on top of the trend and under the grid.
trend
2 On top of trend The ruler is positioned on top of the trend.

TrendWindowRulerStyle (RT Professional)

Description
Defines the appearance of the ruler.
Access in Runtime: Read and write

Syntax
Object.TrendWindowRulerStyle[=RulerStyle]

Object
Required A "ScreenItem" object with following format:
● FunctionTrendControl
● OnlineTrendControl

RulerStyle
TRUE: The ruler is displayed as a single black line.
FALSE: The ruler is displayed in the configured "Color" and "Width".

TrendWindowRulerWidth (RT Professional)

Description
Defines the width of the ruler in pixels.
The width can be configured and displayed if "1 - graphic" is set for visualization.
Access in runtime: Read and write

Syntax
Object.TrendWindowRulerWidth[=Int32]

WinCC Professional V13 SP2 – Programming reference


1908 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl
● OnlineTrendControl

Int32
Optional. A value or a constant that specifies the width of the ruler in pixels.

TrendWindowSpacePortion (RT Professional)

Description
Specifies the proportion of the trend widow to be used for the selected curve.
Access in runtime: Read and write

Syntax
Object.TrendWindowSpacePortion[=Int32]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl
● OnlineTrendControl

Int32
Optional. A value or constant that specifies the proportion of the selected trend window in the
control in percent.

TrendWindowVerticalGrid (RT Professional)

Description
Enables the display of vertical grid lines.
Access in runtime: Read and write

Syntax
Object.TrendWindowVerticalGrid[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1909
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BOOLEAN
TRUE: The vertical grid lines are displayed.
FALSE: The vertical grid lines are not displayed.

TrendWindowVisible (RT Professional)

Description
Specifies whether or not the selected trend window is displayed.
The list contains the trend views that you have created.
Activate the trend views in the list which you want to display in the control.
Click a list entry to adapt the ruler and grid line properties.
Access in runtime: Read and write

Syntax
Object.TrendWindowVisible[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

BOOLEAN
TRUE: The selected trend window is displayed.
FALSE: The selected trend window is not displayed.

TrendXAxis (RT Professional)

Description
Defines the X axis to be used for the trend selected.
Define the available X axes inn the "X Axes" tab.
Access in runtime: Read and write

Syntax
Object.TrendXAxis[=STRING]

WinCC Professional V13 SP2 – Programming reference


1910 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl

STRING
Optional. A value or constant that specifies the name of the X-axis used for the selected trend.

TrendYAxis (RT Professional)

Description
Defines the Y axis to be used for the trend selected.
Define the available Y axes inn the "Y Axes" tab.
Access in runtime: Read and write

Syntax
Object.TrendYAxis[=STRING]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl

STRING
Optional. A value or constant that specifies the name of the Y-axis used for the selected trend.

3.5.5.14 Properties U-W (Panels, Comfort Panels, RT Advanced, RT Professional)

Unit (RT Professional)

Description
Specifies the unit of measurement.
Access in runtime: Read and write

Syntax
Object.Unit[=STRING]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1911
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● Bar
● IOField

STRING
Optional A value or a constant that specifies the unit of measurement.

UnitColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the text color for the unit of measurement in the Gauge" object
Access in runtime: Read and write

Syntax
Object.UnitColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

Color
Optional A value or a constant that specifies the text color for the measurement unit.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

UnitText (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the text for the measurement unit of the selected object.
Access in runtime: Read and write

Syntax
Object.UnitText[=STRING]

WinCC Professional V13 SP2 – Programming reference


1912 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● Gauge

STRING
Optional A value or a constant that specifies the text for the measurement unit.

Comments
Enter a text to show, for example, the physical unit of the displayed value. It is standard for no
text to be set as a default.

UnitTop (RT Professional)

Description
Specifies the distance of the measurement unit to the upper edge of the selected object. The
lettering can be positioned only in line with the vertical diameter of the scale. The value of the
property refers to the height of the selected object and is measured from the upper edge of
the selected object to the lower edge of the lettering.
Access in runtime: Read and write

Syntax
Object.UnitTop[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

DOUBLE
Optional A value or a constant that specifies the distance of the measurement unit to the upper
edge of the selected object.
Value range from 0 to 1
0: The lower edge of the lettering is positioned on the upper limit of the selected object. The
text is no longer visible as it is positioned outside of the selected object.
1: The lower edge of the lettering is positioned on the lower limit of the selected object.

UpperLimit (RT Professional)

Description
Specifies the upper limit for input values.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1913
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in runtime: Read and write

Syntax
Object.UpperLimit[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● IOField

DOUBLE
Optional A value or a constant that specifies the upper limit for input values.

Used (RT Professional)

Description
Returns the size of the used disk space.
Access in runtime: Read and write

Syntax
Object.Used[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● DiscSpaceView

DOUBLE
Optional A value or a constant that returns the size of the used disk space.

UseDesignColorSchema (RT Professional)

Description
Specifies whether the colors defined in the global color scheme of the current design are used
for this object.
Access in runtime: Read and write

Syntax
Object.UseDesignColorSchema[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


1914 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. An object of the "ScreenItem"" type with the following format:
● Bar
● Button
● CheckBox
● Circle
● CircleSegment
● CircularArc
● Clock
● ComboBox
● Ellipse
● EllipseSegment
● EllipticalArc
● Gauge
● GraphicView
● IOField
● Line
● ListBox
● MultiLineEdit
● OptionGroup
● Polygon
● Polyline
● Rectangle
● RoundButton
● Slider
● SymbolicIOField
● TextField
● TubeArcObject
● TubeDoubleTeeObject
● TubeTeeObject
● Tubepolyline
● WindowsSlider
You have no access in runtime with the following format:
● AlarmView
● DateTimeField

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1915
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● RecipeView
● StatusForce
● Switch
● SysDiagControl
● TrendView
● UserView

BOOLEAN
Optional. 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.

UseDesignShadowSettings (RT Professional)

Description
Defines whether the object will be displayed with the shadowing defined in the active design.
Access in runtime: Read and write

Syntax
Object.UseDesignShadowSettings[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Circle
● CircleSegment
● CircularArc
● Ellipse
● EllipseSegment
● EllipticalArc
● GraphicView
● Line
● Polygon
● Polyline
● Rectangle
● TextField
● TubeArcObject
● TubeDoubleTeeObject

WinCC Professional V13 SP2 – Programming reference


1916 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● Tubepolyline
● TubeTeeObject
● Bar
● Button
● CheckBox
● Clock
● ComboBox
● Gauge
● GraphicIOField
● IOField
● ListBox
● MultiLineEdit
● OptionGroup
● RoundButton
● Slider
● SymbolicIOField
● WindowsSlider

BOOLEAN
TRUE: The object is displayed with the global shading defined for this object type.
FALSE: The object is displayed without shadows.

UsedPercent (RT Professional)

Description
Specifies the measured value for the used disk space as a percentage. The values can be
queried in Runtime. The values cannot be predefined.
Access in runtime: Read and write

Syntax
Object.UsedPercent[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● DiscSpaceView

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1917
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int32
Optional A value or a constant that returns the measured values for the used disk space as a
percentage.

UseExponentialFormat (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the figures are shown exponentially (e.g. "1.00e+000").
Access in runtime: Read and write

Syntax
Object.UseExponentialFormat[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional TRUE, if the figures are shown exponentially (e.g. "1.00e+000").

UseFlashTransparentColor (RT Professional)

Description
Specifies whether the color of the bitmap object of a flashing graphic will be set to
""transparent".
Access in Runtime: Read and write

Syntax
Object.UseFlashTransparentColor[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "GraphicIOField".

BOOLEAN
Optional TRUE, if the color of the bitmap object of a flashing graphic will be set to "transparent".

See also
GraphicIOField (Page 1383)

WinCC Professional V13 SP2 – Programming reference


1918 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UseMessageColor (RT Professional)

Description
Specifies whether the agreed colors of the message classes are displayed.
Access in runtime: Read and write

Syntax
Object.UseMessageColor [=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl

BOOLEAN
TRUE: The colors are displayed.
FALSE: The color settings specified for the table content on the "Layout" tab are effective.

UseSelectedTitleColor (RT Professional)

Description
Specifies whether to use a selection color for the headers of selected table cells.
Access in runtime: Read and write

Syntax
Object.UseSelectedTitleColor[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: A marking color is used. The "Background" and "Font" settings are active in Runtime.
FALSE: A marking color is not used. The "Background" and "Font" settings are disabled in
Runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1919
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UseTableColor2 (RT Professional)

Description
Specifies whether to use a second row color for the representation of the table.
Access in runtime: Read and write

Syntax
Object.UseTableColor2[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: The settings of "RowColor 2" are used in alternation with "RowColor1".
FALSE: The settings of "RowColor 1" are used for all rows.

UseTagLimitColors (RT Professional)

Description
Specifies that the colors are used.
Access in runtime: Read and write

Syntax
Object.UseTagLimitColors[=BOOLEAN]

Object
Required. An object of the "ScreenItem" type with the following format:
● IOField

BOOLEAN
Optional. TRUE if the colors are used.

WinCC Professional V13 SP2 – Programming reference


1920 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UseTransparentColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the color described with the property "TransparentColor" will be shown as
transparent for the selected object.
Access in runtime: Read and write

Syntax
Object.UseTransparentColor[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● GraphicView
● GraphicIOField

BOOLEAN
Optional TRUE, if the specified color is to be shown as transparent.

UseTransparentColorDeactivatedPicture (RT Professional)

Description
Specifies if the transparent color defined with the property
"TransparentColorDeactivatedPicture" for the status "disabled" will be used.
Access in runtime: Read and write

Syntax
Object.UseTransparentColorDeactivatedPicture[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● RoundButton

BOOLEAN
Optional TRUE, if the transparent color defined with the property
"TransparentColorDeactivatedPicture" for the status "disabled" will be used.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1921
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UseTransparentColorPictureOff (RT Professional)

Description
Specifies if the transparent color defined with the property "TransparentColorPictureOff" for
the "off" status will be used.
Access in runtime: Read and write

Syntax
Object.UseTransparentColorPictureOff[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Button
● RoundButton

BOOLEAN
Optional TRUE, if the transparent color defined with the property "TransparentColorPictureOff"
for the "off" status will be used.

UseTransparentColorPictureOn (RT Professional)

Description
Specifies if the transparent color defined with the property "TransparentColorPictureOn" for
the "on" status will be used.
Access in runtime: Read and write

Syntax
Object.UseTransparentColorPictureOn[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Button
● RoundButton

BOOLEAN
Optional TRUE, if the transparent color defined with the property "TransparentColorPictureOn"
for the "on" status will be used.

WinCC Professional V13 SP2 – Programming reference


1922 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UseTrendNameAsLabel (RT Professional)

Description
Specifies whether the "Name" or "Label" property is used as a designation for the trend in
runtime.
Access in runtime: Read and write

Syntax
Object.UseTrendNameAsLabel[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl
● OnlineTrendControl

BOOLEAN
TRUE: The name configured under "Properties > Properties > Trends > Name" is used.
FALSE: The name configured under "Properties > Properties > Trends > Label" is used.

UserName (RT Professional)

Description
Returns the name of the user who triggered the alarm object.

UV_ColumnWidth_AKZ (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ColumnWidth_Descriptor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1923
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UV_ColumnWidth_InstallationDate (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ColumnWidth_LADDR (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ColumnWidth_Name (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ColumnWidth_OKZ (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ColumnWidth_OperationState (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ColumnWidth_OrderID (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ColumnWidth_ProfileID (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


1924 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UV_ColumnWidth_Rack (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ColumnWidth_Slot (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ColumnWidth_SoftwareRevision (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ColumnWidth_SpecificProfileData (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ColumnWidth_State (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ColumnWidth_Station (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ColumnWidth_SubAddress (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1925
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UV_ColumnWidth_SubSlot (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ColumnWidth_SubSystem (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ColumnWidth_Type (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ShowItem_AKZ (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ShowItem_Descriptor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ShowItem_InstallationDate (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ShowItem_LADDR (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


1926 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UV_ShowItem_Name (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ShowItem_OKZ (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ShowItem_OperationState (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ShowItem_OrderID (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ShowItem_ProfileID (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ShowItem_Rack (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ShowItem_Slot (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1927
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UV_ShowItem_SoftwareRevision (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ShowItem_SpecificProfileData (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ShowItem_State (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ShowItem_Station (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ShowItem_SubAddress (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ShowItem_SubSlot (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

UV_ShowItem_SubSystem (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

WinCC Professional V13 SP2 – Programming reference


1928 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UV_ShowItem_Type (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
No access in runtime.

Value (RT Professional)

Description
Specifies a value for the object being used or returns it.
Access during runtime: Read and write

Syntax
Object.Value[=VARIANT]

Object
Necessary. An object of type "Tag", "DataItem" or "ScreenItem" with the format "Gauge".

VARIANT
Optional The value that is specified dependent on the object being used:
● Tag.Value: returns the tag value for the last read access or specifies the future tag value.
Use the "Read" method to read the tag value from the "Value" property. You assign a new
tag value to the "Value" property with the "Write" method.
● Dataset.Value: Specifies a value or returns a copy of the value or the object reference.
When returning object references, ensure that the object reference is multithread-capable.
● ScreenItem("Gauge_1").Value: Specifies the value to which the pointer points. The value
range within the values set via the properties "ValueMin",and "ValueMax".

Examples
The following example writes a new value in the "Tag1" tag:

'VBS94
Dim objTag
Set objTag = HMIRuntime.Tags("Tag1")
objTag.Value = 50
objTag.Write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1929
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

The example shows how to add a value to a list of tags and output it as a trace. After that, the
value is changed, output again and then removed. It make sense to perform this in several
different actions:

'VBS198
HMIRuntime.DataSet.Add "motor1", 23
HMIRuntime.Trace "motor1: " & HMIRuntime.DataSet("motor1").Value & vbNewLine
HMIRuntime.DataSet("motor1").Value = 55
HMIRuntime.Trace "motor1: " & HMIRuntime.DataSet("motor1").Value & vbNewLine
HMIRuntime.DataSet.Remove("motor1")

See also
DataItem (Page 1287)
Tag (Page 1310)

ValueAxisAutoRange(i) (RT Professional)

Description
Specifies whether the value range of the Y axis is determined automatically or via the values
"ValueAxisBegin(i)" and "ValueAxisEnd(i)".
Access in runtime: Read and write

Syntax
Object.ValueAxisAutoRange(i)[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTrendControl

BOOLEAN
Optional TRUE, if the value range of the Y axis is established automatically or via the values
"ValueAxisBegin(i)" and "ValueAxisEnd(i)"".

ValueAxisLabel(i) (RT Professional)

Description
Specifies the labeling of the value axis. Whether or not the information is evaluated depends
on the "ConfigureTimeAxis(i)" property.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1930 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.ValueAxisLabel(i)[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTrendControl

STRING
Optional A value or a constant that specifies the labeling of the value axis.

ValueAxisScalingType(i) (RT Professional)

Description
Specifies the type of axis scaling.
Access in Runtime: Read and write

Syntax
Object.ValueAxisScalingType(i)[=AxisScalingType]

Object
Required An object of the type "ScreenItem" with the following format:
● OnlineTrendControl

AxisScalingType
hmiBarScalingLinear (0): Linear axis scaling
hmiBarScalingLogarithmic (1): Logarithmic axis scaling
hmiBarScalingNegativeLogarithmic (2): Negative logarithmic axis scaling

Comments
The parameter i indicates the number of the trend.

ValueColumnAlignment(i) (RT Professional)

Description
Specifies the alignment of the tag values of this column pair. The parameter i indicates the
number of the column pair.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1931
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.ValueColumnAlignment(i)[=HorizontalAlignment]

Object
Required. A "ScreenItem" object with the following format:
● OnlineTableControl

HorizontalAlignment
hmiAlignmentLeft (0): The text is left-justified.
hmiAlignmentCentered (1): The text is centered.
hmiAlignmentRight (2): The text is right-justified.

VerticalAlignment (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the vertical alignment of the text in the specified object.
Access in runtime: Read and write

Syntax
Object.VerticalAlignment[=VerticalAlignment]

Object
Required. A "ScreenItem" object with the following format:
● Button
● DateTimeField
● IOField
● OptionGroup
● RoundButton
● Switch
● SymbolicIOField
● TextField
You have no access in runtime with the following format:
● CheckBox

VerticalAlignment
Optional A value that specifies the vertical alignment.
hmiAlignmentTop (0): The text is shown at the top.
hmiAlignmentMiddle (1): The text is shown in the middle.

WinCC Professional V13 SP2 – Programming reference


1932 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

hmiAlignmentBottom (2): The text is shown at the bottom.

VerticalGridLines (RT Professional)

Description
Enables the display of vertical dividers.
Access in runtime: Read and write

Syntax
Object.VerticalGridLines[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● OnlineTableControl
● TrendRulerControl
● UserArchiveControl

BOOLEAN
TRUE: Vertical grid lines are displayed.
FALSE: Vertical grid lines are not displayed.

VerticalScrollbarPosition (RT Professional)

Description
Specifies the vertical positioning of the scroll bar in a picture window with slider, or returns its
value.
The picture is displayed in the picture window by positioning the horizontal and vertical scroll
bars. If you wish to display the screen as a cutout where the scroll bars are located at the left
and top edge of the screen, use the OffsetLeft" and "OffsetTop" properties as the source of
this cutout.
Access in runtime: Read and write

Syntax
Object.VerticalScrollBarPosition[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Screenwindow

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1933
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int32
Optional A value or constant that specifies the offset of the vertical scroll bar.

ViewOnly (RT Advanced)

Description
Specifies whether the Sm@rtClient display will be used for remote monitoring or remote
maintenance.
Remote maintenance means that settings can be changed on the monitored device.
Remote monitoring means that settings of the monitored device cannot be changed.
Access in runtime: Read and write

Syntax
Object.ViewOnly[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● SmartClientView

BOOLEAN
Optional TRUE, if the Sm@rtClient display is to be used only for remote monitoring.

Visible (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the selected object is visible.
Access in runtime: Read and write

Syntax
Object.Visible[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● AlarmView
● ApplicationWindow
● Bar
● BatteryView

WinCC Professional V13 SP2 – Programming reference


1934 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● Button
● ChannelDiagnose
● CheckBox
● Circle
● CircleSegment
● CircularArc
● Clock
● ComboBox
● DateTimeField
● DiscSpaceView
● Ellipse
● EllipseSegment
● EllipticalArc
● FunctionTrendControl
● Gauge
● GraphicIOField
● HTML-Browser
● IOField
● Line
● ListBox
● MediaPlayer
● MultiLineEdit
● OnlineTableControl
● OnlineTrendControl
● OptionGroup
● PLCCodeViewer
● Polygon
● Polyline
● ProtectedAreaNameView
● RangeLabelView
● RangeQualityView
● RecipeView
● Rectangle
● RoundButton
● Screenwindow

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1935
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● Slider
● SmartClientView
● StatusForce
● Switch
● SymbolLibrary
● SymbolicIOField
● SysDiagControl
● TextField
● TrendRulerControl
● TrendView
● TubeArcObject
● TubeDoubleTeeObject
● TubeTeeObject
● Tubepolyline
● UserArchiveControl
● UserView
● WLanQualityView
● WindowsSlider
● ZoneLabelView
● ZoneQualityView
You have no access in runtime with the following format:
● S7GraphOverview

BOOLEAN
Optional TRUE, if the object is visible.

Warning (RT Professional)

Description
Specifies the percentage of used storage space as of which a warning is to be generated.
Access in runtime: Read and write

Syntax
Object.Warning[=Int32]

WinCC Professional V13 SP2 – Programming reference


1936 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● DiskSpaceView

Int32
Optional A value or a constant that specifies the percentage of used storage space as of which
a warning is generated.

WarningColor (RT Professional)

Description
Specifies the color in which the bar of the storage space display will be shown as soon as the
warning area is reached.
Access in runtime: Read and write

Syntax
Object.WarningColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● DiskSpaceView

Color
Optional A value or a constant that specifies the color in which the bar of the storage space
display will be shown as soon as the warning area is exceeded.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

WarningLowerLimit (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the lower limit for "WarningLowerLimit".
The "WarningLowerLimitEnable" property must have the value "TRUE" for the limit to be
monitored.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1937
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.WarningLowerLimit[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● Bar

DOUBLE
Optional A value or a constant that specifies the lower limit for "WarningLowerLimit".

Comments
The following values will be specified with the properties "WarningLowerLimitColor" and
"WarningLowerLimitRelative":
● Representation upon reaching the limit
● Type of evaluation

WarningLowerLimitColor (RT Professional)

Description
Specifies the color for the lower limit "WarningLowerLimit".
The "WarningLowerLimitEnable" property must have the value "TRUE" if the bar color is to
change when the limit is reached.
Access in runtime: Read and write

Syntax
Object.WarningLowerLimitColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Bar

Color
Optional A value or a constant that specifies the color for the lower limit "WarningLowerLimit".

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

WinCC Professional V13 SP2 – Programming reference


1938 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

The following values are defined with the "WarningUpperLimit", "WarningUpperLimitColor" and
"WarningUpperLimitRelative" properties:
● Limit
● Representation upon reaching the limit
● Type of evaluation

WarningLowerLimitEnabled (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the "WarningLowerLimit" limit is to be monitored.
Access in runtime: Read and write

Syntax
Object.WarningLowerLimitEnabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional TRUE, if the "WarningLowerLimit" limit is monitored.

Comments
The following values will be defined via the properties "WarningLowerLimit",
"WarningLowerLimitColor" and "WarningLowerLimitRelative":
● Limit
● Representation upon reaching the limit
● Type of evaluation

WarningLowerLimitRelative (RT Professional)

Description
Specifies whether the lower limit "WarningLowerLimit" is evaluated as a percentage or as an
absolute value.
Access in runtime: Read and write

Syntax
Object.WarningLowerLimitRelative[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1939
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional
TRUE: The lower limit "WarningLowerLimit" is evaluated as a percentage.
FALSE: The lower limit "WarningLowerLimit" is evaluated as an absolute value.

WarningRangeColor (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the color of the warning range on the scale of the "Gauge" object.
The "WarningRangeVisible" property must have the value TRUE so that the warning range is
displayed.
Access in runtime: Read and write

Syntax
Object.WarningRangeColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

Color
Optional A value or a constant that specifies the color of the warning range.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

WarningRangeStart (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies at which scale value the warning range of the "Gauge" object will start.
The "WarningRangeVisible" property must have the value TRUE so that the warning range is
displayed.

WinCC Professional V13 SP2 – Programming reference


1940 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in runtime: Read and write

Syntax
Object.WarningRangeStart[=SINGLE]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

SINGLE
Optional A value or a constant that contains the scale value for the start of the warning range.

Comments
The range extends from the value "Warning" through to the value "Danger". If no range is
activated for "Danger", the range for "Warning" extends to the end of the scale.

WarningRangeVisible (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the warning range in the scale of the "Gauge" object will be displayed.
Access in runtime: Read and write

Syntax
Object.WarningRangeVisible[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Gauge

BOOLEAN
Optional TRUE, if the warning range will be displayed in the scale.

Comments
Specifies the color of the warning range with the "WarningRangeColor" property.
Specifies the start of the warning range with the "WarningRangeStart" property.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1941
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

WarningUpperLimit (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the upper warning limit.
The "WarningUpperLimitEnabled"" property must have the value TRUE so that the limit is
monitored.
Access in runtime: Read and write

Syntax
Object.WarningUpperLimit[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● Bar

DOUBLE
Optional A value or a constant that specifies the higher limit.

Comments
"WarningUpperLimitColor" defines the display for when the limit is reached.
"WarningUpperLimitRelative" specifies the type of evaluation.

WarningUpperLimitColor (RT Professional)

Description
Defines the color for the lower warning limit.
The ""WarningUpperLimitEnabled" property must have the value TRUE if the bar color is to
change once the limit has been reached.
Access in runtime: Read and write

Syntax
Object.WarningUpperLimitColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● Bar

Color
Optional A value or a constant that specifies the color for the higher limit.

WinCC Professional V13 SP2 – Programming reference


1942 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

WarningUpperLimitEnabled (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the higher limit is to be monitored.
Access in runtime: Read and write

Syntax
Object.WarningUpperLimitEnabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional TRUE if the higher limit is monitored.

WarningUpperLimitRelative (RT Professional)

Description
Determines whether the lower limit "WarningUpperLimit" is to be evaluated as a percentage
or as an absolute value.
Access in runtime: Read and write

Syntax
Object.WarningUpperLimitRelative[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional TRUE, if the lower limit "WarningUpperLimit" is to be evaluated as a percentage.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1943
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Width (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies the width of the object in pixels.
Access in runtime: Read and write

Syntax
Object.Width[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● AlarmControl
● AlarmView
● ApplicationWindow
● Bar
● BatteryView
● Button
● ChannelDiagnose
● CheckBox
● Circle
● CircleSegment
● CircularArc
● Clock
● ComboBox
● DateTimeField
● DiscSpaceView
● Ellipse
● EllipseSegment
● EllipticalArc
● FunctionTrendControl
● Gauge
● GraphicIOField
● GraphicView
● HTML-Browser
● IOField
● Line

WinCC Professional V13 SP2 – Programming reference


1944 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● ListBox
● MediaPlayer
● MultiLineEdit
● OnlineTableControl
● OnlineTrendControl
● OptionGroup
● PLCCodeViewer
● Polygon
● Polyline
● ProtectedAreaNameView
● RangeLabelView
● RangeQualityView
● RecipeView
● Rectangle
● RoundButton
● Screenwindow
● Slider
● SmartClientView
● StatusForce
● Switch
● SymbolLibrary
● SymbolicIOField
● SysDiagControl
● TextField
● TrendRulerControl
● TrendView
● TubeArcObject
● TubeDoubleTeeObject
● TubeTeeObject
● Tubepolyline
● UserArchiveControl
● UserView
● WLanQualityView
● WindowsSlider

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1945
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

● ZoneLabelView
● ZoneQualityView
You have no access in runtime with the following format:
● S7GraphOverview

Int32
Optional A value or a constant that specifies the width of the object in pixels.

WindowCloseEnabled (RT Professional)

Description
Indicates whether a window can be closed in runtime.
Access in runtime: Read

Syntax
Object.WindowCloseEnabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● ApplicationWindow
● ScreenWindow

BOOLEAN
Optional TRUE, if the window can be closed in Runtime.

WindowMaximizeEnabled (RT Professional)

Description
Returns whether the object can be maximized in runtime.
Access in runtime: Read

Syntax
Object.WindowMaximizeEnabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● ApplicationWindow
● Screenwindow

WinCC Professional V13 SP2 – Programming reference


1946 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BOOLEAN
TRUE: The object can be maximized in runtime.
FALSE: The object cannot be maximized in runtime.

WindowMovingEnabled (RT Professional)

Description
Returns whether the object can be moved in runtime.
Access in runtime: Read

Syntax
Object.WindowMovingEnabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● ApplicationWindow
● Screenwindow

BOOLEAN
TRUE: The object can be moved in runtime.
FALSE: The object cannot be moved in runtime.

WindowOnTop (RT Professional)

Description
Returns whether the object always remains in the foreground in runtime.
Access in runtime: Read

Syntax
Object.WindowOnTop[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● ApplicationWindow
● Screenwindow

BOOLEAN
TRUE: The object remains in the foreground in runtime.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1947
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

FALSE: The object does not always remain in the foreground in runtime.

WindowsContents (RT Professional)

Description
Supplies the content of the application window Read only access.

See also
ScriptDiagnostics (Page 1451)

WindowSizingEnabled (RT Professional)

Description
Indicates whether the size of the specified object can be changed in runtime.
Access in runtime: Read

Syntax
Object.WindowSizingEnabled[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● ApplicationWindow
● ScreenWindow

BOOLEAN
Optional TRUE, if the size of the selected object can be changed in runtime.

WindowsStyle (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Specifies whether the object will be displayed in the general Windows style.
Access in runtime: Read and write

Syntax
Object.WindowsStyle[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


1948 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● Button
● WindowSlider
You have no access in runtime with the following format:
● Switch

BOOLEAN
Optional TRUE, if the object will be displayed in the general Windows style.

3.5.5.15 Properties X-Z (Panels, Comfort Panels, RT Advanced, RT Professional)

XAxisAdd (RT Professional)

Description
Creates a new X axis.

Syntax
Object.XAxisAdd[=STRING]

Object
Required. An object of the "ScreenItem" type with the format:
● FunctionTrendControl

STRING
Optional. A value or a constant, which????

XAxisAlignment (RT Professional)

Description
Specifies how the selected axis is aligned.

Syntax
Object.XAxisAlignment[=AxisAlignment]

Object
Required. A "ScreenItem" object with the format "FunctionTrendControl".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1949
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

AxisAlignment

Value Description Explanation


0 Bottom The X axis selected is displayed below the trend.
1 Top The X axis selected is displayed above the trend.

XAxisAutoPrecisions (RT Professional)

Description
Enables automatic setting of the decimal precision.
Access in runtime: Read and write

Syntax
Object.XAxisAutoPrecisions[=BOOLEAN]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl

BOOLEAN
TRUE: The number of decimal places is specified automatically.
FALSE: The value configured under "Properties > X axis > Format > Decimal places" is
effective.

XAxisAutoRange(i) (RT Professional)

Description
Specifies whether the value range of the X-axis is determined automatically or with the
"XAxisBegin(i)" and "XAxisEnd(i)" attributes.
Access in runtime: Read and write

Syntax
Object.XAxisAutoRange(i)[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

WinCC Professional V13 SP2 – Programming reference


1950 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BOOLEAN
Optional TRUE if the value range of the X-axis is established automatically or with the
"XAxisBegin(i)" and "XAxisEnd(i)" attributes.

XAxisBeginValue (RT Professional)

Description
Specifies the lower end of the value range of the selected X-axis.
To configure the value, deselect the "Automatic" option under "Value range".
Access in runtime: Read and write

Syntax
Object.XAxisBeginValue[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

DOUBLE
Optional A value or a constant that specifies the lower limit of the value range of the selected
X-axis.

XAxisColor (RT Professional)

Description
Use this attribute to define the color for the common X-axis.
Access in runtime: Read and write

Syntax
Object.XAxisColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

Color
A value or a constant that specifies the color used for the common X-axis.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1951
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

XAxisCount (RT Professional)

Description
Specifies the number of X-axes.
Access in runtime: Read and write

Syntax
Object.XAxisCount[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

Int32
Optional A value or a constant that specifies the number of X-axes.

XAxisEndValue (RT Professional)

Description
Specifies the upper end of the value range of the selected X-axis.
To configure the value, deselect the "Automatic" option under "Value range".
Access in runtime: Read and write

Syntax
Object.XAxisEndValue[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

DOUBLE
Optional A value or a constant that specifies the upper limit of the value range of the selected
X-axis.

WinCC Professional V13 SP2 – Programming reference


1952 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

XAxisExponentialFormat (RT Professional)

Description
Enables the exponential notation for visualization of a selected axis.
Access in runtime: Read and write

Syntax
Object.XAxisExponentialFormat[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

BOOLEAN
TRUE: The values are displayed in exponential format.
FALSE: The values are not displayed in exponential format.

XAxisIndex (RT Professional)

Description
References a configured X axis. You can assign the values of other properties to a specific X
axis by using the property.
Values of between 0 and "XAxisCount" minus 1 are valid for "XAxisIndex". The property
"ToolbarButtonCount" specifies the number of configured X-axes.
Access in runtime: Read and write

Syntax
Object.XAxisIndex[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

Int32
Optional A value or a constant that specifies the number of the selected X-axis.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1953
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

XAxisInTrendColor (RT Professional)

Description
Specifies whether the selected axis is shown in the trend color. The color of the first trend is
used if there are several trends displayed in the trend window. The order of the trends is defined
in the "Trends" properties.
Access in runtime: Read and write

Syntax
Object.XAxisInTrendColor[=BOOLEAN]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl

BOOLEAN
TRUE: The selected axis is displayed in the trend color. The setting in the "Color" field is
disabled.
FALSE: The selected axis is displayed in the color which is set in the "Color" field.

XAxisLabel(i) (RT Professional)

Description
In line with the value of "XAxisMode(i)", specifies the X-axis labeling of a trend that is referenced
with "CurrentCurveIndex".
Access in Runtime: Read and write

Syntax
Object.XAxisLabel(i)[=STRING]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl

STRING
Optional. A value or a constant that specifies the labeling of the X-axis of a trend referenced
with "CurrentCurveIndex".

WinCC Professional V13 SP2 – Programming reference


1954 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

XAxisName (RT Professional)

Description
Specifies the name of the selected axis.
Access in runtime: Read and write

Syntax
Object.XAxisName[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

STRING
Optional A value or a constant that specifies the name of the selected axis.

XAxisPrecisions (RT Professional)

Description
Specifies the number of decimal places to be displayed for the values of the selected X-axis.
To enter the value, deselect the "Automatic" option under "Format".
Access in runtime: Read and write

Syntax
Object.XAxisPrecisions[=Int16]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

Int16
Optional A value or a constant that specifies the number of decimal places.

XAxisRemove (RT Professional)

Description
Removes the selected axis from the list.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1955
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.XAxisRemove[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

STRING
Optional A value or a constant that specifies the axis that is to be removed from the list.

XAxisRepos (RT Professional)

Description
Specifies the order of the axes. The order in the list determines the position of the axis in the
trend view in Runtime. The axis is displayed further away from the trend if it is higher up the
list and the alignment is the same.
Access in runtime: Read and write

Syntax
Object.XAxisRepos[=Int32]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl

Int32
Optional. A value or a constant that specifies the order of the axes???

XAxisScalingType(i) (RT Professional)

Description
Specifies the type of scaling for the X axis. Whether the information is evaluated depends on
the value of the "XAxisMode(i)" attribute.
Access in Runtime: Read and write

Syntax
Object.XAxisScalingType(i)[=AxisScalingType]

WinCC Professional V13 SP2 – Programming reference


1956 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required An object of the type "ScreenItem" with the following format:
● FunctionTrendControl

AxisScalingType
hmiBarScalingLinear (0): Linear axis scaling.
hmiBarScalingLogarithmic (1): Logarithmic axis scaling
hmiBarScalingNegativeLogarithmic (2): Negative logarithmic axis scaling

Comments
The parameter i indicates the number of the trend.

XAxisTrendWindow (RT Professional)

Description
Specifies the trend window in which the selected axis is used. The available trend windows
are specified in the properties under "Trends".
Access in runtime: Read and write

Syntax
Object.XAxisTrendWindow[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

STRING
Optional A value or a constant that specifies the name of the trend window.

XAxisVisible (RT Professional)

Description
The list shows all axes that you have created.
From the list, select the axes that are to be displayed in the trend views.
Click on an axis in the list to adapt the properties and to assign the axis to a trend view.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1957
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.XAxisVisible[=BOOLEAN]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl

BOOLEAN
Optional. Specifies whether the X-axis is to be visible.

YAxisAdd (RT Professional)

Description
Creates a new Y axis.

Syntax
Object.YAxisAdd[=STRING]

Object
Required An object of the type "ScreenItem" with the following format:
● FunctionTrendControl

STRING
Optional A value or a constant that specifies ???.

YAxisAlignment (RT Professional)

Description
Specifies how the selected axis is aligned.

Syntax
Object.YAxisAlignment[=AxisAlignment]

Object
Required. A "ScreenItem" object with the format "FunctionTrendControl".

AxisAlignment

Value Description Explanation


0 Left The X axis selected is displayed on left side of the trend.
1 Right The selected Y axis is displayed to the right of the trend.

WinCC Professional V13 SP2 – Programming reference


1958 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

YAxisAutoPrecisions (RT Professional)

Description
Enables automatic setting of the decimal precision.
Access in runtime: Read and write

Syntax
Object.YAxisAutoPrecisions[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

BOOLEAN
TRUE: The number of decimal places is specified automatically.
FALSE: The value configured in the Inspector window under "Properties > Y-axis > Format >
Decimal places" is effective.

YAxisAutoRange (RT Professional)

Description
Specifies whether the value range of the selected Y-axis is calculated automatically.
Access in runtime: Read and write

Syntax
Object.YAxisAutoRange[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

BOOLEAN

Value Explanation
TRUE The range of values is calculated automatically.
FALSE The range of values is calculated based in the values configured in the "from" and "to" fields.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1959
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

YAxisBeginValue (RT Professional)

Description
Specifies the lower end of the value range of the selected Y-axis.
To configure the value, deselect the "Automatic" option under "Value range".
Access in runtime: Read and write

Syntax
Object.YAxisBeginValue[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

DOUBLE
Optional A value or a constant that specifies the lower limit of the value range of the selected
Y-axis.

YAxisColor (RT Professional)

Description
Specifies the color of the selected axis. Open the "Color selection" dialog by clicking the button.
The setting is only active if the "Use trend color" field is not selected.
Access in runtime: Read and write

Syntax
Object.YAxisColor[=Color]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

Color
Optional A value or a constant that specifies the color of the selected axis.

Comments
You can use the "RGB" function to define the color in RGB format (red, green, blue). To do
this, enter the appropriate decimal value for each of the three RGB values (range from 0 to
255). For example, the color "red" is shown like this: RGB(255, 0, 0). You can also use the
VBS color constants such as vbRed and vbGreen.

WinCC Professional V13 SP2 – Programming reference


1960 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

YAxisCount (RT Professional)

Description
Specifies the number of configured Y-axes.
Access in runtime: Read and write

Syntax
Object.YAxisCount[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

Int32
Optional A value or a constant that specifies the number of configured Y-axes.

YAxisEndValue (RT Professional)

Description
Specifies the upper end of the value range of the selected Y-axis.
To configure the value, deselect the "Automatic" option under "Value range".
Access in runtime: Read and write

Syntax
Object.YAxisEndValue[=DOUBLE]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

DOUBLE
Optional A value or a constant that specifies the upper limit of the value range of the selected
Y-axis.

YAxisExponentialFormat (RT Professional)

Description
Enables the exponential notation for visualization of a selected axis.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1961
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in runtime: Read and write

Syntax
Object.YAxisExponentialFormat[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

BOOLEAN
TRUE: The values are displayed in exponential format.
FALSE: The values are not displayed in exponential format.

YAxisIndex (RT Professional)

Description
References a configured Y axis. You can assign the values of other properties to a specific Y
axis by using the property.
Values of between 0 and "YAxisCount" minus 1 are valid for "YAxisIndex". The property
"ToolbarButtonCount" specifies the number of configured Y-axes.
Access in runtime: Read and write

Syntax
Object.YAxisIndex[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

Int32
Optional A value or a constant that specifies the number of the selected Y-axis.

YAxisInTrendColor (RT Professional)

Description
Specifies whether the selected axis is shown in the trend color. The color of the first trend is
used if there are several trends displayed in the trend window. The order of the trends is defined
in the "Trends" properties.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1962 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.YAxisInTrendColor[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

BOOLEAN
TRUE: The selected axis is displayed in the trend color. The setting in the "Color" field is
disabled.
FALSE: The selected axis is displayed in the color set in the "Color" field.

YAxisLabel (RT Professional)

Description
Defines the label text for a selected axis.
Access in runtime: Read and write

Syntax
Object.YAxisLabel[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

STRING
Optional A value or a constant that specifies the label text for the selected Y-axis.

YAxisName (RT Professional)

Description
Specifies the name of the selected axis.
Access in runtime: Read and write

Syntax
Object.YAxisName[=STRING]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1963
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

STRING
Optional A value or a constant that specifies the name of the selected axis.

YAxisPrecisions (RT Professional)

Description
Specifies the number of decimal places to be displayed for the values of the selected Y-axis.
To enter the value, deselect the "Automatic" option under "Format".
Access in runtime: Read and write

Syntax
Object.YAxisPrecisions[=Int16]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

Int16
Optional A value or a constant that specifies the number of decimal places.

YAxisRemove (RT Professional)

Description
Removes the selected axis from the list.
Access in runtime: Read and write

Syntax
Object.YAxisRemove[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

STRING
Optional A value or a constant that specifies the name of the selected axis.

WinCC Professional V13 SP2 – Programming reference


1964 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

YAxisRename (RT Professional)

Description
Changes the name of the Y axis which is referenced by the "YAxisIndex" property.
Access in runtime: Read and write

Syntax
Object.YAxisRename[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

STRING
Optional A value or a constant that specifies the new name of the selected Y-axis.

YAxisRepos (RT Professional)

Description
Changes the sorting order of the axes. "Up" and "Down" move the axis selected up or down
in the list.
The order in the list determines the position of the axis in the trend view in Runtime. The axis
output position is moved away from the trend if the axis is moved further up in the list and the
orientation is the same.
Access in runtime: Read and write

Syntax
Object.YAxisRepos[=Int32]

Object
Required An object of the type "ScreenItem" with the following format:
● FunctionTrendControl

Int32
Optional #####################################################.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1965
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

YAxisScalingType (RT Professional)

Description
Specifies how the Y-axis is scaled.
Access in runtime: Read and write

Syntax
Object.YAxisScalingType[=AxisScalingType]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

AxisScalingType
The following settings are available:

Value Description
0 Linear
1 Logarithmic
2 Negative logarithmic

YAxisTrendWindow (RT Professional)

Description
Specifies the trend window in which the selected axis is used. The available trend windows
are specified in the properties under "Trends".
Access in runtime: Read and write

Syntax
Object.YAxisTrendWindow[=STRING]

Object
Required. A "ScreenItem" object with the following format:
● FunctionTrendControl

STRING
Optional A value or a constant that specifies the name of the trend window.

WinCC Professional V13 SP2 – Programming reference


1966 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

YAxisVisible (RT Professional)

Description
The list shows all axes that you have created.
From the list, select the axes that are to be displayed in the trend views.
Click on an axis in the list to adapt the properties and to assign the axis to a trend view.
Access in runtime: Read and write

Syntax
Object.YAxisVisible[=BOOLEAN]

Object
Required. An object of the "ScreenItem" type with the following format:
● FunctionTrendControl

BOOLEAN
Optional. Specifies whether the selected Y-axis is to be visible.

ZeroPoint (RT Professional)

Description
Specifies the position of the zero point as a percentage of the bar height. The zero point can
also be located outside of the displayed area.
The "ScalingType" property must be set to "Auto".
The "ShowScale" property must be set to "TRUE".
Access in runtime: Read and write

Syntax
Object.ZeroPoint[=Int32]

Object
Required. A "ScreenItem" object with the following format:
● Bar

Int32
Optional A value or a constant that specifies the position of the zero point as a percentage of
the bar height.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1967
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Zoom/ZoomFactor (RT Professional)

Description
Sets or reads the zoom factor of a screen or screen window.
If the indicated zoom factor is smaller than the minimum value, the zoom factor is automatically
set to the minimum value. If the indicated zoom factor is larger than the minimum value, the
zoom factor is automatically set to the maximum value.
The minimum value of the zoom factor is at 2%, the maximum value at 800%.
With the Screen Object the zoom factor is indicated as a numeric value and with a picture
window object, it is indicated in percent.
Zoom: Zoom factor of picture
Zoomfactor: Zoom factor of picture window

Example
The following example doubles the zoom factor of the current picture:

'VBS97
HMIRuntime.ActiveScreen.Zoom = HMIRuntime.ActiveScreen.Zoom * 2

See also
ScreenWindow (Page 1449)

1 (Panels, Comfort Panels, RT Advanced, RT Professional)

AlarmLow (RT Professional)

Description
Defines the bottom limit value at which an alarm should be triggered or returned.
The type of evaluation (percentage or absolute) is specified with the "TypeAlarmLow"
property.
Access in Runtime: Write and read

Syntax
Object.AlarmLow[=REAL]

Object
Required A "ScreenItem" object with the format "Bar".

WinCC Professional V13 SP2 – Programming reference


1968 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

REAL
Value for the lower limit

See also
Bar (Page 1330)

AlignmentTop (RT Professional)

Description
Defines or returns the vertical alignment of the text. Value range from 0 to 2.

Access in Runtime: Read and write

Syntax
Object.AlignmentTopt[=VerticalAlignment]

Object
Required An object of the "ScreenItem" type with the format "TextField", "IOField",
"SymbolicIOField", "Button", "RoundButton", "CheckBox", "OptionGroup".

VerticalAlignment
0: Alignment left
1: Alignment centered
2: Alignment right

Application (RT Professional)

Description
Supplies the content of the application window Read only access.

See also
ScriptDiagnostics (Page 1451)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1969
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

AssumeOnExit (RT Professional)

Description
Specifies whether the entered text is applied after leaving the input field, e.g. with the <TAB>
key or a mouseclick.
Access in Runtime: Read and write

Syntax
Object.AssumeOnExit

Object
Required An object of the "ScreenItem" type with the format "IOField", "SymbolicIOField".

See also
IOField (Page 1392)
SymbolicIOField (Page 1463)

AssumeOnFull (RT Professional)

Description
Specifies whether the input field is left automatically after a complete input (the specified
number of characters was entered) and the input is applied.
Access in Runtime: Read and write

Syntax
Object.AssumeOnFull[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "IOField", "SymbolicIOField".

BOOLEAN
TRUE: is applied.
FALSE: is not applied.

See also
IOField (Page 1392)
SymbolicIOField (Page 1463)

WinCC Professional V13 SP2 – Programming reference


1970 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BackBorderWidth (RT Professional)

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.

BackColor3 property (RT Professional)

Description
Defines or returns the color of the bar background. LONG write-read access.

BackFlashColorOff (RT Professional)

Description
Defines or returns the color of the object background for the flash status "Off". LONG write-
read access.

BackFlashColorOn (RT Professional)

Description
Defines or returns the color of the object background for the flash status "On". LONG write-
read access.

BorderFlashColorOff (RT Professional)

Description
Defines or returns the color of the object lines for the flashing status "Off". LONG write-read
access.

BorderFlashColorOn (RT Professional)

Description
Defines or returns the color of the object lines for the flashing status "On". LONG write-read
access.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1971
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BottomConnectedConnectionPointIndex (RT Professional)

Description
Specifies or sets the index number of the bottom connecting point.
LONG write-read access.

BottomConnectedObjectName (RT Professional)

Description
Specifies or sets the object name of the object which is docked on at the bottom connecting
point.
LONG write-read access.

BoxAlignment (RT Professional)

Description
TRUE, when the fields are arranged aligned to the right. BOOLEAN write-read access.

BoxCount (RT Professional)

Description
Defines or returns the number of fields. Value range from 0 to 31.

BoxType (RT Professional)

Description
Defines or returns the field type. Value range from 0 to 2:
● 0: Edition
● 1: Input
● 2: I/O field

Button1Width (RT Professional)

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.

WinCC Professional V13 SP2 – Programming reference


1972 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Button2Width (RT Professional)

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.

Button3Width (RT Professional)

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.

Button4Width (RT Professional)

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.

ButtonColor (RT Professional)

Description
Defines or returns the color of the slider. LONG write-read access.

ButtonCommand (RT Professional)

Description
Specifies the display in the message view.
Access in Runtime: Read and write

Syntax
Object.ButtonCommand[=Long]

Object
Required A "ScreenItem" object with the format "AlarmControl".

Long
Optional A value or a constant which specifies the display in the message view.
0x00000001; 1; alarm list·

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1973
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

0x00000002; 2; historical alarm list·(short-term)


0x00000004; 4; historical alarm list·(long-term)
0x00200000; 2097152; lock list·
0x00000008; 8; central annunciator acknowledgement·
0x00000010; 16; single acknowledgement·
0x00000020; 32; group acknowledgement·
0x00000040; 64; Autoscroll·
0x00000080; 128; selection dialog·
0x00000100; 256; block dialog·
0x00000200; 512; print alarm report·
0x00000800; 2048; emergency acknowledgement·
0x00001000; 4096; first alarm·
0x00002000; 8192; last alarm·
0x00004000; 16384; next alarm·
0x00008000; 32768; previous alarm·
0x00010000; 65536; Infotext dialog·
0x00020000; 131072; comment dialog·
0x00040000; 262144; Loop in interrupt·
0x00100000; 1048576; print current view·
0x00400000; 4194304; lock / unlock alarm·
0x00800000; 8388608; sort dialog·
0x01000000; 16777216; time base dialog·
0x02000000; 33554432; hit list

See also
AlarmControl (Page 1316)

CheckAlarmHigh (RT Professional)

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.

WinCC Professional V13 SP2 – Programming reference


1974 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

CheckAlarmLow (RT Professional)

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.

CheckLimitHigh4 (RT Professional)

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.

CheckLimitHigh5 (RT Professional)

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.

CheckLimitLow4 (RT Professional)

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.

CheckLimitLow5 (RT Professional)

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.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1975
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

CheckToleranceHigh (RT Professional)

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.

CheckToleranceLow (RT Professional)

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.

CheckWarningHigh (RT Professional)

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.

CheckWarningLow (RT Professional)

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.

ClearOnNew (RT Professional)

Description
TRUE, when the field entry is deleted as soon as the I/O field has the focus. BOOLEAN write-
read access.

WinCC Professional V13 SP2 – Programming reference


1976 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ColorAlarmHigh (RT Professional)

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.

ColorAlarmLow (RT Professional)

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.

ColorLimitHigh4 (RT Professional)

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.

ColorLimitHigh5 (RT Professional)

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.

ColorLimitLow4 (RT Professional)

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.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1977
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ColorLimitLow5 (RT Professional)

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.

ColorToleranceHigh (RT Professional)

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.

ColorToleranceLow (RT Professional)

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.

ColorWarningHigh (RT Professional)

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.

ColorWarningLow (RT Professional)

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.

WinCC Professional V13 SP2 – Programming reference


1978 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

CountValueColumns (RT Professional)

Description
Returns the number of configured trends or column pairs (visible and invisible) of the window.
Access in Runtime: Read and write

Syntax
Object.CountValueColumns[=Int]

Object
Required A "ScreenItem" object with the format "OnlineTableControl".

Int
Optional A value or a constant that returns the number of configured trends or column pairs
(visible and invisible) of the window.

See also
OnlineTableControl (Page 1409)

CurrentColumnIndex (RT Professional)

Description
Specifies which settings can be assigned to a selected column pair. The property is evaluated
by other properties. Valid values for the index have values from 0 to -1. The
"CountValueColumns" property contains the number of column pairs that are to be shown.
Access in Runtime: Read and write

Syntax
Object.CurrentColumnIndex[=Int]

Object
Required A "ScreenItem" object with the format "OnlineTableControl".

Int
Optional A value or a constant that specifies which settings can be assigned to a particular
column pair.

Comments
The "NumItems" property contains the number of trends / column pairs to be shown.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1979
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
OnlineTableControl (Page 1409)

DeleteEnable (RT Professional)

Description
Specifies whether the recipe view can be cleared in Runtime.
Access in Runtime: Read and write

Syntax
Object.DeleteEnable[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "UserArchiveControl".

BOOLEAN
Optional TRUE, if the recipe view can be cleared in Runtime.

DrawAlwaysInsideFrame (RT Professional)

Description
Specifies whether the border line of the selected object should be illustrated with a line weight
greater than 1 within the border or symmetrically to the border.
Access in Runtime: Read and write

Syntax
Object.DrawAlwaysInsideFrame[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "Rectangle".

BOOLEAN
Option TRUE, if the border line of the specified object will be illustrated with a line weight
greater than 1 within the border.

See also
Rectangle (Page 1443)

WinCC Professional V13 SP2 – Programming reference


1980 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

DrawStylishButton (RT Professional)

Description
Specifies whether the button will be displayed in the general Windows style.
Access in Runtime: Read and write

Syntax
Object.DrawStylishButton[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "Button".

BOOLEAN
Optional TRUE, if the button will be displayed in the general Windows style.

See also
Button (Page 1337)

EditAtOnce (RT Professional)

Description
TRUE, if accessing the field with the <TAB> key permits input immediately and without further
action. BOOLEAN write-read access.

Exponent (RT Professional)

Description
TRUE, when the display of numbers should be with exponents (e.g."1.00e+000"). BOOLEAN
write-read access.

FillColor (RT Professional)

Description
Defines or returns the fill pattern color for the object.
Access during runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1981
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.FillColor[=LONG]

Object
Necessary. An object of the "ScreenItem" type with the format "Line", "Polyline", "Ellipse",
"Circle", "EllipseSegment", "CircleSegment", "EllipticalArc", "CircularArc", "Rectangle",
"Polygon", "TextField", "IOField", "SymbolicIOField", "DateTimeField", "Button",
"Roundbutton", "Switch", "Bar", "StatusForce", "Clock", "Gauge", "Slider", "Checkbox".

Determination of Color Value


The color is displayed in RGB format (Red, Green, Blue). Enter the appropriate decimal value
for each of the three RGB values.
Example:
RGB(200, 150, 100)

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)

Filling (RT Professional)

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.

FillingIndex (RT Professional)

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.

WinCC Professional V13 SP2 – Programming reference


1982 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

FillStyle2 (RT Professional)

Description
Defines or returns the fill style of the bar.

FlashBackColor (RT Professional)

Description
TRUE, when flashing of the background is activated. BOOLEAN write-read access

FlashBorderColor (RT Professional)

Description
TRUE, when flashing of the object lines is activated. BOOLEAN write-read access.

FlashRate (RT Professional)

Description
Defines or returns the flash frequency. Value range from 0 to 2.
0 = slow
1 = medium
2 = fast

FlashRateBackColor (RT Professional)

Description
Defines or returns the flash frequency for the object background. Value range from 0 to 2.
0 = slow
1 = medium
2 = fast

FormatType (RT Professional)

Description
Specifies the data type of the selected object.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1983
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in Runtime: Read and write

Syntax
Object.FormatType[=IOFieldDataFormat]

Object
Required A "ScreenItem" object with the format "IOField".

IOFieldDataFormat
hmiOutputFormatString ( 2): String
hmiOutputFormatDecimal ( 1): Decimal
hmiOutputFormatHexadecimal ( 3): Hexadecimal
hmiOutputFormatBinary ( 0): Binary
hmiOutputFormatDate ( 4): Date
hmiOutputFormatTime ( 5): Time
hmiOutputFormatDateTime ( 6): Date and time

See also
IOField (Page 1392)

GridBackColor (RT Professional)

Description
Specifies the background color for the recipe view in Runtime.
Access in Runtime: Read and write

Syntax
Object.GridBackColor[=Color]

Object
Required A "ScreenItem" object with the format "UserArchiveControl".

Color
Optional A value or a constant that specifies the background color in the recipe view in Runtime.

WinCC Professional V13 SP2 – Programming reference


1984 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

GridForeColor (RT Professional)

Description
Defines the font color for the recipe view.
Access in Runtime: Read and write

Syntax
Object.GridForeColor[=Color]

Object
Required A "ScreenItem" object with the format "UserArchiveControl".

Color
Optional A value or a constant that specifies the font color for the recipe view.

Hysteresis property (RT Professional)

Description
TRUE, when the display should appear with hysteresis. BOOLEAN write-read access.

HysteresisRange (RT Professional)

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.

InsertEnable (RT Professional)

Description
Specifies whether an entry can be made in the recipe view in Runtime.
Access in Runtime: Read and write

Syntax
Object.InsertEnable[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "UserArchiveControl".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1985
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BOOLEAN
Optional TRUE, if an entry can be made in the recipe view in Runtime.

ItemBorderBackColor (RT Professional)

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.

ItemBorderColor (RT Professional)

Description
Defines or returns the color for deviding lines in the selection list of the text list object. LONG
write-read access.

ItemBorderWidth (RT Professional)

Description
Defines or returns the dividing line weight in pixels in the selection list of the text list object.

LeftComma property (RT Professional)

Description
Defines or returns the number of digits to the left of the decimal point (0 to 20).

LimitHigh4 (RT Professional)

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.

WinCC Professional V13 SP2 – Programming reference


1986 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

LimitHigh5 (RT Professional)

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.

LimitLow4 (RT Professional)

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.

LimitLow5 (RT Professional)

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.

LimitMax (RT Professional)

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

LimitMin (RT Professional)

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

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1987
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

LockStatus (RT Professional)

Description
TRUE, when a locked measuring point should be displayed. BOOLEAN write-read access.

LockText (RT Professional)

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.

LockTextColor (RT Professional)

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.

LongStrokesBold (RT Professional)

Description
TRUE, when the long sections of a scale should be displayed in bold face. BOOLEAN write-
read access.

LongStrokesOnly (RT Professional)

Description
TRUE, when only the long sections of a scale should be displayed . BOOLEAN write-read
access.

LongStrokesSize (RT Professional)

Description
Specifies whether only large scale marks are shown.
Access in runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1988 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.ShowLargeTicksOnly[=BOOLEAN]

Object
Required. A "ScreenItem" object with the following format:
● Bar

BOOLEAN
Optional TRUE if only large scale marks are shown.

LongStrokesTextEach (RT Professional)

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

LowerLimitColor(i) (RT Professional)

Description
Specifies the color that identifies the tag values for the selected trend and which lie below the
value of "LowerLimitValue(i)". Whether the information is evaluated depends on the property
"LowerLimitEnabled(i)".
Access in Runtime: Read and write

Syntax
Object.LowerLimitColor(i)[=Color]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl",
"FunctionTrendControl" or "OnlineTableControl".

Color
Optional A value or a constant which specifies the color which identifies tag values of the
specified trend which are below the value of "LowerLimitValue(i)".

Comments
The parameter i indicates the number of the trend.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1989
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)

LowerLimitEnabled(i) (RT Professional)

Description
Specifies whether the information from "LowerLimitColor(i)" is used to identify the tag values
that lie beneath the value of "LowerLimitValue(i)".
Access in Runtime: Read and write

Syntax
Object.LowerLimitEnabled(i)[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl",
"FunctionTrendControl" or "OnlineTableControl".

BOOLEAN
Optional TRUE, if the information from "LowerLimitColor(i)" is used to identify the tag values
that lie beneath the value of "LowerLimitValue(i)".

Comments
The parameter i indicates the number of the trend.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)

LowerLimitValue(i) (RT Professional)

Description
???Specifies whether the tag values which drop below the value of "LowerLimitValue(i)" are
marked by the color specified in "LowerLimitColor(i)". Whether the specification is evaluated
depends on the attribute "LowerLimitEnabled(i)".
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


1990 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.LowerLimitValue(i)[=Double]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl" or
"FunctionTrendControl".

Double
Optional A value or a constant that determines if the tag values that fall short of the
"LowerLimitValue(i)" are to be identified with the color specified in "LowerLimitColor(i)".

Comments
The parameter i indicates the number of the trend.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

Marker property (RT Professional)

Description
TRUE, when the limit values should be displayed as scale values. BOOLEAN write-read
access.

MaximizeButton property (RT Professional)

Description
TRUE, when the object can be maximized in Runtime. Read only access.

MCGUBackColorOff (RT Professional)

Description
Defines or returns the background color for flash status "Off" in the case of the "Departed
Unacknowledged" status. LONG write-read access.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1991
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

MCGUBackColorOn (RT Professional)

Description
Defines or returns the background color for flash status "On" in the case of the "Departed
Unacknowledged" status. LONG write-read access.

MCGUBackFlash (RT Professional)

Description
TRUE, when the background should flash when a message departs unacknowledged.
BOOLEAN write-read access.

MCGUTextColorOff (RT Professional)

Description
Defines or returns the color of the text for flash status "Off" for the "Outgoing unacknowledged"
status. LONG write-read access.

MCGUTextColorOn (RT Professional)

Description
Defines or returns the background color of the text for flash status "On" for the "Outgoing
unacknowledged" status. LONG write-read access.

MCGUTextFlash (RT Professional)

Description
TRUE, when the font should flash when a message departs unacknowledged. BOOLEAN write-
read access.

MCKOBackColorOff (RT Professional)

Description
Defines or returns the background color for flash status "Off" in the case of the "Arrived" status.
LONG write-read access.

WinCC Professional V13 SP2 – Programming reference


1992 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

MCKOBackColorOn (RT Professional)

Description
Defines or returns the background color for flash status "On" in the case of the "Arrived" status.
LONG write-read access.

MCKOBackFlash (RT Professional)

Description
TRUE, when the background should flash when a message arrives. BOOLEAN write-read
access.

MCKOTextColorOff (RT Professional)

Description
Defines or returns the color of the text for flash status "Off" for the "Incoming" status. LONG
write-read access.

MCKOTextColorOn (RT Professional)

Description
Defines or returns the background color of the text for flash status "On" for the "Incoming"
status. LONG write-read access.

MCKOTextFlash (RT Professional)

Description
TRUE, when the font should flash when a message arrives. BOOLEAN write-read access.

MCKQBackColorOff (RT Professional)

Description
Defines or returns the background color for flash status "Off" in the case of the "Departed
Acknowledged" status. LONG write-read access.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1993
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

MCKQBackColorOn (RT Professional)

Description
Defines or returns the background color for flash status "On" in the case of the "Departed
Acknowledged" status. LONG write-read access.

MCKQBackFlash (RT Professional)

Description
TRUE, when the background should flash when a message departs acknowledged. BOOLEAN
write-read access.

MCKQTextColorOff (RT Professional)

Description
Defines or returns the color of the text for flash status "Off" for the "Outgoing acknowledged"
status. LONG write-read access.

MCKQTextColorOn (RT Professional)

Description
Defines or returns the background color of the text for flash status "On" for the "Outgoing
acknowledged" status. LONG write-read access.

MCKQTextFlash (RT Professional)

Description
TRUE, when the font should flash when a message departs acknowledged. BOOLEAN write-
read access.

MCText (RT Professional)

Description
Defines or returns the label for the respective message class.

WinCC Professional V13 SP2 – Programming reference


1994 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

MessageClass (RT Professional)

Description
Defines the respective limit violation (Alarm High, Alarm Low, Warning High, Warning Low,
etc.) for which the "Display Text", "Incoming -", "Incoming acknowledged -", and "Outgoing
unacknowledged -" settings have been configured.

NumberLines (RT Professional)

Description
Defines or return the number of lines the text list object should contain. If the amount of
configured text is larger than this value, the selection list receives a vertical scroll bar.

ObjectName (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Returns the name of the specified object.
Access in Runtime: Read

Syntax
Object.ObjectName

Object
Required A "ScreenItem" object. This property is a standard property of the ScreenItem object
and is therefore available for all formats.

See also
Line (Page 1396)
Polyline (Page 1431)
Ellipse (Page 1361)
Circle (Page 1346)
EllipseSegment (Page 1363)
CircleSegment (Page 1348)
EllipticalArc (Page 1366)
CircularArc (Page 1351)
Rectangle (Page 1443)
Polygon (Page 1429)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1995
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TextField (Page 1477)


IOField (Page 1392)
SymbolicIOField (Page 1463)
Button (Page 1337)
Switch (Page 1460)
GraphicView (Page 1387)
GraphicIOField (Page 1383)
Bar (Page 1330)
Clock (Page 1353)
Gauge (Page 1380)
Slider (Page 1453)
SymbolLibrary (Page 1468)
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)
AlarmControl (Page 1316)
HTMLBrowser (Page 1391)
CheckBox (Page 1343)
OptionGroup (Page 1426)
WindowSlider (Page 1508)
Connector (Page 1355)
ScreenWindow (Page 1449)
DiskSpaceView (Page 1359)
ChannelDiagnose (Page 1341)
ScriptDiagnostics (Page 1451)
Group (Page 1389)

OnTop (RT Professional)

Description
TRUE, when the object should remain in the foreground in Runtime. Read only access.

WinCC Professional V13 SP2 – Programming reference


1996 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

OperationMessage property (RT Professional)

Description
TRUE, if an alarm should be output when an operation is performed. BOOLEAN write-read
access.
The operation is sent to the alarm system and is logged. The alarm system can be used to
output an alarm in an alarm line, for example.

Particularities for I/O field, text list, and slider


The reason for the operation can only be entered if the "OperationReport" property has been
set to TRUE.

OperationReport property (RT Professional)

Description
TRUE, if the reason for an operation should be recorded. BOOLEAN write/read access.
When the object is used or operated in Runtime, a dialog opens in which the operator can
input the reason for the operation in the form of text. The operation is sent to the message
system, and is archived.

Orientation (RT Professional)

Description
Specifies the text direction (orientation) of the selected object.
Access in Runtime: Read and write

Syntax
Object.Orientation[=TextOrientation]

Object
Required An object of the "ScreenItem" type with the format "TextField", "IOField",
"SymbolicIOField", "Button", "Switch", "Bar", "OnlineTrendControl", "FunctionTrendControl",
"Checkbox", "OptionGroup" or "WindowSlider".

TextOrientation
hmiTextHorizontal ( 0): The text is shown horizontally.
hmiTextRotated90Degree (-1): The text is shown vertically and left justified.
hmiTextRotated270Degree ( 1): The text is shown vertically and right justified.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1997
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
TextField (Page 1477)
IOField (Page 1392)
SymbolicIOField (Page 1463)
Button (Page 1337)
Switch (Page 1460)
Bar (Page 1330)
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)
CheckBox (Page 1343)
OptionGroup (Page 1426)
WindowSlider (Page 1508)

OutputFormat (RT Professional)

Description
Returns the value for the representation of the output value. The representation is dependent
on the data format. Read only access.

OutputValue (RT Professional)

Description
Determines the default setting for the value to be displayed or returns it.
This value is used in Runtime when the associated tag cannot be connected or updated when
a picture is started.

PersistentRTAuthorization (RT Professional)

Description
Specifies the authorization for operators which is necessary to change the persistence setting
in Runtime. The value to be entered corresponds to the number which has the desired
authorization in the user administration. Whether the information is evaluated depends on the
value of the property "AllowPersistance". This does not apply for the message view.
Access in Runtime: Read and write

Syntax
Object.PersistentRTAuthorization[=RtAuthorization]

WinCC Professional V13 SP2 – Programming reference


1998 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required An object of the "ScreenItem" type with the format "AlarmControl",
"OnlineTrendControl", "FunctionTrendControl" or "OnlineTableControl".

RtAuthorization
Optional A value or a constant that specifies the authorization for operators to change the
persistence setting.

See also
AlarmControl (Page 1316)

PersistentRuntime (RT Professional)

Description
Specifies whether changed settings in the window will also be maintained after a screen
change.
Access in Runtime: Read and write

Syntax
Object.PersistentRuntime[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl",
"FunctionTrendControl" oder "OnlineTableControl".

BOOLEAN
Optional. TRUE, if changed settings in the window will also be maintained after a screen
change.

Comments
The "AllowPersistance" property specifies whether the information will be evaluated.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 1999
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

PersistentRuntimeAuthorization (RT Professional)

Description
Specifies the access authorization to change the persistence setting in Runtime. The value to
be entered corresponds to the number which has the desired authorization in the user
administration.
Access in Runtime: Read and write

Syntax
Object.PersistentRuntimeAuthorization[=HmiRTAuthorization]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl",
"FunctionTrendControl" or "OnlineTableControl".

HmiRTAuthorization
Optional A value or a constant that specifies the access authorization required to change the
persistence setting in Runtime.

Comments
The "AllowPersistance" property specifies whether the information will be evaluated. This does
not apply for the message view.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)

PicDeactReferenced (RT Professional)

Description
TRUE, when the picture assigned for the "Disable" status should be saved in the RoundButton
object. Otherwise, only the associated object reference is saved. Read only access.

WinCC Professional V13 SP2 – Programming reference


2000 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

PicDeactTransparent (RT Professional)

Description
Defines or returns which color of the bitmap object (.bmp, .dib) assigned to the "Disabled"
status should be set to "transparent". LONG Write/Read Access.
The color is only set to "Transparent" if the value of the "PicDeactUseTransColor" property is
"True".

PicDeactUseTransColor (RT Professional)

Description
TRUE, when the transparent color defined by the "PicDeactTransparent" property for the
"Disable" status should be used. BOOLEAN write-read access.

PicDownTransparent (RT Professional)

Description
Defines or returns which color of the bitmap object (.bmp, .dib) assigned to the "On" status
should be set to "transparent". LONG Write/Read Access.
The color is only set to "Transparent" if the value of the "PicDownUseTransColor" property is
"True".

PicDownUseTransColor (RT Professional)

Description
TRUE, when the transparent color defined by the "PicDownTransparent" property for the "On"
status should be used. BOOLEAN write-read access.

PicTransColor (RT Professional)

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 "PicUseTransColor" property is "True".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2001
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

PictureName (RT Professional)

Description
Defines the path and file name of the background image in the process picture or returns it.
LONG write-read access.

PictureUp (RT Professional)

Description
Defines the picture to be displayed in the "Off" status or returns the picture name.
The picture (*.BMP or *.DIB) must be located in the "GraCS" folder of the current project so
that it can be integrated.

PicUpTransparent (RT Professional)

Description
Defines or returns which color of the bitmap object (.bmp, .dib) assigned to the "Off" status
should be set to "transparent". LONG Write/Read Access.
The color is only set to "Transparent" if the value of the "PicUpUseTransColor" property is
"True".

PicUpUseTransColor (RT Professional)

Description
TRUE, when the transparent color defined by the "PicUpTransparent" property for "Off" status
should be used. BOOLEAN write-read access.

PicUseTransColor (RT Professional)

Description
TRUE, when the transparent color defined by the "PicDeactTransparent" property for the
"Disable" status should be used. BOOLEAN write-read access.

Pinned (RT Professional)

Description
Defines whether the display of the picture window in Runtime depends on the process picture
in which the picture window was configured.

WinCC Professional V13 SP2 – Programming reference


2002 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

PointCount (RT Professional)

Description
Defines or returns the number of corner points. Each corner point has position coordinates
and is identified via an index.

PrintJobName (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Defines the print job triggered by the print function of the "Print" toolbar button. The
recommended print job is set for the control by default.
Open the "Select Print Job" dialog using the selection button.

Syntax
Object.PrintJobName]

Object
Required An object of the "ScreenItem" type with the format "AlarmControl",
"FunctionTrendControl", "OnlineTableControl", "OnlineTrendControl", "TrendRulerControl",
"UserArchiveControl".

See also
AlarmControl (Page 1316)

PrintVisibleColumnsOnly (RT Professional)

Description
Specifies whether only the current visible columns should be output in quick print.
Access in Runtime: Read and write

Syntax
Object.PrintVisibleColumnsOnly[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "UserArchiveControl".

BOOLEAN
Optional TRUE, if only the current visible columns should be output in quick print.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2003
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Process (RT Professional)

Description
Defines or returns presetting for the value to be displayed.
This value is used in Runtime when the associated tag cannot be connected or updated when
a picture is started.

ReadOnly (RT Professional)

Description
Specifies whether the Control has read and write access in Runtime.
Access in Runtime: Read and write

Syntax
Object.ReadOnly[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "UserArchiveControl".

BOOLEAN
Optional TRUE, if the Control has read and write access in Runtime.

ReferenceRotationLeft (RT Professional)

Description
Defines or returns the X-coordinate of the reference point about which the object should be
rotated in Runtime.
The value of the x coordinate is relative to the object width. Enter the value in percent starting
from the left edge of the rectangle enclosing the object.

ReferenceRotationTop (RT Professional)

Description
Defines or returns the Y-coordinate of the reference point about which the object should be
rotated in Runtime.
The value of the Y-coordinate is relative to the object height. Enter the value in percent starting
from the top edge of the rectangle enclosing the object.

WinCC Professional V13 SP2 – Programming reference


2004 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Relevant property (RT Professional)

Description
TRUE, when the object will be taken into account when forming the group display. BOOLEAN
write-read access.

RightComma property (RT Professional)

Description
Defines or returns the number of decimal places (0 to 20).

RTPersistencePasswordLevel (RT Professional)

Description
Displays the authorization for online configuration. You can edit the authorization using the
selection button. Authorizations are configured in the user administration.

Syntax
Object.RTPersistencePasswordLevel

Object
Required. An object of the "ScreenItem" type with the formats "AlarmControl",
"OnlineTrendControl", "TrendRulerControl", "UserArchiveControl" or OnlineTableControl"
("Runtime Professional) or "HMITrendView" (Runtime Advanced).

See also
AlarmControl (Page 1316)
UserArchiveControl (Page 1499)

SameSize (RT Professional)

Description
TRUE, when all four buttons of a Group Display object have the same size. BOOLEAN write-
read access.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2005
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ScaleTicks (RT Professional)

Description
Defines the number of segments into which the bar will be subdivided by large tick marks of
the scale:
0-100: Object can be divided into a maximum of 100 segments
= 0: The optimum number of segments is set automatically.

ScrollBars (RT Professional)

Description
TRUE, when the object is equipped with a scroll bar in Runtime. Read only access.

ScrollPositionX (RT Professional)

Description
Specifies the horizontal positioning of the scroll bar in a picture window with slider, or returns
its value.
The picture is displayed in the picture window by positioning the horizontal and vertical scroll
bars. If you wish to display the picture as a cutout where the scroll bars are located at the left
and upper edge of the picture, use the properties "OffsetLeft" and "OffsetTop" as the origin of
this cutout.

ScrollPositionY (RT Professional)

Description
Specifies the vertical positioning of the scroll bar in a picture window with slider, or returns its
value.
The picture is displayed in the picture window by positioning the horizontal and vertical scroll
bars. If you wish to display the picture as a cutout where the scroll bars are located at the left
and upper edge of the picture, use the properties "OffsetLeft" and "OffsetTop" as the origin of
this cutout.

SelBGColor (RT Professional)

Description
Defines or returns the background color of the selected entry in a text list object. LONG write-
read access.

WinCC Professional V13 SP2 – Programming reference


2006 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

SelectionMode (RT Professional)

Description
Defines whether and how a message line can be selected.
.
Access in Runtime: Read and write

Syntax
Object.SelectionMode[=Mode]

Object
Required A "ScreenItem" object with the format "MessageView".

Mode
0 - NoSelection: Prevents the selection of a message. Acknowledgement affects the oldest
pending message.
1 - Cell: Enables the selection of fields in the message line. Acknowledgement affects the
selected message.
2 - Line: Enables the selection of a message line. Acknowledgement affects the selected
message.

SelectionMode (RT Professional)

Description
Specifies whether and how the alarm line can be selected.
Access in Runtime: Read and write

Syntax
Object.SelectionMode[=AlarmViewAdvancedSelectionMode]

Object
Required An object of the "ScreenItem" type with the format "AlarmControl".

AlarmViewAdvancedSelectionMode
hmiAlarmViewAdvancedSelectionModeNone ( 0): Prevents the selection of an alarm. An
acknowledgement always affects the oldest pending alarm.
hmiAlarmViewAdvancedSelectionModeCell ( 1): Enables the selection of fields in the alarm
line. An acknowledgement always effects the selected alarm.
hmiAlarmViewAdvancedSelectionModeLine ( 2): Enables the selection of an alarm line. An
acknowledgement always effects the selected alarm.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2007
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
AlarmControl (Page 1316)

SelTextColor (RT Professional)

Description
Defines or returns the color of the text of the selected entry in the text list object. LONG write-
read access.

ShortenCellText (RT Professional)

Description
Specifies whether the content of the fields of an alarm line should be shortened if the column
width is too small.
Access in Runtime: Read and write

Syntax
Object.ShortenCellText[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "AlarmControl".

BOOLEAN
Optional TRUE, if the content of the fields of an alarm line should be shortened if the column
width is too small.

See also
AlarmControl (Page 1316)

ShortenColumnHeaderText (RT Professional)

Description
Specifies whether the content of the fields of a title line should be shortened if the column width
is too small.
Access in Runtime: Read and write

Syntax
Object.ShortenColumnHeaderText[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


2008 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required A "ScreenItem" object with the format "AlarmControl".

BOOLEAN
Optional TRUE, if the content of the fields of a title line should be shortened if the column width
is too small.

See also
AlarmControl (Page 1316)

ShowVerticalGridlines (RT Professional)

Description
Specifies whether the columns of the message view are separated by vertical lines.
Access in Runtime: Read and write

Syntax
Object.ShowVerticalGridlines[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "AlarmControl".

BOOLEAN
Optional TRUE, if the columns of the alarm window will be separated by vertical separation
lines.

See also
AlarmControl (Page 1316)

ShowXValuesExponential(i) (RT Professional)

Description
Specifies whether a value of the X coordinate is shown in exponential format. Whether the
information is evaluated depends on the property "XAxisMode(i)".".
Access in Runtime: Read and write

Syntax
Object.ShowXValuesExponential(i)[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2009
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required An object of the "ScreenItem" type with the format "FunctionTrendControl".

BOOLEAN
Optional TRUE, if a value of the X coordinate is shown in exponential format.

Comments
The parameter i indicates the number of the trend.
You use the function "Display value here" to view the X coordinate of the measurement value.

See also
FunctionTrendControl (Page 1373)

ShowYValuesExponential(i) (RT Professional)

Description
Specifies whether a value of the Y coordinate is shown in exponential format. Whether the
information is evaluated depends on the property "XAxisMode(i)". ".
Access in Runtime: Read and write

Syntax
Object.ShowYValuesExponential(i)[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "FunctionTrendControl".

BOOLEAN
Optional TRUE, if a value of the Y coordinate is shown in exponential format.

Comments
The parameter i indicates the number of the trend.
You use the function "Display value here" to view the Y coordinate of the measurement value.

See also
FunctionTrendControl (Page 1373)

WinCC Professional V13 SP2 – Programming reference


2010 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

SignificantMask property (RT Professional)

Description
Is required in Runtime to display the active message class with the highest priority.
The value of the SignificantMask property represents an internal system output value does not
require any specific configuration by the user. Updating is initiated in Runtime by clicking on
the object.

SortByTimeEnable (RT Advanced)

Description
Specifies whether the sorting direction can be altered in Runtime.
Access in Runtime: Read and write

Syntax
Object.SortByTimeEnable[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "AlarmControl".

BOOLEAN
Optional TRUE, if the sorting direction can be altered in Runtime.

See also
AlarmView (Page 1327)

SortOnColumnHeaderClick (RT Professional)

Description
Specifies whether the alarm text blocks can be sorted via the column header of the alarm text
block.
Access in Runtime: Read and write

Syntax
Object.SortOnColumnHeaderClick[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "AlarmControl".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2011
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BOOLEAN
Optional TRUE, if the message blocks can be sorted by the column header of the message
blocks.

See also
AlarmControl (Page 1316)

SortTimeAscending (Panels, Comfort Panels, RT Advanced)

Description
Determines whether the last message received is displayed on top (ascending sorting order)
in the "MessageView" object.
Access during runtime: Read and Write

Syntax
Object.SortTimeAscending [= BOOLEAN]

Object
Required. An object of the "MessageView" type.

BOOLEAN
Optional. TRUE, if the last message received is displayed on top.

SortTimeEnable (Panels, Comfort Panels, RT Advanced)

Description
Determines whether the sorting of messages can be changed according to time in the
"MessageView" object.
Access during runtime: Read and Write

Syntax
Object.SortTimeEnable [= BOOLEAN]

Object
Required. An object of the "MessageView" type.

BOOLEAN
Optional. TRUE, if the sorting can be changed by the operator on the device.

WinCC Professional V13 SP2 – Programming reference


2012 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

StartPointLeft (RT Professional)

Description
Specifies the horizontal distance in pixels from the left edge of the screen.
Access in Runtime: Read and write

Syntax
Object.StartPointLeft[=Int]

Object
Required An object of the "ScreenItem type with the format "Line"".

Int
Optional A value that specifies the horizontal distance in pixels of the start point from the left
edge of the screen.

See also
EllipseSegment (Page 1363)
CircleSegment (Page 1348)
EllipticalArc (Page 1366)
CircularArc (Page 1351)

TagName (RT Professional)

Description
The "Index" property references a trend. "TagName" defines the tag linked to this trend. It is
specified in the form "Archivname\Variablenname" to display tags in a process value archive
or "TasgName" to display an internal or external tag which is not stored in an archive.

TimeAxisShowGridLines(i) (RT Professional)

Description
Specifies whether the trend window is shown with grid lines that run parallel to the x axis.
Access in Runtime: Read and write

Syntax
Object.TimeAxisShowGridLines(i)[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2013
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required A "ScreenItem" object with the format "OnlineTrend".

BOOLEAN
Optional TRUE, if the trend window is shown with grid lines that run parallel to the x axis.

Comments
The distance between two grid lines can be altered with the "TimeAxisGridLineInterval(i)"
property.

See also
OnlineTrendControl (Page 1417)

TimeColumnFormat(i) (RT Professional)

Description
Specifies the format of the time columns for the selected column pair. The parameter i indicates
the number of the column pair.
Access in Runtime: Read and write

Syntax
Object.TimeColumnFormat(i)[=TimeFormat]

Object
Required A "ScreenItem" object with the format "OnlineTableControl".

TimeFormat
( 0): The information is carried out in the form hh:mm.
( 1): The information is carried out in the form hh:mm:ss.
( 2): The information is carried out in the form hh:mm:ss.ms.
( 3): The information is carried out in the form hh:mm (full hours).
( 4): The information is carried out in the form hh:mm:ss (full minutes).
( 5): The information is carried out in the form hh:mm:ss:ms (full seconds).
( 6): The information is carried out in the form dd_mm_yy_hh_mm.
( 7): The information is carried out in the form dd_mm_yy_hh_mm (full hours).
( 8): The information is carried out in the form dd_mm_yy.
( 9): The information is carried out in the form dd_mm_yy_ (full days).

WinCC Professional V13 SP2 – Programming reference


2014 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
OnlineTableControl (Page 1409)

TitleBackColor (RT Professional)

Description
Specifies the background color of the table headers for the selected status. You open a color
selection dialog box with the button.

Titleline (RT Professional)

Description
TRUE, when the control has a title bar and it can be moved in Runtime. BOOLEAN write-read
access.

ToleranceHigh property (RT Professional)

Description
Defines or returns the limit value for "Tolerance high".
The type of the evaluation (in percent or absolute) is defined in the "TypeToleranceHigh"
property.
The monitoring of the limit value is only valid if the "CheckToleranceHigh" property is set to
"TRUE".

ToleranceLow property (RT Professional)

Description
Defines or returns the limit value for "Tolerance low".
The type of the evaluation (in percent or absolute) is defined in the "TypeToleranceLow"
property.
The monitoring of the limit value is only valid if the "CheckToleranceLow" property is set to
"TRUE".

TopConnectedConnectionPointIndex (RT Professional)

Description
Specifies or sets the index number of the top connecting point.
LONG write-read access.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2015
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TopConnectedObjectName (RT Professional)

Description
Specifies or sets the object name of the object which is docked on at the bottom connecting
point.
LONG write-read access.

Trend (RT Professional)

Description
TRUE, when the tendency (rising or falling) of the measuring value being monitored should
be displayed by a small arrow. BOOLEAN write-read access.

TrendTag (RT Professional)

Description
Specifies which tag is linked with the selected trend.
You enter the value either in the form "archive name/tag name", to show tags of a process
value archive, or in the form "tag name" to show an internal or an external tag that will now be
saved in an archive.
Access in Runtime: Read and write

Syntax
Object.TrendTag[=HmiTag]

Object
Required A ""ScreenItem" object with the format "OnlineTrend".

HmiTag
Optional A value or a constant that specifies which tags are linked with the selected trend.

Comments
The parameter i indicates the number of the trend.

See also
OnlineTrendControl (Page 1417)

WinCC Professional V13 SP2 – Programming reference


2016 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TypeAlarmHigh (RT Professional)

Description
TRUE, when the upper limit value, at which an alarm is triggered, should be evaluated as a
percentage. FALSE, when the evaluation should be as an absolute value. BOOLEAN write-
read access.

TypeAlarmLow (RT Professional)

Description
TRUE, when the lower limit value, at which an alarm is triggered, should be evaluated as a
percentage. FALSE, when the evaluation should be as an absolute value. BOOLEAN write-
read access.

TypeLimitHigh4 (RT Professional)

Description
TRUE, when the "Reserve 4" upper limit value should be evaluated as a percentage. FALSE,
when the evaluation should be as an absolute value. BOOLEAN write-read access.

TypeLimitHigh5 (RT Professional)

Description
TRUE, when the "Reserve 5" upper limit value should be evaluated as a percentage. FALSE,
when the evaluation should be as an absolute value. BOOLEAN write-read access.

TypeLimitLow4 (RT Professional)

Description
TRUE, when the "Reserve 4" lower limit value should be evaluated as a percentage. FALSE,
when the evaluation should be as an absolute value. BOOLEAN write-read access.

TypeLimitLow5 (RT Professional)

Description
TRUE, when the "Reserve 5" lower limit value should be evaluated as a percentage. FALSE,
when the evaluation should be as an absolute value. BOOLEAN write-read access.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2017
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TypeToleranceHigh (RT Professional)

Description
TRUE, when the "Tolerance high" lower limit value should be evaluated as a percentage.
FALSE, when the evaluation should be as an absolute value. BOOLEAN write-read access.

TypeToleranceLow (RT Professional)

Description
TRUE, when the "Tolerance low" lower limit value should be evaluated as a percentage.
FALSE, when the evaluation should be as an absolute value. BOOLEAN write-read access.

TypeWarningHigh (RT Professional)

Description
TRUE, when the "Warning high" lower limit value should be evaluated as a percentage. FALSE,
when the evaluation should be as an absolute value. BOOLEAN write-read access.

TypeWarningLow (RT Professional)

Description
TRUE, when the "Warning low" lower limit value should be evaluated as a percentage. FALSE,
when the evaluation should be as an absolute value. BOOLEAN write-read access.

UncertainStateColor(i) (RT Professional)

Description
Specifies the color for the identification of values with an uncertain status.
Access in Runtime: Read and write

Syntax
Object.UncertainStateColor(i)[=Color]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl" or
"FunctionTrendControl".

WinCC Professional V13 SP2 – Programming reference


2018 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Color
Optional A value or a constant that specifies the color for the identification of values with an
uncertain status.

Comments
The parameter i indicates the number of the trend.
If the start value of a value is not known after Runtime has been activated or a substitute value
is used, then this value has an uncertain status.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

UncertainStateEnabled(i) (RT Professional)

Description
Specifies if values with an uncertain status are identified with the color set up in
"ReplacementColor(i)"".
If the start value of a value is not known after Runtime has been activated or a substitute value
is being used, then this value is considered to have an uncertain status.
Access in Runtime: Read and write

Syntax
Object.UncertainStateEnabled(i)[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl" or
"FunctionTrendControl".

BOOLEAN
Optional TRUE, if values with an uncertain status are identified with the color specified in
""ReplacementColor(i".

Comments
The parameter i indicates the number of the trend.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2019
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UpdateEnable (RT Professional)

Description
Specifies whether the recipe view can be altered in Runtime.
Access in Runtime: Read and write

Syntax
Object.UpdateEnable[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "UserArchiveControl".

BOOLEAN
Optional TRUE, if the recipe view can be altered in Runtime.

UpperLimitColor(i) (RT Professional)

Description
Specifies the color that identifies the tag values that lie above the value of
""UpperLimitValue(i)". Whether the information is evaluated depends on the value of the
property ""UpperLimitEnabled(i)".
Access in Runtime: Read and write

Syntax
Object.UpperLimitColor(i)[=Color]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl",
"FunctionTrendControl" or "OnlineTableControl".

Color
Optional A value or a constant that identifies the tag values that lie above the value of
""UpperLimitValue(i)".

Comments
The parameter i indicates the number of the trend.

WinCC Professional V13 SP2 – Programming reference


2020 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)

UpperLimitEnabled(i) (RT Professional)

Description
Specifies whether the information from "UpperLimitColor(i)" is used to identify the tag values
that lie above the value of "UpperLimitValue(i)".
Access in Runtime: Read and write

Syntax
Object.UpperLimitEnabled(i)[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl",
"FunctionTrendControl" or "OnlineTableControl".

BOOLEAN
Optional TRUE, if the information from "UpperLimitColor(i)"" is used to identify the tag values
that lie above the value of "UpperLimitValue(i)".

Comments
The parameter i indicates the number of the trend.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)

UpperLimitValue(i) (RT Professional)

Description
Specifies whether the tag values that exceed the "UpperLimitValue(i)" are to be identified with
the color specified in "UpperLimitColor(i)"". Whether the information is evaluated depends on
the value of the property "UpperLimit(i)".".
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2021
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.UpperLimitValue(i)[=Double]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl" or
"FunctionTrendControl".

Double
Optional A value or a constant that specifies whether the tag values that exceed the
""UpperLimitValue(i)" value are to be identified with the color specified in UpperLimitColor(i)"".

Comments
The parameter i indicates the number of the trend.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

UseAllServers (RT Professional)

Description
Specifies whether the data to be shown in the alarm window can be requested from all servers
in a distributed system. Alarm Logging must be activated on the respective servers.
Access in Runtime: Read-only

Syntax
Object.UseAllServers[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "AlarmView".

BOOLEAN
Optional. TRUE, if the data to be shown in the alarm window can be requested from all servers
in a distributed system.

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


2022 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UserValue1 property (RT Professional)

Description
Defines or returns a value.
The value can be evaluated by a script, for example. This value is neither evaluated nor
displayed in Runtime.

UserValue2 property (RT Professional)

Description
Defines or returns a value.
The value can be evaluated by a script, for example. This value is neither evaluated nor
displayed in Runtime.

UserValue3 property (RT Professional)

Description
Defines or returns a value.
The value can be evaluated by a script, for example. This value is neither evaluated nor
displayed in Runtime.

UserValue4 property (RT Professional)

Description
Defines or returns a value.
The value can be evaluated by a script, for example. This value is neither evaluated nor
displayed in Runtime.

ValueAxisDecimalPrecision(i) (RT Professional)

Description
Specifies the number of decimal places for the value range of the selected trend.
Access in Runtime: Read and write

Syntax
Object.ValueAxisDecimalPrecision(i)[=Int]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2023
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required A "ScreenItem" object with the formats "OnlineTrend" or "FunctionTrendView".

Int
Optional A value or a constant that specifies the number of decimal places for the value range
of the selected trend.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

ValueAxisShowGridLines(i) (RT Professional)

Description
Specifies whether the trend window is shown with grid lines that run parallel to the y axis.
Access in Runtime: Read and write

Syntax
Object.ValueAxisShowGridLines(i)[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl" or
"FunctionTrendControl".

BOOLEAN
Optional TRUE, if the trend window is shown with grid lines that run parallel to the y axis.

Comments
The distance between two grid lines can be altered with the "ValueAxisGridLineInterval(i)"
property.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

WinCC Professional V13 SP2 – Programming reference


2024 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ValueColumnPrecision(i) (RT Professional)

Description
Specifies the number of decimal places that are shown in this value column. The parameter i
indicates the number of the column pair. A maximum of 16 decimal places can be shown.
Access in Runtime: Read and write

Syntax
Object.ValueColumnPrecision(i)[=Int]

Object
Required A "ScreenItem" object with the format "OnlineTableControl".

Int
Optional A value or a constant that specifies the number of decimal places that are shown in
this value column.

See also
OnlineTableControl (Page 1409)

WarningHigh (RT Professional)

Description
Defines or returns the upper limit value for "Warning High".
In order that the limit value is monitored, the "CheckWarningHigh" property must be set to
TRUE.
The display on reaching the limit value and the type of evaluation are defined by means of the
"ColorWarningHigh" and "TypeWarningHigh" properties.

WarningLow (RT Professional)

Description
Defines or returns the lower limit value for "Warning Low".
In order that the limit value is monitored, the "CheckWarningLow" property must be set to
TRUE.
The display on reaching the limit value and the type of evaluation are defined by means of the
"ColorWarningLow" and "TypeWarningLow" properties.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2025
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

StyleSettings (RT Professional)

Description
Defines the style in which the object is displayed.
Access in runtime: Read and write

Syntax
Object.StyleSettings[=WinCCStyle]

Object
Required. An object of the "ScreenItem" type with the following format:
● Button
● RoundButton
● WindowsSlider

WinCCStyle
Optional. A value or a constant that specifies the style in which the object is displayed.

User Defined Shows the object according to the respective settings.


Global Shows the object in a globally defined design.
Windows Style Shows the object in Windows style.

WindowBorder (RT Professional)

Description
TRUE, when the window is displayed with borders in Runtime. Read only access.

XAxisBegin(i) (RT Professional)

Description
Specifies the lower limit of the X axis of a trend that has been referenced with the property
"CurrentCurveIndex". Whether the information is evaluated depends on the properties
"XAxisAutorange(i)" and "ShareXAxis".
Access in Runtime: Read and write

Syntax
Object.XAxisBegin(i)[=String]

WinCC Professional V13 SP2 – Programming reference


2026 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required A ""ScreenItem" object with the format ""FunctionTrendView".

String
Optional A value or a constant that specifies the lower limit of the X axis of a trend that has
been referenced with the property "CurrentCurveIndex".

See also
FunctionTrendControl (Page 1373)

XAxisEnd(i) (RT Professional)

Description
Specifies the lower limit of the X axis of a trend that has been referenced with the property
"CurrentCurveIndex". Whether the information is evaluated depends on the properties
"XAxisAutorange(i)"" and "ShareXAxis".
Access in Runtime: Read and write

Syntax
Object.XAxisEnd(i)[=String]

Object
Required A "ScreenItem" object with the format "FunctionTrendView".

String
Optional A value or a constant that specifies the upper limit of the X axis of a trend that has
been referenced with the property "CurrentCurveIndex".

See also
FunctionTrendControl (Page 1373)

XAxisShowGridLines(i) (RT Professional)

Description
Specifies whether the trend window is shown with grid lines that run parallel to the X axis. The
distance between two grid lines can be altered with the ""XAxisGridLineInterval(i)" property.
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2027
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.XAxisShowGridLines(i)[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "FunctionTrendView".

BOOLEAN
Optional TRUE, if the trend window is shown with grid lines that run parallel to the X axis.

See also
FunctionTrendControl (Page 1373)

2 (Panels, Comfort Panels, RT Advanced, RT Professional)

Activate (RT Professional)

Description
Determines whether the data to be displayed are requested by the alarm server.
Access in Runtime: Read and write

Syntax
Object.Activate[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "AlarmControl".

BOOLEAN
Optional TRUE, if the data to be displayed are requested by the alarm server.

See also
AlarmControl (Page 1316)

AdjustBorder3DWithStyle (RT Professional)

Description
Specifies whether the 3D border width will be displayed in the general Windows style.
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


2028 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.AdjustBorder3DWithStyle[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "Button".

BOOLEAN
Optional TRUE, if the 3D border width will be displayed in the general Windows style.

See also
Button (Page 1337)

AlarmFilter (RT Professional)

Description
Specifies a SQL-Statement for selecting the alarms that will be shown in the alarm window.
Alarm list and hit list filtering and sorting settings
Access in Runtime: Read and write

Syntax
Object.AlarmFilter[=String]

Object
Required A "ScreenItem" object with the format "AlarmControl".

String
Optional A value or a constant that specifies a SQL-Statement for selecting the alarms that
will be shown in the alarm window.

See also
AlarmControl (Page 1316)

AngleAlpha (RT Professional)

Description
Defines or returns depth angle a for the 3D-effect of the "3DBarGraph" object. Value range in
degrees from 0 to 90.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2029
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

AngleBeta (RT Professional)

Description
Defines or returns depth angle b for the 3D-effect of the "3DBarGraph" object. Value range in
degrees from 0 to 90.

Axe property (RT Professional)

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.

AxisSection (RT Professional)

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.

Background (RT Professional)

Description
TRUE, when the background of the 3D-bar graph object should be visible. BOOLEAN write-
read access.

BarDepth (RT Professional)

Description
Defines or returns the depth of the bar in pixels.

BarHeight property (RT Professional)

Description
Defines or returns the height of the bar in pixels.

WinCC Professional V13 SP2 – Programming reference


2030 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BaseX property (RT Professional)

Description
Defines or returns the horizontal distance of the right bar edge to the left edge of the object
field in pixels.

BaseY property (RT Professional)

Description
Defines or returns the vertical distance of the bottom bar edge to the top edge of the objet field.

CloseButton (RT Professional)

Description
TRUE, when the window is provided with a "Close" button. Read only access.

ColumnSizingEnable (RT Professional)

Description
Specifies whether the width of the columns in the alarm window can be changed. The width
of the columns can be changed only if the "AutoScroll" property is not enabled.
Access in Runtime: Read and write

Syntax
Object.ColumnSizingEnable[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "AlarmControl".

BOOLEAN
Optional TRUE if the width of the columns in the alarm window can be changed.

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2031
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ForeFlashColorOff (RT Professional)

Description
Defines or returns the color of the text for flash status "Off". LONG write-read access.

ForeFlashColorOn (RT Professional)

Description
Defines or returns the color of the text for flash status "On". LONG write-read access.

InsertData(i) (RT Professional)

Description
Specifies which data will be inserted for the active trend.
Access in Runtime: Read and write

Syntax
Object.InsertData(i)[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "FunctionTrendControi".

BOOLEAN
Optional TRUE, if "DataIndex(i)" is ignored and the data added to the rear of the data buffer.
FALSE, if the data is inserted at the position "DataIndex(i)" of the data buffer.

Comments
The trend view is redrawn in every operation with "InsertData(i)".

See also
FunctionTrendControl (Page 1373)

WinCC Professional V13 SP2 – Programming reference


2032 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Layer00Checked (RT Professional)

Description
TRUE, when limit 0 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer00Value and Layer00Color
properties.

Layer00Color (RT Professional)

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.

Layer00Value (RT Professional)

Description
Determines the value for "Limit 0" or returns it.
Monitoring only takes effect when the Layer00Checked property value is set to TRUE.

Layer01Checked (RT Professional)

Description
TRUE, when limit 1 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer01Value and Layer01Color
properties.

Layer01Color (RT Professional)

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.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2033
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Layer01Value (RT Professional)

Description
Determines the value for "Limit 1" or returns it.
Monitoring only takes effect when the Layer01Checked property value is set to TRUE.

Layer02Checked (RT Professional)

Description
TRUE, when limit 2 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer02Value and Layer02Color
properties.

Layer02Color (RT Professional)

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.

Layer02Value (RT Professional)

Description
Determines the value for "Limit 2" or returns it.
Monitoring only takes effect when the Layer02Checked property value is set to TRUE.

Layer03Checked (RT Professional)

Description
TRUE, when limit 3 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer03Value and Layer03Color
properties.

WinCC Professional V13 SP2 – Programming reference


2034 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Layer03Color (RT Professional)

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.

Layer03Value (RT Professional)

Description
Determines the value for "Limit 3" or returns it.
Monitoring only takes effect when the Layer03Checked property value is set to TRUE.

Layer04Checked (RT Professional)

Description
TRUE, when limit 4 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer04Value and Layer04Color
properties.

Layer04Color (RT Professional)

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.

Layer04Value (RT Professional)

Description
Determines the value for "Limit 4" or returns it.
Monitoring only takes effect when the Layer04Checked property value is set to TRUE.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2035
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Layer05Checked (RT Professional)

Description
TRUE, when limit 5 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer05Value and Layer05Color
properties.

Layer05Color (RT Professional)

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.

Layer05Value (RT Professional)

Description
Determines the value for "Limit 5" or returns it.
Monitoring only takes effect when the Layer05Checked property value is set to TRUE.

Layer06Checked (RT Professional)

Description
TRUE, when limit 6 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer06Value and Layer06Color
properties.

Layer06Color (RT Professional)

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.

WinCC Professional V13 SP2 – Programming reference


2036 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Layer06Value (RT Professional)

Description
Determines the value for "Limit 6" or returns it.
Monitoring only takes effect when the Layer06Checked property value is set to TRUE.

Layer07Checked (RT Professional)

Description
TRUE, when limit 7 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer07Value and Layer07Color
properties.

Layer07Color (RT Professional)

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.

Layer07Value (RT Professional)

Description
Determines the value for "Limit 7" or returns it.
Monitoring only takes effect when the Layer07Checked property value is set to TRUE.

Layer08Checked (RT Professional)

Description
TRUE, when limit 8 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer08Value and Layer08Color
properties.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2037
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Layer08Color (RT Professional)

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.

Layer08Value (RT Professional)

Description
Determines the value for "Limit 8" or returns it.
Monitoring only takes effect when the Layer08Checked property value is set to TRUE.

Layer09Checked property (RT Professional)

Description
TRUE, when limit 9 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer09Value and Layer09Color
properties.

Layer09Color (RT Professional)

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.

Layer09Value (RT Professional)

Description
Determines the value for "Limit 9" or returns it.
Monitoring only takes effect when the Layer09Checked property value is set to TRUE.

WinCC Professional V13 SP2 – Programming reference


2038 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Layer10Checked (RT Professional)

Description
TRUE, when limit 10 should be monitored. BOOLEAN write/read access.
Limit value and representation are defined with the Layer10Value and Layer10Color
properties.

Layer10Color (RT Professional)

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.

Layer10Value (RT Professional)

Description
Determines the value for "Limit 10" or returns it.
Monitoring only takes effect when the Layer10Checked property value is set to TRUE.

LightEffect property (RT Professional)

Description
TRUE, when the light effect should be activated. BOOLEAN write-read access.

ListType property (RT Professional)

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

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2039
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Localizable (RT Professional)

Description
Specifies whether a font should be assigned and can be formatted for each Runtime language.
Access in Runtime: Read and write

Syntax
Object.Localizable[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl",
"FunctionTrendControl", "OnlineTableControl", "AlarmControl" or "UserArchiveControl".

BOOLEAN
Optional TRUE, if a font should be assigned and can be formatted for each Runtime language.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)
AlarmControl (Page 1316)

Max property (RT Professional)

Description
Defines or returns the absolute value in the case of a full value display. This value is displayed
if the scale display is active.

PersistentRTCSAuthorization (RT Professional)

Description
Specifies the operator authorization to be able to change the persistence setting in Runtime.
The value to be entered corresponds to the number which has the desired authorization in the
user administration. Whether the information is evaluated depends on the value of the property
"AllowPersistance". This does not apply for the message view.
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


2040 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.PersistentRTCSAuthorization[=RtAuthorization]

Object
Required An object of the "ScreenItem" type with the format "AlarmControl",
"OnlineTrendControl", "FunctionTrendControl" or "OnlineTableControl".

RtAuthorization
Optional A value or a constant that specifies the operator authorization to change the
persistence setting.

See also
AlarmControl (Page 1316)

PersistentToDownload (RT Professional)

Description
Specifies whether the settings will be maintained until the next ES download.
Access in Runtime: Read and write

Syntax
Object.PersistentToDownload[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl",
"FunctionTrendControl" or "OnlineTableControl".

BOOLEAN
Optional TRUE, if the settings will be maintained until the next ES download.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)

PersistentToDownloadAuthorization (RT Professional)

Description
Specifies the access authorization required to change the settings until the next ES download.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2041
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in Runtime: Read and write

Syntax
Object.PersistentToDownloadAuthorization[=HmiRTAuthorization]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl",
"FunctionTrendControl" or "OnlineTableControl".

HmiRTAuthorization
Optional A value or a constant that specifies the access authorization required to change the
settings until the next ES download.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)

PicDownReferenced (RT Professional)

Description
TRUE, when the picture assigned for the "On" status is to be saved. Otherwise, only the
associated object reference is saved. Read only access.

PicReferenced (RT Professional)

Description
TRUE, when the assigned picture is references the object and is not saved in it. Read only
access.

Position (RT Professional)

Description
Defines the presetting for the position of the slider.
This value is used as the start value in Runtime.
To operate the process value linked to this attribute, it is necessary that the process value is
also linked to the "Position" event. You will find the event "Position" in the "Event" tab, in the
topic tree under SliderCtrl\Property Topics\Control Properties\Value.

WinCC Professional V13 SP2 – Programming reference


2042 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

PredefinedAngles (RT Professional)

Description
Defines or returns the depth of the display of the 3DBarGraph object. Value range from 0 to 3.
0 = cavalier
1 = isometric
2 = axionometric
3 = freely defined

PrintConfiguration (RT Professional)

Description
Specifies the log for the printout.
Access in Runtime: Read and write

Syntax
Object.PrintConfiguration[=HMIPrintConfiguration]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl",
"FunctionTrendControl", "OnlineTableControl", "AlarmControl" or "UserArchiveControl".

HMIPrintConfiguration
Optional A value or a constant which specifies the log for the printout.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)
AlarmControl (Page 1316)

ProjectPath (RT Professional)

Description
Contains the path and name of the associated project.
Access in Runtime: Read-only

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2043
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.ProjectPath[=String]

Object
Required A "ScreenItem" object with the format "AlarmControl".

String
Optional A value or a constant that specifies which path and name the associated project will
contain.

See also
AlarmControl (Page 1316)

RowSizingEnable (RT Professional)

Description
Specifies whether the row height can be changed.
The "RowSizingEnable" property is then only disabled if both properties "RowSizingEnable"
and "AdaptFontSizeToLineHeight" have the value FALSE.
Access in Runtime: Read and write

Syntax
Object.RowSizingEnable[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "AlarmControl".

BOOLEAN
Optional TRUE, if the row height can be changed.

See also
AlarmControl (Page 1316)

Scrollable (RT Professional)

Description
Specifies whether the DXF screen display supports the Scroll functions in Runtime mode.
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


2044 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.Scrollable[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "DXFView".

BOOLEAN
Optional TRUE, if the DXF screen display supports the Scroll functions in Runtime mode.

ShowMessagesAtDate (Panels, Comfort Panels, RT Advanced)

Description
Determines at which time the alarms will be displayed.

Note
This function does not filter out alarms, it positions the display range of the alarm list as of the
specified date.

Access during runtime: Read and Write

Syntax
Object.ShowMessagesAtDate [= DATE]

Object
Required. An object of the "MessageView" type.
Remarks
To assign SmartTags to the "ShowMessagesAtDate" property, you must formulate the
assignment as follows:
'Example 1
HmiRuntime.Screens("Screen_1").ScreenItems("Alarm
view_1").ShowMessagesAtDate = SmartTags("intern_1").Value
'Example 2
HmiRuntime.Screens("Screen_1").ScreenItems("Alarm
view_1").ShowMessagesAtDate = CDate(SmartTags("intern_1"))
SmartTag "intern_1" must be of the "DateTime" type.

See also
AlarmView (Page 1327)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2045
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Sort (RT Professional)

Description
Specifies the sorting criteria in SQL syntax for the database.
Access in Runtime: Read and write

Syntax
Object.Sort[=String]

Object
Required An object of the "ScreenItem" type with the format "UserArchiveControl".

String
Optional A value or a constant that specifies the sort criteria in SQL syntax for the database.

TableFocusOnButtonCommand (RT Professional)

Description
Specifies whether by clicking on a Button in a script in Runtime the table of the Controls will
be activated.
Access in Runtime: Read and write

Syntax
Object.TableFocusOnButtonCommand[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "AlarmView".

BOOLEAN
Optional TRUE, if by clicking on a Button in a script in Runtime the table of the Controls will
be activated.

See also
AlarmControl (Page 1316)

TimeRangeBase(i) (RT Professional)

Description
Specifies the unit for determining the time interval of the selected trend.

WinCC Professional V13 SP2 – Programming reference


2046 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in Runtime: Read and write

Syntax
Object.TimeRangeBase(i)[=TagLoggingTimeUnit]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl",
"FunctionTrendControl" or "OnlineTableControl".

TagLoggingTimeUnit
( 1): The time intervals are set up in milliseconds.
hmiCurveTimeRangeBase500ms (500): The time intervals are set up in 500 ms.
hmiCurveTimeRangeBaseSecond ( 1000): The time intervals are set up in seconds.
hmiCurveTimeRangeBaseMinute ( 60000): The time intervals are set up in minutes.
hmiCurveTimeRangeBaseHour ( 3600000): The time intervals are set up in hours.
hmiCurveTimeRangeBaseDay ( 86400000): The time intervals are set up in days.

Comments
The time range to be displayed for the trend i is achieved by multiplying the values
"TimeRangeBase(i)" and "TimeRangeFactor(i)", whereby the value of "TimeRangeBase(i)" is
interpreted in milliseconds. The "TimeRangeBase(i" and "TimeRangeFactor(i)" properties are
only evaluated if the "TimeRange" property has the value "-1".

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)

TimeRangeFactor(i) (RT Professional)

Description
Specifies the factor for determining the time interval of the selected trend.
Access in Runtime: Read and write

Syntax
Object.TimeRangeFactor(i)[=Int]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2047
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required A "ScreenItem" object with the formats "OnlineTrend", "FunctionTrendView" or
"TableView".

Int
Optional A value or a constant that specifies the factor for determining the time interval of the
selected trend.

Comments
The time range to be displayed for the trend i is achieved by multiplying the values
""TimeRangeBase(i and "TimeRangeFactor(i)", whereby the value of "TimeRangeBase(i)" is
interpreted in milliseconds. The "TimeRangeBase(i" and "TimeRangeFactor(i)" " properties
are only evaluated if the property "TimeRange" has the value "-1".

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)

UseTimeRange(i) (RT Professional)

Description
Specifies how the time range that is to be shown for the selected trend will be defined.
Access in Runtime: Read and write

Syntax
Object.UseTimeRange(i)[=BOOLEAN]

Object
Required A "ScreenItem" object with the formats "OnlineTrend","FunctionTrendView" or
"TableView".

BOOLEAN
Optional TRUE, if the time range that is to be shown is defined by means of a start time
("TimeAxisBeginTime(i)") and an end time ("TimeAxisEndTime").
FALSE,, if the time range that is to be shown is defined by means of a start time
("TimeAxisBeginTime(i)") and an end time "TimeRangeBase(i)" and "TimeRangeFactor(i)".

Comments
The parameter i indicates the number of the trend.

WinCC Professional V13 SP2 – Programming reference


2048 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)

ValidateFormatPattern (RT Professional)

Description
Specifies that the "format pattern" field can be checked for specific characters.
Access in Runtime: Read and write

Syntax
Object.ValidateFormatPattern[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "IOField".

BOOLEAN
Optional TRUE, if the "format pattern" field can be checked for specific characters.

See also
IOField (Page 1392)

ValueAxisBegin(i) (RT Professional)

Description
Specifies the lower limit of the value range for the selected trend that is to be displayed.
Whether the information is evaluated depends on the properties "Autorange" and
"ShareValueAxis".
Access in Runtime: Read and write

Syntax
Object.ValueAxisBegin(i)[=Double]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl" or
"FunctionTrendControl".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2049
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Double
Optional A value or a constant that specifies the lower limit of the value range of the selected
trend that is to be shown.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

ValueAxisEnd(i) (RT Professional)

Description
Specifies the upper limit of the value range of the selected trend that is to be displayed. Whether
the information is evaluated depends on the properties "Autorange" and "ShareValueAxis".
Access in Runtime: Read and write

Syntax
Object.ValueAxisEnd(i)[=Double]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl" or
"FunctionTrendControl".

Double
Optional A value or a constant that specifies the upper limit of the value range of the selected
trend that is to be shown.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

ZeroPointValue (RT Professional)

Description
Defines the value of the zero point of the scale indicator.
Defines or returns the absolute value for the zero point.

WinCC Professional V13 SP2 – Programming reference


2050 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Zoomable (RT Professional)

Description
Specifies whether the DXF screen display supports the zoom functions in Runtime mode.
Access in Runtime: Read and write

Syntax
Object.Zoomable[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "DXFView".

BOOLEAN
Optional TRUE, if the DXF screen display supports the zoom functions in Runtime mode.

3 (Panels, Comfort Panels, RT Advanced, RT Professional)

Active (RT Professional)

Description
Specifies whether the data that is to be shown is requested by the log server.
Access in Runtime: Read and write

Syntax
Object.Active[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl," or
"OnlineTableControl".

BOOLEAN
Optional TRUE, if the data that is to be shown is requested by the log server.

Comments
The screen opening times are reduced if you do not set this attribute. You can change the
value dynamically.
To differentiate between the "Activate" property and the "Activate" methods, the property is
addressed via "Object".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2051
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)

AdaptFontSizeToLineHeight (RT Professional)

Description
Specifies whether the font size will be adapted to the line height.
Access in Runtime: Read and write

Syntax
Object.AdaptFontSizeToLineHeight[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "AlarmControl".

BOOLEAN
Optional TRUE, if the font size will be adapted to the line height.

See also
AlarmControl (Page 1316)

AddAssignment (RT Professional)

Description
Adds an entry.

AdjustRulerWindow (RT Professional)

Description
Specifies whether the ruler window is adapted every time the trend view is displayed.
Access in Runtime: Read and write

Syntax
Object.AdjustRulerWindow[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


2052 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required A "ScreenItem" object with the format "OnlineTrendControl".

BOOLEAN
Optional TRUE, if the ruler window is adapted every time the trend view is displayed.

Comments
TRUE, if the ruler window will be moved and then shown and hidden, it will be displayed at the
original position in the original size.

See also
OnlineTrendControl (Page 1417)

AlarmHigh (RT Professional)

Description
Defines the top limit value at which an alarm should be triggered or returned.
The type of evaluation (percentage or absolute) is specified with the "TypeAlarmHigh"
property.
Access in Runtime: Write and read

Syntax
Object.AlarmHigh[=REAL]

Object
Required A "ScreenItem" object with the format "Bar".

REAL
Value for the upper limit

See also
Bar (Page 1330)

Alignment (RT Professional)

Description
Determines the layout of the scale (left/right or top/bottom) depending on the position of the
bar object or returns it.
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2053
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.Alignment[=ScalePosition]

Object
Required An object of the "ScreenItem" type with the format "Bar".

ScalePosition
1: Right or bottom .
0: Left or top.

See also
Bar (Page 1330)

AlignmentLeft (RT Professional)

Description
Defines or returns the horizontal alignment of the text. Value range from 0 to 2.
Access in Runtime: Read and write

Syntax
Object.AlignmentLeft[=HorizontalAlignment]

Object
Required An object of the "ScreenItem" type with the format "TextField", "IOField",
"SymbolicIOField", "Button", "RoundButton", "CheckBox", "OptionGroup", "MultilineEdit",
"ComboBox", "ListBox".

HorizontalAlignment
0: Alignment left
1: Alignment centered
2: Alignment right

AllowPersistence (RT Professional)

Description
Specifies whether the persistence is adjustable.
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


2054 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.AllowPersistence[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl",
"FunctionTrendControl" or "OnlineTableControl".

BOOLEAN
Optional TRUE, if the persistence is adjustable.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)

BackColor2 (RT Professional)

Description
Defines or returns the bar color for the display of the current value. LONG write-read access.

BackFillStyleReadOnlySpecial (RT Professional)

Description
Specifies that the "Background fill style" can only be read.
Access in Runtime: Read and write

Syntax
Object.BackFillStyleReadOnlySpecial[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "IOField".

BOOLEAN
Optional TRUE, if the "Background fill style" can only be read.

See also
IOField (Page 1392)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2055
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BarStartValue (RT Professional)

Description
Specifies the value of the zero point of the scale.
Access in Runtime: Read and write

Syntax
Object.BarStartValue[=Double]

Object
Required A "ScreenItem" object with the format "Bar".

Double
Optional A value or a constant that specifies the value of the zero point for the scale.

See also
Bar (Page 1330)

BarWidth (RT Professional)

Description
Defines or returns the width of the bar in pixels.

BeginTime(i) (RT Professional)

Description
Specifies the start time of the time range to be shown in the trend view. The property
"TagProviderType(i)" must have the value -1.
Access in Runtime: Read and write

Syntax
Object.BeginTime(i)[=Time]

Object
Required An object of the "ScreenItem" type with the format "FunctionTrendControl" oder
"OnlineTableControl".

WinCC Professional V13 SP2 – Programming reference


2056 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Time
Optional A value or a constant which determines the start time of the time range to be shown
in the trend view.

Comments
The parameter i indicates the number of the trend.
If "BeginTime(i)" is changed, illegal combinations with different attributes for the data
connection could arise. This means you have to prevent an immediate acceptance of the
change with "FreezeProviderConnections" before changing "BeginTime(i)".

See also
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)

BorderColorBottom (RT Professional)

Description
Defines or returns the border color for the bottom/right part of the object. LONG write-read
access.

BorderColorTop (RT Professional)

Description
Defines or returns the border color for the top/left part of the object. LONG write-read access.

CentrePoint (RT Professional)

Description
Specifies the position of the center point.
Access in Runtime: Read and write

Syntax
Object.CentrePoint[=Point]

Object
Required A "ScreenItem" object with the formats "EllipseSegment", "CircleSegment",
"EllipticalArc" or "CircularArc".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2057
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Point
Optional A value that specifies the position of the center point.

See also
EllipseSegment (Page 1363)
CircleSegment (Page 1348)
EllipticalArc (Page 1366)
CircularArc (Page 1351)

CentrePointLeft (RT Professional)

Description
Specifies the horizontal distance in pixels of the center point from the left edge of the screen.
Access in Runtime: Read and write

Syntax
Object.CentrePointLeft[=Int]

Object
Required A "ScreenItem" object with the formats "EllipseSegment", "CircleSegment",
"EllipticalArc" or "CircularArc".

Int
Optional A value that specifies the horizontal distance in pixels of the center point from the left
edge of the screen.

See also
EllipseSegment (Page 1363)
CircleSegment (Page 1348)
EllipticalArc (Page 1366)
CircularArc (Page 1351)

CentrePointTop (RT Professional)

Description
Specifies the vertical distance in pixels of the center point from the upper edge of the screen.
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


2058 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.CentrePointTop[=Int]

Object
Required A "ScreenItem" object with the formats "EllipseSegment", "CircleSegment",
"EllipticalArc" or "CircularArc".

Int
Optional A value that specifies the vertical distance in pixels of the center point from the upper
edge of the screen.

See also
EllipseSegment (Page 1363)
CircleSegment (Page 1348)
EllipticalArc (Page 1366)
CircularArc (Page 1351)

ColorBottom (RT Professional)

Description
Defines or returns the color for the bottom/right stop of the slider object. LONG write-read
access.

ColorChangeType (RT Professional)

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.

ColorTop (RT Professional)

Description
Defines or returns the color for the top/left stop of the slider object. LONG write-read access.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2059
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ColumnColor(i) (RT Professional)

Description
Determines the color of the i column pair. The parameter i indicates the number of the column
pair.
Access in Runtime: Read and write

Syntax
Object.ColumnColor(i)[=Color]

Object
Required A "ScreenItem" object with the format "OnlineTableControl".

Color
Optional A value or a constant that specifies the color of the i column pair.

See also
OnlineTableControl (Page 1409)

ColumnDisplayName(i) (RT Professional)

Description
Specifies the name for the selected column pair. The parameter i indicates the number of the
column pair.
Access in Runtime: Read and write

Syntax
Object.ColumnDisplayName(i)[=String]

Object
Required A "ScreenItem" object with the format "OnlineTableControl".

String
Optional A value or a constant that specifies the name for the selected column pair.

See also
OnlineTableControl (Page 1409)

WinCC Professional V13 SP2 – Programming reference


2060 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ColumnUpdateEnabled(i) (RT Professional)

Description
Specifies whether the selected column pair will be shown statically or dynamically.
Access in Runtime: Read and write

Syntax
Object.ColumnUpdateEnabled(i)[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "OnlineTableControl".

BOOLEAN
Optional TRUE if the column pair is to be shown statically.

Comments
The "CurrentColumnIndex" property references the column pair that is currently active.

See also
OnlineTableControl (Page 1409)

Command (RT Professional)

Description
Specifies whether there is a forced update of the values displayed in the control.
Access in Runtime: Read and write

Syntax
Object.Command[=String]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl" or
"OnlineTableControl".

String
Optional A value or a constant which specifies whether there is a forced update of the values
displayed in the control.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2061
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)

Comment (RT Professional)

Description
Reads or sets the Alarm object comment.

CommonTimeAxisColor (RT Professional)

Description
Specifies the color of the mutual X axis.
Access in Runtime: Read and write

Syntax
Object.CommonTimeAxisColor[=Color]

Object
Required A "ScreenItem" object with the format "OnlineTrendControl".

Color
Optional A value or a constant that specifies the color of the common x axis.

See also
OnlineTrendControl (Page 1417)

ConfigureTimeAxis(i) (RT Professional)

Description
Specifies whether a common time axis is used for all the trends in the trend view.
Access in Runtime: Read and write

Syntax
Object.ConfigureTimeAxis(i)[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


2062 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required A "ScreenItem" object with the format "OnlineTrendControl".

BOOLEAN
Optional TRUE, if a common axis is used for all the trends in the trend view.

See also
OnlineTrendControl (Page 1417)

CurrentCurveIndex (RT Professional)

Description
Specifies the index for the active trends.
Access in Runtime: Read and write

Syntax
Object.CurrentCurveIndex[=Int]

Object
Required An object of the "ScreenItem" type with the format "FunctionTrendControl" or
"OnlineTrendControl".

Int
Optional A value or a constant that specifies the index of the trends that are currently active.

Comments
The "CurrentCurveIndex" property is evaluated by other properties so that their settings can
be assigned to a specific trend. Valid values range from 0 to -1. The "CurvesCount" property
contains the number of trends to be shown.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

CurveColor(i) (RT Professional)

Description
Specifies the color of the selected trend.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2063
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in Runtime: Read and write

Syntax
Object.CurveColor(i)[=Color]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl" or
"FunctionTrendControl".

Color
Optional A value or a constant that specifies the color of the selected trend.

Comments
The parameter i indicates the number of the trend.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

CurveLineWidth(i) (RT Professional)

Description
Specifies the line weight of the selected trend.
Access in Runtime: Read and write

Syntax
Object.CurveLineWidth(i)[=Int]

Object
Required A "ScreenItem" object with the format "OnlineTrendControl".

Int
Optional A value or a constant that specifies the line weight of the selected trend. Value range
from 0 to 10.

Comments
The parameter i indicates the number of the trend.

WinCC Professional V13 SP2 – Programming reference


2064 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
OnlineTrendControl (Page 1417)

CurvesCount (RT Professional)

Description
Returns the number of configured trends or column pairs (visible and invisible) of the window.
Access in Runtime: Read and write

Syntax
Object.CurvesCount[=Int]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl" or
"FunctionTrendControl".

Int
Optional A value or a constant that returns the number of configured trends or column pairs
(visible and invisible) of the window.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

CurveUpdateEnabled(i) (RT Professional)

Description
Specifies whether the selected trend will be shown statically or dynamically.
Access in Runtime: Read and write

Syntax
Object.CurveUpdateEnabled(i)[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "OnlineTrendControl".

BOOLEAN
Optional TRUE if the trend is to be shown statically.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2065
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
The parameter i indicates the number of the trend.

See also
OnlineTrendControl (Page 1417)

DataIndex(i) (RT Professional)

Description
Returns the current index for the data of the current trend.
Access in Runtime: Read and write

Syntax
Object.DataIndex(i)[=Int]

Object
Required A "ScreenItem" object with the format "FunctionTrendControl".

Int
Optional A value or a constant that specifies the current index of the data for the current trend.

See also
FunctionTrendControl (Page 1373)

DataLogTag (RT Professional)

Description
Specifies which tag is linked with the selected trend.
Access in Runtime: Read and write

Syntax
Object.DataLogTag[=HmiLoggingTag]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl" or
"OnlineTableControl".

WinCC Professional V13 SP2 – Programming reference


2066 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

HmiLoggingTag
Optional A value or a constant that specifies which tags are linked to the selected trend.

Comments
The parameter i indicates the number of the trend.

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)

DataX(i) (RT Professional)

Description
Inserts one single data record and must be set prior to the call of "InsertData(i)".
Access in Runtime: Read and write

Syntax
Object.DataX(i)[=object]

Object
Required A "ScreenItem" object with the format "FunctionTrendControl".

object
Optional A value or a constant that inserts one single data record.

See also
FunctionTrendControl (Page 1373)

DataXY(i) (RT Professional)

Description
Inserts several data records as Array with value pairs and must be set before calling
"InsertData(i)".
The data in the Array are applied if "DataX(i)" is a VT_EMPTY type. Otherwise, the single value
pair resulting from "DataX(i)" and "DataY(i)" will be used in the attribute "InsertData(i)".
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2067
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.DataXY(i)[=object]

Object
Required A "ScreenItem" object with the format "FunctionTrendView".

object
Optional A value or a constant which inserts several data records as Array with value pairs.

See also
FunctionTrendControl (Page 1373)

DataY(i) (RT Professional)

Description
Inserts one single data record and must be set prior to the call of "InsertData(i)".
Access in Runtime: Read and write

Syntax
Object.DataY(i)[=Double]

Object
Required A "ScreenItem" object with the format "FunctionTrendControl".

Double
Optional A value or a constant that inserts one single data record.

See also
FunctionTrendControl (Page 1373)

DeleteData(i) (RT Professional)

Description
Specifies which data from the data buffer of the active trend will be deleted.
TRUE:
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


2068 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.DeleteData(i)[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "FunctionTrendControl".

BOOLEAN
Optional TRUE, if all the data of the trend is to be deleted.
FALSE, if the value pair at position "DataIndex(i)" is to be deleted.

See also
FunctionTrendControl (Page 1373)

Direction (RT Professional)

Description
Defines or returns the bar direction or the position of the slider object.
Access in Runtime: Read and write

Syntax
Object.Direction [=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "Bar" or "Slider".

BOOLEAN
0 = top
1 = bottom
2 = left
3 = right

DisplayName(i) (RT Professional)

Description
Specifies the name for the selected trend.
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2069
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.DisplayName(i)[=String]

Object
Required A "ScreenItem" object with the format "FunctionTrendControl".

String
Optional A value or a constant that specifies the name for the selected trend.

Comments
The parameter i indicates the number of the trend.

See also
FunctionTrendControl (Page 1373)

DrawEnhancedHTMLBrowser (RT Professional)

Description
Specifies the style of the HTML-Browsers.
Access in Runtime: Read and write

Syntax
Object.DrawEnhancedHTMLBrowser[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "HTMLBrowser".

BOOLEAN
Optional TRUE, if an extended HTML-Browser will be displayed.

See also
HTMLBrowser (Page 1391)

Editable(i) (RT Professional)

Description
Specifies whether a column pair can be edited. The parameter i indicates the number of the
column pair.

WinCC Professional V13 SP2 – Programming reference


2070 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in Runtime: Read and write

Syntax
Object.Editable(i)[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "OnlineTableControl".

BOOLEAN
Optional TRUE, if the column pair can be edited. The column pair is referenced by the
parameter i.

See also
OnlineTableControl (Page 1409)

EditEnabled (RT Professional)

Description
Specifies whether edit mode is enabled for a cell, if the property "Editable(i)" has the value
TRUE.
Access in Runtime: Read and write

Syntax
Object.EditEnabled[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "OnlineTableControl".

BOOLEAN
Optional TRUE, if the edit mode is enabled for a cell if the property "Editable(i)" has the value
TRUE.

See also
OnlineTableControl (Page 1409)

EndPoint (RT Professional)

Description
Specifies the position of the end point.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2071
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in Runtime:

Syntax
Object.EndPoint[=Point]

Object
Required A "ScreenItem" object with the formats "EllipseSegment", "CircleSegment",
"EllipticalArc" or "CircularArc".

Point
Optional A value that specifies the position of the end point.

See also
EllipseSegment (Page 1363)
CircleSegment (Page 1348)
EllipticalArc (Page 1366)
CircularArc (Page 1351)

EndPointLeft (RT Professional)

Description
Specifies the horizontal distance in pixels of the end point from the left edge of the screen.
Access in Runtime: Read and write

Syntax
Object.EndPointLeft[=Int]

Object
Required A "ScreenItem" object with the formats "EllipseSegment", "CircleSegment",
"EllipticalArc" or "CircularArc".

Int
Optional A value that specifies the horizontal distance in pixels of the end point from the left
edge of the screen.

See also
EllipseSegment (Page 1363)
CircleSegment (Page 1348)

WinCC Professional V13 SP2 – Programming reference


2072 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

EllipticalArc (Page 1366)


CircularArc (Page 1351)

EndPointTop (RT Professional)

Description
Specifies the vertical distance in pixels of the end point from the upper edge of the screen.
Access in Runtime: Read and write

Syntax
Object.EndPointTop[=Int]

Object
Required A "ScreenItem" object with the formats "EllipseSegment", "CircleSegment",
"EllipticalArc" or "CircularArc".

Int
Optional A value that specifies the vertical distance in pixels of the end point from the upper
edge of the screen.

See also
EllipseSegment (Page 1363)
CircleSegment (Page 1348)
EllipticalArc (Page 1366)
CircularArc (Page 1351)

EndTime(i) (RT Professional)

Description
Specifies the end time of the time range to be shown in the trend view. The property
"TagProviderType(i)" must have the value -1.
Access in Runtime: Read and write

Syntax
Object.EndTime(i)[=Time]

Object
Required An object of the "ScreenItem" type with the format "FunctionTrendControl" or
"OnlineTabelControl".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2073
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Time
Optional A value or a constant that specifies the end time of the time range that is to be shown
in the trend window.

Comments
The parameter i indicates the number of the trend.
If "EndTime(i)" is changed, illegal combinations with different attributes for the data connection
could arise. This means you have to prevent an immediate acceptance of the change with
"FreezeProviderConnections" before changing "EndTime(i)".

See also
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)

ExportXML (Panels, Comfort Panels, RT Advanced)

ExportXML
Only used internally.
The attribute can be assigned dynamic properties by means of the name ExportXML.

ExtendedOperation (RT Professional)

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.

ExtraSpaceForLabelDisplay (RT Professional)

Description
Specifies the extra space required for the label.
Access in Runtime: Read and write

Syntax
Object.ExtraSpaceForLabelDisplay[=Int]

Object
Required A "ScreenItem" object with the format "Bar".

WinCC Professional V13 SP2 – Programming reference


2074 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int
Optional A value that specifies the extra space required for the label.

See also
Bar (Page 1330)

FlashFlashPicture (RT Professional)

Description
TRUE, when flashing of the flash picture is activated. BOOLEAN write-read access.

FlashForeColor (RT Professional)

Description
TRUE, when flashing of the text is activated. BOOLEAN write-read access.

FlashPicReferenced (RT Professional)

Description
TRUE, when the assigned flash picture is to be saved. Otherwise, only the associated object
reference is saved. Read only access.

FlashPicture (RT Professional)

Description
Returns the flash picture. Read-only access.
The graphic (*.BMP or *.DIB) must be located in the "GraCS" folder of the current project so
that it can be integrated.
In this context, the "FlashPicReferenced" property defines whether the flash picture should be
saved or referenced together with the object.

FlashRateBorderColor (RT Professional)

Description
Defines or returns the flash frequency for the lines of the object. Value range from 0 to 2.
0 = slow
1 = medium

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2075
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

2 = fast

FlashRateFlashPic (RT Professional)

Description
Defines or returns the flash frequency for the flash picture. Value range from 0 to 2.
0 = slow
1 = medium
2 = fast

FlashRateForeColor (RT Professional)

Description
Defines or returns the flash frequency for the object label. Value range from 0 to 2.
0 = slow
1 = medium
2 = fast

FormatPatternReadOnlySpecial (RT Professional)

Description
Specifies that the "format pattern" field can only be read.
Access in Runtime: Read and write

Syntax
Object.FormatPatternReadOnlySpecial[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "IOField".

BOOLEAN
Optional TRUE, if the "format pattern" field can only be read.

See also
IOField (Page 1392)

WinCC Professional V13 SP2 – Programming reference


2076 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

FreezeProviderConnections (RT Professional)

Description
Specifies whether the properties for the data connection ("TagProviderType(i)", "Source.."...)
can be changed without the change becoming effective immediately. If you change from, for
example, "XDataLogTag(i)" illegal combinations with "YDataLogTag(i)" could arise.
This means attributes must have the value TRUE before changing the data connection
"FreezeProviderConnections". After changing all the properties for the data connection,
"FreezeProviderConnection" will be set to FALSE and the changes will become effective.
Access in Runtime: Read and write

Syntax
Object.FreezeProviderConnections[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "FunctionTrendControl".

BOOLEAN
Optional TRUE, if the properties for the data connection ("TagProviderType(i)", "Source.."...)
can be changed without the change becoming effective immediately.

See also
FunctionTrendControl (Page 1373)

GetSelectionText (RT Professional)

Description
Returns the selected text of the "MultiLineEdit" object.

HideTagNames (RT Professional)

Description
Specifies whether the tag name is shown in the f/t() trend view.
Access in Runtime: Read and write

Syntax
Object.HideTagNames[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2077
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required A "ScreenItem" object with the format "OnlineTrendControl".

BOOLEAN
Optional TRUE, if the tag names are displayed.

See also
OnlineTrendControl (Page 1417)

LanguageSwitch (RT Professional)

Description
Returns the value which defines where the language dependent assigned texts are stored.
Read only access.
TRUE, if the texts are managed in the project texts editor. Translations into other languages
are made in the project texts editor.
FALSE, when the texts are managed directly in the object. Translations into other languages
can be made by means of the export/import function.

LeaveMarginForBorder (RT Professional)

Description
Specifies whether an additional margin will be left for borders.
Access in Runtime: Read and write

Syntax
Object.LeaveMarginForBorder[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "Bar".

BOOLEAN
Optional TRUE, if an additional margin is enabled for borders.

See also
Bar (Page 1330)

WinCC Professional V13 SP2 – Programming reference


2078 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

LeaveMarginForMarkers (RT Professional)

Description
Specifies whether an additional margin will be left for markers.
Access in Runtime: Read and write

Syntax
Object.LeaveMarginForMarkers[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "Bar".

BOOLEAN
Optional TRUE, if an additional margin is enabled for markers.

See also
Bar (Page 1330)

Min (RT Professional)

Description
Defines or returns the absolute value in the case of the smallest value display. This value is
displayed if the scale display is active.

NumberOfValues(i) (RT Professional)

Description
Specifies the number of values that are shown in the trend window. The property
"TagProviderType(i)"" must have the value -1. Whether the information is evaluated depends
on the property "UseMeasurePoints(i)".".
Access in Runtime: Read and write

Syntax
Object.NumberOfValues(i)[=Int]

Object
Required An object of the "ScreenItem" type with the format "FunctionTrendControl".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2079
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int
Optional A value or a constant that specifies the number of values that are shown in the trend
window.

Comments
Number of value pairs for trend i (from tag provider)

See also
FunctionTrendControl (Page 1373)

Parent (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Returns the screen in which the specified object is embedded.
Access in Runtime: Read

Syntax
Object.Parent

Object
Required A "ScreenItem" object. This property is a standard property of the ScreenItem object
and is therefore available for all formats.

Application example
The following example writes the name of the root screen in "BaseScreenName" tag:

'VBS_Example_Parent
Dim objScrItem, BaseScreenName
Set objScrItem = HMIRuntime.Screens(1).ScreenItems(1)
BaseScreenName = "Name of BaseScreen: " & objScrItem.Parent.ObjectName

See also
Line (Page 1396)
Polyline (Page 1431)
Ellipse (Page 1361)
Circle (Page 1346)
EllipseSegment (Page 1363)
CircleSegment (Page 1348)

WinCC Professional V13 SP2 – Programming reference


2080 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

EllipticalArc (Page 1366)


CircularArc (Page 1351)
Rectangle (Page 1443)
Polygon (Page 1429)
TextField (Page 1477)
IOField (Page 1392)
SymbolicIOField (Page 1463)
Button (Page 1337)
Switch (Page 1460)
GraphicView (Page 1387)
GraphicIOField (Page 1383)
Bar (Page 1330)
Clock (Page 1353)
Gauge (Page 1380)
Slider (Page 1453)
SymbolLibrary (Page 1468)
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)
OnlineTableControl (Page 1409)
AlarmControl (Page 1316)
HTMLBrowser (Page 1391)
CheckBox (Page 1343)
OptionGroup (Page 1426)
WindowSlider (Page 1508)
Connector (Page 1355)
ScreenWindow (Page 1449)
DiskSpaceView (Page 1359)
ChannelDiagnose (Page 1341)
ScriptDiagnostics (Page 1451)
Group (Page 1389)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2081
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

PicUpReferenced (RT Professional)

Description
TRUE, when the picture assigned for the "Off" status should be saved in the object. Otherwise,
only the associated object reference is saved. Read only access.

RemoveAllAssignment (RT Professional)

Description
Deletes all entries.

RemoveAssignment (RT Professional)

Description
Removes an entry.

RowNumber (RT Professional)

Description
Specifies the row number of the Row object of a Table Control.

See also
AlarmControl (Page 1316)

RulerPrecision(i) (RT Professional)

Description
Specifies the number of decimal places with which a measurement value of the specified trend
will be displayed if it is measured via the function "Display value here".
Access in Runtime: Read and write

Syntax
Object.RulerPrecision(i)[=Int]

Object
Required A "ScreenItem" object with the format "OnlineTrendControl".

WinCC Professional V13 SP2 – Programming reference


2082 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int
Optional A value or a constant that specifies the number of decimal places with which a
measurement value of the specified trend will be displayed if it is measured via the function
"Display value here".

See also
OnlineTrendControl (Page 1417)

RulerXPrecision(i) (RT Professional)

Description
Specifies the number of decimal places with which a measurement value of the X coordinate
will be displayed. Whether the information is evaluated depends on the value of the property
"XAxisMode(i)".
Access in Runtime: Read and write

Syntax
Object.RulerXPrecision(i)[=Int]

Object
Required A "ScreenItem" object with the format "FunctionTrendControl".

Int
Optional A value or a constant that specifies the number of decimal places with which a
measurement value of the X coordinate will be displayed.

Comments
The parameter i indicates the number of the trend.
You use the function "Display value here" to view the X coordinate of the measurement value.

See also
FunctionTrendControl (Page 1373)

RulerYPrecision(i) (RT Professional)

Description
Specifies the number of decimal places with which a measurement value of the Y coordinate
will be displayed. Whether the information is evaluated depends on the value of the property
"XAxisMode(i)".".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2083
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in Runtime: Read and write

Syntax
Object.RulerYPrecision(i)[=Int]

Object
Required An object of the "ScreenItem" type with the format "FunctionTrendControl".

Int
Optional A value or a constant that specifies the number of decimal places with which a
measurement value of the Y coordinate will be displayed.

Comments
The parameter i indicates the number of the trend.
You use the function "Display value here" to view the Y coordinate of the measurement value.

See also
FunctionTrendControl (Page 1373)

SetAllAssignment (RT Professional)

Description
Sets all entries.

SetpointTrendArchiveStartId(i) (RT Professional)

Description
Specifies the starting position from which the values of the setpoint trend will be read from the
recipe. Whether the information is evaluated depends on the value of the property
"ShowSetpointTrend(i)".
Access in Runtime: Read and write

Syntax
Object.SetpointTrendArchiveStartId(i)[=Int]

Object
Required A "ScreenItem" object with the format "FunctionTrendControl".

WinCC Professional V13 SP2 – Programming reference


2084 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int
Optional A value or a constant that specifies the starting position from which the values of the
setpoint trend will be read from the recipe.

Comments
The parameter i indicates the number of the trend.

See also
FunctionTrendControl (Page 1373)

SetpointTrendColor(i) (RT Professional)

Description
Specifies the color of a setpoint trend. Whether the information is evaluated depends on the
value of the property "ShowSetpointTrend(i)".
Access in Runtime: Read and write

Syntax
Object.SetpointTrendColor(i)[=Color]

Object
Required An object of the "ScreenItem" type with the format "FunctionTrendControl".

Color
Optional A value or a constant that specifies the color of a setpoint trend.

Comments
The parameter i indicates the number of the trend.

See also
FunctionTrendControl (Page 1373)

SetpointTrendNumberOfValues(i) (RT Professional)

Description
Specifies the number of value pairs of a setpoint trend. Whether the information is evaluated
depends on the value of the property "ShowSetpointTrend(i)".
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2085
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.SetpointTrendNumberOfValues(i)[=Int]

Object
Required A "ScreenItem" object with the format "FunctionTrendControl".

Int
Optional A value or a constant that specifies the number of value pairs of a setpoint trend.

Comments
The parameter i indicates the number of the trend.

See also
FunctionTrendControl (Page 1373)

SetProps (RT Professional)

Description
Sets the value of the property.

SetSelection (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Sets a list of the lines which are selected.

ShareTimeAxis (RT Professional)

Description
Specifies whether the trends of a trend window are displayed with a shared X axis.
Access in Runtime: Read and write

Syntax
Object.ShareTimeAxis[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "OnlineTrendControl".

WinCC Professional V13 SP2 – Programming reference


2086 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BOOLEAN
Optional. TRUE, if the trends of the trend window are displayed with a shared X axis.

See also
OnlineTrendControl (Page 1417)

ShareTimeColumn (RT Professional)

Description
Specifies whether a shared time column will be used in the table window.
Access in Runtime: Read and write

Syntax
Object.ShareTimeColumn[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "OnlineTableControl".

BOOLEAN
Optional TRUE, if a shared time column will be used in the table window.

See also
OnlineTableControl (Page 1409)

ShareValueAxis (RT Professional)

Description
Specifies whether the trends of a trend window are displayed with a shared Y axis.
Access in Runtime: Read and write

Syntax
Object.ShareValueAxis[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "OnlineTrendControl".

BOOLEAN
Optional TRUE, if the trends of the trend window are displayed with a shared Y axis.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2087
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
OnlineTrendControl (Page 1417)

ShareXAxis (RT Professional)

Description
Specifies whether the trends of a trend window are displayed with a shared X axis.
Access in Runtime: Read and write

Syntax
Object.ShareXAxis[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "FunctionTrendControl".

BOOLEAN
Optional TRUE, if the trends of the trend window are displayed with a shared X axis.

See also
FunctionTrendControl (Page 1373)

ShareYAxis (RT Professional)

Description
Specifies whether the trends of a trend window are displayed with a shared Y axis.
Access in Runtime: Read and write

Syntax
Object.ShareYAxis[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "FunctionTrendControl".

BOOLEAN
Optional TRUE, if the trends of the trend window are displayed with a shared Y axis.

See also
FunctionTrendControl (Page 1373)

WinCC Professional V13 SP2 – Programming reference


2088 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ShowBorder (RT Professional)

Description
Specifies whether the window will be shown with a border.
Access in Runtime: Read and write

Syntax
Object.ShowBorder[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "UserArchiveControl".

BOOLEAN
Optional TRUE if the window is to be shown with a border.

ShowColumn(i) (RT Professional)

Description
Specifies whether a column pair that is referenced via the "CurrentColumnIndex" property is
shown.
Access in Runtime: Read and write

Syntax
Object.ShowColumn(i)[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "OnlineTableControl".

BOOLEAN
Optional TRUE, if a column pair that is referenced via the "CurrentColumnIndex" property is
shown.

See also
OnlineTableControl (Page 1409)

ShowCurve(i) (RT Professional)

Description
Specifies whether a trend that is referenced via the "CurrentCurveIndex" property is shown.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2089
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in Runtime: Read and write

Syntax
Object.ShowCurve(i)[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl" or
"FunctionTrendControl".

BOOLEAN
Optional TRUE, if a trend that is referenced via the "CurrentCurveIndex" property is shown.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

ShowInputControls (Panels, Comfort Panels, RT Advanced)

Description
Establishes whether additional fields exist for entering the address and password.

Syntax
Object.ShowInputControls

Object
Required A "ScreenItem" object with the format "SmartClientView".

ShowMainFrame (RT Professional)

Description
Specifies whether the entire bar object is provided with a border.
Access in Runtime: Read and write

Syntax
Object.ShowMainFrame[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "Bar".

WinCC Professional V13 SP2 – Programming reference


2090 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BOOLEAN
Option TRUE, if the entire bar object is shown with a border.

See also
Bar (Page 1330)

ShowOverflowIndicator (RT Professional)

Description
Specifies whether an overflow indicator is shown when the process value exceeds or falls short
of the limit value.
Access in Runtime: Read and write

Syntax
Object.ShowOverflowIndicator[=BOOLEAN]

Object
Required A "ScreenItem" object with the format ""Bar".".

BOOLEAN
TRUE, if an overflow indicator is shown when the process value exceeds or falls short of the
limit value.

See also
Bar (Page 1330)

ShowSetpointTrend(i) (RT Professional)

Description
Specifies whether a setpoint trend that belongs to a trend that is referenced via
"CurrentCurveIndex" should be shown.
Access in Runtime: Read and write

Syntax
Object.ShowSetpointTrend(i)[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "FunctionTrendControl".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2091
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BOOLEAN
Optional TRUE, if a setpoint trend that belongs to a trend that is referenced via
CurrentCurveIndex" should be shown.

See also
FunctionTrendControl (Page 1373)

SmallChange (RT Professional)

Description
Defines how many steps the controller can be moved with one mouse click or returns the value.

StartPoint (RT Professional)

Description
Specifies the beginning of the object or returns it.

StatusbarShowArchiveName (RT Professional)

Description
Specifies whether the archive name will be displayed in the status bar.
Access in Runtime: Read and write

Syntax
Object.StatusbarShowArchiveName[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "UserArchiveControl".

BOOLEAN
Optional TRUE, if the archive name will be displayed in the status bar.

StatusbarShowColumn (RT Professional)

Description
Specifies whether the current number of selected data record columns will be displayed.
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


2092 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.StatusbarShowColumn[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "UserArchiveControl".

BOOLEAN
Optional TRUE, specifies whether the current number of selected data record columns will be
displayed.

StatusbarShowRecord (RT Professional)

Description
Specifies whether the field coordinates of the selected data record will be displayed in the
status bar.
Access in Runtime: Read and write

Syntax
Object.StatusbarShowRecord[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "UserArchiveControl".

BOOLEAN
Optional TRUE, if the field coordinates of the selected data record will be displayed in the
status bar.

StatusbarShowRow (RT Professional)

Description
Specifies whether the current number of selected data record rows will be displayed.
Access in Runtime: Read and write

Syntax
Object.StatusbarShowRow[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "UserArchiveControl".

BOOLEAN
Optional TRUE, if the current number of selected data record rows will be displayed.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2093
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

StatusbarShowText (RT Professional)

Description
Specifies whether the current status of the database will be displayed in the status bar.
Access in Runtime: Read and write

Syntax
Object.StatusbarShowText[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "UserArchiveControl".

BOOLEAN
Optional TRUE, specifies whether the current status of the database will be displayed in the
status bar.

SwapDimensionsWithOrientation (RT Professional)

Description
Specifies whether the values for the height and width of the bar should be automatically
replaced if the bar alignment is changed.
Access in Runtime: Read and write

Syntax
Object.SwapDimensionsWithOrientation[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "Bar".

BOOLEAN
Optional TRUE, if the values for the height and width of the bar should be automatically
replaced if the bar alignment is changed.

See also
Bar (Page 1330)

WinCC Professional V13 SP2 – Programming reference


2094 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

TimeAxisShowLargeIncrements(i) (RT Professional)

Description
Specifies whether the time axis is scaled with long marking lengths.
Access in Runtime: Read and write

Syntax
Object.TimeAxisShowLargeIncrements(i)[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "OnlineTrend".

BOOLEAN
Optional TRUE, if the time axis is scaled with long marking lengths.

Comments
The distance of two long marking lines can be altered with the
""TimeAxisLargeIncrementSize(i) property.

See also
OnlineTrendControl (Page 1417)

TimeAxisShowSmallIncrements(i) (RT Professional)

Description
Specifies whether the time axis is scaled with short marking lengths.
Access in Runtime: Read and write

Syntax
Object.TimeAxisShowSmallIncrements(i)[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "OnlineTrend".

BOOLEAN
Optional TRUE, if the time axis is scaled with short marking lengths.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2095
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
The distance of two short marking lines can be altered with the
"TimeAxisSmallIncrementSize(i)" property.

See also
OnlineTrendControl (Page 1417)

TimeJumpColor(i) (RT Professional)

Description
Specifies the color that is identified in the time jump available in the log. Whether the information
is evaluated depends on the property "TimeJumpEnabled(i)".".
Access in Runtime: Read and write

Syntax
Object.TimeJumpColor(i)[=Color]

Object
Required A "ScreenItem"" object with the formats ""OnlineTrend" or ""TableView".".

Color
Optional A value or a constant that specifies the color that identifies the time jump available
in the log.

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)

TimeJumpEnabled(i) (RT Professional)

Description
Specifies if the time jumps available in the log are identified in the color set up in
"TimeJumpColor(i)".
Access in Runtime: Read and write

Syntax
Object.TimeJumpEnabled(i)[=BOOLEAN]

WinCC Professional V13 SP2 – Programming reference


2096 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Object
Required A "ScreenItem" object with the formats "OnlineTrend" or ""TableView".

BOOLEAN
Optional TRUE, if the time jumps available in the log are identified in the color specified in
"TimeJumpColor(i)".

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)

TimeOverlapColor(i) (RT Professional)

Description
Specifies the color that is identified in the time overlap available in the log. Whether the
information is evaluated depends on the attribute "TimeOverlapEnabled(i)".".
Access in Runtime: Read and write

Syntax
Object.TimeOverlapColor(i)[=Color]

Object
Required A "ScreenItem" object with the formats "OnlineTrend" or ""TableView".

Color
Optional A value or a constant that specifies the color that identifies the time overlap available
in the log.

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)

TimeOverlapEnabled(i) (RT Professional)

Description
Specifies if the time overlaps available in the log are identified in the color set up in
"TimeOverlapColor(i)".
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2097
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.TimeOverlapEnabled(i)[=BOOLEAN]

Object
Required A "ScreenItem" object with the formats "OnlineTrend"" or "TableView".

BOOLEAN
Optional TRUE, if the time jumps overlaps available in the log are identified in the color
specified in ""TimeOverlapColor(i)"".

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)

Type (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Returns the type of the specified object as STRING. Name diagram: Hmi<ObjectName>, e.g.
HmiCircle for the "circle" screen object.
Access in Runtime: Read

Syntax
Object.Type

Object
Required A "ScreenItem" object.

UnselBGColor property (RT Professional)

Description
Defines or returns the background color of entries in the text list object which are not selected.
LONG write-read access.

UnselTextColor property (RT Professional)

Description
Defines or returns the color of the text for entries in the text list object which are not selected.
LONG write-read access.

WinCC Professional V13 SP2 – Programming reference


2098 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UpdateCycle property (RT Professional)

Description
Returns the type and frequency of updating the picture window in Runtime. Read only access.

UseBarBorderConstraints (RT Professional)

Description
Specifies whether the bar border is restricted to specific values.
Access in Runtime: Read and write

Syntax
Object.UseBarBorderConstraints[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "Bar".

BOOLEAN
Optional. TRUE, if the bar border is restricted to specific values.

See also
Bar (Page 1330)

UseEffectiveProcessValue (RT Professional)

Description
Specifies whether an actual percentage made up of maximum value, minimum value, average
of the last 15 values and hysteresis will be used.
Access in Runtime: Read and write

Syntax
Object.UseEffectiveProcessValue[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "Bar".

BOOLEAN
Optional TRUE, if an actual percentage made up of maximum value, minimum value, average
of the last 15 values and hysteresis will be used.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2099
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
Bar (Page 1330)

UseGDI (RT Professional)

Description
Specifies whether the ellipse is shown via GDI or GDI+.
Access in Runtime: Read and write

Syntax
Object.UseGDI[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "Ellipse".

BOOLEAN
Optional TRUE, if the ellipse is shown via GDI.

See also
Ellipse (Page 1361)

UseMeasurePoints(i) (RT Professional)

Description
Specifies whether the time range for the selected trend will be determined by measuring points
or the end time. Whether the information is evaluated depends on the properties
"TimeAxisEndTime", "TimeAxisBeginTime(i)".
Define time range for curve i through measure points (TRUE) or end time (FALSE) (for time
based tag providers)
Access in Runtime: Read and write
Syntax
Object.UseMeasurePoints(i)[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl"or
"FunctionTrendControl".

BOOLEAN
Optional TRUE, if the time range for the selected trend will be determined by measuring points.

WinCC Professional V13 SP2 – Programming reference


2100 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
The parameter i indicates the number of the trend.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

UseMultipleLimits (RT Professional)

Description
Specifies whether one or more pairs of limits are shown as a selection or a line.
Access in Runtime: Read and write

Syntax
Object.UseMultipleLimits[=BOOLEAN]

Object
Required A "ScreenItem" object with the format ""Bar".

BOOLEAN
Optional TRUE, if one or more pairs of limits are displayed as a selection or a line.

See also
Bar (Page 1330)

UseScaleConstraints (RT Professional)

Description
Specifies whether the distance between two large marking lengths of the scale are calculated
from the minimum and maximum values.
Access in Runtime: Read and write

Syntax
Object.UseScaleConstraints[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "Bar".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2101
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BOOLEAN
Optional TRUE, if the distance between two large marking lengths of the scale are calculated
from the minimum and maximum values.

See also
Bar (Page 1330)

UseScaledBarBorder (RT Professional)

Description
Specifies whether the rectangle that surrounds the object is shown dependent of the scale or
as a default.
Access in Runtime: Read and write

Syntax
Object.UseScaledBarBorder[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "Bar".".

BOOLEAN
Optional TRUE, if the rectangle that surrounds the object is shown dependent on the scale.

See also
Bar (Page 1330)

UseSeparateDiagrams (RT Professional)

Description
Specifies whether the trends are shown staggered.
Access in Runtime: Read and write

Syntax
Object.UseSeparateDiagrams[=BOOLEAN]

Object
Required A "ScreenItem" object with the formats "OnlineTrend" or "FunctionTrendView".

WinCC Professional V13 SP2 – Programming reference


2102 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BOOLEAN
Optional TRUE, if the trends are shown staggered.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

UseSimplePresicionOffset (RT Professional)

Description
Specifies how the field length will be calculated for the labeling of the scale.
Access in Runtime: Read and write

Syntax
Object.UseSimplePresicionOffset[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "Bar".

BOOLEAN
Optional TRUE, if the field length will be calculated for the labeling of the scale.

See also
Bar (Page 1330)

UserArchiveNumberOfValues(i) (RT Professional)

Description
Specifies the number of values that are loaded from the recipe. The "TagProviderType(i)""
property must have the value -2.
Access in Runtime: Read and write

Syntax
Object.UserArchiveNumberOfValues(i)[=Int]

Object
Required A "ScreenItem" object with the format "FunctionTrendView".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2103
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Int
Optional A value or a constant that specifies the number of values that are loaded from the
recipe.

Comments
The parameter i indicates the number of the trend.
If "UserArchiveNumberOfValues(i)"" is changed, illegal combinations with different attributes
for the data connection could arise. This means you have to prevent immediate acceptance
of the change with ""FreezeProviderConnections"" before changing
""UserArchiveNumberOfValues(i)"".

See also
FunctionTrendControl (Page 1373)

UserArchiveStartId(i) (RT Professional)

Description
Specifies the data record starting from which the values for the selected trend are loaded from
the recipe. The "TagProviderType(i)"" property must have the value -2.
Access in Runtime: Read and write

Syntax
Object.UserArchiveStartId(i)[=Int]

Object
Required An object of the "ScreenItem" type with the format "FunctionTrendControl".

Int
Optional A value or a constant that specifies the data record starting from which the values for
the selected trend are loaded from the recipe.

Comments
The parameter i indicates the number of the trend.
If "UserArchiveStartId(i)" is changed, illegal combinations with different attributes for the data
connection could arise. This means you have to prevent immediate acceptance of the change
with ""FreezeProviderConnections" before changing ""UserArchiveStartId(i)".

See also
FunctionTrendControl (Page 1373)

WinCC Professional V13 SP2 – Programming reference


2104 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UserData (RT Professional)

Description
Specifies the value that is passed to the VB script when a user-defined menu entry or toolbar
button is executed.
Use the "Data" field in the "Menus and toolbars" editor to pass a parameter to the procedure.
Access in Runtime: Read and write

Syntax
Object.UserData[=String]

Object
Required A "Item"-type object.

String
Optional. A value or constant that is passed to the VB script when a user-defined menu entry
or toolbar button is executed.

ValueAxisGridLineInterval(i) (RT Professional)

Description
Specifies the distance between two grid lines. Whether the information is evaluated depends
on the properties "ValueAxisShowGridLines(i)" and "TimeAxisShowGridLines(i)".".
Access in Runtime: Read and write

Syntax
Object.ValueAxisGridLineInterval(i)[=Double]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl" or
"FunctionTrendControl".

Double
Optional A value or a constant that specifies the distance between two grid lines.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2105
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ValueAxisLargeIncrementSize(i) (RT Professional)

Description
Specifies the distance between two long marking lengths of the scale. Whether the information
is evaluated depends on the properties "ValueAxisShowLargeIncrements(i)" and
""TimeAxisShowLargeIncrements(i)".".
Access in Runtime: Read and write

Syntax
Object.ValueAxisLargeIncrementSize(i)[=Double]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl" or
"FunctionTrendControl".

Double
Optional A value or a constant that specifies the distance between two marking lengths of the
scale.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

ValueAxisShowLargeIncrements(i) (RT Professional)

Description
Specifies whether the value axis is scaled with long marking lengths.
Access in Runtime: Read and write

Syntax
Object.ValueAxisShowLargeIncrements(i)[=BOOLEAN]

Object
Required An object of the "ScreenItem" with the format "OnlineTrendControl" or
"FunctionTrendControl".

BOOLEAN
Optional TRUE, if the value axis is scaled with long marking lengths.

WinCC Professional V13 SP2 – Programming reference


2106 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Comments
The distance of two long marking lines can be altered with the
"ValueAxisLargeIncrementSize(i)"" property.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

ValueAxisShowSmallIncrements(i) (RT Professional)

Description
Specifies whether the value axis is scaled with short marking lengths.
Access in Runtime: Read and write

Syntax
Object.ValueAxisShowSmallIncrements(i)[=BOOLEAN]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl" or
"FunctionTrendControl".

BOOLEAN
Optional TRUE, if the value axis is scaled with short marking lengths.

Comments
The distance between two short marking lines can be altered with the
"ValueAxisSmallIncrementSize(i)" property.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

ValueAxisSmallIncrementSize(i) (RT Professional)

Description
Specifies the distance between two short marking lengths of the scale. Whether the information
is evaluated depends on the properties ""ValueAxisShowSmallIncrements(i)")" and
""TimeAxisShowSmallIncrements(i)".".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2107
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Access in Runtime: Read and write

Syntax
Object.ValueAxisSmallIncrementSize(i)[=Double]

Object
Required An object of the "ScreenItem" type with the format "OnlineTrendControl" or
"FunctionTrendControl".

Double
Optional A value or a constant that specifies the distance between two short marking lengths
of the scale.

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

XAxisDecimalPrecision(i) (RT Professional)

Description
Specifies the number of decimal places with which the scaling value of the X axis will be
displayed.
Access in Runtime: Read and write

Syntax
Object.XAxisDecimalPrecision(i)[=Int]

Object
Required A "ScreenItem" object with the format "FunctionTrendView".

Int
Optional A value or a constant that specifies the number of decimal places with which the
scaling value for the X axis will be displayed.

See also
FunctionTrendControl (Page 1373)

WinCC Professional V13 SP2 – Programming reference


2108 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

XAxisGridLineInterval(i) (RT Professional)

Description
Specifies the distance between two grid lines of the X axis. Whether the information is
evaluated depends on the value of the property ""XAxisShowGridLines(i)".".
Access in Runtime: Read and write

Syntax
Object.XAxisGridLineInterval(i)[=Double]

Object
Required A "ScreenItem" object with the format "FunctionTrendView".".

Double
Optional A value or a constant that specifies the distance between two grid lines of the X axis.

See also
FunctionTrendControl (Page 1373)

XAxisLargeIncrementSize(i) (RT Professional)

Description
Specifies the distance of two long marking lengths of the X axis. Whether the information is
evaluated depends on the property "XAxisShowLargeIncrements(i)".".
Access in Runtime: Read and write

Syntax
Object.XAxisLargeIncrementSize(i)[=Double]

Object
Required A "ScreenItem" object with the format "FunctionTrendView".

Double
Optional A value or a constant that specifies the distance of two long marking lengths of the
scaling of the X axis.

See also
FunctionTrendControl (Page 1373)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2109
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

XAxisMode(i) (RT Professional)

Description
Specifies whether a mutual time axis will be used in the trend window for all trends.
Specifies time units used by tag logging controls.
Access in Runtime: Read and write

Syntax
Object.XAxisMode(i)[=TrendViewTimeAxisMode]

Object
Required A "ScreenItem" object with the format "FunctionTrendContol".

TrendViewTimeAxisMode
( 1): The time axis will be scaled.
( 2): No time range has been specified. Only a random sample will be displayed.
( 3): The time range will be established via tags.
( 4): The time range will be defined by constant values.

Comments
Specifies whether a mutual X axis will be used in the trend window for all trends.

See also
FunctionTrendControl (Page 1373)

XAxisShowLargeIncrements(i) (RT Professional)

Description
Specifies whether the X axis is scaled with long marking lengths. The distance of two long
marking lines can be altered with the "XAxisLargeIncrementSize(i)"" property.
Access in Runtime: Read and write

Syntax
Object.XAxisShowLargeIncrements(i)[=BOOLEAN]

Object
Required A "ScreenItem" object with the format ""FunctionTrendView".

WinCC Professional V13 SP2 – Programming reference


2110 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

BOOLEAN
Optional TRUE, if the X axis is scaled with long marking lengths.

See also
FunctionTrendControl (Page 1373)

XAxisShowSmallIncrements(i) (RT Professional)

Description
Specifies whether the X axis is scaled with short marking lengths. The distance of two short
marking lines can be altered with the "XAxisSmallIncrementSize(i)" property.
Access in Runtime: Read and write

Syntax
Object.XAxisShowSmallIncrements(i)[=BOOLEAN]

Object
Required A "ScreenItem" object with the format "FunctionTrendView".

BOOLEAN
Optional TRUE, if the X axis is scaled with short marking lengths.

See also
FunctionTrendControl (Page 1373)

XAxisSmallIncrementSize(i) (RT Professional)

Description
Specifies the distance of two short marking lengths of the X axis. Whether the information is
evaluated depends on the property "XAxisShowSmallIncrements(i)".".
Access in Runtime: Read and write

Syntax
Object.XAxisSmallIncrementSize(i)[=Double]

Object
Required A "ScreenItem" object with the format "FunctionTrendView".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2111
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Double
Optional A value or a constant that specifies the distance of two short marking lengths of the
X axis scaling.

See also
FunctionTrendControl (Page 1373)

XDataLogTag(i) (RT Professional)

Description
Specifies the tag that will be shown along the X axis. The property "TagProviderType(i)" must
have the value -1.
Access in Runtime: Read and write

Syntax
Object.XDataLogTag(i)[=HmiLoggingTag]

Object
Required A ""ScreenItem" object with the format "FunctionTrendView".

HmiLoggingTag
Optional A value or a constant that specifies which tag will be shown along the X axis.

Comments
If "XOnlineTag(i)"" is changed, illegal combinations with different attributes for the data
connection could arise. This means you have to prevent mmediate acceptance of the change
with "FreezeProviderConnections before changing "XOnlineTag(i).

See also
FunctionTrendControl (Page 1373)

XOnlineTag(i) (RT Professional)

Description
Specifies the tag that will be shown along the X axis. The property "TagProviderType(i)"" must
have the value -1.
Access in Runtime: Read and write

WinCC Professional V13 SP2 – Programming reference


2112 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Object.XOnlineTag(i)[=HmiTag]

Object
Required A "ScreenItem" object with the format "FunctionTrendView".

HmiTag
Optional A value or a constant that specifies which tag will be shown along the X axis.

Comments
The parameter i indicates the number of the trend.
If "XOnlineTag(i)" is changed, illegal combinations with different attributes for the data
connection could arise. This means you have to prevent an immediate acceptance of the
change with "FreezeProviderConnections" before changing "XOnlineTag(i)".

See also
FunctionTrendControl (Page 1373)

YDataLogTag(i) (RT Professional)

Description
Specifies the tag that will be shown along the Y axis. The property "TagProviderType(i)"" must
have the value -1.
Access in Runtime: Read and write

Syntax
Object.YDataLogTag(i)[=HmiLoggingTag]

Object
Required A "ScreenItem" object with the format "FunctionTrendView"".

HmiLoggingTag
Optional A value or a constant that specifies which tag will be shown along the Y axis.

Comments
If "YOnlineTag(i)"" is changed, illegal combinations with different attributes for the data
connection could arise. This means you have to prevent immediate acceptance of the change
with "FreezeProviderConnections" before changing "YOnlineTag(i)"".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2113
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
FunctionTrendControl (Page 1373)

YOnlineTag(i) (RT Professional)

Description
Specifies the tag that will be shown along the Y axis. The property "TagProviderType(i)" must
have the value -1.
Access in Runtime: Read and write

Syntax
Object.YOnlineTag(i)[=HmiTag]

Object
Required A "ScreenItem" object with the format "FunctionTrendView".

HmiTag
Optional A value or a constant that specifies which tag will be shown along the Y axis.

Comments
The parameter i indicates the number of the trend.
If "YOnlineTag(i)"" is changed, illegal combinations with different attributes for the data
connection could arise. This means you have to prevent immediate acceptance of the change
with "FreezeProviderConnections" before changing "YOnlineTag(i)".

See also
FunctionTrendControl (Page 1373)

3.5.6 Methods (Panels, Comfort Panels, RT Advanced, RT Professional)

3.5.6.1 Methods A-G (Panels, Comfort Panels, RT Advanced, RT Professional)

Activate (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Activates the permanent window or the root screen.
To activate a not selected screen, use the "BaseScreenName" property.

WinCC Professional V13 SP2 – Programming reference


2114 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

It only makes sense to use the activate method with the following operable screen objects. An
error message is output at screen objects which cannot be operated, for example rectangles.
● I/O field
● Switch
● Symbol library
● Trend view
● f(x) trend view
● HTML browser
● Slider
● Graphic I/O field
● Symbolic I/O field
● Button
● Alarm view
● User view
● Recipe view
● Sm@rtClient View
● Status/Force

Syntax
Expression.Activate

Expression
Necessary. An output which returns an object of the "Screen" or "ScreenItem" type.

Parameters
--

See also
ScreenItem (Page 1302)
Screen (Page 1299)
ChannelDiagnose (Page 1341)
CheckBox (Page 1343)
Circle (Page 1346)
CircleSegment (Page 1348)
CircularArc (Page 1351)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2115
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Clock (Page 1353)


Connector (Page 1355)
DateTimeField (Page 1357)
DiskSpaceView (Page 1359)
Ellipse (Page 1361)
EllipseSegment (Page 1363)
EllipticalArc (Page 1366)
Gauge (Page 1380)
GraphicIOField (Page 1383)
GraphicView (Page 1387)
HTMLBrowser (Page 1391)
IOField (Page 1392)
Rectangle (Page 1443)
ScriptDiagnostics (Page 1451)
Switch (Page 1460)
SymbolicIOField (Page 1463)
SymbolLibrary (Page 1468)
TextField (Page 1477)
TrendView (Page 1488)
TubeArcObject (Page 1491)
TubeDoubleTeeObject (Page 1493)
TubePolyline (Page 1495)
TubeTeeObject (Page 1497)
UserView (Page 1506)
WindowSlider (Page 1508)
StatusForce (Page 1458)
SmartClientView (Page 1456)
Slider (Page 1453)
ScreenWindow (Page 1449)
RoundButton (Page 1445)
Polyline (Page 1431)
Polygon (Page 1429)
OptionGroup (Page 1426)
MultiLineEdit (Page 1404)
MediaPlayer (Page 1402)

WinCC Professional V13 SP2 – Programming reference


2116 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Listbox (Page 1399)


Line (Page 1396)
Bar (Page 1330)
Button (Page 1337)
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
TrendRulerControl (Page 1480)
UserArchiveControl (Page 1499)
FunctionTrendControl (Page 1373)
AlarmView (Page 1327)
AlarmControl (Page 1316)

ActivateDynamic (RT Professional)

Description
Dynamically activates a trigger and the specified cycle for a property at runtime. This requires
a VB script at the property as well as a trigger set to "On demand". Every time the trigger is
activated a different activation cycle can be used.

Syntax
Expression.ActivateDynamic (ByVAl bstrPropertyName As String, ByVal
bstrCycleName As String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameter Description
bstrPropertyName Name of property to which trigger relates.
bstrCycleName Name of activation cycle, e.g. "CycleTime1s".

See also
ChannelDiagnose (Page 1341)
CheckBox (Page 1343)
Circle (Page 1346)
CircleSegment (Page 1348)
CircularArc (Page 1351)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2117
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Clock (Page 1353)


Connector (Page 1355)
DiskSpaceView (Page 1359)
Ellipse (Page 1361)
EllipseSegment (Page 1363)
EllipticalArc (Page 1366)
Gauge (Page 1380)
GraphicIOField (Page 1383)
GraphicView (Page 1387)
HTMLBrowser (Page 1391)
IOField (Page 1392)
Rectangle (Page 1443)
ScriptDiagnostics (Page 1451)
SymbolicIOField (Page 1463)
SymbolLibrary (Page 1468)
TextField (Page 1477)
TubeArcObject (Page 1491)
TubeDoubleTeeObject (Page 1493)
TubePolyline (Page 1495)
TubeTeeObject (Page 1497)
UserView (Page 1506)
WindowSlider (Page 1508)
Slider (Page 1453)
ScreenWindow (Page 1449)
RoundButton (Page 1445)
Polyline (Page 1431)
Polygon (Page 1429)
OptionGroup (Page 1426)
MultiLineEdit (Page 1404)
MediaPlayer (Page 1402)
Listbox (Page 1399)
Line (Page 1396)
Bar (Page 1330)
Button (Page 1337)
OnlineTrendControl (Page 1417)

WinCC Professional V13 SP2 – Programming reference


2118 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

OnlineTableControl (Page 1409)


TrendRulerControl (Page 1480)
UserArchiveControl (Page 1499)
FunctionTrendControl (Page 1373)
AlarmControl (Page 1316)

Add (RT Professional)

Description of TagSet Object


Adds a tag to the list. A tag may be added to the tag object by using name or reference.

syntax
Expression.Add [Tag]

Expression
Necessary. An expression which returns an object of type "TagSet".

Parameters
VARIANT

Parameters Description
Tag Name of a WinCC tag or reference to a tag object
to be added to the list.

Example:
In the following example, a TagSet object is generated and a tag is added.

'VBS170
Dim group
Set group = HMIRuntime.Tags.CreateTagSet
group.Add "Motor1"

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2119
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Tag objects may also be added as follows.

'VBS171
Dim Tag
Set Tag = HMIRuntime.Tags("Motor2")
Dim group2
Set group2 = HMIRuntime.Tags.CreateTagSet
group2.Add Tag

Description of DataSet Object


Adds a value or object reference to the list.

Note
The Data Set Object does not support classes.
Objects of type Screen, Screens, ScreenItem, ScreenItems, Tag and TagSet cannot be
included in the DataSet list.
For object references it must be ascertained that objects are multiread-enabled.

syntax
Expression.Add [vtName], [vtUserData]

Expression
Necessary. An expression which returns an object of type "DataSet".

Parameters
VARIANT

Parameters Description
vtName Name by which value or tag are to be added to list.
vtUserData Value to be added to list.

Example:
In this example, a value is included in the DataSet list.

'VBS172
HMIRuntime.DataSet.Add "Motor1",23

WinCC Professional V13 SP2 – Programming reference


2120 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
DataSet (list) (Page 1290)
OnlineTrendControl (Page 1417)

AttachDB method (RT Professional)

Description
Executes the "Connect backup" key function of the control.

Syntax
Ausdruck.AttachDB()

Expression
Required An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
FunctionTrendControl (Page 1373)
AlarmControl (Page 1316)

CalculateStatistic (RT Professional)

Description
Executes the "calculate statistics" key function of the f(t) trend view.

Syntax
Ausdruck.CalculateStatistic()

Expression
Required An expression that returns an object of the "ScreenItem" type.

Parameters
--

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2121
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)

CopyRows (RT Professional)

Description
Executes the "Copy lines" key function of the control.

Syntax
Ausdruck.CopyRows()

Expression
Required An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
UserArchiveControl (Page 1499)
AlarmControl (Page 1316)

Create (RT Professional)

Description
Creates a new Alarm object.

Syntax
Expression.Create (VARIANT vtApplication)

Expression
Required An expression which returns an object of type "Alarm".

WinCC Professional V13 SP2 – Programming reference


2122 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Parameters
VARIANT

Parameters Description
vtApplication Name of alarm object (optional)

See also
OnlineTrendControl (Page 1417)

CreateTagSet (RT Professional)

Description
Creates a new TagSet object. This object may be used for optimized multi-tag access.

syntax
Expression.CreateTagSet()

Expression
Necessary. An expression which returns an object of type "TagSet".

Parameters
VARIANT

Example:
The following example shows how to create a TagSet object.

'VBS168
'Build a Reference to the TagSet Object
Dim group
Set group = HMIRuntime.Tags.CreateTagSet

See also
OnlineTrendControl (Page 1417)

CutRows (RT Professional)

Description
Executes the "Cut rows" key function of the recipe view.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2123
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Ausdruck.CutRows()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
OnlineTrendControl (Page 1417)
UserArchiveControl (Page 1499)

DeactivateDynamic (RT Professional)

Description
Deactivates the trigger of the "ActivateDynamic" method used for the specified property in/
during runtime.

Syntax
Ausdruck.DeactivateDynamic(ByVal bstrPropertyName As String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
String

Parameters Description
bstrPropertyName Name of property to which trigger relates.

See also
ChannelDiagnose (Page 1341)
CheckBox (Page 1343)
Circle (Page 1346)

WinCC Professional V13 SP2 – Programming reference


2124 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

CircleSegment (Page 1348)


CircularArc (Page 1351)
Clock (Page 1353)
Connector (Page 1355)
DiskSpaceView (Page 1359)
Ellipse (Page 1361)
EllipseSegment (Page 1363)
EllipticalArc (Page 1366)
Gauge (Page 1380)
GraphicIOField (Page 1383)
GraphicView (Page 1387)
HTMLBrowser (Page 1391)
IOField (Page 1392)
Rectangle (Page 1443)
ScriptDiagnostics (Page 1451)
SymbolicIOField (Page 1463)
SymbolLibrary (Page 1468)
TextField (Page 1477)
TubeArcObject (Page 1491)
TubeDoubleTeeObject (Page 1493)
TubePolyline (Page 1495)
TubeTeeObject (Page 1497)
UserView (Page 1506)
WindowSlider (Page 1508)
Slider (Page 1453)
ScreenWindow (Page 1449)
RoundButton (Page 1445)
Polyline (Page 1431)
Polygon (Page 1429)
OptionGroup (Page 1426)
MultiLineEdit (Page 1404)
MediaPlayer (Page 1402)
Listbox (Page 1399)
Line (Page 1396)
Bar (Page 1330)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2125
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Button (Page 1337)


OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
TrendRulerControl (Page 1480)
FunctionTrendControl (Page 1373)
AlarmControl (Page 1316)

DeleteRows (RT Professional)

Description
Executes the "Delete rows" key function of the recipe view.

Syntax
Ausdruck.DeleteRows()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
OnlineTrendControl (Page 1417)
UserArchiveControl (Page 1499)

DetachDB (RT Professional)

Description
Executes the "Disconnect backup" key function of the control.

Syntax
Ausdruck.DetachDB()

Expression
Required An expression that returns an object of the "ScreenItem" type.

WinCC Professional V13 SP2 – Programming reference


2126 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Parameters
--

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
FunctionTrendControl (Page 1373)
AlarmControl (Page 1316)

Edit (RT Professional)

Description
Executes the "Edit" key function of the table view.

Syntax
Ausdruck.Edit()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
AlarmControl (Page 1316)

Export (RT Professional)

Description
Executes the "Export archive" or "Export data" key function of the control.

Syntax
Ausdruck.Export()

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2127
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Expression
Required An expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
TrendRulerControl (Page 1480)
UserArchiveControl (Page 1499)
FunctionTrendControl (Page 1373)
AlarmControl (Page 1316)

GetColumn (RT Professional)

Description
Returns the column object of the recipe view designated by name or index as
"ICCAxUAColumn" type.

Syntax
Ausdruck.GetColumn(ByVal vIndex As Variant)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

Parameters Description
vIndex Index or name of the column of the recipe view

WinCC Professional V13 SP2 – Programming reference


2128 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example

'VBS312
Dim ctrl
Dim objColumn
Set ctrl = ScreenItems("RecipeControl")
Set objColumn = ctrl.GetColumn("Field1")
objColumn.Length = 30
Set objColumn = ctrl.GetColumn(3)
objColumn.Align = 2

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "Column" listing, for example, you write "objColumn.Align" instead of
"objColumn.ColumnAlign".

See also
OnlineTrendControl (Page 1417)
UserArchiveControl (Page 1499)

GetColumnCollection (RT Professional)

Description
Returns the list of all column objects of the recipe view as "ICCAxCollection" type.

Syntax
Ausdruck.GetColumnCollection()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2129
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Features and functions of the ICCAxCollection


The following properties are available for the ICCAxCollection:
● Count
● Item
The following functions are available for the ICCAxCollection:
● AddItem(vName) As Object
● RemoveItem(vIndex)

Example

'VBS313
Dim ctrl
Dim coll
Dim field
Set ctrl = ScreenItems("RecipeControl")
Set coll = ctrl.GetColumnCollection
HMIRuntime.Trace "Number of fields:" & coll.Count & vbCrLf
For Each field In coll
HMIRuntime.Trace field.Name & vbCrLf
HMIRuntime.Trace field.Type & vbCrLf
HMIRuntime.Trace field.Length & vbCrLf
HMIRuntime.Trace field.Caption & vbCrLf
Next

See also
OnlineTrendControl (Page 1417)
UserArchiveControl (Page 1499)

GetHistlistColumnCollection (RT Professional)

Description
Returns the list of all column objects of the message view hit list as "ICCAxCollection" type.

Syntax
Expression.GetHitlisteColumnCollection()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

WinCC Professional V13 SP2 – Programming reference


2130 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Parameters
--

Features and functions of the ICCAxCollection


The following properties are available for the ICCAxCollection:
● Count
● Item
The following functions are available for the ICCAxCollection:
● AddItem(vName) As Object
● RemoveItem(vIndex)

Example

'VBS315
Dim ctrl
Dim coll
Dim hitlistcol
Set ctrl = ScreenItems("AlarmControl")
Set coll = ctrl.GetHitlistColumnCollection
HMIRuntime.Trace "Number of hitlist columns:" & coll.Count & vbCrLf
For Each hitlistcol In coll
HMIRuntime.Trace hitlistcol.Index & vbCrLf
HMIRuntime.Trace hitlistcol.Name & vbCrLf
HMIRuntime.Trace hitlistcol.Sort & vbCrLf
HMIRuntime.Trace hitlistcol.SortIndex & vbCrLf
Next

See also
OnlineTrendControl (Page 1417)
AlarmControl (Page 1316)

GetHitlistColumn (RT Professional)

Description
Returns the column object of the message view hit list designated by name or index as
"ICCAxMessageColumn" type.

Syntax
Expression.GetHitlistColumn(ByVal vIndex As Variant)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2131
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

Parameters Description
vIndex Index or name of hitlist column

Example

'VBS314
Dim ctrl
Dim objHitlistColumn
Set ctrl = ScreenItems("AlarmControl")
Set objHitlistColumn = ctrl.GetHitlistColumn("Date")
objHitlistColumn.Sort = 2
Set objHitlistColumn = ctrl.GetHitlistColumn("AverageComeGo")
objHitlistColumn.Visible = FALSE

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "HitlistColumn" listing, for example, you write "objHitlistColumn.Visible" instead of
"objHitlistColumn.HitlistColumnVisible".

See also
OnlineTrendControl (Page 1417)
AlarmControl (Page 1316)

GetMessageBlock (RT Professional)

Description
Returns the message block of the message view designated by name or index as
"ICCAxMessageBlock" type.

Syntax
Expression.GetMessageBlock(ByVal vIndex As Variant)

WinCC Professional V13 SP2 – Programming reference


2132 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

Parameters Description
vIndex Index or name of message block.

Example

'VBS316
Dim ctrl
Dim objMsgBlock
Set ctrl = ScreenItems("AlarmControl")
Set objMsgBlock = ctrl.GetMessageBlock("Date")
objMsgBlock.Align = 2
Set objMsgBlock = ctrl.GetMessageBlock("Number")
objMsgBlock.LeadingZeros = 4

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "MessageBlock" listing, for example, you write "objMsgBlock.Align" instead of
"objMsgBlock.MessageBlockAlign".

See also
OnlineTrendControl (Page 1417)
AlarmControl (Page 1316)

GetMessageBlockCollection (RT Professional)

Description
Returns the list of all message block objects of the message view as "ICCAxCollection" type.

Syntax
Expression.GetMessageBlockCollection()

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2133
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

Features and functions of the ICCAxCollection


The following properties are available for the ICCAxCollection:
● Count
● Item
The following functions are available for the ICCAxCollection:
● AddItem(vName) As Object
● RemoveItem(vIndex)

Example

'VBS317
Dim ctrl
Dim coll
Dim msgblock
Set ctrl = ScreenItems("AlarmControl")
Set coll = ctrl.GetMessageBlockCollection
For Each msgblock In coll
msgblock.Align = 1
msgblock.Length = 12
msgblock.Selected = TRUE
Next

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "MessageBlock" listing, for example, you write "msgblock.Align" instead of
"msgblock.MessageBlockAlign".

See also
OnlineTrendControl (Page 1417)
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


2134 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

GetMessageColumn (RT Professional)

Description
Returns the column object of the message view designated by name or index as
"ICCAxMessageColumn" type.

Syntax
Expression.GetMessageColumn(ByVal vIndex As Variant)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

Parameters Description
vIndex Index or name of column in message list.

Example

'VBS318
Dim ctrl
Dim objMessColumn
Set ctrl = ScreenItems("AlarmControl")
Set objMessColumn = ctrl.GetMessageColumn("Date")
objMessColumn.Visible = FALSE
Set objMessColumn = ctrl.GetMessageColumn("Number")
objMessColumn.Sort = 1

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "MessageColumn" listing, for example, you write "objMessColumn.Visible" instead of
"objMessColumn.MessageColumnVisible".

See also
OnlineTrendControl (Page 1417)
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2135
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

GetOperatorMessage (RT Professional)

Description
Returns the operator message object of the message view designated by name or index as
"ICCAxOperatorMessage" type.

Syntax
Expression.GetOperatorMessage(ByVal vIndex As Variant)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

Parameters Description
vIndex Index or name of operator message

Example

'VBS320
Dim ctrl
Dim objOpMess
Set ctrl = ScreenItems("AlarmControl")
Set objOpMess = ctrl.GetOperatorMessage(0)
objOpMess.Source1 = "Number"
objOpMess.SourceType1 = 1

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "OperatorMessage" listing, for example, you write "objOpMess.Source1" instead of
"objOpMess.OperatorMessageSource1".

See also
OnlineTrendControl (Page 1417)
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


2136 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

GetMessageColumnCollection (RT Professional)

Description
Returns the list of all column objects of the message view as "ICCAxCollection" type.

Syntax
Expression.GetMessageColumnCollection()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

Features and functions of the ICCAxCollection


The following properties are available for the ICCAxCollection:
● Count
● Item
The following functions are available for the ICCAxCollection:
● AddItem(vName) As Object
● RemoveItem(vIndex)

Example

'VBS319
Dim ctrl
Dim coll
Dim msgcol
Set ctrl = ScreenItems("AlarmControl")
Set coll = ctrl.GetMessageColumnCollection
HMIRuntime.Trace "Number of message columns:" & coll.Count & vbCrLf
For Each msgcol In coll
HMIRuntime.Trace msgcol.Index & vbCrLf
HMIRuntime.Trace msgcol.Name & vbCrLf
HMIRuntime.Trace msgcol.Sort & vbCrLf
HMIRuntime.Trace msgcol.SortIndex & vbCrLf
Next

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2137
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
OnlineTrendControl (Page 1417)
AlarmControl (Page 1316)

GetOperatorMessageCollection (RT Professional)

Description
Returns the list of all operator message objects of the message view as "ICCAxCollection"
type.

Syntax
Expression.GetOperatorMessageCollection()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

Features and functions of the ICCAxCollection


The following properties are available for the ICCAxCollection:
● Count
● Item
The following functions are available for the ICCAxCollection:
● AddItem(vName) As Object
● RemoveItem(vIndex)

WinCC Professional V13 SP2 – Programming reference


2138 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example

'VBS321
Dim ctrl
Dim coll
Dim opmsg
Set ctrl = ScreenItems("AlarmControl")
Set coll = ctrl.GetOperatorMessageCollection
For Each opmsg In coll
HMIRuntime.Trace opmsg.Index & vbCrLf
HMIRuntime.Trace opmsg.Name & vbCrLf
HMIRuntime.Trace opmsg.Number & vbCrLf
HMIRuntime.Trace opmsg.Selected & vbCrLf
Next

See also
OnlineTrendControl (Page 1417)
AlarmControl (Page 1316)

GetRow (RT Professional)

Description
Returns the row object defined by its row number in the table-based controls as
"ICCAxDataRow" type.

Syntax
Expression.GetRow(ByVal IRow As Long)

Expression
Required An expression that returns an object of the "ScreenItem" type.

Parameters
Long

Parameters Description
IRow Number of the desired line of the control.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2139
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example

'VBS356
Dim coll
Dim ctrl
Dim lIndex
Dim lCellIndex
Set ctrl = ScreenItems("UAControl")
Set coll = ctrl.GetRowCollection
'enumerate and trace out row numbers
For lIndex = 1 To coll.Count
HMIRuntime.trace "Row: " & (ctrl.GetRow(lIndex).RowNumber) & " "
'enumerate and trace out column titles and cell texts
For lCellIndex = 1 To ctrl.GetRow(lIndex).CellCount
HMIRuntime.trace ctrl.GetRow(0).CellText(lCellIndex) & " "
HMIRuntime.trace ctrl.GetRow(lIndex).CellText(lCellIndex) & " "
Next
HMIRuntime.trace vbNewLine
Next

Note
When you use the "Get..." methods to access properties from the control object list rather than
with the control object, you have to omit the prefix of the property with the name of the list.
For the "Row" listing, for example, you write "objRow.CellCount" instead of
"objRow.RowCellCount".

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
TrendRulerControl (Page 1480)
UserArchiveControl (Page 1499)
AlarmControl (Page 1316)

GetRowCollection (RT Professional)

Description
Returns the list of all row objects of the table-based controls type "ICCAxDataRowCollection".

Syntax
Expression.GetRowCollection()

WinCC Professional V13 SP2 – Programming reference


2140 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

Properties of the ICCAxDataRowCollection


The ICCAxDataRowCollection refers to runtime data. The data is read-only. It is not possible
to add and edit the data.
The following properties are available for the ICCAxDataRowCollection:
● Count - Determines the number of rows in the collection.
● Item - Access to an individual row within the collection via the row number. Numbering runs
from 1 to Count. A Row object is returned.

Example

'VBS357
Dim ctrl
Dim coll
Dim lIndex
Dim lCellIndex
Set ctrl = ScreenItems("AlarmControl")
Set coll = ctrl.GetRowCollection
HMIRuntime.Trace "Number of message rows:" & coll.Count & vbCrLf
'enumerate and trace out row numbers
For lIndex = 1 To coll.Count
HMIRuntime.Trace "Row: " & (ctrl.GetRow(lIndex).RowNumber) & " "
'enumerate and trace out column titles and cell texts
For lCellIndex = 1 To ctrl.GetRow(lIndex).CellCount
HMIRuntime.Trace ctrl.GetMessageColumn(lCellIndex -1).Name & " "
HMIRuntime.Trace ctrl.GetRow(lIndex).CellText(lCellIndex) & " "
Next
HMIRuntime.Trace vbNewLine
Next

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
TrendRulerControl (Page 1480)
UserArchiveControl (Page 1499)
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2141
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

GetRulerBlock (RT Professional)

Description
Returns the block object of the evaluation table designated by name or index as
"ICCAxRulerBlock" type.

Syntax
Expression.GetRulerBlock(ByVal vIndex As Variant)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

Parameters Description
vIndex Index or name of the block in the evaluation table

Example

'VBS322
Dim ctrl
Dim objRulerBlock
Set ctrl = ScreenItems("RulerControl")
Set objRulerBlock = ctrl.GetRulerBlock(0)
objRulerBlock.Caption = "RulerBlock1"
Set objRulerBlock = ctrl.GetRulerBlock("Name")
objRulerBlock.Length = 10

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "RulerBlock" listing, for example, you write "objRulerBlock.Caption" instead of
"objRulerBlock.BlockCaption".

See also
OnlineTrendControl (Page 1417)
TrendRulerControl (Page 1480)

WinCC Professional V13 SP2 – Programming reference


2142 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

GetRulerBlockCollection (RT Professional)

Description
Returns the list of all block objects of the evaluation table as "ICCAxCollection" type.

Syntax
Expression.GetRulerBlockCollection()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

Features and functions of the ICCAxCollection


The following properties are available for the ICCAxCollection:
● Count
● Item
The following functions are available for the ICCAxCollection:
● AddItem(vName) As Object
● RemoveItem(vIndex)

Example

'VBS323
Dim ctrl
Dim coll
Dim rulerblock
Set ctrl = ScreenItems("RulerControl")
Set coll = ctrl.GetRulerBlockCollection
For Each rulerblock In coll
rulerblock.Align = 1
rulerblock.Length = 12
Next

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "RulerBlock" listing, for example, you write "rulerblock.Align" instead of
"rulerblock.RulerBlockAlign".

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2143
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
OnlineTrendControl (Page 1417)
TrendRulerControl (Page 1480)

GetRulerColumn (RT Professional)

Description
Returns the column object of the evaluation table designated by name or index as
"ICCAxRulerColumn" type.

Syntax
Expression.GetRulerColumn(ByVal vIndex As Variant)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

Parameters Description
vIndex Index or name of the column of the evaluation

Example

'VBS324
Dim ctrl
Dim objRulercol
Set ctrl = ScreenItems("RulerControl")
Set objRulercol = ctrl.GetRulerColumn("Name")
objRulercol.Sort = 0
Set objRulercol = ctrl.GetRulerColumn("ValueY")
objRulercol.Visible = FALSE

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "RulerColumn" listing, for example, you write "objRulercol.Visible" instead of
"objRulercol.ColumnVisible".

WinCC Professional V13 SP2 – Programming reference


2144 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
OnlineTrendControl (Page 1417)
TrendRulerControl (Page 1480)

GetRulerColumnCollection (RT Professional)

Description
Returns the list of all column objects of the evaluation table as "ICCAxCollection" type.

Syntax
Expression.GetRulerColumnCollection()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

Features and functions of the ICCAxCollection


The following properties are available for the ICCAxCollection:
● Count
● Item
The following functions are available for the ICCAxCollection:
● AddItem(vName) As Object
● RemoveItem(vIndex)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2145
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example

'VBS325
Dim ctrl
Dim coll
Dim rulercol
Set ctrl = ScreenItems("RulerControl")
Set coll = ctrl.GetRulerColumnCollection
HMIRuntime.Trace "Number of ruler columns:" & coll.Count & vbCrLf
For Each rulercol In coll
HMIRuntime.Trace rulercol.Index & vbCrLf
HMIRuntime.Trace rulercol.Name & vbCrLf
HMIRuntime.Trace rulercol.Sort & vbCrLf
HMIRuntime.Trace rulercol.SortIndex & vbCrLf
Next

See also
OnlineTrendControl (Page 1417)
TrendRulerControl (Page 1480)

GetRulerData (RT Professional)

Description
Returns the value of the called trend at the ruler position.

Syntax
Expression.GetRulerData(ByVal RulerIndex As Long, pvValue As
Variant, Optional pvTimeStamp As Variant, Optional pvFlags As
Varian) Long

Expression
Necessary. An expression which returns an object of the "Trend" type.

Parameters

Parameters Description
RulerIndex 0 =Ruler
pvValue Value of X axis
pvTimeStamp Time or value of the Y axis
pvFlags Qualitycode

WinCC Professional V13 SP2 – Programming reference


2146 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example

'VBS326
Dim ctrl
Dim objTrend
Dim objIOField1
Dim objIOField2
Dim rulvalue
Dim rultime
Set ctrl = ScreenItems( "Control1" )
Set objTrend = ctrl.GetTrend( "Trend 1" )
Set objIOField1 = ScreenItems( "I/O Field1" )
Set objIOField2 = ScreenItems( "I/O Field2" )
objTrend.GetRulerData 0, rulvalue, rultime
objIOField1.OutputValue = rulvalue
objIOField2.OutputValue = rultime

See also
OnlineTrendControl (Page 1417)

GetSelectedRow (RT Professional)

Description
Returns the selected row object of a table-based control as "ICCAxDataRow" type.

Syntax
Expression.GetSelectedRow()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2147
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example

'VBS358
Dim ctrl
Dim lCellIndex
Dim lCellCount
Dim headingRow
Dim selectedRow
Set ctrl = ScreenItems("TableControl")
Set headingRow = ctrl.GetRow(0)
Set selectedRow = ctrl.GetSelectedRow
lCellCount = headingRow.CellCount
'enumerate and trace out column titles and cell texts
For lCellIndex = 1 To lCellCount
HMIRuntime.trace headingRow.CellText(lCellIndex) & ": "
HMIRuntime.trace selectedRow.CellText(lCellIndex)
HMIRuntime.trace vbNewLine
Next

Note
When you use the "Get..." methods to access properties from the control object list rather than
with the control object, you have to omit the prefix of the property with the name of the list.
For the "Row" listing, for example, you write "objRow.CellCount" instead of
"objRow.RowCellCount".

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
TrendRulerControl (Page 1480)
UserArchiveControl (Page 1499)
AlarmControl (Page 1316)

GetSelectedRows (RT Professional)

Description
Returns the selected row objects of a table-based control as type "ICCAxDataRow" for multiple
selection.

Syntax
Expression.GetSelectedRows()

WinCC Professional V13 SP2 – Programming reference


2148 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

Example

'VBS359
Dim ctrl
Dim lCellIndex
Dim lCellCount
Dim lRowIndex
Dim lRowCount
Dim headingRow
Dim selectedRow
Dim selectedRows
Set ctrl = ScreenItems("TableControl")
Set headingRow = ctrl.GetRow(0)
Set selectedRows = ctrl.GetSelectedRows
lCellCount = headingRow.CellCount
lRowCount = selectedRows.Count
'enumerate selected rows
For lRowIndex = 1 To lRowCount
Set selectedRow = selectedRows(lRowIndex)
HMIRuntime.Trace "Row number: " & CStr(lRowIndex) & vbNewLine
'enumerate and trace out column titles and cell texts
For lCellIndex = 1 To lCellCount
HMIRuntime.trace headingRow.CellText(lCellIndex) & ": "
HMIRuntime.trace selectedRow.CellText(lCellIndex)
HMIRuntime.trace vbNewLine
Next
Next

Note
When you use the "Get..." methods to access properties from the control object list rather than
with the control object, you have to omit the prefix of the property with the name of the list.
For the "Row" listing, for example, you write "objRow.CellCount" instead of
"objRow.RowCellCount".

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
TrendRulerControl (Page 1480)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2149
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UserArchiveControl (Page 1499)


AlarmControl (Page 1316)

GetStatisticAreaColumn (RT Professional)

Description
Returns the column object of the statistic area window of the evaluation window designated
by name or index as "ICCAxRulerColumn" type.

Syntax
Ausdruck.GetStatisticAreaColumn(ByVal vIndex As Variant)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

Parameters Description
vIndex Index or name of column of statistics area window.

Example

'VBS327
Dim ctrl
Dim objStatAreaCol
Set ctrl = ScreenItems("RulerControl")
Set objStatAreaCol = ctrl.GetStatisticAreaColumn("DatasourceY")
objStatAreaCol.Visible = FALSE
Set objStatAreaCol = ctrl.GetStatisticAreaColumn("ValueY(LL)")
objStatAreaCol.Sort = 1

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "StatisticAreaColumn" listing, for example, you write "objStatAreaCol.Visible" instead
of "objStatAreaCol.ColumnVisible".

WinCC Professional V13 SP2 – Programming reference


2150 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
OnlineTrendControl (Page 1417)
TrendRulerControl (Page 1480)

GetStatisticAreaColumnCollection (RT Professional)

Description
Returns the list of all column objects of the statistic area window of the evaluation table as
"ICCAxCollection" type.

Syntax
Ausdruck.GetStatisticAreaColumnCollection()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

Features and functions of the ICCAxCollection


The following properties are available for the ICCAxCollection:
● Count
● Item
The following functions are available for the ICCAxCollection:
● AddItem(vName) As Object
● RemoveItem(vIndex)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2151
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example

'VBS328
Dim ctrl
Dim coll
Dim statcol
Set ctrl = ScreenItems("RulerControl")
Set coll = ctrl.GetStatisticAreaColumnCollection
HMIRuntime.Trace "Number of statistic Area columns:" & coll.Count & vbCrLf
For Each statcol In coll
HMIRuntime.Trace statcol.Index & vbCrLf
HMIRuntime.Trace statcol.Name & vbCrLf
HMIRuntime.Trace statcol.Sort & vbCrLf
HMIRuntime.Trace statcol.SortIndex & vbCrLf
Next

See also
OnlineTrendControl (Page 1417)
TrendRulerControl (Page 1480)

GetStatisticResultColumn (RT Professional)

Description
Returns the column object of the statistic window of the evaluation window designated by name
or index as "ICCAxRulerColumn" type.

Syntax
Ausdruck.GetStatisticResultColumn(ByVal vIndex As Variant)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

Parameters Description
vIndex Index or name of column of statistics window.

WinCC Professional V13 SP2 – Programming reference


2152 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example

'VBS329
Dim ctrl
Dim objStatResCol
Set ctrl = ScreenItems("RulerControl")
Set objStatResCol = ctrl.GetStatisticResultColumn("MaxValue")
objStatResCol.Visible = FALSE
Set objStatResCol = ctrl.GetStatisticResultColumn("Average")
objStatResCol.Sort = 2

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "StatisticResultColumn" listing, for example, you write "objStatResCol.Visible" instead
of "objStatResCol.ColumnVisible".

See also
OnlineTrendControl (Page 1417)
TrendRulerControl (Page 1480)

GetStatisticResultColumnCollection (RT Professional)

Description
Returns the list of all column objects of the statistic window of the evaluation table as
"ICCAxCollection" type.

Syntax
Ausdruck.GetStatisticResultColumnCollection()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2153
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Features and functions of the ICCAxCollection


The following properties are available for the ICCAxCollection:
● Count
● Item
The following functions are available for the ICCAxCollection:
● AddItem(vName) As Object
● RemoveItem(vIndex)

Example

'VBS330
Dim ctrl
Dim coll
Dim statcol
Set ctrl = ScreenItems("RulerControl")
Set coll = ctrl.GetStatisticResultColumnCollection
HMIRuntime.Trace "Number of statistic result columns:" & coll.Count & vbCrLf
For Each statcol In coll
HMIRuntime.Trace statcol.Index & vbCrLf
HMIRuntime.Trace statcol.Name & vbCrLf
HMIRuntime.Trace statcol.Sort & vbCrLf
HMIRuntime.Trace statcol.SortIndex & vbCrLf
Next

See also
OnlineTrendControl (Page 1417)
TrendRulerControl (Page 1480)

GetStatusbarElement (RT Professional)

Description
Returns the element of the control status bar designated as name or index as type
"ICCAxStatusbarElement".

Syntax
Ausdruck.GetStatusbarElement(ByVal vIndex As Variant)

Expression
Required An expression that returns an object of the "ScreenItem" type.

WinCC Professional V13 SP2 – Programming reference


2154 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Parameters
VARIANT

Parameters Description
vIndex Index or name of status bar element.

Example

'VBS331
Dim ctrl
Dim objStatusBar
Set ctrl = ScreenItems( "Control1" )
Set objStatusBar = ctrl.GetStatusbarElement(1)
objStatusBar.Visible = FALSE
Set objStatusBar = ctrl.GetStatusbarElement(3)
objStatusBar.Width = 10

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "StatusbarElement" listing, for example, you write "objStatusBar.Visible" instead of
"objStatusBar.StatusbarElementVisible".

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
TrendRulerControl (Page 1480)
UserArchiveControl (Page 1499)
FunctionTrendControl (Page 1373)
AlarmControl (Page 1316)

GetStatusbarElementCollection (RT Professional)

Description
Returns the list of all status bar elements of the control as type "ICCAxCollection".

Syntax
Ausdruck.GetStatusbarElementCollection()

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2155
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Expression
Required An expression that returns an object of the "ScreenItem" type.

Parameters
--

Features and functions of the ICCAxCollection


The following properties are available for the ICCAxCollection:
● Count
● Item
The following functions are available for the ICCAxCollection:
● AddItem(vName) As Object
● RemoveItem(vIndex)

Example

'VBS332
Dim ctrl
Dim coll
Dim statelement
Set ctrl = ScreenItems.Item("Control1")
Set coll = ctrl.GetStatusbarElementCollection
HMIRuntime.Trace "Number of statusbar elements:" & coll.Count & vbCrLf
For Each statelement In coll
HMIRuntime.Trace statelement.Name & vbCrLf
HMIRuntime.Trace statelement.Width & vbCrLf
HMIRuntime.Trace statelement.Text & vbCrLf
Next

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "StatusbarElement" listing, for example, you write "statelement.Name" instead of
"statelement.StatusbarElementName".

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
TrendRulerControl (Page 1480)

WinCC Professional V13 SP2 – Programming reference


2156 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UserArchiveControl (Page 1499)


FunctionTrendControl (Page 1373)
AlarmControl (Page 1316)

GetTimeAxis (RT Professional)

Description
Returns the time object that is specified by name or index for the f(t) trend view as
"ICCAxTimeAxis" type.

Syntax
Expression.GetTimeAxis(ByVal vIndex As Variant)

Expression
Necessary. Expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

Parameters Description
vIndex Index or name of time axis.

Example

'VBS333
Dim ctrl
Dim objTimeAxis
Set ctrl = ScreenItems("OnlineTrendControl")
Set objTimeAxis = ctrl.GetTimeAxis(1)
objTimeAxis.Visible = FALSE
Set objTimeAxis = ctrl.GetTimeAxis("axis 2")
objTimeAxis.Label = "Time axis 2"
objTimeAxis.DateFormat = "dd.MM.yy"
objTimeAxis.TimeFormat = "HH:mm:ss.ms"
objTimeAxis.RangeType = 2
'The format to be used for date and time entries depends on the
'regional settings and language options in the operating system.
objTimeAxis.BeginTime = "06.04.2010 9:33:18"
'objTimeAxis.BeginTime = "04/06/2010 9:33:18"
objTimeAxis.MeasurePoints = 100

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2157
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Note
When you use the "Get..." methods to access properties from the control object list rather than
with the control object, you have to omit the prefix of the property with the name of the list.
For the "TimeAxis" listing, for example, you write "objTimeAx.Visible" instead of
"objTimeAx.TimeAxisVisible".

See also
OnlineTrendControl (Page 1417)

GetTimeAxisCollection (RT Professional)

Description
Returns a list of all time objects of the f(t) trend view as "ICCAxCollection" type.

Syntax
Expression.GetTimeAxisCollection()

Expression
Necessary. Expression that returns an object of the "ScreenItem" type.

Parameters
--

Features and functions of the ICCAxCollection


The following properties are available for ICCAxCollection:
● Count
● Item
The following functions are available for ICCAxCollection:
● AddItem(vName) As Object
● RemoveItem(vIndex)

WinCC Professional V13 SP2 – Programming reference


2158 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example

'VBS334
Dim ctrl
Dim objTrendWnd
Dim objTimeAxis1
Dim objTimeAxis2
Dim objTrend
Set ctrl = ScreenItems("OnlineTrendControl")
Set objTrendWnd = ctrl.GetTrendWindowCollection.AddItem("myWindow")
Set objTimeAxis1 = ctrl.GetTimeAxisCollection.AddItem("TimeAxis2010")
Set objTimeAxis2 = ctrl.GetTimeAxisCollection.AddItem("TimeAxis2011")
objTimeAxis1.TrendWindow = objTrendWnd.Name
objTimeAxis1.Label = "2010"
objTimeAxis1.RangeType = 1
'The format to be used for date and time entries depends on the
'regional settings and language options in the operating system.
objTimeAxis1.BeginTime = "01.01.2010 0:00:00"
'objTimeAxis1.BeginTime = "01/01/2010 0:00:00"
objTimeAxis1.EndTime = "31.12.2010 11:59:59"
'objTimeAxis1.EndTime = "12/31/2010 11:59:59"
objTimeAxis2.TrendWindow = objTrendWnd.Name
objTimeAxis2.Label = "2011"
objTimeAxis2.RangeType = 1
objTimeAxis2.BeginTime = "01.01.2011 0:00:00"
'objTimeAxis2.BeginTime = "01/01/2011 0:00:00"
objTimeAxis2.EndTime = "31.12.2011 11:59:59"
'objTimeAxis2.EndTime = "12/31/2011 11:59:59"
Set objTrend = ctrl.GetTrendCollection.AddItem("myTrend1")
objTrend.TrendWindow = objTrendWnd.Name
objTrend.TimeAxis = objTimeAxis1.Name
Set objTrend = ctrl.GetTrendCollection.AddItem("myTrend2")
objTrend.TrendWindow = objTrendWnd.Name
objTrend.TimeAxis = objTimeAxis2.Name

Note
When you use the "Get..." methods to access properties from the control object list rather than
with the control object, you have to omit the prefix of the property with the name of the list.
For the "TimeAxis" listing, for example, you write "objTimeAxis1.Label" instead of
"objTimeAxis1.TimeAxisLabel".

See also
OnlineTrendControl (Page 1417)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2159
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

GetTimeColumn (RT Professional)

Description
Returns the time column object of the table view designated by name or index as "ICCAxTime
Column" type.

Syntax
Ausdruck.GetTimeColumn(ByVal vIndex As Variant)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

Parameters Description
vIndex Index or name of time column.

Example

'VBS335
Dim ctrl
Dim objTimeCol
Set ctrl = ScreenItems("TableControl")
Set objTimeCol = ctrl.GetTimeColumn("Timecolumn1")
objTimeCol.ShowDate = FALSE
Set objTimeCol = ctrl.GetTimeColumn("Timecolumn2")
objTimeCol.Visible = FALSE

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "TimeColumn" listing, for example, you write "objTimeColumn.ShowDate" instead of
"objTimeColumn.TimeColumnShowDate".

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)

WinCC Professional V13 SP2 – Programming reference


2160 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

GetTimeColumnCollection (RT Professional)

Description
Returns the list of all time column objects of the table view as "ICCAxCollection" type.

Syntax
Expression.GetTimeColumnCollection()

Expression
Necessary. Expression that returns an object of the "ScreenItem" type.

Parameters
--

Features and functions of the ICCAxCollection


The following properties are available for ICCAxCollection:
● Count
● Item
The following functions are available for ICCAxCollection:
● AddItem(vName) As Object
● RemoveItem(vIndex)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2161
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example

'VBS336
Dim ctrl
Dim objTimeCol1
Dim objTimeCol2
Dim coll
Dim timecol
Set ctrl = ScreenItems("TableControl")
Set objTimeCol1 = ctrl.GetTimeColumnCollection.AddItem("TimeColumn2010")
Set objTimeCol2 = ctrl.GetTimeColumnCollection.AddItem("TimeColumn2011")
objTimeCol1.Caption = "2010"
objTimeCol1.RangeType = 1
'The format to be used for date and time entries depends on the
'regional settings and language options in the operating system.
objTimeCol1.BeginTime = "01.01.2010 0:00:00"
'objTimeCol1.BeginTime = "01/01/2010 0:00:00"
objTimeCol1.EndTime = "31.12.2010 11:59:59"
'objTimeCol1.EndTime = "12/31/2010 11:59:59"
objTimeCol2.Caption = "2011"
objTimeCol2.RangeType = 0
objTimeCol2.BeginTime = "01.01.2011 0:00:00"
'objTimeCol2.BeginTime = "01/01/2011 0:00:00"
objTimeCol2.TimeRangeFactor = 1
objTimeCol2.TimeRangeBase = 3600000
Set coll = ctrl.GetTimeColumnCollection
For Each timecol In coll
timecol.Align = 1
timecol.Length = 12
timecol.BackColor = RGB(240,240,0)
timecol.ForeColor = RGB(130,160,255)
Next

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)

GetToolbarButton (RT Professional)

Description
Returns the button function designated by name or index on the control toolbar as
"ICCAxToolbarButton" type.

Syntax
Ausdruck.GetToolbarButton(ByVal vIndex As Variant)

WinCC Professional V13 SP2 – Programming reference


2162 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

Parameters Description
vIndex Index or name of toolbar button function.

Example

'VBS337
Dim ctrl
Set ctrl = ScreenItems( "Control1" )
Dim toolbu
Set toolbu = ctrl.GetToolbarButton ("ShowHelp")
HMIRuntime.Trace "Name: " & toolbu.Name & vbCrLf
HMIRuntime.Trace "Index: " & toolbu.Index & vbCrLf
HMIRuntime.Trace "Hotkey: " & toolbu.HotKey & vbCrLf

Note
When you use the "Get..." methods to access properties from the control object list rather than
with the control object, you have to omit the prefix of the property with the name of the list.
For the "ToolbarButton" listing, for example, you write "toolbu.Index" instead of
"toolbu.ToolbarButtonIndex".

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
TrendRulerControl (Page 1480)
UserArchiveControl (Page 1499)
FunctionTrendControl (Page 1373)
AlarmControl (Page 1316)

GetToolbarButtonCollection (RT Professional)

Description
Returns the list of all button functions of the control toolbar as "ICCAxCollection" type.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2163
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Ausdruck.GetToolbarButtonCollection()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

Features and functions of the ICCAxCollection


The following properties are available for the ICCAxCollection:
● Count
● Item
The following methods are available for the ICCAxCollection:
● AddItem(vName) As Object
● RemoveItem(vIndex)

Example

'VBS338
Dim ctrl
Dim coll
Dim toolbu
Set ctrl = ScreenItems( "Control1" )
Set coll = ctrl.GetToolbarButtonCollection
HMIRuntime.Trace "Number of toolbar buttons:" & coll.Count & vbCrLf
For Each toolbu In coll
HMIRuntime.Trace toolbu.Name & vbCrLf
HMIRuntime.Trace "Hotkey: " & toolbu.HotKey & vbCrLf
HMIRuntime.Trace "Authorization: " & toolbu.PasswordLevel & vbCrLf
Next

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
TrendRulerControl (Page 1480)
UserArchiveControl (Page 1499)
FunctionTrendControl (Page 1373)
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


2164 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

GetTrend (RT Professional)

Description
Returns the f(t) or f(x) trend view designated by name or index as "ICCAxTrend" or
"ICCAxFunctionTrend" type.

Syntax
Ausdruck.GetTrend(ByVal vIndex As Variant)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

Parameters Description
vIndex Index or name of curve.

Example for Runtime Professional

'VBS339
Dim ctrl
Dim objTrend
Set ctrl = ScreenItems("OnlineTrendControl")
Set objTrend = ctrl.GetTrend( "Trend 1" )
objTrend.PointStyle = 1
objTrend.LineWidth = 4
Set objTrend = ctrl.GetTrend(2)
objTrend.Provider = 1
objTrend.TagName = "Archive\ArchiveTag2"

Note
When you use the "Get..." methods to access properties from the control object list rather than
with the control object, you have to omit the prefix of the property with the name of the list.
For the "Trend" listing, for example, you write "objTrend.PointStyle" instead of
"objTrend.TrendPointStyle".

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2165
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

GetTrendCollection (RT Professional)

Description
Returns the list of all trends of the f(t) or f(x) trend view as "ICCAxCollection" type.

Syntax
Ausdruck.GetTrendCollection()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

Features and functions of the ICCAxCollection


The following properties are available for the ICCAxCollection:
● Count
● Item
The following functions are available for the ICCAxCollection:
● AddItem(vName) As Object
● RemoveItem(vIndex)

Example for Runtime Professional

'VBS340
Dim ctrl
Dim objTrendWnd
Dim objTimeAxis
Dim objValAxis
Dim objTrend
Set ctrl = ScreenItems("OnlineTrendControl")
Set objTrendWnd = ctrl.GetTrendWindowCollection.AddItem("myWindow")
Set objTimeAxis = ctrl.GetTimeAxisCollection.AddItem("myTimeAxis")
Set objValAxis = ctrl.GetValueAxisCollection.AddItem("myValueAxis")
objTimeAxis.TrendWindow = objTrendWnd.Name
objValAxis.TrendWindow = objTrendWnd.Name
Set objTrend = ctrl.GetTrendCollection.AddItem("myTrend1")
objTrend.Provider = 1
objTrend.TagName = "Archive\ArchiveTag1"
objTrend.TrendWindow = objTrendWnd.Name
objTrend.TimeAxis = objTimeAxis.Name
objTrend.ValueAxis = objValAxis.Name

WinCC Professional V13 SP2 – Programming reference


2166 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Note
When you use the "Get..." methods to access properties from the control object list rather than
with the control object, you have to omit the prefix of the property with the name of the list.
For the "Trend" listing, for example, you write "objTrend.TagName" instead of
"objTrend.TrendTagName".

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

GetTrendWindow (RT Professional)

Description
Returns the trend view object of the f(t) trend view or the f(x) trend view designated by name
or index as "ICCAxTrendWindow" type.

Syntax
Ausdruck.GetTrendWindow(ByVal vIndex As Variant)

Expression
Required An expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

Parameters Description
vIndex Index or name of curve window.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2167
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example for Runtime Professional

'VBS341
Dim ctrl
Dim objTrendWnd
Set ctrl = ScreenItems("OnlineTrendControl")
Set objTrendWnd = ctrl.GetTrendWindow(1)
objTrendWnd.Visible = FALSE
Set objTrendWnd = ctrl.GetTrendWindow("trend window 2")
objTrendWnd.VerticalGrid = TRUE
objTrendWnd.FineGrid = TRUE

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "TrendWindow" listing, for example, you write "objTrendWnd.Visible" instead of
"objTrendWnd.TrendWindowVisible".

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

GetTrendWindowCollection (RT Professional)

Description
Returns the list of all trend window objects of the f(t) trend display or the f(x) trend display as
"ICCAxCollection" type.

Syntax
Ausdruck.GetTrendWindowCollection()

Expression
Required. An expression that returns an object of the "ScreenItem" type.

Parameters
--

WinCC Professional V13 SP2 – Programming reference


2168 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Features and functions of the ICCAxCollection


The following properties are available for the ICCAxCollection:
● Count
● Item
The following functions are available for the ICCAxCollection:
● AddItem(vName) As Object
● RemoveItem(vIndex)

Example for Runtime Professional

'VBS342
Dim ctrl
Dim objTrendWnd
Dim objTimeAxis
Dim objValAxis
Set ctrl = ScreenItems("OnlineTrendControl")
Set objTrendWnd = ctrl.GetTrendWindowCollection.AddItem("myWindow")
Set objTimeAxis = ctrl.GetTimeAxisCollection.AddItem("myTimeAxis")
Set objValAxis = ctrl.GetValueAxisCollection.AddItem("myValueAxis")
objTimeAxis.TrendWindow = objTrendWnd.Name
objValAxis.TrendWindow = objTrendWnd.Name

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

GetValueAxis (RT Professional)

Description
Returns the value axis object of the f(t) trend view designated by name or index as
"ICCAxValueAxis" type.

Syntax
Ausdruck.GetValueAxis(ByVal vIndex As Variant)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2169
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Parameters
VARIANT

Parameters Description
vIndex Index or name of the value axis

Example

'VBS343
Dim ctrl
Dim objValAxis
Set ctrl = ScreenItems("OnlineTrendControl")
Set objValAxis = ctrl.GetValueAxis(1)
objValAxis.Visible = FALSE
Set objValAxis = ctrl.GetValueAxis("axis 2")
objValAxis.Label = "Value axis 2"
objValAxis.ScalingType = 0
objValAxis.Precisions = 2
objValAxis.AutoRange = TRUE

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "ValueAxis" listing, for example, you write "objValueAx.Visible" instead of
"objValueAx.ValueAxisVisible".

See also
OnlineTrendControl (Page 1417)

GetValueAxisCollection (RT Professional)

Description
Returns the list of all value axis objects of the f(t) trend view as "ICCAxCollection" type.

Syntax
Ausdruck.GetValueAxisCollection()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

WinCC Professional V13 SP2 – Programming reference


2170 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Parameters
--

Features and functions of the ICCAxCollection


The following properties are available for the ICCAxCollection:
● Count
● Item
The following functions are available for the ICCAxCollection:
● AddItem(vName) As Object
● RemoveItem(vIndex)

Example

'VBS344
Dim ctrl
Dim objTrendWnd
Dim objValAxis1
Dim objValAxis2
Dim objTrend
Set ctrl = ScreenItems("OnlineTrendControl")
Set objTrendWnd = ctrl.GetTrendWindowCollection.AddItem("myWindow")
Set objValAxis1 = ctrl.GetValueAxisCollection.AddItem("myValueAxis1")
Set objValAxis2 = ctrl.GetValueAxisCollection.AddItem("myValueAxis2")
objValAxis1.TrendWindow = objTrendWnd.Name
objValAxis1.Label = "Value1"
objValAxis2.TrendWindow = objTrendWnd.Name
objValAxis2.inTrendColor = TRUE
Set objTrend = ctrl.GetTrendCollection.AddItem("myTrend1")
objTrend.TrendWindow = objTrendWnd.Name
objTrend.ValueAxis = objValAxis1.Name
Set objTrend = ctrl.GetTrendCollection.AddItem("myTrend2")
objTrend.TrendWindow = objTrendWnd.Name
objTrend.ValueAxis = objValAxis2.Name

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "ValueAxis" listing, for example, you write "objValueAxis1.Label" instead of
"objValueAxis1.ValueAxisLabel".

See also
OnlineTrendControl (Page 1417)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2171
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

GetValueColumn (RT Professional)

Description
Returns the value column object defined by name or index for the tabular view as
"ICCAxValueColumn" type.

Syntax
Expression.GetValueColumn(ByVal vIndex As Variant)

Expression
Necessary. Expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

Parameters Description
vIndex Index or name of the value column of the f(t) trend view.

Example

'VBS345
Dim ctrl
Dim objValueColumn
Set ctrl = ScreenItems("TableControl")
Set objValueColumn = ctrl.GetValueColumn("Valuecolumn1")
objValueColumn.Precisions = 4
Set objValueColumn = ctrl.GetValueColumn(2)
objValueColumn.ExponentialFormat = TRUE

Note
When you use the "Get..." methods to access properties from the control object list rather than
with the control object, you have to omit the prefix of the property with the name of the list.
For the "ValueColumn" listing, for example, you write "objValueColumn.Precisions" instead of
"objValueColumn.ValueColumnPrecisions".

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)

WinCC Professional V13 SP2 – Programming reference


2172 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

GetValueColumnCollection (RT Professional)

Description
Returns the list of all value column objects of the f(t) trend view as "ICCAxCollection" type.

Syntax
Ausdruck.GetValueColulmnCollection()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

Features and functions of the ICCAxCollection


The following properties are available for the ICCAxCollection:
● Count
● Item
The following functions are available for the ICCAxCollection:
● AddItem(vName) As Object
● RemoveItem(vIndex)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2173
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example

'VBS346
Dim ctrl
Dim objValCol1
Dim objValCol2
Dim coll
Dim valcol
Set ctrl = ScreenItems("TableControl")
Set objValCol1 = ctrl.GetValueColumnCollection.AddItem("ValueColumn1")
Set objValCol2 = ctrl.GetValueColumnCollection.AddItem("ValueColumn2")
objValCol1.Caption = "Value Archive"
objValCol1.Provider = 1
objValCol1.TagName = "ProcessValueArchive\arch1"
objValCol1.TimeColumn = "TimeColumn1"
objValCol2.Caption = "Value Tag"
objValCol2.Provider = 2
objValCol2.TagName = "tagxx"
objValCol2.TimeColumn = "TimeColumn2"
Set coll = ctrl.GetValueColumnCollection
For Each valcol In coll
valcol.Align = 2
valcol.Length = 10
valcol.AutoPrecisions = TRUE
Next

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)

GetXAxis (RT Professional)

Description
Returns the X axis object of the f(x) trend view designated by name or index as
"ICCAxValueAxis" type.

Syntax
Ausdruck.GetXAxis(ByVal vIndex As Variant)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

WinCC Professional V13 SP2 – Programming reference


2174 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Parameters
VARIANT

Parameters Description
vIndex Index or name of X axis.

Example

'VBS347
Dim ctrl
Dim objXAx
Set ctrl = ScreenItems("FunctionTrendControl")
Set objXAx = ctrl.GetXAxis(1)
objXAx.Visible = FALSE
Set objXAx = ctrl.GetXAxis("axis 2")
objXAx.Label = "X axis 2"
objXAx.ScalingType = 0
objXAx.Precisions = 2
objXAx.Color = RGB(109,109,109)

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "XAxis" listing, for example, you write "objXAx.Visible" instead of "objXAx.XAxisVisible".

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

GetXAxisCollection (RT Professional)

Description
Returns the list of all X axis objects of the f(x) trend view as "ICCAxCollection" type.

Syntax
Ausdruck.GetXAxisCollection()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2175
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Parameters
--

Features and functions of the ICCAxCollection


The following properties are available for the ICCAxCollection:
● Count
● Item
The following functions are available for the ICCAxCollection:
● AddItem(vName) As Object
● RemoveItem(vIndex)

Example

'VBS348
Dim ctrl
Dim objXAxis1
Dim objXAxis2
Dim coll
Dim axes
Set ctrl = ScreenItems("FunctionTrendControl")
Set objXAxis1 = ctrl.GetXAxisCollection.AddItem("myXAxis1")
objXAxis1.Label = "temperature"
Set objXAxis2 = ctrl.GetXAxisCollection.AddItem("myXAxis2")
objXAxis2.Label = "pressure"
Set coll = ctrl.GetXAxisCollection
HMIRuntime.Trace "Number of XAxis:" & coll.Count & vbCrLf
For Each axes In coll
HMIRuntime.Trace axes.Name & vbCrLf
HMIRuntime.Trace axes.Label & vbCrLf
Next

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "XAxis" listing, for example, you write "objXAxis1.Label" instead of
"objXAxis1.XAxisLabel".

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

WinCC Professional V13 SP2 – Programming reference


2176 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

GetYAxis (RT Professional)

Description
Returns the Y axis object of the f(x) trend view designated by name or index as
"ICCAxValueAxis" type.

Syntax
Ausdruck.GetYAxis(ByVal vIndex As Variant)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

Parameters Description
vIndex Index or name of Y axis.

Example

'VBS349
Dim ctrl
Dim objYAx
Set ctrl = ScreenItems("FunctionTrendControl")
Set objYAx = ctrl.GetYAxis(1)
objYAx.Visible = FALSE
Set objYAx = ctrl.GetYAxis("axis 2")
objYAx.Label = "Y axis 2"
objYAx.Align = 0
objYAx.Precisions = 3
objYAx.EndValue = 90.000
objYAx.BeginValue = 10.000

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "YAxis" listing, for example, you write "objYAx.Visible" instead of "objYAx.YAxisVisible".

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2177
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

GetYAxisCollection (RT Professional)

Description
Returns the list of all Y axis objects of the f(x) trend view as "ICCAxCollection" type.

Syntax
Ausdruck.GetYAxisCollection()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

Features and functions of the ICCAxCollection


The following properties are available for the ICCAxCollection:
● Count
● Item
The following functions are available for the ICCAxCollection:
● AddItem(vName) As Object
● RemoveItem(vIndex)

Example

'VBS350
Dim ctrl
Dim objYAxis1
Dim objYAxis2
Dim coll
Dim axes
Set ctrl = ScreenItems("FunctionTrendControl")
Set objYAxis1 = ctrl.GetXAxisCollection.AddItem("myYAxis1")
objYAxis1.Label = "temperature"
Set objYAxis2 = ctrl.GetXAxisCollection.AddItem("myYAxis2")
objYAxis2.Label = "pressure"
Set coll = ctrl.GetYAxisCollection
HMIRuntime.Trace "Number of YAxis:" & coll.Count & vbCrLf
For Each axes In coll
HMIRuntime.Trace axes.Name & vbCrLf
HMIRuntime.Trace axes.Label & vbCrLf
Next

WinCC Professional V13 SP2 – Programming reference


2178 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Note
When you use the "Get..." methods to access properties from the Control object list rather than
with the Control object, you have to omit the prefix of the property with the name of the list.
For the "YAxis" listing, for example, you write "objYAxis1.Label" instead of
"objYAxis1.YAxisLabel".

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

3.5.6.2 Methods H-R (Panels, Comfort Panels, RT Advanced, RT Professional)

HideAlarm (RT Professional)

Description
Executes the "Hide alarm" button function of the alarm view.

Syntax
Expression.HideAlarm()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

InsertData (RT Professional)

Description
Adds data to the called trend.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2179
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Expression.InsertData(dblAxisX As Variant, dblAxisY As Variant)

Expression
Necessary. An expression which returns an object of the "Trend" type.

Parameters

Parameters Description
dblAxisX Value of X axis
dblAxisY Value of Y axis

Example

'VBS300
Dim lngFactor
Dim dblAxisX
Dim dblAxisY
Dim objTrendControl
Dim objTrend
Set objTrendControl = ScreenItems("Control1")
Set objTrend = objTrendControl.GetTrend("Trend 1")
For lngFactor = -100 To 100
dblAxisX = CDbl(lngFactor * 0.02)
dblAxisY = CDbl(dblAxisX * dblAxisX + 2 * dblAxisX + 1)
objTrend.InsertData dblAxisX, dblAxisY
Next

Item (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Returns an element from a list.

Syntax
Expression.Item(Index)

Expression
Necessary. An expression which returns a list.

WinCC Professional V13 SP2 – Programming reference


2180 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Parameters

Index
The name or the index number of an element of the list:
● ScreenItems-Listing: Use an object name, e.g.
"HmiRuntime.Screens(1).ScreenItems("Circle")", or the index number.
● Screens-Listing: Use either the name or the index number.
● SmartTags-Listing: You can only use the tag name as index in the SmartTags list. A
counting of all tags is not possible.

If the transferred value does not correspond with an element in the list, an error occurs. The
return value has the value "Nothing".

On Error Resume Next


Dim screen
Set screen = HmiRuntime.Screens("Screen_1")
If (screen is Nothing)
then...
Else...
End If

Best practice for optimizing auto-completion support is to use combined addressing by means
of screen name and object name, e.g.
"HmiRuntime.Screens("Screen").ScreenItems("Circle")".

Example
The item method is the default method for lists. Therefore, the results are the same for the
following two examples:

'VBS_Example_Item
HMIRuntime.Screens.Item(1)
HMIRuntime.Screens(1)

Both instructions reference the respective base screen.

See also
ScreenItems (list) (Page 1304)
ScreenItem (Page 1302)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2181
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

LockAlarm (RT Professional)

Description
Executes the "Disable alarm" button function of the alarm view.

Syntax
Expression.LockAlarm()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

LoopInAlarm (RT Professional)

Description
Executes the "Loop in alarm" button function of the alarm view.

Syntax
Expression.LoopInAlarm()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


2182 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

MoveAxis (RT Professional)

Description
Executes the "Move axes area" button function of the f(t) and f(x) trend views.

Syntax
Expression.MoveAxis()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

MoveToFirst (RT Professional)

Description
Executes the "First line" button function of the control.

Syntax
Expression.MoveToFirst()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
UserArchiveControl (Page 1499)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2183
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

MoveToFirstLine (RT Professional)

Description
Executes the "First alarm" button function of the alarm view.

Syntax
Ausdruck.MoveToFirstLine()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

MoveToFirstPage (RT Professional)

Description
Executes the "First page" button function of the alarm view.

Syntax
Ausdruck.MoveToFirstPage()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


2184 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

MoveToLast (RT Professional)

Description
Executes the "last data record" button function of the control.

Syntax
Ausdruck.MoveToLast()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
UserArchiveControl (Page 1499)

MoveToLastLine (RT Professional)

Description
Executes the "Last alarm" button function of the alarm view.

Syntax
Ausdruck.MoveToLastLine()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2185
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

MoveToLastPage (RT Professional)

Description
Executes the "Last page" button function of the alarm view.

Syntax
Ausdruck.MoveToLastPage()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

MoveToNext (RT Professional)

Description
Executes the "next data record" button function of the control.

Syntax
Ausdruck.MoveToNext()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
UserArchiveControl (Page 1499)

WinCC Professional V13 SP2 – Programming reference


2186 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

MoveToNextLine (RT Professional)

Description
Executes the "Next alarm" button function of the alarm view.

Syntax
Ausdruck.MoveToNextLine()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

MoveToNextPage (RT Professional)

Description
Executes the "Next page" button function of the alarm view.

Syntax
Ausdruck.MoveToNextPage()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2187
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

MoveToPrevious (RT Professional)

Description
Executes the "previous data record" button function of the control.

Syntax
Ausdruck.MoveToPrevious()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
UserArchiveControl (Page 1499)

MoveToPreviousLine (RT Professional)

Description
Executes the "Previous alarm" button function of the alarm view.

Syntax
Ausdruck.MoveToPreviousLine()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


2188 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

MoveToPreviousPage (RT Professional)

Description
Executes the "Previous page" button function of the alarm view.

syntax
Ausdruck.MoveToPreviousPage()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

NextColumn (RT Professional)

Description
Executes the "Next column" button function of the table view.

Syntax
Ausdruck.NextColumn()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
OnlineTableControl (Page 1409)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2189
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

NextTrend (RT Professional)

Description
Executes the "Next trend" button function of the f(t) and f(x) trend views.

Syntax
Ausdruck.NextTrend()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

OneToOneView (RT Professional)

Description
Executes the "Original view" button function of the f(t) and f(x) trend views.

Syntax
Ausdruck.OneToOneView()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

WinCC Professional V13 SP2 – Programming reference


2190 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

PasteRows (RT Professional)

Description
Executes the "Insert rows" button function of the recipe view.

Syntax
Expression.PasteRows()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
UserArchiveControl (Page 1499)

PreviousColumn (RT Professional)

Description
Executes the "Previous column" button function of the table view.

Syntax
Ausdruck.PreviousColumn()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
OnlineTableControl (Page 1409)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2191
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

PreviousTrend (RT Professional)

Description
Executes the "Previous trend" button function of the f(t) and f(x) trend views.

Syntax
Ausdruck.PreviousTrend()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

Print (RT Professional)

Description
Executes the "Print" button function of the control.

Syntax
Ausdruck.Print()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
TrendRulerControl (Page 1480)
UserArchiveControl (Page 1499)

WinCC Professional V13 SP2 – Programming reference


2192 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

FunctionTrendControl (Page 1373)


AlarmControl (Page 1316)

QuitHorn (RT Professional)

Description
Executes the "Acknowledge central alarm generator" button function of the alarm view.

Syntax
Ausdruck.QuitHorn()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

QuitSelected (RT Professional)

Description
Executes the "Single acknowledgment" button function of the alarm view.

Syntax
Ausdruck.QuitSelected()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2193
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

QuitVisible (RT Professional)

Description
Executes the "Group acknowledgment" button function of the alarm view.

Syntax
Ausdruck.QuitVisible()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

ReadTags (RT Professional)

Description
Executes the "Read tags" button function of the recipe view.

Syntax
Ausdruck.ReadTags()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
UserArchiveControl (Page 1499)

WinCC Professional V13 SP2 – Programming reference


2194 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Read (RT Professional)

Description of Tag Object


Reads out the status of a tag (tag object) shortly after the moment it was called. At the same
time, the tag object is provided with the values read. Upon reading a tag, its value, quality code
and time stamp are determined. The "LastError" property can be used to determine whether
the call was successful.
The "Name" and "Tagprefix" properties are not changed by this.
If the value of the tag is read successfully, the properties of the tag object are assigned the
following values:

Property Allocation
Value Tag values
Name Tag name (unchanged)
QualityCode Quality level
Timestamp Current tag time stamp
LastError 0
ErrorDescription ""

If the value of the tag is not read successfully, the properties of the tag object are assigned
the following values:

Property Allocation
Value VT_Empty
Name Tag name (unchanged)
QualityCode Bad Out of Service
Timestamp 0
LastError Read operation error codes
ErrorDescription Error description on LastError

syntax
Expression.Read([Readmode])

Expression
Necessary. An expression which returns a tag object. The return value of the Read method is
the value of the tag read out.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2195
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Parameters
The optional "Readmode" parameter enables the distinction between two types of reading:

Parameters Description
0 The tag value is read from the process image
(cache). 0 is the default value.
1 The value of a tag is read directly from AS or chan‐
nel (direct).

If the "Readmode" parameter is omitted, the value is read from the process image by default.
The return value of the Read method is the tag value read out as VARIANT.

Reading From the Process Image


When reading from the process image, the tag is logged on and, from that moment, polled
cyclically from the PLC. The login cycle is dependent on the configured trigger. The value is
read from the tag image by WinCC. For Close Picture, the tag actions are ended again. The
call is characterized by the following:
● The value is read by WinCC from the tag image.
● The call is faster in comparison to direct reading (except with the first call: The first call
basically takes longer because the value from the PLC must be read out and logged on.)
● The duration of the call is not dependent on the bus load or AS.
Behavior in actions with a tag trigger
All of the tags contained in the tag trigger are already known with Open Picture and are
registered with the defined monitoring time. Since all tags are requested at once, the best
possible optimization can be targeted from the channel. If a tag, contained in the trigger, is
requested with Read during an action, the value already exists and is transferred directly to
the call. If a tag is requested which is not contained in the trigger, the behavior is the same as
with a standard trigger.
Behavior in actions with a cyclic trigger
tags are registered with half of the cycle time with the first call. For every other call, the value
is present.
Behavior in event-driven actions
The tag is registered in the "upon change" mode with the first call. Process tags that are
registered in the "upon change" mode correspond with a cyclic read job with a cycle time of
1s.
If an event (e.g. mouse click) requests a value asynchronously, the tag is transferred to the
tag image. The tag is requested cyclically from the AS as of this point in time and therefore
increases the basic load. To bypass this increase in the basic load, the value can also be read
synchronously. The synchronous call causes a one-off increase in the communication load
but the tag is not transferred to the tag image.

WinCC Professional V13 SP2 – Programming reference


2196 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Direct reading
In the case of direct reading, the current value is returned. The tag is not registered cyclically,
the value is requested from the AS one time only. Direct reading has the following properties:
● The value is read explicitly from the AS.
● The call takes longer compared to reading from the process image.
● The duration of the call is dependent on the bus load and AS, amongst other things.

Example
Reading a tag directly from AS or channel

'VBS100
Dim objTag
Dim vntValue
Set objTag = HMIRuntime.Tags("Tagname")
vntValue = objTag.Read(1) 'Read direct
MsgBox vntValue

Reading a tag from the process image

'VBS101
Dim objTag
Dim vntValue
Set objTag = HMIRuntime.Tags("Tagname")
vntValue = objTag.Read 'Read from cache
MsgBox vntValue

Description of TagSet Object


The TagSet object offers the option of reading several tags in one call.
Functionality here is mostly identical with that of a tag object. In the following, only deviations
thereof are described.

Expression
Necessary. An expression which returns an object of type "TagSet".

Reading From the Process Image


The TagSet object offers the advantage of requesting several tags in one read command. The
tags are registered in the process image as a group, improving performance in the process.

Direct reading
Since one call may process several read commands, performance is enhanced in comparison
to single calls.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2197
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example
The following example shows how tags are included in the TagSet list, how tag values are
imported and subsequently read.

'VBS174
Dim group
Set group = HMIRuntime.Tags.CreateTagSet
group.Add "Motor1"
group.Add "Motor2"
group.Read
HMIRuntime.Trace "Motor1: " & group("Motor1").Value & vbNewLine
HMIRuntime.Trace "Motor2: " & group("Motor2").Value & vbNewLine

If the optional parameter "Readmode" is set to 1, the process tags are not registered but read
directly from AS or channel.

group.Read 1

Refresh (RT Professional)

Description
Drawing all visible pictures again.

syntax
Expression.Refresh

Expression
Necessary. An expression which returns a "Screens" or "Screen" type object.

Parameter
--

Examples
The first example forces all visible pictures to be drawn again:

'VBS149
HMIRuntime.Screens.Refresh

WinCC Professional V13 SP2 – Programming reference


2198 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

The second example forces the basic picture to be immediately redrawn:

'VBS150
HMIRuntime.Screens(1).Refresh

See also
Screen (Page 1299)
HMIRuntime (Page 1292)

Remove (RT Professional)

Description of TagSet Object


Removes a tag from the TagSet list. The tag may be removed by name or reference to a tag
object.

Syntax
Expression.Remove [Tag]

Expression
Required An expression that returns an object of type "TagSet".

Parameters
VARIANT

Parameters Description
Tag Name of a WinCC tag or reference to a tag object
to be removed from the list.

Example
The following example shows how several tags are included in the TagSet list, and how to
remove a tag again.

'VBS175
Dim group
Set group = HMIRuntime.Tags.CreateTagSet
group.Add "Motor1"
group.Add "Motor2"
group.Remove "Motor1"

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2199
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Description of DataSet Object


Deletes the element specified in parameter "Name" from a list.

Syntax
Expression.Remove [Name]

Expression
Required An expression which returns an object of type "DataSet".

Parameters
VARIANT

Parameters Description
Name Name of the object to be removed from the list.

Example
The example shows how to remove the object "motor1" from the list.

'VBS166
HMIRuntime.DataSet.Remove("motor1")

Description of objects Logging, AlarmLogs, DataLogs


The method deletes previously swapped-in log segments from the Runtime project.
Log segments that were deleted using the "Remove" method are removed from the "Common
logging" folder of the project.
The call may require a somewhat longer time period, depending on the log data. This may
block the processing of subsequent scripts. Blockage of actions within the picture may be
avoided if you start the call in a Global Scripting action, such as starting the action through a
trigger tag.
The process of disconnecting and clearing logs creates a CPU load. This will affect
performance.

Note
Calling up the "Remove" method is presently only possible at the server. There is an example,
however, which shows how the method may be started by the client from a server.

WinCC Professional V13 SP2 – Programming reference


2200 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax

Objects Logging, AlarmLogs


Expression.Remove [TimeFrom] [TimeTo] [TimeOut] [ServerPrefix]

Expression
Required An expression that returns an object of type "Logging" or "AlarmLogs".

Object DataLogs
Expression.Remove [TimeFrom] [TimeTo] [TimeOut] [Type] [ServerPrefix]

Expression
Required An expression that returns an object of type "DataLogs".

Parameters

TimeFrom
Point in time, from which the logs are to be cleared.
When specifying the time information, a short form is also possible. This is described in the
"Time format" section.

TimeTo
Time up to which log segments are to be cleared.
When specifying the time information, a short form is also possible. This is described in the
"Time Format" section.

Timeout
Timeout in milliseconds.
If you enter "-1" as a value, the wait will be infinite. If you enter a value of "0", there will be no
wait.

Type
Type of log.
The parameter can (optionally) be used only to delete log segments of the tag logging.
The following values can be entered:

Assigned value Type Description


1 hmiDataLogFast Tag Logging Fast data
2 hmiDataLogSlow Tag Logging Slow data
3 hmiDataLogAll Tag Logging Fast and Slow data

ServerPrefix
Reserved for future versions.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2201
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Return value
If an error occurred during deletion of the log segments, the method will return an error alarm.
Additional information may be found under the subject heading "Error alarms from database
area".

Time format
The format for specifying time information is defined as follows: YYYY-MM-DD hh:mm:ss,
where YYYY represents the year, MM the month, DD the day, hh the hour, mm the minute
and ss the second. For example, the time of 2 minutes and one second past 11 o'clock on July
26, 2004 is displayed as follows: 2004-07-26 11:02:01.
For parameters "TimeFrom" and "TimeTo" the statement of data and time is also possible in
short form. Not all format fields must be filled in this case. The short form means that the
information on date and time may be lacking one or several parameters, beginning with the
value for seconds. For example, the time may be specified in the "YYYY-MM" or "YYYY-MM-
DD hh" format. Using the statement "TimeFrom" = "2004-09" and "TimeTo" = "2004-10-04" all
log segments between September 2004 up to and including October 4.

Example
In the following example, log segments within a certain time period that were swapped in
(again) after the fact are removed and the return value is output as a trace.

'VBS182
HMIRuntime.Trace "Ret: " & HMIRuntime.Logging.Remove("2004-08-22","2004-09-22",-1) &
vbNewLine

In the following example, all log segments that were swapped-in (again) after the fact are
removed and the return value is output as a trace.

'VBS183
HMIRuntime.Trace "Ret: " & HMIRuntime.Logging.Remove("","",-1) & vbNewLine

See also
Logging (Page 1297)
DataSet (list) (Page 1290)
DataLogs (list) (Page 1288)
AlarmLogs (list) (Page 1285)

WinCC Professional V13 SP2 – Programming reference


2202 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

RemoveAll (RT Professional)

Description of TagSet Object


Deletes all tags from a TagSet list.

syntax
Expression.RemoveAll

Expression
Necessary. An expression which returns an object of type "TagSet".

Parameters
--

Example:
The following example shows how several tags are included in the TagSet list, and how to
remove all tags again.

'VBS176
Dim group
Set group = HMIRuntime.Tags.CreateTagSet
group.Add "Motor1"
group.Add "Motor2"
group.RemoveAll

Description of DataSet Object


Deletes all values or object references from a DataSet list.

syntax
Expression.RemoveAll

Expression
Necessary. An expression which returns an object of type "DataSet".

Parameters
--

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2203
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example:
The example shows how all objects are removed from the list.

'VBS167
HMIRuntime.DataSet.RemoveAll

See also
DataSet (list) (Page 1290)

Restore (RT Professional)

Description of objects Logging, AlarmLogs, DataLogs


The method adds swapped-out log segments to the Runtime project.
Upon swapping-in, the log segments are copied to the "Common logging" folder of the project.
Therefore the appropriate storage capacity must be available.
The call may require a somewhat longer time period, depending on the log data. This may
block the processing of subsequent scripts. Blockage of actions within the picture may be
avoided if you start the call in a Global Scripting action, such as starting the action through a
trigger tag.
The connecting/copying of the logs generates a CPU load because the SQL server
experiences additional load, especially if signature checking is activated. Copying of log
segments will slow down hard disk access.
If signature checking is activated, an error message is returned if an unsigned or modified log
is to be swapped in. There is always only one error alarm returned, even if several errors
occurred during a swap-in process. Additionally, a WinCC system alarm is generated for each
log segment. An entry is added to the Windows event viewer in the "Application" section. This
provides the opportunity to check which log segments are creating the error.
● With an unsigned log, the return value "0x8004720F" is returned. The event viewer contains
the entry "Validation of database <db_name> failed! No signature found!".
The log is swapped in.
● With a changed log, the return value "0x80047207" is returned. The event viewer contains
the entry "Validation of database <db_name> failed!".
The log is not swapped in.
Note
Calling up the "Restore" method is presently only possible at the server. There is an
example, however, which shows how the method may be started by the client from a server.

WinCC Professional V13 SP2 – Programming reference


2204 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax

Objects Logging, AlarmLogs


Expression.Restore [SourcePath] [TimeFrom] [TimeTo] [TimeOut]
[ServerPrefix]

Expression
Required An expression that returns an object of type "Logging" or "AlarmLogs".

Object DataLogs
Expression.Restore [SourcePath] [TimeFrom] [TimeTo] [TimeOut] [Type]
[ServerPrefix]

Expression
Required An expression that returns an object of type "DataLogs".

Parameters

SourcePath
Path to log data.

TimeFrom
Point in time, from which the logs are to be swapped in.
When specifying the time information, a short form is also possible. This is described in the
"Time format" section.

TimeTo
Time up to which log segments are to be swapped in.
When specifying the time information, a short form is also possible. This is described in the
"Time Format" section.

Timeout
Timeout in milliseconds.
If you enter "-1" as a value, the wait will be infinite. If you enter a value of "0", there will be no
wait.

Type
Type of log.
The parameter can (optionally) be used only to store log segments of the tag logging.
The following values can be entered:

Assigned value Type Description


1 hmiDataLogFast Tag Logging Fast data
2 hmiDataLogSlow Tag Logging Slow data
3 hmiDataLogAll Tag Logging Fast and Slow data

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2205
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ServerPrefix
Reserved for future versions.

Return value
If an error occurred while swapping in log segments, the method will return an error message.
Additional information may be found under the subject heading "Error alarms from database
area".

Time format
The format for specifying time information is defined as follows: YYYY-MM-DD hh:mm:ss,
where YYYY represents the year, MM the month, DD the day, hh the hour, mm the minute
and ss the second. For example, the time of 2 minutes and one second past 11 o'clock on July
26, 2004 is displayed as follows: 2004-07-26 11:02:01.
For parameters "TimeFrom" and "TimeTo" the statement of data and time is also possible in
short form. Not all format fields must be filled in this case. The short form means that the
information on date and time may be lacking one or several parameters, beginning with the
value for seconds. For example, the statement may be in the form of "YYYY-MM" or "YYYY-
MM-DD hh". Using the statement "TimeFrom" = "2004-09" and "TimeTo" = "2004-10-04" all
log segments between September 2004 up to and including October 4.

Example
In the following example, all log segments since the start of the specified time period are
swapped in again, and the return value is output as a trace.

'VBS184
HMIRuntime.Trace "Ret: " & HMIRuntime.Logging.Restore("D:\Folder","2004-09-14","",-1) &
vbNewLine

In the following example, all Tag Logging Slow log segments in the specified time period are
swapped in again, and the return value is output as a trace.

'VBS185
HMIRuntime.Trace "Ret: " & HMIRuntime.Logging.DataLogs.Restore("D:\Folder","2004-09-14
12:30:05","2004-09-20 18:30",-1,2) & vbNewLine

In the following example, all Alarm Logging log segments up to the specified time period are
swapped in again, and the return value is output as a trace.

'VBS186
HMIRuntime.Trace "Ret: " & HMIRuntime.Logging.AlarmLogs.Remove("","2004-09-20",-1) &
vbNewLine

WinCC Professional V13 SP2 – Programming reference


2206 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
Logging (Page 1297)
DataLogs (list) (Page 1288)
AlarmLogs (list) (Page 1285)

3.5.6.3 Methods S-Z (Panels, Comfort Panels, RT Advanced, RT Professional)

SelectAll (RT Professional)

Description
Selects all rows in a table-based control.

Syntax
Expression.SelectAll()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
OnlineTableControl (Page 1409)
TrendRulerControl (Page 1480)
UserArchiveControl (Page 1499)
AlarmControl (Page 1316)

SelectedStatisticArea (RT Professional)

Description
Executes the "Set statistics range" button function of the table view.

Syntax
Ausdruck.SelectedStatisticArea()

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2207
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
OnlineTableControl (Page 1409)

SelectRow (RT Professional)

Description
Selects a specific row in a table-based control.

Syntax
Expression.SelectRow(ByVal IRow As Long, Optional bExtendSelection
As Boolean)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
IRow Number of the row to be selected.
bExtendSelection Indicates as an option whether the current selection will be extended. Is only rel‐
evant if multiple selections are possible.

Example
● Row 1 is currently selected. If SelectRow( 2, True ) is called, then row 1 and row 2 will be
selected.
● Row 1 is currently selected. If SelectRow( 2, False ) or SelectRow( 2 ) is called without an
optional parameter, then only row 2 will be selected.

See also
OnlineTableControl (Page 1409)
TrendRulerControl (Page 1480)

WinCC Professional V13 SP2 – Programming reference


2208 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

UserArchiveControl (Page 1499)


AlarmControl (Page 1316)

ServerExport (RT Professional)

Description
Executes the "Export log" button function of the recipe view.

Syntax
Ausdruck.ServerExport()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
UserArchiveControl (Page 1499)

ServerImport (RT Professional)

Description
Executes the "Import log" button function of the recipe view.

Syntax
Ausdruck.ServerImport()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
UserArchiveControl (Page 1499)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2209
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ShowColumnSelection (RT Professional)

Description
Executes the "Select columns" button function of the table view.

Syntax
Ausdruck.ShowColumnSelection()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
OnlineTableControl (Page 1409)

ShowComment (RT Professional)

Description
Executes the "Comment dialog" button function of the alarm view.

Syntax
Ausdruck.ShowComment()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


2210 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ShowDisplayOptionsDialog (RT Professional)

Description
Executes the "Display options dialog" button function of the alarm view.

Syntax
Ausdruck.ShowDisplayOptionsDialog()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

ShowEmergencyQuitDialog (RT Professional)

Description
Executes the "Single acknowledgment" button function of the alarm view.

Syntax
Ausdruck.ShowEmergencyQuitDialog()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2211
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ShowHelp (RT Professional)

Description
Executes the "Help" button function of the control.

Syntax
Ausdruck.ShowHelp()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
TrendRulerControl (Page 1480)
UserArchiveControl (Page 1499)
FunctionTrendControl (Page 1373)
AlarmControl (Page 1316)

ShowHideList (RT Professional)

Description
Executes the "List of alarm to hide" button function of the alarm view.

Syntax
Ausdruck.ShowHideList()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

WinCC Professional V13 SP2 – Programming reference


2212 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

See also
AlarmControl (Page 1316)

ShowHitList (RT Professional)

Description
Executes the "Hitlist" button function of the alarm view.

Syntax
Ausdruck.ShowHitList()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

ShowInfoText (RT Professional)

Description
Executes the "About dialog" button function of the alarm view.

Syntax
Ausdruck.ShowInfoText()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2213
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ShowLockDialog (RT Professional)

Description
Executes the "Lock dialog" button function of the alarm view.

Syntax
Ausdruck.ShowLockDialog()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

ShowLockList (RT Professional)

Description
Executes the "Lock list" button function of the alarm view.

Syntax
Ausdruck.ShowLockList()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


2214 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ShowLongTermArchiveList (RT Professional)

Description
Executes the "Historical alarm list (long-term)" button function of the alarm view.

Syntax
Ausdruck.ShowLongTermArchiveList()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

ShowMessageList (RT Professional)

Description
Executes the "Alarm list" button function of the alarm view.

Syntax
Ausdruck.ShowMessageList()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2215
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ShowPercentageAxis (RT Professional)

Description
Executes the "Relative axis" button function of the f(t) trend view.

Syntax
Ausdruck.ShowPercentageAxis()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
OnlineTrendControl (Page 1417)

ShowPropertyDialog (RT Professional)

Description
Executes the "Configuration dialog" button function of the control.

Syntax
Ausdruck.ShowPropertyDialog()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
VARIANT

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
TrendRulerControl (Page 1480)
UserArchiveControl (Page 1499)

WinCC Professional V13 SP2 – Programming reference


2216 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

FunctionTrendControl (Page 1373)


AlarmControl (Page 1316)

ShowSelectArchive (RT Professional)

Description
Executes the "Select data connection" button function of the recipe view.

Syntax
Ausdruck.ShowSelectArchive()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
UserArchiveControl (Page 1499)

ShowSelection (RT Professional)

Description
Executes the "Selection dialog" button function of the recipe view.

Syntax
Ausdruck.ShowSelection ()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
UserArchiveControl (Page 1499)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2217
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ShowSelectionDialog (RT Professional)

Description
Executes the "Selection dialog" button function of the alarm view.

Syntax
Ausdruck.ShowSelectionDialog()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

ShowSelectTimeBase (RT Professional)

Description
Executes the "Timebase dialog" button function of the recipe view.

Syntax
Ausdruck.ShowSelectTimeBase()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
UserArchiveControl (Page 1499)

WinCC Professional V13 SP2 – Programming reference


2218 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ShowShortTermArchiveList (RT Professional)

Description
Executes the "Historical alarm list (short-term)" button function of the alarm view.

Syntax
Ausdruck.ShowShortTermArchiveList()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

ShowSort (RT Professional)

Description
Executes the "Sorting dialog" button function of the recipe view.

Syntax
Ausdruck.ShowSort()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
UserArchiveControl (Page 1499)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2219
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ShowSortDialog (RT Professional)

Description
Executes the "Sorting dialog" button function of the alarm view.

Syntax
Ausdruck.ShowSortDialog()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

ShowTagSelection (RT Professional)

Description
Executes the "Select data connection" button function of the control.

Syntax
Ausdruck.ShowTagSelection()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
FunctionTrendControl (Page 1373)

WinCC Professional V13 SP2 – Programming reference


2220 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ShowTimebaseDialog (RT Professional)

Description
Executes the "Timebase dialog" button function of the alarm view.

Syntax
Ausdruck.ShowTimebaseDialog()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

ShowTimeSelection (RT Professional)

Description
Executes the "Select time range" button function of the control.

Syntax
Ausdruck.ShowTimeSelection()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
FunctionTrendControl (Page 1373)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2221
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

ShowTrendSelection (RT Professional)

Description
Executes the "Select trends" button function of the f(t) and f(x) trend views.

Syntax
Ausdruck.ShowTrendSelection()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
-- -

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
FunctionTrendControl (Page 1373)

StartStopUpdate (RT Professional)

Description
Executes the "Start" or "Stop" button function of the control.

Syntax
Ausdruck.StartStopUpdate()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
OnlineTrendControl (Page 1417)
OnlineTableControl (Page 1409)
FunctionTrendControl (Page 1373)

WinCC Professional V13 SP2 – Programming reference


2222 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Stop (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Closes WinCC Runtime.

Syntax
Expression.Stop

Expression
Required An expression which returns an "HMIRuntime" type object.

Parameters
--

See also
HMIRuntime (Page 1292)

Trace (Panels, Comfort Panels, RT Advanced, RT Professional)

Description
Returns a user-defined text through the operating system channel for debug alarms.
The methods HMIRuntime.Trace works only in a PC-based environment. The text transferred
as parameter can be displayed using the diagnostics tools "GSC Diagnostics" or "ApDiag".
You can use the "ShowSystemAlarm" system function if you need to run a trace without using
external tools.

Syntax
Expression.Trace"STRING"

Expression
Required An expression which returns an "HMIRuntime" type object.

Parameters

STRING
The text which is issued as a debug alarm. The transferred text can be displayed using the
diagnostics tools "GSC Diagnostics" or "ApDiag". You can use the "ShowSystemAlarm"
system function if you need to run a trace without using external tools.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2223
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example
In the following example a debug alarm is issued:
'VBS example trace
HMIRuntime.Trace "Customized error message"

See also
HMIRuntime (Page 1292)

UnhideAlarm (RT Professional)

Description
Executes the "Unhide alarm" button function of the alarm view.

Syntax
Ausdruck.UnhideAlarm()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
AlarmControl (Page 1316)

UnlockAlarm (RT Professional)

Description
Executes the "Unlock alarm" button function of the alarm view.

Syntax
Ausdruck.UnlockAlarm()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

WinCC Professional V13 SP2 – Programming reference


2224 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Parameter
--

See also
AlarmControl (Page 1316)

UnselectAll (RT Professional)

Description
Removes all selections from the cells of a table-based control.

Syntax
Expression.UnselectAll()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
OnlineTableControl (Page 1409)
TrendRulerControl (Page 1480)
UserArchiveControl (Page 1499)
AlarmControl (Page 1316)

UnselectRow (RT Professional)

Description
Removes the selections from a specific cell of a table-based control.

Syntax
Expression.UnselectRow(ByVal IRow As Long)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2225
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Parameters
Long

Parameters Description
IRow Number of the row to be selected.

See also
OnlineTableControl (Page 1409)
TrendRulerControl (Page 1480)
UserArchiveControl (Page 1499)
AlarmControl (Page 1316)

Write (RT Professional)

Description of Tag Object


Writes a value to a tag. The "LastError" property can be used to determine whether the call
was successful.
If the value of the tag is set successfully, the properties of the tag object are assigned the
following values:

Property Allocation
Value Tag values set by the user (unchanged)
Name Tag name (unchanged)
QualityCode Bad Out of Service
Timestamp 0
LastError 0
ErrorDescription ""

If the value of the tag is not set successfully, the properties of the tag object are assigned the
following values:

Property Allocation
Value Tag values set by the user (unchanged)
Name Tag name (unchanged)
QualityCode Bad Out of Service
Timestamp 0
LastError Write operation error codes
ErrorDescription Error description on LastError

syntax
Expression.Write [Value],[Writemode]

WinCC Professional V13 SP2 – Programming reference


2226 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Expression
Necessary. An expression which returns a tag object.

Parameters
The value to be written can be transferred directly to the method as a parameter. If the
parameter is not specified, the value in the "Value" property is used. The "Writemode" option
parameter can be used to select whether the tag value should be written synchronously or
asynchronously. If the "Writemode" parameter is not used, writing is performed asynchronously
as its default value.
During the writing process, no information is supplied on the status of the tags.
The "Value" property contains the value which was set before or during the writing operation,
therefore is may not correspond to the real current value of the tag. If the data on the tag should
be updated, use the Read method.

Parameters Description
Value (optional) The tag value is specified. The specified value
overwrites the value in the "Value" property in the
tag object.
The tag value is not specified. The tag receives the
current value from the "Value" property of the tag
object.
Writemode (optional) 0 or empty: The tag value is written asynchronous‐
ly. 0 is the default value.
1: The tag value is written synchronously.

On asynchronous writing, it is written immediately into the tag image. The user does not receive
any feedback if the value has been written in the programmable controller, too.
In the case of synchronous writing (direct to the PLC), the writing operation actually occurs
when the PLC is ready to operate. The use receives a check-back message if the writing
operation was not successful.

Example
Asynchronous writing

'VBS104
Dim objTag
Set objTag = HMIRuntime.Tags("Var1")
objTag.Value = 5
objTag.Write
MsgBox objTag.Value

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2227
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

or

'VBS105
Dim objTag
Set objTag = HMIRuntime.Tags("Var1")
objTag.Write 5
MsgBox objTag.Value

Synchronous writing

'VBS106
Dim objTag
Set objTag = HMIRuntime.Tags("Var1")
objTag.Value = 5
objTag.Write ,1
MsgBox objTag.Value

or

'VBS107
Dim objTag
Set objTag = HMIRuntime.Tags("Var1")
objTag.Write 5, 1
MsgBox objTag.Value

Description of TagSet Object


The TagSet object offers the option of writing several tags in one call.
Functionality here is mostly identical with that of a tag object. In the following, only deviations
thereof are described.

Expression
Necessary. An expression which returns an object of type "TagSet".

Parameters
In order to write different values, the "Value" property of individual tag objects must be set, and
write must be called thereafter without the "Value" parameter. Since the write commands are
grouped into one call, it results in improved performance compared to single calls.
In a TagSet object, it is not possible to pass on a value using the "Write" method. Individual
values must be set using the "Value" property of the individual tag objects.

WinCC Professional V13 SP2 – Programming reference


2228 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Example
The following example shows how tags are included in the TagSet list, how tag values are set
and subsequently written.

'VBS173
Dim group
Set group = HMIRuntime.Tags.CreateTagSet
group.Add "Wert1"
group.Add "Wert2"
group("Wert1").Value = 3
group("Wert2").Value = 9
group.Write

If you set the optional parameter "Writemode" equal to 1, the process tags are written
synchronously (directly to AS).

group.Write 1

WriteTags (RT Professional)

Description
Executes the "Write tags" button function of the recipe view.

Syntax
Expression.WriteTags()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
UserArchiveControl (Page 1499)

ZoomArea (RT Professional)

Description
Executes the "Zoom area" button function of the f(t) and f(x) trend views.

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2229
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Ausdruck.ZoomArea()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

ZoomInOut (RT Professional)

Description
Executes the "Zoom +/-" button function of the f(t) and f(x) trend views.

Syntax
Ausdruck.ZoomInOut()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

ZoomInOutTime (RT Professional)

Description
Executes the "Zoom time axis +/-" button function of the f(t) trend view.

WinCC Professional V13 SP2 – Programming reference


2230 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Syntax
Ausdruck.ZoomInOutTime()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
OnlineTrendControl (Page 1417)

ZoomInOutValues (RT Professional)

Description
Executes the "Zoom value axis +/-" button function of the f(t) trend view.

Syntax
Ausdruck.ZoomInOutValues()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameter
--

See also
OnlineTrendControl (Page 1417)

ZoomInOutX (RT Professional)

Description
Executes the "Zoom X axis +/-" button function of the f(x) trend view.

Syntax
Ausdruck.ZoomInOutX()

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2231
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
FunctionTrendControl (Page 1373)

ZoomInOutY (RT Professional)

Description
Executes the "Zoom Y axis +/-" button function of the f(x) trend view.

Syntax
Ausdruck.ZoomInOutY()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
--

See also
FunctionTrendControl (Page 1373)

ZoomMove (RT Professional)

Description
Executes the "Move trend area" button function of the f(t) and f(x) trend views.

Syntax
Ausdruck.ZoomMove()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

WinCC Professional V13 SP2 – Programming reference


2232 System Manual, 03/2017, Online help printout
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

Parameters
--

See also
OnlineTrendControl (Page 1417)
FunctionTrendControl (Page 1373)

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2233
VB scripting (Panels, Comfort Panels, RT Advanced, RT Professional)
3.5 VBS object model (Panels, Comfort Panels, RT Advanced, RT Professional)

WinCC Professional V13 SP2 – Programming reference


2234 System Manual, 03/2017, Online help printout
Index
ActivateDynamic, 2117
ActivateNextScreen, 23
_ ActivatePreviousScreen, 24, 1129
ActivateScreen, 25, 1130, 1218
_ismbcalnum function, 175
ActivateScreenByNumber, 1131
_ismbcalpha function, 175
ActivateScreenInScreenWindow, 26, 1220
_ismbcdigit function, 175
ActivateStartScreen, 27
_ismbcgraph function, 175
ActivateStoredScreen, 28
_ismbclower function, 175
ActivateSystemDiagnosticsView, 1132
_ismbcprint function, 175
Active property (VBS), 2051
_ismbcpunct function, 175
ActiveScreen property (VBS), 1517
_ismbcspace function, 175
ActiveScreenItem object, 1519
_ismbcupper function, 175
ActualPointIndex property (VBS), 1519
_mbscat function, 176
ActualPointLeft property (VBS), 1520
_mbschr function, 176
ActualPointTop property (VBS), 1520
_mbscmp function, 175
AdaptBorder property (VBS), 1521
_mbscpy function, 176
AdaptFontSizeToLineHeight property (VBS), 2052
_mbscspn function, 175
AdaptPicture property (VBS), 1522
_mbsdec function, 176
AdaptScreenToWindow property (VBS), 1522
_mbsinc function, 176
AdaptWindowtoScreen property (VBS), 1522
_mbslen function, 176
Address property (VBS), 1523
_mbsncat function, 176
AddressEnabled property (VBS), 1523
_mbsncmp function, 175
AdjustBorder3DWithStyle property (VBS), 2028
_mbsncpy function, 176
AdjustRulerWindow property (VBS), 2052
_mbspbrk function, 176
AdressPreview property (VBS), 1523
_mbsrchr function, 175
Alarm object, 1283
_mbsspn function, 175
Alarm property (VBS), 1523
_mbsstr function, 176
AlarmClasses property (VBS), 1524
_mbstok function, 176
AlarmColor property (VBS), 1524
_mbstrlen function, 176
AlarmControl object, 1316
AlarmFilter property (VBS), 2029
AlarmHigh property (VBS), 2053
{ AlarmID property, 1525
{"ColumnDateFormat property (VBS)"}{"Properties AlarmLog property (VBS), 1525
(VBS)";"ColumnDateFormat"}, 1588 AlarmLogs object, 1285
{"ColumnTimeFormat property (VBS)"}{"Properties AlarmLow property (VBS), 1968
(VBS)";"ColumnTimeFormat"}, 1591 AlarmLowerLimit property (VBS), 1525
AlarmLowerLimitColor property (VBS), 1526
AlarmLowerLimitEnabled property (VBS), 1527
A AlarmLowerLimitRelative property (VBS), 1527
Alarms object (list), 1284
abort function, 178
AlarmSource property (VBS), 1528
AboveUpperLimitColor property (VBS), 1514
AlarmUpperLimit property (VBS), 1528
abs function, 177
AlarmUpperLimitColor property (VBS), 1529
AcceptOnExit property (VBS), 1515
AlarmUpperLimitEnabled property (VBS), 1529
AcceptOnFull property (VBS), 1515
AlarmUpperLimitRelative property (VBS), 1530
AcknowledgeAlarm, 1129
AlarmView object, 1327
acos function, 174
Alignment property (VBS), 2053
Activate method, 2114
AlignmentLeft property (VBS), 2054
Activate property (VBS), 2028

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2235
Index

AlignmentTop property (VBS), 1969 BackFillStyle property (VBS), 1544


AllFilters property (VBS), 1530 BackFillStyleReadOnlySpecial property (VBS), 2055
AllFiltersForHitlist property (VBS), 1530 BackFlashingColorOff property (VBS), 1545
AllowEdit property (VBS), 1531 BackFlashingColorOn property (VBS), 1546
AllowMenu property (VBS), 1531 BackFlashingEnabled property (VBS), 1547
AllowPersistence property (VBS), 2054 BackFlashingRate property (VBS), 1548
Analog property (VBS), 1531 BackgroundColor property (VBS), 1549
AngleMax property (VBS), 1531 BackupRAMFileSystem, 1135
AngleMin property (VBS), 1532 Bar object, 1331
Appearance property (VBS), 1533 BarBackColor property (VBS), 1549
ApplicationWindow object, 1451 BarBackFillStyle property (VBS), 1549
ApplyProjectSettings property (VBS), 1533 BarBackFlashingColorOff property (VBS), 1551
ApplyProjectSettingsForDesignMode property BarBackFlashingColorOn property (VBS), 1551
(VBS), 1533 BarBackFlashingEnabled property (VBS), 1551
ArchiveLogFile, 1133 BarBackFlashingRate property (VBS), 1552
asctime function, 179 BarColor property (VBS), 1552
asin function, 174 BarEdgeStyle property (VBS), 1552
AskOperationMotive property (VBS), 1533 BarStartValue property (VBS), 2056
Assignments property (VBS), 1534 BaseScreenName property (VBS), 1552
AssociatedS7GraphDBTag property (VBS), 1534 Battery object, 1336
AssumeOnExit property (VBS), 1970 BeginTime(i) property (VBS), 2056
AssumeOnFull property (VBS), 1970 BelowLowerLimitColor property (VBS), 1553
atan function, 174 BitNumber property (VBS), 1553
atan2 function, 174 BlinkColor property (VBS), 1554
atof function, 177 BlinkMode property (VBS), 1554
atoi function, 177 BlinkSpeed property (VBS), 1555
atol function, 178 Blocks property (VBS), 1555
AttachDB, 2121 BorderBackColor property (VBS), 1556
Authorization property (VBS), 1535 BorderBrightColor3D property (VBS), 1557
AutoCompleteColumns property (VBS), 1536 BorderColor property (VBS), 1558
AutoCompleteRows property (VBS), 1537 BorderEnabled property (VBS), 1559
AutoScroll property (VBS), 1537 BorderEndStyle property (VBS), 1560
AutoSelectionColors property (VBS), 1538 BorderFlashingColorOff property (VBS), 1560
AutoSelectionRectColors property (VBS), 1538 BorderFlashingColorOn property (VBS), 1562
AutoSizing property (VBS), 1539 BorderFlashingEnabled property (VBS), 1563
AverageLast15Values property (VBS), 1539 BorderFlashingRate property (VBS), 1564
AxisXBunchCount property (VBS), 1540 BorderInnerStyle3D property (VBS), 1565
AxisXMarkCount property (VBS), 1540 BorderInnerWidth3D property (VBS), 1565
AxisXShowBunchValues property (VBS), 1540 BorderOuterStyle3D property (VBS), 1566
AxisY1BunchCount property (VBS), 1540 BorderOuterWidth3D property (VBS), 1566
AxisY1MarkCount property (VBS), 1540 BorderShadeColor3D property (VBS), 1567
AxisY1ShowBunchValues property (VBS), 1540 BorderStyle property (VBS), 1568
AxisY2BunchCount property (VBS), 1540 BorderStyle3D property (VBS), 1569
AxisY2MarkCount property (VBS), 1541 BorderWidth property (VBS), 1569
AxisY2ShowBunchValues property (VBS), 1541 BorderWidth3D property (VBS), 1571
BottomMargin property (VBS), 1571
BrowserView object, 1391
B bsearch function, 178
BusyText property (VBS), 1571
Back up RAM file system, 1135
Button object, 1337
BackColor property (VBS), 1541
ButtonBackColor property (VBS), 1572
BackColorBottom property (VBS), 1543
ButtonBackFillStyle property (VBS), 1572
BackColorTop property (VBS), 1543

WinCC Professional V13 SP2 – Programming reference


2236 System Manual, 03/2017, Online help printout
Index

ButtonBarElements property (VBS), 1572 _mbslen function, 176


ButtonBarStyle property (VBS), 1572 _mbsncat function, 176
ButtonBorderBackColor property (VBS), 1572 _mbsncmp function, 175
ButtonBorderColor property (VBS), 1572 _mbsncpy function, 176
ButtonBorderWidth property (VBS), 1572 _mbspbrk function, 176
ButtonCommand property (VBS), 1973 _mbsrchr function, 175
ButtonCornerRadius property (VBS), 1573 _mbsspn function, 175
ButtonEdgeStyle property (VBS), 1573 _mbsstr function, 176
ButtonFirstGradientColor property (VBS), 1573 _mbstok function, 176
ButtonFirstGradientOffset property (VBS), 1573 _mbstrlen function, 176
ButtonMiddleGradientColor property (VBS), 1573 abort function, 178
ButtonSecondGradientColor property (VBS), 1573 abs function, 177
ButtonSecondGradientOffset property (VBS), 1573 acos function, 174
BV_ColumnWidth_Date property (VBS), 1574 asctime function, 179
BV_ColumnWidth_Event property (VBS), 1574 asin function, 174
BV_ColumnWidth_EventSeverity property atan function, 174
(VBS), 1574 atan2 function, 174
BV_ColumnWidth_EventState property (VBS), 1574 atof function, 177
BV_ColumnWidth_Number property (VBS), 1574 atoi function, 177
BV_ColumnWidth_Time property (VBS), 1574 atol function, 178
BV_ItemText_Date property (VBS), 1574 bsearch function, 178
BV_ItemText_Event property (VBS), 1575 calloc function, 178
BV_ItemText_EventSeverity property (VBS), 1575 ceil function, 174
BV_ItemText_EventState property (VBS), 1575 clearerr function, 177
BV_ItemText_Number property (VBS), 1575 clock function, 179
BV_ItemText_Time property (VBS), 1575 cos function, 174
BV_ShowItem_Date property (VBS), 1575 cosh function, 174
BV_ShowItem_Event property (VBS), 1575 ctime function, 179
BV_ShowItem_EventSeverity property (VBS), 1576 difftime function, 179
BV_ShowItem_EventState property (VBS), 1576 div function, 177
BV_ShowItem_Number property (VBS), 1576 exit function, 178
BV_ShowItem_Time property (VBS), 1576 exp function, 174
fabs function, 174
fclose function, 176
C feof function, 176
ferror function, 176
C functions
fflush function, 176
_ismbcalnum function, 175
fgetc function, 176
_ismbcalpha function, 175
fgetpos function, 176
_ismbcdigit function, 175
fgets function, 176
_ismbcgraph function, 175
floor function, 174
_ismbclower function, 175
fmod function, 174
_ismbcprint function, 175
fopen function, 176
_ismbcpunct function, 175
fputc function, 177
_ismbcspace function, 175
fputs function, 177
_ismbcupper function, 175
fread function, 177
_mbscat function, 176
free function, 178
_mbschr function, 176
freopen function, 176
_mbscmp function, 175
frexp function, 174
_mbscpy function, 176
fseek function, 177
_mbscspn function, 175
fsetpos function, 177
_mbsdec function, 176
ftell function, 177
_mbsinc function, 176

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2237
Index

fwrite function, 177 strncpy function, 178


getc function, 177 strpbrk function, 178
getenv function, 177 strrchr function, 178
gmtime function, 179 strspn function, 179
isalnum function, 172 strstr function, 178
isalpha function, 172 strtod function, 177
isdigit function, 172 strtok function, 178
isgraph function, 173 strtol function, 178
islower function, 173 strtoul function, 178
isprint function, 173 system function, 178
ispunct function, 173 tan function, 174
isspace function, 173 tanh function, 174
isupper function, 173 time function, 179
isxdigit function, 173 tmpfile function, 176
labs function, 178 tmpnam function, 176
ldexp function, 174 tolower function, 173
ldiv function, 177 toupper function, 173
localtime function, 179 ungetc function, 177
log function, 174 vfprintf function, 177
log10 function, 174 vsprintf function, 177
malloc function, 178 C text lists, 693, 695
memchr function, 175 CalculateStatistic, 2121
memcmp function, 175 CalibrateTouchScreen, 1135
memcpy function, 175 calloc function, 178
memmove function, 175 Caption property (VBS), 1576
memset function, 175 CaptionBackColor property (VBS), 1577
mktime function, 179 CaptionColor property (VBS), 1577
modf function, 174 CaptionText property (VBS), 1578
pow function, 174 CaptionTop property (VBS), 1579
putc function, 177 ceil function, 174
qsort function, 178 CellCut property (VBS), 1579
rand function, 178 CellSpaceBottom property (VBS), 1580
realloc function, 178 CellSpaceLeft property (VBS), 1580
remove function, 177 CellSpaceRight property (VBS), 1581
rename function, 177 CellSpaceTop property (VBS), 1581
rewind function, 177 CenterColor property (VBS), 1582
setbuf function, 177 CenterSize property (VBS), 1582
setvbuf function, 177 CentrePoint property (VBS), 2057
sin function, 174 CentrePointLeft property (VBS), 2058
sinh function, 174 CentrePointTop property (VBS), 2058
sqrt function, 174 ChangeConnection, 1136
srand function, 178 ChangeMouseCursor property (VBS), 1583
strcat function, 178 ChannelDiagnose object, 1341
strchr function, 178 CheckBox object, 1343
strcmp function, 179 CheckMarkAlignment property (VBS), 1583
strcpy function, 178 CheckMarkCount property (VBS), 1584
strcspn function, 179 Circle object, 1346
strerror function, 178 CircleSegment object, 1348
strftime function, 179 CircularArc object, 1351
strlen function, 179 ClearAlarmBuffer, 1138
strncat function, 178 ClearAlarmBufferProTool, 1139
strncmp function, 179 ClearAlarmBufferProtoolLegacy, 1139

WinCC Professional V13 SP2 – Programming reference


2238 System Manual, 03/2017, Online help printout
Index

ClearDataRecordMemory, 1140 Connect notify function, 267


clearerr function, 177 Edit tag properties via dialog, 400
ClearLog, 1142 Enumerate connection data, 436
ClearOnError property (VBS), 1584 Enumerate tag group information, 329
ClearOnFocus property (VBS), 1585 Enumerate tags of a structured tag, 425
clock function, 179 Open tag selection dialog box, 404, 409
clock functions Remove notify function, 291, 298
asctime function, 179 Retrieve data type of a tag, 374
Clock object, 1353 Retrieve limits of a tag, 367
Closeable property (VBS), 1585 Retrieve tag ID, 356
CloseAllLogs, 1142 Retrieve tag name, 356
Color property (VBS), 1586 Retrieve tag values, 339
ColorChangeHysteresis property (VBS), 1586 Retrieve tag values with update, 352
ColorChangeHysteresisEnabled property Specify update tags, 454
(VBS), 1587 ControlDesignMode property (VBS), 1796
ColumnAlignment property (VBS), 1587 Controls
ColumnColor(i) property (VBS), 2060 WinCC MediaControl, 1402
ColumnDisplayName(i) property (VBS), 2060 ControlSmartServer, 1143
ColumnResize property (VBS), 1588 ControlWebServer, 1144
Columns property (VBS), 1589 CopyRows, 2122
ColumnScrollbar property (VBS), 1589 CornerRadius property (VBS), 1595
ColumnSettings property (VBS), 1590 CornerStyle property (VBS), 1595
ColumnSettingsBufferView property (VBS), 1590 cos function, 174
ColumnSizingEnable property (VBS), 2031 cosh function, 174
ColumnsMoveable property (VBS), 1590 Count property (VBS), 1597
ColumnTextAckGroup property (VBS), 1590 CountDivisions property (VBS), 1597
ColumnTextAlarmState property (VBS), 1590 CountOfLinesPerAlarms property (VBS), 1598
ColumnTextAlarmText property (VBS), 1590 CountOfVisibleAlarms property (VBS), 1598
ColumnTextClassName property (VBS), 1591 CountSubDivisions property (VBS), 1598
ColumnTextDevice property (VBS), 1591 CountValueColumns property (VBS), 1979
ColumnTextDiagnosable property (VBS), 1591 CountVisibleItems property (VBS), 1598
ColumnTextNumber property (VBS), 1591 CreateTagSet-Methode, 2123
ColumnTextTime property (VBS), 1591 ctime function, 179
ColumnTitleAlignment property (VBS), 1592 ctype functions
ColumnTitles property (VBS), 1593 isalnum function, 172
ColumnUpdateEnabled(i) property (VBS), 2061 isalpha function, 172
ComboboxFont property (VBS), 1593 isdigit function, 172
Command property (VBS), 2061 isgraph function, 173
CommonTimeAxisColor property (VBS), 2062 islower function, 173
CompatibilityMode property (VBS), 1593 isprint function, 173
ConfigureTimeAxis(i) property (VBS), 2062 ispunct function, 173
ConnectionType property (VBS), 1594 isspace function, 173
ConnectOnStart property (VBS), 1594 isupper function, 173
Connector object, 1355 isxdigit function, 173
ConnectTrendWindows property (VBS), 1594 tolower function, 173
ContinousChange property (VBS), 1595 toupper function, 173
Control Center CurrentColumnIndex property (VBS), 1979
Change tag values, 381 CurrentCurveIndex property (VBS), 2063
Change tag values with alarm display, 386 CursorControl property (VBS), 1599
Change tag values with notify message, 390 CurveColor(i) property (VBS), 2063
Change tag values with notify message and alarm CurveLineWidth(i) property (VBS), 2064
display, 395 Curves property (VBS), 1600

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2239
Index

CurvesCount property (VBS), 2065 DMEnumConnectionDataExStr (Control


CurveUpdateEnabled(i) property (VBS), 2065 Center), 436
CutRows, 2123 DMEnumVarGrpDataExStr (Control Center), 329
DMEnumVariables (Control Center), 386
DMFireNotifyData (Control Center), 291
D DMGetValueExStr (Control Center), 339
DMGetValueWaitExStr (Control Center), 352
DangerRangeColor property (VBS), 1600
DMGetVarInfoExStr (Control Center), 356
DangerRangeStart property (VBS), 1601
DMGetVarLimitsExStr (Control Center), 367
DangerRangeVisible property (VBS), 1601
DMGetVarTypeExStr (Control Center), 374
DataFormat property (VBS), 1602
DMRemoveNotify (Control Center), 298
DataIndex(i) property (VBS), 2066
DMSetValueExStr (Control Center), 381
DataItem object, 1287
DMSetValueWaitExStr (Control Center), 390
DataLogs object, 1288
DMSetValueWaitMessageExStr (Control
DataLogTag property (VBS), 2066
Center), 395
DataRecordNameCaption property (VBS), 1603
DMShowVarDatabaseExStr (Control Center), 404
DataRecordNrCaption property (VBS), 1603
DMShowVarDatabaseMultiExStr (Control
DataSet object (list), 1290
Center), 409
DataX(i) property (VBS), 2067
DMShowVarPropertiesExStr (Control Center), 400
DataXY(i) property (VBS), 2067
DMStartVarUpdateExStr (Control Center), 454
DataY(i) property (VBS), 2068
DoubleClickAction property (VBS), 1607
DateTimeField object, 1358
DrawAlwaysInsideFrame property (VBS), 1980
DecreaseTag, 29, 1146, 1221
DrawEnhancedHTMLBrowser property (VBS), 2070
DeleteDataRecord, 1139
DrawInsideFrame property (VBS), 1608
DeleteDataRecordMemory, 1140
DrawStylishButton property (VBS), 1981
DeleteDate(i) property (VBS), 2068
Drive property (VBS), 1609
DeleteEnable property (VBS), 1980
DeleteRows, 2126
DetachDB, 2126
DialColor property (VBS), 1603
E
DialFillStyle property (VBS), 1604 EdgeStyle property (VBS), 1610
DialSize property (VBS), 1605 Edit, 2127
difftime function, 179 Editable(i) property (VBS), 2070
Direction property (VBS), 2069 EditAlarm, 1147
DiskSpaceView object, 1359 EditEnabled property (VBS), 2071
DisplayButton2Plc property (VBS), 1605 EditOnFocus property (VBS), 1611
DisplayButtonComparison property (VBS), 1605 Ellipse object, 1361
DisplayButtonDelete property (VBS), 1605 EllipseSegment object, 1364
DisplayButtonFromPlc property (VBS), 1605 EllipticalArc object, 1366
DisplayButtonHelp property (VBS), 1606 Enabled property (VBS), 1612
DisplayButtonNew property (VBS), 1606 EnableEdit property (VBS), 1614
DisplayButtonSave property (VBS), 1606 EnableNavigateKeys property (VBS), 1614
DisplayButtonSaveAs property (VBS), 1606 Encode, 1147
DisplayComboBox property (VBS), 1606 EncodeEx, 1148
DisplayGridLines property (VBS), 1606 EndAngle property (VBS), 1614
DisplayLabeling property (VBS), 1606 EndLeft property (VBS), 1615
DisplayName(i) property (VBS), 2069 EndPoint property (VBS), 2071
DisplayNumbers property (VBS), 1607 EndPointLeft property (VBS), 2072
DisplayOptions property (VBS), 1607 EndPointTop property (VBS), 2073
DisplayStatusBar property (VBS), 1607 EndStyle property (VBS), 1615
DisplayTable property (VBS), 1607 EndTime(i) property (VBS), 2073
div function, 177 EndTop property (VBS), 1616
DMAddNotify (Control Center), 267 EntryNameCaption property (VBS), 1616

WinCC Professional V13 SP2 – Programming reference


2240 System Manual, 03/2017, Online help printout
Index

EstablishPROFIsafe, 1149 fmod function, 174


EvenRowBackColor property (VBS), 1617 FocusColor property (VBS), 1635
exit function, 178 FocusWidth property (VBS), 1636
exp function, 174 Font property (VBS), 1637
Export, 2127 FontBold property (VBS), 1638
Recipe, 1152 FontItalic property (VBS), 1639
ExportDataRecords, 1150 FontName property (VBS), 1640
ExportDataRecordsWithChecksum, 1152 FontSize property (VBS), 1640
ExportDelimiter property (VBS), 1617 FontUnderline property (VBS), 1641
ExportDirectoryChangeable property (VBS), 1618 fopen function, 176
ExportDirectoryname property (VBS), 1618 ForeColor property (VBS), 1642
ExportFileExtension property (VBS), 1619 ForeColorTransparency property (VBS), 1643
ExportFilename property (VBS), 1619 FormatPattern property (VBS), 1643
ExportFilenameChangeable property (VBS), 1620 FormatPatternReadOnlySpecial property
ExportFormatGuid property (VBS), 1621 (VBS), 2076
ExportFormatName property (VBS), 1621 FormatType property (VBS), 1983
ExportImportUserAdministration, 1155, 1222 fputc function, 177
ExportParameters property (VBS), 1622 fputs function, 177
ExportSelection property (VBS), 1622 fread function, 177
ExportShowDialog property (VBS), 1623 free function, 178
ExtraSpaceForLabelDisplay property (VBS), 2074 Free property (VBS), 1643
FreePercent property (VBS), 1644
FreezeProviderConnections property (VBS), 2077
F freopen function, 176
frexp function, 174
fabs function, 174
fseek function, 177
fclose function, 176
fsetpos function, 177
feof function, 176
ftell function, 177
ferror function, 176
FunctionTrendControl object, 1373
fflush function, 176
fwrite function, 177
fgetc function, 176
fgetpos function, 176
fgets function, 176
FieldLength property (VBS), 1624, 1625
G
FillColorMode property (VBS), 1625 GAPIEnumTypeMembersExStr (Control
FillPatternColor property (VBS), 1625 Center), 425
FillStyle property (VBS), 1627 Gauge object, 1381
Filter property (VBS), 1627 GetBrightness, 1155
FilterTag property (VBS), 1627 getc function, 177
FilterText property (VBS), 1628 GetColumn, 2128, 2147, 2148, 2207, 2208, 2225
FirstConnectedObjectIndex property (VBS), 1628 GetColumnCollection, 2129
FirstConnectedObjectName property (VBS), 1628 GetDataRecordFromPLC, 1156
FitToLargest property (VBS), 1629 GetDataRecordName, 1158
FitToSize property (VBS), 1629 GetDataRecordTagsFromPLC, 1159
FixedAspectRatio property (VBS), 1629 getenv function, 177
FlashingColorOff property (VBS), 1629 GetGroupNumber, 1160
FlashingColorOn property (VBS), 1631 GetHitlistColumn, 2131
FlashingEnabled property (VBS), 1632 GetHitlisteColumnCollection, 2130
FlashingOnLimitViolation property (VBS), 1633 GetLanguageByLocaleID, 34
FlashingRate property (VBS), 1633 GetLinkedTag, 33
FlashTransparentColor property (VBS), 1634 GetLocalScreen, 31
Flip property (VBS), 1635 GetMessageBlock, 2132
floor function, 174 GetMessageBlockCollection, 2133

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2241
Index

GetMessageColumn, 2135 GetTagDWordStateQCWait, 59


GetMessageColumnCollection, 2140 GetTagDWordStateWait, 61
GetOperatorMessage, 2136 GetTagDWordWait function, 69
GetOperatorMessageCollection, 2138 GetTagFloat, 47
GetParentScreen, 36 GetTagFloatState, 54
GetParentScreenWindow, 37 GetTagFloatStateQC, 56
GetPassword, 1161 GetTagFloatStateQCWait, 59
GetPropBOOL, 39 GetTagFloatStateWait, 62
GetPropChar, 41 GetTagFloatWait function, 69
GetPropDouble, 42 GetTagMultiStateQCWait function, 49
GetPropLong, 43 GetTagMultiStateWait, 51
GetRow, 2139 GetTagMultiWait, 52
GetRulerBlock, 2142 GetTagRaw, 47
GetRulerBlockCollection, 2143 GetTagRawState, 54
GetRulerColumn, 2144 GetTagRawStateQC, 56
GetRulerColumnCollection, 2145 GetTagRawStateQCWait, 59
GetRulerData, 2146 GetTagRawStateWait, 62
GetSelectionText property (VBS), 2077 GetTagRawWait function, 69
GetStatisticAreaColumn, 2150 GetTagSByte, 47
GetStatisticAreaColumnCollection, 2151 GetTagSByteState, 54
GetStatisticResultColumn, 2152 GetTagSByteStateQC, 56
GetStatisticResultColumnCollection, 2153 GetTagSByteStateQCWait, 59
GetStatusbarElement, 2154 GetTagSByteStateWait, 62
GetStatusbarElementCollection, 2155 GetTagSByteWait function, 69
GetTagBit, 47 GetTagSDWord function, 47
GetTagBitState, 54 GetTagSDWordState, 54
GetTagBitStateQC, 56 GetTagSDWordStateQC, 56
GetTagBitStateQCWait, 59 GetTagSDWordStateQCWait, 59
GetTagBitStateWait, 61 GetTagSDWordStateWait, 62
GetTagBitWait function, 69 GetTagSDWordWait function, 70
GetTagByte, 47 GetTagSWord, 47
GetTagByteState, 54 GetTagSWordState, 54
GetTagByteStateQC, 56 GetTagSWordStateQC, 57
GetTagByteStateQCWait, 59 GetTagSWordStateQCWait, 59
GetTagByteStateWait, 61 GetTagSWordStateWait, 62
GetTagByteWait function, 69 GetTagSWordWait function, 70
GetTagChar, 47 GetTagValue, 63
GetTagCharState, 54 GetTagValueStateQC, 65
GetTagCharStateQC, 56 GetTagValueStateQCWait, 66
GetTagCharStateQCWait, 59 GetTagValueWait, 68
GetTagCharStateWait, 61 GetTagWord, 47
GetTagCharWait function, 69 GetTagWordState, 54
GetTagDateTime, 47, 48 GetTagWordStateQC, 57
GetTagDouble, 47 GetTagWordStateQCWait, 59
GetTagDoubleState, 54 GetTagWordStateWait, 62
GetTagDoubleStateQC, 56 GetTagWordWait function, 70
GetTagDoubleStateQCWait, 59 GetTimeAxis, 2157
GetTagDoubleStateWait, 61 GetTimeAxisCollection, 2158
GetTagDoubleWait function, 69 GetTimeColumn, 2160
GetTagDWord function, 47 GetTimeColumnCollection, 2161
GetTagDWordState, 54 GetToolbarButton, 2162
GetTagDWordStateQC, 56 GetToolbarButtonCollection, 2163

WinCC Professional V13 SP2 – Programming reference


2242 System Manual, 03/2017, Online help printout
Index

GetTrend, 2165 HMIRuntime, 1274


GetTrendCollection, 2166 HMIRuntime object, 1274, 1292
GetTrendWindow, 2167 HorizontalAlignment property (VBS), 1661
GetTrendWindowCollection, 2168 HorizontalGridLines property (VBS), 1662
GetUserName, 1161 HorizontalScrollBarPosition property (VBS), 1662
GetValueAxis, 2169 Hotkey property (VBS), 1663
GetValueAxisCollection, 2170 HourNeedleHeight property (VBS), 1663
GetValueColumn, 2172 HourNeedleWidth property (VBS), 1663
GetValueColumnCollection, 2173
GetXAxis, 2174
GetXAxisCollection, 2175 I
GetYAxis, 2177
IconSpace property (VBS), 1664
GetYAxisCollection, 2178
ImportDataRecords, 1163
gmtime function, 179
ImportDataRecordsWithChecksum, 1165
GoToEnd, 1162
IncreaseTag, 71, 1166, 1223
GoToHome, 1162
Index property (VBS), 1664
Gradation property (VBS), 1644
InnerBackColorOff property (VBS), 1665
GraphDirection property (VBS), 1645
InnerBackColorOn property (VBS), 1666
GraphicIOField object, 1383
InputValue property (VBS), 1666
GraphicView object, 1387
InquireLanguage, 72
GridBackColor property (VBS), 1984
InsertData(i) property (VBS), 2032
GridLineColor property (VBS), 1645
InsertEnable property (VBS), 1985
GridlineFillColor property (VBS), 1646
IntegerDigits property (VBS), 1667
GridlineStyle property (VBS), 1646
Interval property (VBS), 1667
GridLineWidth property (VBS), 1646
InverseLinearScaling, 74, 1167, 1224
Group object, 1390
InvertBit, 76, 1169, 1226
InvertBitInTag, 77, 1170, 1227
InvertLinearScaling, 74, 1167, 1224
H IOField object, 1393
HeaderFont property (VBS), 1647 isalnum function, 172
Height property (VBS), 1647 isalpha function, 172
HelpText property (VBS), 1651 isdigit function, 172
HiddenInput property (VBS), 1652 isgraph function, 173
HideAlarm, 2179 islower function, 173
HideTagNames property (VBS), 2077 isprint function, 173
HighLimitColor property (VBS), 1652 ispunct function, 173
Hitlist property (VBS), 1653 isspace function, 173
HitlistColumnAdd property (VBS), 1653 isupper function, 173
HitlistColumnCount property (VBS), 1654 IsUserAuthorized, 78
HitlistColumnIndex property (VBS), 1654 isxdigit function, 173
HitlistColumnName property (VBS), 1655 Item methods, 2180
HitlistColumnRemove property (VBS), 1655 Item object, 1293
HitlistColumnRepos property (VBS), 1656 ItemBorderStyle property (VBS), 1668
HitlistColumnSort property (VBS), 1656
HitlistColumnSortIndex property (VBS), 1657
HitlistColumnVisible property (VBS), 1657 J
HitlistDefaultSort property (VBS), 1658
JumpToLimitsAfterMouseClick property (VBS), 1668
HitlistMaxSourceItems property (VBS), 1658
HitlistMaxSourceItemsWarn property (VBS), 1659
HitlistRelTime property (VBS), 1660
HitlistRelTimeFactor property (VBS), 1659
L
HitlistRelTimeFactorType property (VBS), 1660 LabelColor property (VBS), 1669

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2243
Index

labs function, 178 Logoff, 1173


Language property (VBS), 1669 Logon, 1174
LargeTicksBold property (VBS), 1670 LogOperation property (VBS), 1692
LargeTicksSize property (VBS), 1670 LongTermArchiveConsistency property (VBS), 1692
LastConnectedObjectIndex property (VBS), 1671 LookupText, 1174
LastConnectedObjectName property (VBS), 1671 LoopInAlarm, 2182
Layer object, 1294 LowerLimit property (VBS), 1693
Layers object (list), 1296 LowerLimitColor(i) property (VBS), 1989
ldexp function, 174 LowerLimitValue(i) property (VBS), 1990
ldiv function, 177 LowLimitColor property (VBS), 1693
LeaveMarginForBorder property (VBS), 2078
LeaveMarginForMarkers property (VBS), 2079
Left property (VBS), 1677 M
LeftOffset property (VBS), 1678
MachineName property (VBS), 1694
Limit4LowerLimit property (VBS), 1678
malloc function, 178
Limit4LowerLimitColor property (VBS), 1679
MarginToBorder property (VBS), 1694
Limit4LowerLimitEnabled property (VBS), 1679
math functions
Limit4LowerLimitRelative property (VBS), 1680
acos function, 174
Limit4UpperLimit property (VBS), 1681
asin function, 174
Limit4UpperLimitColor property (VBS), 1681
atan function, 174
Limit4UpperLimitEnabled property (VBS), 1682
ceil function, 174
Limit4UpperLimitRelative property (VBS), 1682
cos function, 174
Limit5LowerLimit property (VBS), 1683
cosh function, 174
Limit5LowerLimitColor property (VBS), 1683
exp function, 174
Limit5LowerLimitEnabled property (VBS), 1684
fabs function, 174
Limit5LowerLimitRelative property (VBS), 1685
floor function, 174
Limit5UpperLimit property (VBS), 1685
fmod function, 174
Limit5UpperLimitColor property (VBS), 1686
frexp function, 174
Limit5UpperLimitEnabled property (VBS), 1686
ldexp function, 174
Limit5UpperLimitRelative property (VBS), 1687
log function, 174
Line object, 1396
log10 function, 174
LinearScaling, 79, 1171, 1228
modf function, 174
LineColor property (VBS), 1687
pow function, 174
LineEndShapeStyle property (VBS), 1688
sin function, 174
LineWidth property (VBS), 1689
sinh function, 174
Listbox, 1399
sqrt function, 174
Lists, 1314
tan function, 174
Lists in VBS
tanh function, 174
Alarms object (list), 1284
MaximumValue property (VBS), 1695
Lists:DataSet, 1290
MediaControl, 1402
Lists:Layers, 1296
memchr function, 175
Lists:Tags Object (List), 1313
memcmp function, 175
LoadDataImmediately property (VBS), 1690
memcpy function, 175
LoadDataRecord, 1172
memmove function, 175
LocalCursor property (VBS), 1691
memory functions
Localizable property (VBS), 2040
memchr function, 175
localtime function, 179
memcmp function, 175
LockAlarm, 2182
memcpy function, 175
LockSquaredExtent property (VBS), 1691
memmove function, 175
log function, 174
memset function, 175
log10 function, 174
memset function, 175
Logging object, 1297
MenuToolBarConfig property (VBS), 1695

WinCC Professional V13 SP2 – Programming reference


2244 System Manual, 03/2017, Online help printout
Index

MessageBlockAlignment property (VBS), 1696 Methods:Add, 2119


MessageBlockAutoPrecisions property (VBS), 1696 Methods:Read, 2195
MessageBlockCaption property (VBS), 1697 Methods:Refresh, 2198
MessageBlockCount property (VBS), 1697, 1700 Methods:Remove, 2199
MessageBlockDateFormat property (VBS), 1698 Methods:RemoveAll, 2203
MessageBlockExponentialFormat property Methods:Restore, 2204
(VBS), 1698 Methods:Write, 2226
MessageBlockFlashOn property (VBS), 1699 MinimumValue property (VBS), 1711
MessageBlockHideText property (VBS), 1699 MinuteNeedleHeight property (VBS), 1712
MessageBlockHideTitleText property (VBS), 1700 MinuteNeedleWidth property (VBS), 1712
MessageBlockID property (VBS), 1700 mktime function, 179
MessageBlockLeadingZeros property (VBS), 1701 Mode property (VBS), 1713
MessageBlockLength property (VBS), 1701 modf function, 174
MessageBlockName property (VBS), 1702 Moveable property (VBS), 1714
MessageBlockPrecisions property (VBS), 1702 MoveAxis, 2183
MessageBlockSelected property (VBS), 1703 MoveToFirst, 2183
MessageBlockShowDate property (VBS), 1703 MoveToFirstLine, 2184
MessageBlockShowIcon property (VBS), 1704 MoveToFirstPage, 2184
MessageBlockShowTitleIcon property (VBS), 1704 MoveToLast, 2185
MessageBlockTextId property (VBS), 1705 MoveToLastLine, 2185
MessageBlockTimeFormat property (VBS), 1705 MoveToLastPage, 2186
MessageBlockType property (VBS), 1706 MoveToNext, 2186
MessageColumnAdd property (VBS), 1706 MoveToNextPage, 2187
MessageColumnCount property (VBS), 1707 MoveToPrevious, 2188
MessageColumnIndex property (VBS), 1707 MoveToPreviousLine, 2188
MessageColumnName property (VBS), 1708 MoveToPreviousPage, 2189
MessageColumnRemove property (VBS), 1708 MsgFilterSQL property (VBS), 1714
MessageColumnRepos property (VBS), 1709 multibyte functions
MessageColumnSort property (VBS), 1709 _ismbcalnum function, 175
MessageColumnSortIndex property (VBS), 1710 _ismbcalpha function, 175
MessageColumnVisible property (VBS), 1710 _ismbcdigit function, 175
MessageListType property (VBS), 1711 _ismbcgraph function, 175
Methods, 2117, 2121, 2122, 2123, 2126, 2127, 2128, _ismbclower function, 175
2129, 2130, 2131, 2132, 2133, 2135, 2136, 2137, _ismbcprint function, 175
2138, 2139, 2140, 2142, 2143, 2144, 2145, 2146, _ismbcpunct function, 175
2147, 2148, 2150, 2151, 2152, 2153, 2154, 2155, _ismbcspace function, 175
2157, 2158, 2160, 2161, 2162, 2163, 2165, 2166, _ismbcupper function, 175
2167, 2168, 2169, 2170, 2172, 2173, 2174, 2175, _mbscat function, 176
2177, 2178, 2179, 2182, 2183, 2184, 2185, 2186, _mbschr function, 176
2187, 2188, 2189, 2190, 2191, 2192, 2193, 2194, _mbscmp function, 175
2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, _mbscpy function, 176
2215, 2216, 2217, 2218, 2219, 2220, 2221, 2222, _mbscspn function, 175
2224, 2225, 2229, 2230, 2231, 2232 _mbsdec function, 176
Methods (VBS), 2114, 2123 _mbsinc function, 176
Activate, 2114 _mbslen function, 176
CreateTagSet, 2123 _mbsncat function, 176
Item, 2180 _mbsncmp function, 175
Stop, 2223 _mbsncpy function, 176
Trace, 2223 _mbspbrk function, 176
Methods in VBS _mbsrchr function, 175
Create, 2122 _mbsspn function, 175
DeactivateDynamic, 2124 _mbsstr function, 176

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2245
Index

_mbstok function, 176 Listbox, 1399


_mbstrlen function, 176 MultiLineEdit, 1404
MultiLineEdit, 1404 OLEView object, 1407
OnlineTrend Control, 1417
OptionGroup, 1426
N Polygon, 1429
Polyline, 1432
Name property (VBS), 1715
ProjectName object, 1434
NColumnTextDate property (VBS), 1591
ProtectedAreaName, 1436
NeedleBorderColor property (VBS), 1717
RangeLabelView, 1437
NeedleColor property (VBS), 1718
RangeQualityView, 1438
NeedleFillStyle property (VBS), 1719
Rectangle, 1445
NextColumn, 2189
RoundButton, 1445
NextTrend, 2190
Screen, 1276, 1299
NormalRangeColor property (VBS), 1719
Screen object (list), 1275
NormalRangeVisible property (VBS), 1720
ScreenItem, 1277, 1302
NotifyUserAction, 1175
ScreenItems (list), 1279, 1304
NumberOfValues(i) property (VBS), 2079
ScreenWindow, 1449
Slider, 1455
SmartClientView object, 1456
O SmartTag, 1281, 1307
Object property (VBS), 1720 SmartTags (list), 1280, 1309
ObjectName property (VBS), 1995 StatusForce, 1458
Objects (VBS) Switch, 1460
ActiveScreenItem, 1518, 1519 SymbolicIOField, 1463
AlarmControl object, 1316 SymbolLibrary, 1468
AlarmView, 1327 SystemDiagnoseView, 1470
ApplicationWindow, 1451 SystemDiagnoseWindow, 1473
Bar, 1331 TableView object, 1409
Battery, 1336 TextField, 1477
BrowserView, 1391 TrendRulerControl, 1480
Button, 1337 TrendView, 1488
ChannelDiagnose, 1341 TubeArcObject, 1491
CheckBox, 1343 TubeDoubleTeeObject, 1493
Circle, 1346 TubePolyline, 1495
CircleSegment, 1348 TubeTeeObject, 1497
CircularArc, 1351 UserArchiveControl object, 1499
Clock, 1353 UserView, 1506
Connector, 1355 WindowSlider, 1508
DateTimeField, 1358 WLanQualityView, 1511
DiskSpaceView, 1359 ZoneLabelView, 1512
Ellipse object, 1361 ZoneQualityView, 1513
EllipseSegment, 1364 Objects in VBS
EllipticalArc, 1366 Alarm object, 1283
FunctionTrendControl, 1373 Objects:AlarmLogs, 1285
Gauge, 1381 Objects:DataItem, 1287
GraphicIOField, 1383 Objects:DataLogs, 1288
GraphicView, 1387 Objects:HMIRuntime, 1292
Group object, 1390 Objects:Item, 1293
HMIRuntime, 1274 Objects:Layer, 1294
IOField object, 1393 Objects:Logging, 1297
Line, 1396 Objects:Tag, 1310

WinCC Professional V13 SP2 – Programming reference


2246 System Manual, 03/2017, Online help printout
Index

OCXState property (VBS), 1723 PersistentRuntimeAuthorization property


OLEView object, 1407 (VBS), 2000
OneToOneView, 2190 PersistentToDownload property (VBS), 2041
Online property (VBS), 1723 PersistentToDownloadAuthorization property
OnlineTrendControl, 1417 (VBS), 2041
OpenAllLogs, 1177 Picture property (VBS), 1740
OpenCommandPrompt, 1178 PictureAlignment property (VBS), 1740
OpenControlPanelDialog, 1178 PictureDeactivated property (VBS), 1741
OpenInternetExplorer, 1179 PictureOff property (VBS), 1741
OpenScreenKeyboard, 1180 PictureOn property (VBS), 1742
OpenTaskManager, 1180 PLC code viewer
OperationSteps property (VBS), 1724 OpenViewerIECPLByAssignment, 1112
OperatorMessageID property (VBS), 1724 OpenViewerIECPLByCall, 1106
OperatorMessageIndex property (VBS), 1725 OpenViewerIECPLByFCCall, 1109
OperatorMessageName property (VBS), 1726 OpenViewerS7GraphByBlock, 1103
OperatorMessageNumber property (VBS), 1726 PointerColor property (VBS), 1743
OperatorMessageSelected property (VBS), 1727 PointsCount property (VBS), 1743
OperatorMessageSource1 property (VBS), 1727 Polygon object, 1429
OperatorMessageSource10 property (VBS), 1732 Polyline object, 1432
OperatorMessageSource2 property (VBS), 1728 pow function, 174
OperatorMessageSource3 property (VBS), 1728 Precision property (VBS), 1744
OperatorMessageSource4 property (VBS), 1729 Pressed property (VBS), 1744
OperatorMessageSource5 property (VBS), 1729 PreviousColumn, 2191
OperatorMessageSource6 property (VBS), 1730 PreviousTrend, 2192
OperatorMessageSource7 property (VBS), 1730 Print, 2192
OperatorMessageSource8 property (VBS), 1731 PrintConfiguration property (VBS), 2043
OperatorMessageSource9 property (VBS), 1732 PrintJobName property (VBS), 2003
OperatorMessageType1 property (VBS), 1733 PrintReport, 1182
OperatorMessageType10 property (VBS), 1737 PrintScreen, 1183
OperatorMessageType2 property (VBS), 1733 PrintVisibleColumnsOnly property (VBS), 2003
OperatorMessageType3 property (VBS), 1734 ProcessValue property (VBS), 1745
OperatorMessageType4 property (VBS), 1734 ProjectName object, 1434
OperatorMessageType5 property (VBS), 1735 ProjectPath property (VBS), 2043
OperatorMessageType6 property (VBS), 1735 Properties (VBS)
OperatorMessageType7 property (VBS), 1736 AboveUpperLimitColor, 1514
OperatorMessageType8 property (VBS), 1736 AcceptOnExit, 1515
OperatorMessageType9 property (VBS), 1737 AcceptOnFull, 1515
OptionGroup object, 1426 AccessPath, 1516
Orientation property (VBS), 1997 ActiveProject, 1516
ActiveScreen, 1517, 1518
ActualPointIndex, 1519
P ActualPointLeft, 1520
ActualPointTop, 1520
PageDown, 1181
AdaptBorder, 1521
PageMode property (VBS), 1738
AdaptFontSizeToLineHeight, 2052
PageModeMessageNumber property (VBS), 1738
AdaptPicture, 1522
PageUp, 1181
AdaptScreenToWindow, 1522
Parent property (VBS), 2080
AdaptWindowtoScreen, 1522
Password property (VBS), 1739
Address, 1523
PasteRows, 2191
AddressEnabled, 1523
PersistentRTAuthorization property (VBS), 1998
AdjustBorder3DWithStyle, 2028
PersistentRTCSAuthorization property (VBS), 2040
AdjustRulerWindow, 2052
PersistentRuntime property (VBS), 1999

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2247
Index

AdressPreview, 1523 AxisY2MarkCount, 1541


Alarm, 1523 AxisY2ShowBunchValues, 1541
AlarmClasses, 1524 BackColor, 1541
AlarmColor, 1524 BackColorBottom, 1543
AlarmFilter, 2029 BackColorTop, 1543
AlarmHigh, 2053 BackFillStyle, 1544
AlarmID, 1525 BackFillStyleReadOnlySpecial, 2055
AlarmLog, 1525 BackFlashingColorOff, 1545
AlarmLow, 1968 BackFlashingColorOn, 1546
AlarmLowerLimit, 1525 BackFlashingEnabled, 1547
AlarmLowerLimitColor, 1526 BackFlashingRate, 1548
AlarmLowerLimitEnabled, 1527 BackgroundColor, 1549
AlarmLowerLimitRelative, 1527 BackPictureName, 2002
AlarmSource, 1528 BarBackColor, 1549
AlarmUpperLimit, 1528 BarBackFillStyle, 1549
AlarmUpperLimitColor, 1529 BarBackFlashingColorOff, 1551
AlarmUpperLimitEnabled, 1529 BarBackFlashingColorOn, 1551
AlarmUpperLimitRelative, 1530 BarBackFlashingEnabled, 1551
Alignment, 2053 BarBackFlashingRate, 1552
AlignmentLeft, 2054 BarColor, 1552
AlignmentTop, 1969 BarEdgeStyle, 1552
AllFilters, 1530 BarStartValue, 2056
AllFiltersForHitlist, 1530 BaseScreenName, 1552
AllowEdit, 1531 BeginTime(i), 2056
AllowMenu, 1531 BelowLowerLimitColor, 1553
AllowPersistence, 2054 BitNumber, 1553
Analog, 1531 BlinkColor, 1554
AngleMax, 1531 BlinkMode, 1554
AngleMin, 1532 BlinkSpeed, 1555
Appearance, 1533 Blocks, 1555
ApplyProjectSettings, 1533 BorderBackColor, 1556
ApplyProjectSettingsForDesignMode, 1533 BorderBrightColor3D, 1557
AskOperationMotive, 1533 BorderColor, 1558
Assignments, 1534 BorderEnabled, 1559
AssociatedS7GraphDBTag, 1534 BorderEndStyle, 1560
AssumeOnExit, 1970 BorderFlashingColorOff, 1560
AssumeOnFull, 1970 BorderFlashingColorOn, 1562
Authorization, 1535 BorderFlashingEnabled, 1563
AutoCompleteColumns, 1536 BorderFlashingRate, 1564
AutoCompleteRows, 1537 BorderInnerStyle3D, 1565
AutoScroll, 1537 BorderInnerWidth3D, 1565
AutoSelectionColors, 1538 BorderOuterStyle3D, 1566
AutoSelectionRectColors, 1538 BorderOuterWidth3D, 1566
AutoSizing, 1539 BorderShadeColor3D, 1567
AverageLast15Values, 1539 BorderStyle, 1568
AxisXBunchCount, 1540 BorderStyle3D, 1569
AxisXMarkCount, 1540 BorderWidth, 1569
AxisXShowBunchValues, 1540 BorderWidth3D, 1571
AxisY1BunchCount, 1540 BottomMargin, 1571
AxisY1MarkCount, 1540 BusyText, 1571
AxisY1ShowBunchValues, 1540 ButtonBackColor, 1572
AxisY2BunchCount, 1540 ButtonBackFillStyle, 1572

WinCC Professional V13 SP2 – Programming reference


2248 System Manual, 03/2017, Online help printout
Index

ButtonBarElements, 1572 Color, 1586


ButtonBarStyle, 1572 ColorChangeHysteresis, 1586
ButtonBorderBackColor, 1572 ColorChangeHysteresisEnabled, 1587
ButtonBorderColor, 1572 ColumnAlignment, 1587
ButtonBorderWidth, 1572 ColumnColor(i), 2060
ButtonCommand, 1973 ColumnDisplayName(i), 2060
ButtonCornerRadius, 1573 ColumnResize, 1588
ButtonEdgeStyle, 1573 Columns, 1589
ButtonFirstGradientColor, 1573 ColumnScrollbar, 1589
ButtonFirstGradientOffset, 1573 ColumnSettings, 1590
ButtonMiddleGradientColor, 1573 ColumnSettingsBufferView, 1590
ButtonSecondGradientColor, 1573 ColumnSizingEnable, 2031
ButtonSecondGradientOffset, 1573 ColumnsMoveable, 1590
BV_ColumnWidth_Date, 1574 ColumnTextAckGroup, 1590
BV_ColumnWidth_Event, 1574 ColumnTextAlarmState, 1590
BV_ColumnWidth_EventSeverity, 1574 ColumnTextAlarmText, 1590
BV_ColumnWidth_EventState, 1574 ColumnTextClassName, 1591
BV_ColumnWidth_Number, 1574 ColumnTextDate, 1591
BV_ColumnWidth_Time, 1574 ColumnTextDevice, 1591
BV_ItemText_Date, 1574 ColumnTextDiagnosable, 1591
BV_ItemText_Event, 1575 ColumnTextNumber, 1591
BV_ItemText_EventSeverity, 1575 ColumnTextTime, 1591
BV_ItemText_EventState, 1575 ColumnTitleAlignment, 1592
BV_ItemText_Number, 1575 ColumnTitles, 1593
BV_ItemText_Time, 1575 ColumnUpdateEnabled(i), 2061
BV_ShowItem_Date, 1575 ComboBoxFont, 1593
BV_ShowItem_Event, 1575 Command, 2061
BV_ShowItem_EventSeverity, 1576 CommonTimeAxisColor, 2062
BV_ShowItem_EventState, 1576 CompatibilityMode, 1593
BV_ShowItem_Number, 1576 ConfigureTimeAxis(i), 2062
BV_ShowItem_Time, 1576 ConnectionType, 1594
Caption, 1576 ConnectOnStart, 1594
CaptionBackColor, 1577 ConnectTrendWindows, 1594
CaptionColor, 1577 ContinousChange, 1595
CaptionText, 1578 ControlDesignMode, 1796
CaptionTop, 1579 CornerRadius, 1595
CellCut, 1579 CornerStyle, 1595
CellSpaceBottom, 1580 Count, 1597
CellSpaceLeft, 1580 CountDivisions, 1597
CellSpaceRight, 1581 CountOfLinesPerAlarms, 1598
CellSpaceTop, 1581 CountOfVisibleAlarms, 1598
CenterColor, 1582 CountSubDivisions, 1598
CenterSize, 1582 CountValueColumns, 1979
CentrePoint, 2057 CountVisibleItems, 1598
CentrePointLeft, 2058 CurrentColumnIndex, 1979
CentrePointTop, 2058 CurrentCurveIndex, 2063
ChangeMouseCursor, 1583 CursorControl, 1599
CheckMarkAlignment, 1583 CurveColor(i), 2063
CheckMarkCount, 1584 CurveLineWidth(i), 2064
ClearOnError, 1584 Curves, 1600
ClearOnFocus, 1585 CurvesCount, 2065
Closeable, 1585 CurveUpdateEnabled(i), 2065

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2249
Index

DangerRangeColor, 1600 EndTime(i), 2073


DangerRangeStart, 1601 EndTop, 1616
DangerRangeVisible, 1601 EntryNameCaption, 1616
DataFormat, 1602 EvenRowBackColor, 1617
DataIndex(i), 2066 ExportDelimiter, 1617
DataLogTag, 2066 ExportDirectoryChangeable, 1618
DataRecordNameCaption, 1603 ExportDirectoryname, 1618
DataRecordNrCaption, 1603 ExportFileExtension, 1619
DataX(i), 2067 ExportFilename, 1619
DataXY(i), 2067 ExportFilenameChangeable, 1620
DataY(i), 2068 ExportFormatGuid, 1621
DeleteDate(i), 2068 ExportFormatName, 1621
DeleteEnable, 1980 ExportParameters, 1622
DialColor, 1603 ExportSelection, 1622
DialFillStyle, 1604 ExportShowDialog, 1623
DialSize, 1605 ExtraSpaceForLabelDisplay, 2074
Direction, 2069 FieldLength, 1624, 1625
DisplayButton2Plc, 1605 FillColorMode, 1625
DisplayButtonComparison, 1605 FillPatternColor, 1625
DisplayButtonDelete, 1605 FillStyle, 1627
DisplayButtonFromPlc, 1605 Filter, 1627
DisplayButtonHelp, 1606 FilterTag, 1627
DisplayButtonNew, 1606 FilterText, 1628
DisplayButtonSave, 1606 FirstConnectedObjectIndex, 1628
DisplayButtonSaveAs, 1606 FirstConnectedObjectName, 1628
DisplayComboBox, 1606 FitToLargest, 1629
DisplayGridlines, 1606 FitToSize, 1629
DisplayLabeling, 1606 FixedAspectRatio, 1629
DisplayName(i), 2069 FlashingColorOff, 1629
DisplayNumbers, 1607 FlashingColorOn, 1631
DisplayOptions, 1607 FlashingEnabled, 1632
DisplayStatusBar, 1607 FlashingOnLimitViolation, 1633
DisplayTable, 1607 FlashingRate, 1633
DoubleClickAction, 1607 FlashTransparentColor, 1634
DrawAlwaysInsideFrame, 1980 Flip, 1635
DrawEnhancedHTMLBrowser, 2070 FocusColor, 1635
DrawInsideFrame, 1608 FocusWidth, 1636
DrawStylishButton, 1981 Font, 1637
Drive, 1609 FontBold, 1638
EdgeStyle, 1610 FontItalic, 1639
Editable(i), 2070 FontName, 1640
EditEnabled, 2071 FontSize, 1640
EditOnFocus, 1611 FontUnderline, 1641
Enabled, 1612 ForeColor, 1642
EnableEdit, 1614 ForeColorTransparency, 1643
EnableNavigateKeys, 1614 FormatPattern, 1643
EndAngle, 1614 FormatPatternReadOnlySpecial, 2076
EndLeft, 1615 FormatType, 1983
EndPoint, 2071 Free, 1643
EndPointLeft, 2072 FreePercent, 1644
EndPointTop, 2073 FreezeProviderConnections, 2077
EndStyle, 1615 GetSelectionText, 2077

WinCC Professional V13 SP2 – Programming reference


2250 System Manual, 03/2017, Online help printout
Index

Gradation, 1644 LeaveMarginForBorder, 2078


GraphDirection, 1645 LeaveMarginForMarkers, 2079
GridBackColor, 1984 Left, 1677
GridLineColor, 1645 LeftOffset, 1678
GridlineFillColor, 1646 Limit4LowerLimit, 1678
GridlineStyle, 1646 Limit4LowerLimitEnabled, 1679
GridLineWidth, 1646 Limit4LowerLimitRelative, 1680
HeaderFont, 1647 Limit4LowrLimitColor, 1679
Height, 1647 Limit4UpperLimit, 1681
Help text, 1651 Limit4UpperLimitColor, 1681
HiddenInput, 1652 Limit4UpperLimitEnabled, 1682
HideTagNames, 2077 Limit4UpperLimitRelative, 1682
HighLimitColor, 1652 Limit5LowerLimit, 1683
Hitlist, 1653 Limit5LowerLimitColor, 1683
HitlistColumnAdd, 1653 Limit5LowerLimitEnabled, 1684
HitlistColumnCount, 1654 Limit5LowerLimitRelative, 1685
HitlistColumnIndex, 1654 Limit5UpperLimit, 1685
HitlistColumnName, 1655 Limit5UpperLimitColor, 1686
HitlistColumnRemove, 1655 Limit5UpperLimitEnabled, 1686
HitlistColumnRepos, 1656 Limit5UpperLimitRelative, 1687
HitlistColumnSort, 1656 LineColor, 1687
HitlistColumnSortIndex, 1657 LineEdShapeStyle, 1688
HitlistColumnVisible, 1657 LineWidth, 1689
HitlistDefaultSort, 1658 LoadDataImmediately, 1690
HitlistMaxSourceItems, 1658 LocalCursor, 1691
HitlistMaxSourceItemsWarn, 1659 Localizable, 2040
HitlistRelTime, 1660 LockSquaredExtent, 1691
HitlistRelTimeFactor, 1659 LogOperation, 1692
HitlistRelTimeFactorType, 1660 LongTermArchiveConsistency, 1692
HorizontalAlignment, 1661 LowerLimit, 1693
HorizontalGridLines, 1662 LowerLimitColor(i), 1989
HorizontalScrollBarPosition, 1662 LowerLimitValue(i), 1990
Hotkey, 1663 LowLimitColor, 1693
HourNeedleHeight, 1663 MachineName, 1694
HourNeedleWidth, 1663 MarginToBorder, 1694
IconSpace, 1664 MaximumValue, 1695
Index, 1664 MenuToolBarConfig, 1695
InnerBackColorOff, 1665 MessageBlockAlignment, 1696
InnerBackColorOn, 1666 MessageBlockAutoPrecisions, 1696
InputValue, 1666 MessageBlockCaption, 1697
InsertData(i), 2032 MessageBlockCount, 1697, 1700
InsertEnable, 1985 MessageBlockDateFormat, 1698
IntegerDigits, 1667 MessageBlockExponentialFormat, 1698
Interval, 1667 MessageBlockFlashOn, 1699
ItemBorderStyle, 1668 MessageBlockHideText, 1699
JumpToLimitsAfterMouseClick, 1668 MessageBlockHideTitleText, 1700
LabelColor, 1669 MessageBlockID, 1700
Language, 1669 MessageBlockLeadingZeros, 1701
LargeTicksBold, 1670 MessageBlockLength, 1701
LargeTicksSize, 1670 MessageBlockName, 1702
LastConnectedObjectIndex, 1671 MessageBlockPrecisions, 1702
LastConnectedObjectName, 1671 MessageBlockSelected, 1703

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2251
Index

MessageBlockShowDate, 1703 OperatorMessageType5, 1735


MessageBlockShowIcon, 1704 OperatorMessageType6, 1735
MessageBlockShowTitleIcon, 1704 OperatorMessageType7, 1736
MessageBlockTextId, 1705 OperatorMessageType8, 1736
MessageBlockTimeFormat, 1705 OperatorMessageType9, 1737
MessageBlockType, 1706 Orientation, 1997
MessageColumnAdd, 1706 PageMode, 1738
MessageColumnCount, 1707 PageModeMessageNumber, 1738
MessageColumnIndex, 1707 Parent, 2080
MessageColumnName, 1708 Password, 1739
MessageColumnRemove, 1708 PersistentRTAuthorization, 1998
MessageColumnRepos, 1709 PersistentRTCSAuthorization, 2040
MessageColumnSort, 1709 PersistentRuntime, 1999
MessageColumnSortIndex, 1710 PersistentRuntimeAuthorization, 2000
MessageColumnVisible, 1710 PersistentToDownload, 2041
MessageListType, 1711 PersistentToDownloadAuthorization, 2041
MinimumValue, 1711 Picture, 1740
MinuteNeedleHeight, 1712 PictureAlignment, 1740
MinuteNeedleWidth, 1712 PictureDeactivated, 1741
Mode, 1713 PictureName, 2002
Moveable, 1714 PictureOff, 1741
MsgFilterSQL, 1714 PictureOn, 1742
NeedleBorderColor, 1717 PointerColor, 1743
NeedleColor, 1718 PointsCount, 1743
NeedleFillStyle, 1719 Precision, 1744
NormalRangeColor, 1719 Pressed, 1744
NormalRangeVisible, 1720 PrintConfiguration, 2043
NumberOfValues(i), 2079 PrintJobName, 2003
ObjectName, 1995 PrintVisibleColumnsOnly, 2003
OCXState, 1723 ProcessValue, 1745
Online, 1723 ProjectPath, 2043
OperationSteps, 1724 Radius, 1747
OperatorMessageID, 1724 RadiusHeight, 1748
OperatorMessageIndex, 1725 RadiusWidth, 1748
OperatorMessageName, 1726 ReadOnly, 2004
OperatorMessageNumber, 1726 RecipeName, 1749
OperatorMessageSelected, 1727 RecipeNumber, 1749
OperatorMessageSource1, 1727 RecordName, 1750
OperatorMessageSource10, 1732 RecordNumber, 1750
OperatorMessageSource2, 1728 RelativeFillLevel, 1750
OperatorMessageSource3, 1728 Rotation, 1751
OperatorMessageSource4, 1729 RotationAngle, 1752
OperatorMessageSource5, 1729 RotationCenterLeft, 1752
OperatorMessageSource6, 1730 RotationCenterTop, 1753
OperatorMessageSource7, 1730 RoundCornerHeight, 1754
OperatorMessageSource8, 1731 RoundCornerWidth, 1754
OperatorMessageSource9, 1732 RowNumber, 2082
OperatorMessageType1, 1733 RowScrollbar, 1754
OperatorMessageType10, 1737 RowSizingEnable, 2044
OperatorMessageType2, 1733 RowTitles, 1787
OperatorMessageType3, 1734 RTPersistence, 1755
OperatorMessageType4, 1734 RTPersistencePasswordLevel, 2005

WinCC Professional V13 SP2 – Programming reference


2252 System Manual, 03/2017, Online help printout
Index

RTPersistenceType, 1756 Shared, 1781


RulerColor, 1757 ShareTimeColumn, 2087
RulerPrecision(i), 2082 ShareValueAxis, 2087
RulerXPrecision(i), 2083 ShareXAxis, 2088
RulerYPrecision(i), 2083 ShareYAxis, 2088
ScaleColor, 1758 ShiftDecimalPoint, 1781
ScaleDenominator, 1762 ShortenCellText, 2008
ScaleGradation, 1758 ShortenColumnHeaderText, 2008
ScaleLabelColor, 1759 ShowAlarmsFromDate, 1781
ScaleNumerator, 1759 ShowBadTagState, 1782
ScalePosition, 1759 ShowBar, 1782
ScaleTickColor, 1760 ShowBorder, 2089
ScaleTickLabelPosition, 1761 ShowCaption, 1783
ScaleTickLength, 1761 ShowColumn(i), 2089
ScaleTickPosition, 1762 ShowCurve(i), 2089
Scaling, 1763 ShowDecimalPoint, 1783
ScalingType, 1763 ShowFillLevel, 1784
ScreenItems, 1764 ShowFocusRectangle, 1785
ScreenName, 1764 ShowInputControls, 2090
Screens, 1765 ShowLargeTicksOnly, 1785, 1988
Scrollable, 2044 ShowLimitMarkers, 1785
SecondNeedleHeight, 1765 ShowMainFrame, 2090
SecondNeedleWidth, 1766 ShowMessagesAtDate, 2045
SegmentColoring, 1766 ShowOverflowIndicator, 2091
SelectBackColor, 1767 ShowPeakValuePointer, 1786
SelectedCellColor, 1767 ShowPosition, 1786
SelectedCellForeColor, 1768 ShowRuler, 1787
SelectedIndex, 1769 ShowRulerInAxis, 1788
SelectedRowColor, 1769 ShowScale, 1788
SelectedRowForeColor, 1770 ShowScrollbars, 1789
SelectedTitleColor, 1771 ShowSetpointTrend(i), 2091
SelectedTitleForeColor, 1771 ShowSortButton, 1789
SelectForeColor, 1772 ShowSortIcon, 1790
SelectionBackColor, 1773 ShowStatusBar, 1791
SelectionColoring, 1774 ShowTableGridlines, 1791
SelectionForeColor, 1774 ShowThumb, 1792
SelectionMode, 2007 ShowTickLabels, 1792
SelectionRect, 1775 ShowTicks, 1793
SelectionRectColor, 1775 ShowTitle, 1793
SelectionRectWidth, 1776 ShowToolBar, 1794
SelectionType, 1777 ShowTrendIcon, 1794
SeparatorBackColor, 1777 ShowTrendIndicator, 1795
SeparatorColor, 1778 ShowVerticalGridlines, 2009
SeparatorStyle, 1779 ShowXValuesExponential(i), 2009
SeparatorWidth, 1779 ShowYValuesExponential(i), 2010
SeperatorCornerStyle, 1779 SmartTags, 1796
ServerNames, 1780 Sort, 2046
ServerPrefix, 1781 SortByTimeDirection, 1797
ServerScale, 1780 SortByTimeEnable, 2011
SetpointTrendArchiveStartId(i), 2084 SortByTimeEnabled, 1797
SetpointTrendColor(i), 2085 SortOnColumnHeaderClick, 2011
SetpointTrendNumberOfValues(i), 2085 SortSequence, 1797

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2253
Index

SortTimeAscending, 2012 ThumbBackColor, 1825


SortTimeEnable, 2012 TicksColor, 1826
StartAngle, 1798 TickStyle, 1827
StartLeft, 2013 TimeAxisBeginTime(i), 1827
StartStyle, 1799 TimeAxisEndTime, 1828
StartTop, 1799 TimeAxisLabel(i), 1828
StartValue, 1799 TimeAxisRange, 1829
StatusbarBackColor, 1800 TimeAxisShowGridLines(i), 2013
StatusbarElementAdd, 1801 TimeAxisShowLargeIncrements(i), 2095
StatusbarElementAutoSize, 1801 TimeAxisShowSmallIncrements(i), 2095
StatusbarElementCount, 1802 TimeAxisTimeFormat(i), 1829
StatusbarElementIconId, 1803 TimeBase, 1829
StatusbarElementID, 1803 TimeColumnActualize, 1830
StatusbarElementIndex, 1804 TimeColumnAdd, 1831
StatusbarElementName, 1805 TimeColumnAlignment, 1831
StatusbarElementRemove, 1805 TimeColumnAlignment(i), 1832
StatusbarElementRename, 1806 TimeColumnBackColor, 1832
StatusbarElements, 1806 TimeColumnBeginTime, 1833
StatusbarElementTooltipText, 1807 TimeColumnCaption, 1833
StatusbarElementUserDefined, 1807 TimeColumnCount, 1834
StatusbarElementVisible, 1808 TimeColumnDateFormat, 1834
StatusbarElementWidth, 1808 TimeColumnEndTime, 1835
StatusbarFontColor, 1809 TimeColumnForeColor, 1835
StatusbarShowArchiveName, 2092 TimeColumnFormat(i), 2014
StatusbarShowColumn, 2092 TimeColumnHideText, 1836
StatusbarShowRecord, 2093 TimeColumnHideTitleText, 1836
StatusbarShowRow, 2093 TimeColumnIndex, 1837
StatusbarShowText, 2094 TimeColumnLength, 1837
StatusbarShowTooltips, 1810 TimeColumnMeasurePoints, 1837
StatusbarText, 1810 TimeColumnName, 1838
StatusbarUseBackColor, 1811 TimeColumnRangeType, 1838
StatusbarVisible, 1812 TimeColumnRemove, 1839
Style, 1812 TimeColumnRename, 1839
StyleSettings, 1813, 2026 TimeColumnRepos, 1840
SwapDimensionsWithOrientation, 2094 TimeColumnShowDate, 1840
SwapFirstWithLastConnection, 1813 TimeColumnShowIcon, 1841
TableBackColor, 1814 TimeColumnShowTitleIcon, 1841
TableColor, 1815 TimeColumnSort, 1842
TableColor2, 1815 TimeColumnSortIndex, 1842
TableFocusOnButtonCommand, 2046 TimeColumnTimeFormat, 1843
TableForeColor, 1816 TimeColumnTimeRangeBase, 1843
TableForeColor2, 1817 TimeColumnTimeRangeFactor, 1844
TableGridLineColor, 1817 TimeColumnUseValueColumnColors, 1844
TableHeaderBackColor, 1818 TimeColumnVisible, 1845
TableHeaderForeColor, 1819 TimeJumpColor(i), 2096
TagPrefix, 1819 TimeJumpEnabled(i), 2096
Template, 1821 TimeOverlapColor(i), 2097
Text, 1822 TimeOverlapEnabled(i), 2097
TextList, 1823 TimeRangeBase(i), 2046
TextOff, 1823 TimeRangeFactor(i), 2047
TextOn, 1824 TitleColor, 2015
TextOrientation, 1825 TitleCut, 1846

WinCC Professional V13 SP2 – Programming reference


2254 System Manual, 03/2017, Online help printout
Index

TitleDarkShadowColor, 1847 TrendCount, 1880


TitleForeColor, 1848 TrendEndTime, 1881
TitleGridLineColor, 1848 TrendExtendedColorSet, 1881
TitleLightShadowColor, 1849 TrendFill, 1882
TitleSort, 1850 TrendFillColor, 1882
TitleStyle, 1850 TrendIndex, 1883
Toggle, 1851 TrendIndicatorColor, 1884
Tolerance, 1851 TrendLabel, 1884
ToleranceColor, 1852 TrendLineStyle, 1885
ToleranceLowerLimit, 1852 TrendLineType, 1885
ToleranceLowerLimitColor, 1853 TrendLineWidth, 1886
ToleranceLowerLimitEnabled, 1854 TrendLowerLimit, 1886
ToleranceLowerLimitRelative, 1854 TrendLowerLimitColor, 1887
ToleranceUpperLimit, 1855 TrendLowerLimitColoring, 1887
ToleranceUpperLimitColor, 1855 TrendMeasurePoints, 1888
ToleranceUpperLimitEnabled, 1856 TrendName, 1888
ToleranceUpperLimitRelative, 1856 TrendPointColor, 1889
ToolbarAlignment, 1857 TrendPointStyle, 1889
ToolbarBackColor, 1858 TrendPointWidth, 1890
ToolbarButtonActive, 1858 TrendProvider, 1890
ToolbarButtonAdd, 1859 TrendRangeType, 1891
ToolbarButtonAuthorization, 1864 TrendRemove, 1892
ToolbarButtonBeginGroup, 1859 TrendRename, 1892
ToolbarButtonCount, 1860 TrendRepos, 1893
ToolbarButtonEnabled, 1861 TrendSelectTagNameX, 1893
ToolbarButtonHotKey, 1861 TrendSelectTagNameY, 1894
ToolbarButtonID, 1862 TrendTag, 2016
ToolbarButtonIndex, 1862 TrendTagNameX, 1894
ToolbarButtonLocked, 1863 TrendTagNameY, 1895
ToolbarButtonName, 1864 TrendTimeRangeBase, 1895
ToolbarButtonRemove, 1865 TrendTimeRangeFactor, 1896
ToolbarButtonRename, 1865 TrendTrendWindow, 1896
ToolbarButtonRepos, 1866 TrendUncertainColor, 1897
ToolbarButtonTooltipText, 1866 TrendUncertainColoring, 1897
ToolbarButtonUserDefined, 1867 TrendUpperLimit, 1898
ToolbarShowTooltips, 1868 TrendUpperLimitColor, 1898
ToolbarUseBackColor, 1868 TrendUpperLimitColoring, 1899
ToolbarUseHotKeys, 1869 TrendVisible, 1899
ToolbarVisible, 1869 TrendWindowAdd, 1900
ToolTipText, 1870 TrendWindowCoarseGrid, 1900
Top, 1871 TrendWindowCoarseGridColor, 1901
TopOffset, 1873 TrendWindowFineGrid, 1902
Total, 1874 TrendWindowFineGridColor, 1902
Transparency, 1874 TrendWindowForegroundTrendGrid, 1903
TransparentColor, 1876 TrendWindowGridInTrendColor, 1903
TransparentColorDeactivatedPicture, 1876 TrendWindowHorizontalGrid, 1904
TransparentColorPictureOff, 1877 TrendWindowIndex, 1904
TransparentColorPictureOn, 1878 TrendWindowName, 1905
TrendActualize, 1878 TrendWindowRemove, 1905
TrendAdd, 1879 TrendWindowRename, 1905
TrendBeginTime, 1879 TrendWindowRepos, 1906
TrendColor, 1880 TrendWindowRulerColor, 1906

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2255
Index

TrendWindowRulerLayer, 1907 UV_ColumnWidth_Name, 1924


TrendWindowRulerStyle, 1908 UV_ColumnWidth_OKZ, 1924
TrendWindowRulerWidth, 1908 UV_ColumnWidth_OperationState, 1924
TrendWindowSpacePortion, 1909 UV_ColumnWidth_OrderID, 1924
TrendWindowVerticalGrid, 1909 UV_ColumnWidth_ProfileID, 1924
TrendWindowVisible, 1910 UV_ColumnWidth_Rack, 1925
TrendXAxis, 1910 UV_ColumnWidth_Slot, 1925
TrendYAxis, 1911 UV_ColumnWidth_SoftwareRevision, 1925
Type, 2098 UV_ColumnWidth_SpecificProfileData, 1925
UncertainStateColor(i), 2018 UV_ColumnWidth_State, 1925
UncertainStateEnabled(i), 2019 UV_ColumnWidth_Station, 1925
Unit, 1911 UV_ColumnWidth_SubAddress, 1925
UnitColor, 1912 UV_ColumnWidth_SubSlot, 1926
UnitText, 1912 UV_ColumnWidth_SubSystem, 1926
UnitTop, 1913 UV_ColumnWidth_Type, 1926
UpdateEnable, 2020 UV_ShowItem_AKZ, 1926
UpperLimit, 1913 UV_ShowItem_Descriptor, 1926
UpperLimitColor(i), 2020 UV_ShowItem_InstallationDate, 1926
UpperLimitEnabled(i), 2021 UV_ShowItem_LADDR, 1926
UpperLimitValue(i), 2021 UV_ShowItem_Name, 1927
UseAllServers, 2022 UV_ShowItem_OKZ, 1927
UseBarBorderConstraints, 2099 UV_ShowItem_OperationState, 1927
Used, 1914 UV_ShowItem_OrderID, 1927
UseDesignColorSchema, 1914 UV_ShowItem_ProfileID, 1927
UseDesignShadowSettings, 1916 UV_ShowItem_Rack, 1927
UsedPercent, 1917 UV_ShowItem_Slot, 1927
UseEffectiveProcessValue, 2099 UV_ShowItem_SoftwareRevision, 1928
UseExponentialFormat, 1918 UV_ShowItem_SpecificProfileData, 1928
UseFlashTransparentColor, 1918 UV_ShowItem_State, 1928
UseGDI, 2100 UV_ShowItem_Station, 1928
UseMeasurePoints(i), 2100 UV_ShowItem_SubAddress, 1928
UseMessageColor, 1919 UV_ShowItem_SubSlot, 1928
UseMultipleLimits, 2101 UV_ShowItem_SubSystem, 1928
UserArchiveNumberOfValues(i), 2103 UV_ShowItem_Type, 1929
UserArchiveStartId(i), 2104 ValidateFormatPattern, 2049
UseScaleConstraints, 2101 ValueAxisAutorange(i), 1930
UseScaledBarBorder, 2102 ValueAxisBegin(i), 2049
UseSelectedTitleColor, 1919 ValueAxisDecimalPrecision(i), 2023
UseSeparateDiagrams, 2102 ValueAxisEnd(i), 2050
UseSimplePresicionOffset, 2103 ValueAxisGridLineInterval(i), 2105
UseTableColor2, 1920 ValueAxisLabel(i), 1930
UseTagLimitColors, 1920 ValueAxisLargeIncrementsSize(i), 2106
UseTimeRange(i), 2048 ValueAxisScalingType(i), 1931
UseTransparentColor, 1921 ValueAxisShowGridLines(i), 2024
UseTransparentColorDeactivatedPicture, 1921 ValueAxisShowLargeIncrements(i), 2106
UseTransparentColorPictureOff, 1922 ValueAxisShowSmallIncrements(i), 2107
UseTransparentColorPictureOn, 1922 ValueAxisSmallIncrementSize(i), 2107
UseTrendNameAsLabel, 1923 ValueColumnAlignment(i), 1931
UV_ColumnWidth_AKZ, 1923 ValueColumnPrecision(i), 2025
UV_ColumnWidth_Descriptor, 1923 VerticalAlignment, 1932
UV_ColumnWidth_InstallationDate, 1924 VerticalGridLines, 1933
UV_ColumnWidth_LADDR, 1924 VerticalScrollBarPosition, 1933

WinCC Professional V13 SP2 – Programming reference


2256 System Manual, 03/2017, Online help printout
Index

ViewOnly, 1934 XOnlineTag(i), 2112


Visible, 1934 YAxisAdd, 1958
Warning, 1936 YAxisAlignment, 1958
WarningColor, 1937 YAxisAutoPrecisions, 1959
WarningLowerLimit, 1937 YAxisAutoRange, 1959
WarningLowerLimitColor, 1938 YAxisBeginValue, 1960
WarningLowerLimitEnabled, 1939 YAxisColor, 1960
WarningLowerLimitRelative, 1939 YAxisCount, 1961
WarningRangeColor, 1940 YAxisEndValue, 1961
WarningRangeStart, 1940 YAxisExponentialFormat, 1961
WarningRangeVisible, 1941 YAxisIndex, 1962
WarningUpperLimit, 1942 YAxisInTrendColor, 1962
WarningUpperLimitColor, 1942 YAxisLabel, 1963
WarningUpperLimitEnabled, 1943 YAxisName, 1963
WarningUpperLimitRelative, 1943 YAxisPrecisions, 1964
Width, 1944 YAxisRemove, 1964
WindowCloseEnabled, 1946 YAxisRename, 1965
WindowMaximizeEnabled, 1946 YAxisRepos, 1965
WindowMovingEnabled, 1947 YAxisScalingType, 1966
WindowOnTop, 1947 YAxisTrendWindow, 1966
WindowSizingEnabled, 1948 YAxisVisible, 1967
WindowsStyle, 1948 YDataLogTag(i), 2113
XAxisAdd, 1949 YOnlineTag(i), 2114
XAxisAlignment, 1949 ZeroPoint, 1967
XAxisAutoPrecisions, 1950 Zoomable, 2051
XAxisAutoRange(i), 1950 ZoomFactor, 1968
XAxisBegin(i), 2026 Properties (VBS)","Name, 1715
XAxisBeginValue, 1951 Properties (VBS)";"Object, 1720
XAxisColor, 1951 Properties in VBS
XAxisCount, 1952 Comment, 2062
XAxisDecimalPrecision(i), 2108 ComputerName, 1593
XAxisEnd(i), 2027 Context, 1594
XAxisEndValue, 1952 Instance, 1667
XAxisExponentialFormat, 1953 SelText, 1767
XAxisGridLineInterval(i), 2109 State, 1800
XAxisIndex, 1953 UserName, 1923
XAxisInTrendColor, 1954 Properties in VBS/ScrollPositionX, 2006
XAxisLabel(i), 1954 Properties in VBS/ScrollPositionY, 2006
XAxisLargeIncrementSize(i), 2109 Properties in VBS:AngleAlpha, 2029
XAxisMode(i), 2110 Properties in VBS:AngleBeta, 2030
XAxisName, 1955 Properties in VBS:Application, 1948, 1969
XAxisPrecisions, 1955 Properties in VBS:Axe, 2030
XAxisRemove, 1955 Properties in VBS:AxisSection, 2030
XAxisRepos, 1956 Properties in VBS:BackBorderWidth, 1971
XAxisScalingType(i), 1956 Properties in VBS:BackColor2, 2055
XAxisShowGridLines(i), 2027 Properties in VBS:BackColor3, 1971
XAxisShowLargeIncrements(i), 2110 Properties in VBS:BackFlashColorOff, 1971
XAxisShowSmallIncrements(i), 2111 Properties in VBS:BackFlashColorOn, 1971
XAxisSmallIncrementSize(i), 2111 Properties in VBS:Background, 2030
XAxisTrendWindow, 1957 Properties in VBS:BarDepth, 2030
XAxisVisible, 1957 Properties in VBS:BarHeight, 2030
XDataLogTag(i), 2112 Properties in VBS:BarWidth, 2056

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2257
Index

Properties in VBS:BaseX, 2031 Properties in VBS:FlashBackColor, 1983


Properties in VBS:BaseY, 2031 Properties in VBS:FlashBorderColor, 1983
Properties in VBS:BorderColorBottom, 2057 Properties in VBS:FlashFlashPicture, 2075
Properties in VBS:BorderColorTop, 2057 Properties in VBS:FlashForeColor, 2075
Properties in VBS:BorderFlashColorOff, 1971 Properties in VBS:FlashPicReferenced, 2075
Properties in VBS:BorderFlashColorOn, 1971 Properties in VBS:FlashPicture, 2075
Properties in Properties in VBS:FlashRate, 1983
VBS:BottomConnectedConnectionPointIndex, 1972 Properties in VBS:FlashRateBackColor, 1983
Properties in Properties in VBS:FlashRateBorderColor, 2075
VBS:BottomConnectedObjectName, 1972 Properties in VBS:FlashRateFlashPic, 2076
Properties in VBS:BoxAlignment, 1972 Properties in VBS:FlashRateForeColor, 2076
Properties in VBS:BoxCount, 1972 Properties in VBS:ForeFlashColorOff, 2032
Properties in VBS:BoxType, 1972 Properties in VBS:ForeFlashColorOn, 2032
Properties in VBS:Button1Width, 1972 Properties in VBS:Hysteresis, 1985
Properties in VBS:Button2Width, 1973 Properties in VBS:HysteresisRange, 1985
Properties in VBS:Button3Width, 1973 Properties in VBS:ItemBorderBackColor, 1986
Properties in VBS:Button4Width, 1973 Properties in VBS:ItemBorderColor, 1986
Properties in VBS:ButtonColor, 1973 Properties in VBS:ItemBorderWidth, 1986
Properties in VBS:CheckAlarmHigh, 1974 Properties in VBS:LanguageSwitch, 2078
Properties in VBS:CheckAlarmLow, 1975 Properties in VBS:Layer, 1673
Properties in VBS:CheckLimitHigh4, 1975 Properties in VBS:Layer00Checked, 2033
Properties in VBS:CheckLimitHigh5, 1975 Properties in VBS:Layer00Color, 2033
Properties in VBS:CheckLimitLow4, 1975 Properties in VBS:Layer00Value, 2033
Properties in VBS:CheckLimitLow5, 1975 Properties in VBS:Layer01Checked, 2033
Properties in VBS:CheckToleranceHigh, 1976 Properties in VBS:Layer01Color, 2033
Properties in VBS:CheckToleranceLow, 1976 Properties in VBS:Layer01Value, 2034
Properties in VBS:CheckWarningHigh, 1976 Properties in VBS:Layer02Checked, 2034
Properties in VBS:CheckWarningLow, 1976 Properties in VBS:Layer02Color, 2034
Properties in VBS:ClearOnNew, 1976 Properties in VBS:Layer02Value, 2034
Properties in VBS:CloseButton, 2031 Properties in VBS:Layer03Checked, 2034
Properties in VBS:ColorAlarmHigh, 1977 Properties in VBS:Layer03Color, 2035
Properties in VBS:ColorAlarmLow, 1977 Properties in VBS:Layer03Value, 2035
Properties in VBS:ColorBottom, 2059 Properties in VBS:Layer04Checked, 2035
Properties in VBS:ColorChangeType, 2059 Properties in VBS:Layer04Color, 2035
Properties in VBS:ColorLimitHigh4, 1977 Properties in VBS:Layer04Value, 2035
Properties in VBS:ColorLimitHigh5, 1977 Properties in VBS:Layer05Checked, 2036
Properties in VBS:ColorLimitLow4, 1977 Properties in VBS:Layer05Color, 2036
Properties in VBS:ColorLimitLow5, 1978 Properties in VBS:Layer05Value, 2036
Properties in VBS:ColorToleranceHigh, 1978 Properties in VBS:Layer06Checked, 2036
Properties in VBS:ColorToleranceLow, 1978 Properties in VBS:Layer06Color, 2036
Properties in VBS:ColorTop, 2059 Properties in VBS:Layer06Value, 2037
Properties in VBS:ColorWarningHigh, 1978 Properties in VBS:Layer07Checked, 2037
Properties in VBS:ColorWarningLow, 1978 Properties in VBS:Layer07Color, 2037
Properties in VBS:CurrentContext, 1599 Properties in VBS:Layer07Value, 2037
Properties in VBS:EditAtOnce, 1981 Properties in VBS:Layer08Checked, 2037
Properties in VBS:Exponent, 1981 Properties in VBS:Layer08Color, 2038
Properties in VBS:ExtendedOperation, 2074 Properties in VBS:Layer08Value, 2038
Properties in VBS:ExtendedZoomingEnable, 1623 Properties in VBS:Layer09Checked, 2038
Properties in VBS:FillColor, 1981 Properties in VBS:Layer09Color, 2038
Properties in VBS:Filling, 1982 Properties in VBS:Layer09Value, 2038
Properties in VBS:FillingIndex, 1982 Properties in VBS:Layer10Checked, 2039
Properties in VBS:FillStyle2, 1983 Properties in VBS:Layer10Color, 2039

WinCC Professional V13 SP2 – Programming reference


2258 System Manual, 03/2017, Online help printout
Index

Properties in VBS:Layer10Value, 2039 Properties in VBS:OutputValue, 1998


Properties in VBS:LayerDeclutteringEnable, 1676 Properties in VBS:Path, 1739
Properties in VBS:Layers, 1677 Properties in VBS:PicDeactReferenced, 2000
Properties in VBS:LeftComma, 1986 Properties in VBS:PicDeactTransparent, 2001
Properties in VBS:LightEffect, 2039 Properties in VBS:PicDeactUseTransColor, 2001
Properties in VBS:LimitHigh4, 1986 Properties in VBS:PicDownReferenced, 2042
Properties in VBS:LimitHigh5, 1987 Properties in VBS:PicDownTransparent, 2001
Properties in VBS:LimitLow4, 1987 Properties in VBS:PicDownUseTransColor, 2001
Properties in VBS:LimitLow5, 1987 Properties in VBS:PicReferenced, 2042
Properties in VBS:LimitMax, 1987 Properties in VBS:PicTransColor, 2001
Properties in VBS:LimitMin, 1987 Properties in VBS:PictureUp, 2002
Properties in VBS:ListType, 2039 Properties in VBS:PicUpReferenced, 2082
Properties in VBS:LockStatus, 1988 Properties in VBS:PicUpTransparent, 2002
Properties in VBS:LockText, 1988 Properties in VBS:PicUpUseTransColor, 2002
Properties in VBS:LockTextColor, 1988 Properties in VBS:PicUseTransColor, 2002
Properties in VBS:Logging, 1691 Properties in VBS:PointCount, 2003
Properties in VBS:LongStrokesBold, 1988 Properties in VBS:Position, 2042
Properties in VBS:LongStrokesOnly, 1988 Properties in VBS:PredefinedAngles, 2043
Properties in VBS:LongStrokesTextEach, 1989 Properties in VBS:Process, 2004
Properties in VBS:Marker, 1991 Properties in VBS:QualityCode, 1746
Properties in VBS:Max, 2040 Properties in VBS:ReferenceRotationLeft, 2004
Properties in VBS:MaximizeButton, 1991 Properties in VBS:ReferenceRotationTop, 2004
Properties in VBS:MCGUBackColorOff, 1991 Properties in VBS:Relevant, 2005
Properties in VBS:MCGUBackColorOn, 1992 Properties in VBS:RightComma, 2005
Properties in VBS:MCGUBackFlash, 1992 Properties in VBS:SameSize, 2005
Properties in VBS:MCGUTextColorOff, 1992 Properties in VBS:ScaleTicks, 2006
Properties in VBS:MCGUTextColorOn, 1992 Properties in VBS:ScrollBars, 2006
Properties in VBS:MCGUTextFlash, 1992 Properties in VBS:SelBGColor, 2006
Properties in VBS:MCKOBackColorOff, 1992 Properties in VBS:SelTextColor, 2008
Properties in VBS:MCKOBackColorOn, 1993 Properties in VBS:SignificantMask, 2011
Properties in VBS:MCKOBackFlash, 1993 Properties in VBS:Sizeable, 1795
Properties in VBS:MCKOTextColorOff, 1993 Properties in VBS:SmallChange, 2092
Properties in VBS:MCKOTextColorOn, 1993 Properties in VBS:TagName, 2013
Properties in VBS:MCKOTextFlash, 1993 Properties in VBS:Tags, 1821
Properties in VBS:MCKQBackColorOff, 1993 Properties in VBS:TimeStamp, 1845
Properties in VBS:MCKQBackColorOn, 1994 Properties in VBS:Titleline, 2015
Properties in VBS:MCKQBackFlash, 1994 Properties in VBS:ToleranceHigh, 2015
Properties in VBS:MCKQTextColorOff, 1994 Properties in VBS:ToleranceLow, 2015
Properties in VBS:MCKQTextColorOn, 1994 Properties in
Properties in VBS:MCKQTextFlash, 1994 VBS:TopConnectedConnectionPointIndex, 2015
Properties in VBS:MCText, 1994 Properties in VBS:TopConnectedObjectName, 2016
Properties in VBS:MessageClass, 1995 Properties in VBS:Trend, 2016
Properties in VBS:Min, 2079 Properties in VBS:TypeAlarmHigh, 2017
Properties in VBS:NumberLines, 1995 Properties in VBS:TypeAlarmLow, 2017
Properties in Properties in VBS:TypeLimitHigh4, 2017
VBS:ObjectSizeDeclutteringEnable, 1721 Properties in VBS:TypeLimitHigh5, 2017
Properties in VBS:ObjectSizeDeclutteringMax, 1722 Properties in VBS:TypeLimitLow4, 2017
Properties in VBS:ObjectSizeDeclutteringMin, 1723 Properties in VBS:TypeLimitLow5, 2017
Properties in VBS:OnTop, 1996 Properties in VBS:TypeToleranceHigh, 2018
Properties in VBS:OperationMessage, 1997 Properties in VBS:TypeToleranceLow, 2018
Properties in VBS:OperationReport, 1997 Properties in VBS:TypeWarningHigh, 2018
Properties in VBS:OutputFormat, 1998 Properties in VBS:TypeWarningLow, 2018

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2259
Index

Properties in VBS:UnselBGColor, 2098 RotationAngle property (VBS), 1752


Properties in VBS:UnselTextColor, 2098 RotationCenterLeft property (VBS), 1752
Properties in VBS:UpdateCycle, 2099 RotationCenterTop property (VBS), 1753
Properties in VBS:UserValue1, 2023 RoundButton object, 1445
Properties in VBS:UserValue2, 2023 RoundCornerHeight property (VBS), 1754
Properties in VBS:UserValue3, 2023 RoundCornerWidth property (VBS), 1754
Properties in VBS:UserValue4, 2023 RowNumber property (VBS), 2082
Properties in VBS:Value, 1929 RowScrollbar property (VBS), 1754
Properties in VBS:WarningHigh, 2025 RowSizingEnable property (VBS), 2044
Properties in VBS:WarningLow, 2025 RowTitles property (VBS), 1787
Properties in VBS:WindowBorder, 2026 RTPersistence property (VBS), 1755
Properties in VBS:ZeroPointValue, 2050 RTPersistencePasswordLevel property (VBS), 2005
ProtectedAreaName object, 1436 RTPersistenceType property (VBS), 1756
putc function, 177 RulerColor property (VBS), 1757
RulerPrecision(i) property (VBS), 2082
RulerXPrecision(i) property (VBS), 2083
Q RulerYPrecision(i) property (VBS), 2083
qsort function, 178
Quality codes of tags, 196
QuitHorn, 2193
S
QuitSelected, 2193 SafelyRemoveHardware, 1186
QuitVisible, 2194 SaveDataRecord, 1186
ScaleColor property (VBS), 1758
ScaleDenominator property (VBS), 1762
R ScaleGradation property (VBS), 1758
ScaleLabelColor property (VBS), 1759
Radius property (VBS), 1747
ScaleNumerator property (VBS), 1759
RadiusHeight property (VBS), 1748
ScalePosition property (VBS), 1759
RadiusWidth property (VBS), 1748
ScaleTickColor property (VBS), 1760
rand function, 178
ScaleTickLabelPosition property (VBS), 1761
RangeLabelView object, 1437
ScaleTickLength property (VBS), 1761
RangeQualityView object, 1438
ScaleTickPosition property (VBS), 1762
ReadOnly property (VBS), 2004
Scaling property (VBS), 1763
ReadTags, 2194
ScalingType property (VBS), 1763
realloc function, 178
Screen object, 1276, 1299
Recipe
Screen object (list), 1275
Export format, 1152
ScreenItem, 1402
Recipe data record
Control, 1368
Export format, 1152
ScreenItem object, 1277, 1302
RecipeName property (VBS), 1749
ScreenItems object (list), 1279, 1304
RecipeNumber property (VBS), 1749
ScreenItems property (VBS), 1764
RecordName property (VBS), 1750
ScreenName property (VBS), 1764
RecordNumber property (VBS), 1750
Screens property (VBS), 1765
Rectangle object, 1445
ScreenWindow object, 1449
RelativeFillLevel property (VBS), 1750
Scrollable property (VBS), 2044
remove function, 177
SecondNeedleHeight property (VBS), 1765
rename function, 177
SecondNeedleWidth property (VBS), 1766
ReportJob, 81
SegmentColoring property (VBS), 1766
ResetBit, 82, 1184, 1229
SelectBackColor property (VBS), 1767
ResetBitInTag, 82, 1184, 1230
SelectedCellColor property (VBS), 1767
rewind function, 177
SelectedCellForeColor property (VBS), 1768
Rotation property (VBS), 1751
SelectedIndex property (VBS), 1769

WinCC Professional V13 SP2 – Programming reference


2260 System Manual, 03/2017, Online help printout
Index

SelectedRowColor property (VBS), 1769 SetPropLong, 92


SelectedRowForeColor property (VBS), 1770 SetRecipeTags, 1201
SelectedStatisticArea, 2207 SetScreenKeyboardMode, 1202
SelectedTitleColor property (VBS), 1771 SetStart at boot, 1217
SelectedTitleForeColor property (VBS), 1771 SetTag, 116, 1203, 1240
SelectForeColor property (VBS), 1772 SetTagBit, 99
SelectionBackColor property (VBS), 1773 SetTagBitState, 106
SelectionColoring property (VBS), 1774 SetTagBitStateWait, 108
SelectionForeColor property (VBS), 1774 SetTagBitWait, 114
SelectionMode property (VBS), 2007 SetTagByProperty, 117, 1241
SelectionRect property (VBS), 1775 SetTagByte, 99
SelectionRectColor property (VBS), 1775 SetTagByteState, 106
SelectionRectWidth property (VBS), 1776 SetTagByteStateWait, 108
SelectionType property (VBS), 1777 SetTagByteWait, 114
SendEMail, 1188 SetTagChar, 99
SeparatorBackColor property (VBS), 1777 SetTagCharState, 106
SeparatorColor property (VBS), 1778 SetTagCharStateWait, 109
SeparatorStyle property (VBS), 1779 SetTagCharWait, 114
SeparatorWidth property (VBS), 1779 SetTagDateTime, 99, 101
SeperatorCornerStyle property (VBS), 1779 SetTagDouble, 99
ServerExport, 2209 SetTagDoubleState, 106
ServerImport, 2209 SetTagDoubleStateWait, 109
ServerNames property (VBS), 1780 SetTagDoubleWait, 114
ServerPrefix property (VBS), 1781 SetTagDWord, 99
ServerScale property (VBS), 1780 SetTagDWordState, 106
SetAcousticSignal, 1189 SetTagDWordStateWait, 109
SetAlarmReportingMode, 1189 SetTagDWordWait, 115
SetAlarmReportMode, 1189 SetTagFloat, 99
SetAndGetBrightness, 1190 SetTagFloatState, 106
SetBit, 84, 1191, 1231 SetTagFloatStateWait, 109
SetBitInTag, 84, 1192, 1232 SetTagFloatWait, 115
SetBrightness, 1193 SetTagIndirect, 120, 1243
setbuf function, 177 SetTagIndirectByProperty, 119, 120, 1242, 1244
SetConnectionMode, 1194 SetTagIndirectByTagIndirect, 122, 1245
SetDataRecordTagsToPLC, 1195 SetTagIndirectWithOperatorInputAlarm, 123, 1246,
SetDataRecordToPLC, 1196 1247
SetDaylightSavingTime, 1197 SetTagMultiStateWait, 102
SetDeviceMode, 1198 SetTagMultiWait, 103
SetDisplayMode, 1198 SetTagRaw, 99
SetLanguage, 86, 1199 SetTagRawState, 106
SetPLCMode, 1200 SetTagRawStateWait, 109
SetpointTrendArchiveStartId(i) property (VBS), 2084 SetTagRawWait, 115
SetpointTrendColor(i) property (VBS), 2085 SetTagSByte, 99
SetpointTrendNumberOfValues(i) property SetTagSByteState, 106
(VBS), 2085 SetTagSByteStateWait, 109
SetPropBOOL, 88 SetTagSByteWait, 115
SetPropChar, 89 SetTagSDWord, 99
SetPropDouble, 91 SetTagSDWordState, 107
SetPropertyByConstant, 93, 1234 SetTagSDWordStateWait, 109
SetPropertyByProperty, 95, 1235 SetTagSDWordWait, 115
SetPropertyByTag, 96, 1237 SetTagSWord, 99
SetPropertyByTagIndirect, 98, 1238 SetTagSWordState, 107

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2261
Index

SetTagSWordStateWait, 109 ShowRulerInAxis property (VBS), 1788


SetTagSWordWait, 115 ShowScale property (VBS), 1788
SetTagValue, 111 ShowScrollbars property (VBS), 1789
SetTagValueWait, 112 ShowSelectArchive, 2217
SetTagWord, 99 ShowSelection, 2217
SetTagWordState, 107 ShowSelectionDialog, 2218
SetTagWordStateWait, 109 ShowSelectTimeBase, 2218
SetTagWordWait, 115 ShowSetpointTrend(i) property (VBS), 2091
setvbuf function, 177 ShowShortTermArchiveList, 2219
Shared property (VBS), 1781 ShowSlideInScreen, 1208
ShareTimeColumn property (VBS), 2087 ShowSoftwareVersion, 1209
ShareValueAxis property (VBS), 2087 ShowSort, 2219
ShareXAxis property (VBS), 2088 ShowSortButton property (VBS), 1789
ShareYAxis property (VBS), 2088 ShowSortDialog, 2220
ShiftDecimalPoint property (VBS), 1781 ShowSortIcon property (VBS), 1790
ShortenCellText property (VBS), 2008 ShowStatusBar property (VBS), 1791
ShortenColumnHeaderText property (VBS), 2008 ShowSystemAlarm, 1210
ShowAlarmsFromDate property (VBS), 1781 ShowSystemDiagnosticsWindow, 1210
ShowAlarmWindow, 1206, 1210 ShowTableGridlines property (VBS), 1791
ShowBadTagState property (VBS), 1782 ShowTagSelection, 2220
ShowBar property (VBS), 1782 ShowThumb property (VBS), 1792
ShowBorder property (VBS), 2089 ShowTickLabels property (VBS), 1792
ShowCaption property (VBS), 1783 ShowTicks property (VBS), 1793
ShowColumn(i) property (VBS), 2089 ShowTimebaseDialog, 2221
ShowColumnSelection, 2210 ShowTimeSelection, 2221
ShowComment, 2210 ShowTitle property (VBS), 1793
ShowCurve(i) property (VBS), 2089 ShowToolBar property (VBS), 1794
ShowDecimalPoint property (VBS), 1783 ShowTrendIcon property (VBS), 1794
ShowDisplayOptionsDialog, 2211 ShowTrendIndicator property (VBS), 1795
ShowEmergencyQuitDialog, 2211 ShowTrendSelection, 2222
ShowFillLevel property (VBS), 1784 ShowVerticalGridlines property (VBS), 2009
ShowFocusRectangle property (VBS), 1785 ShowXValuesExponential(i) property (VBS), 2009
ShowHelp, 2212 ShowYValuesExponential(i) property (VBS), 2010
ShowHideList, 2212 sin function, 174
ShowHitList, 2213 sinh function, 174
ShowInputControls property (VBS), 2090 Slider object, 1455
ShowLargeTicksOnly property (VBS), 1785, 1988 Smart Objects
ShowLimitMarkers property (VBS), 1785 Control, 1368
ShowLockDialog, 2214 SmartClientView object, 1456
ShowLockList, 2214 SmartServer, 1143
ShowLogonDialog, 1248 SmartTag object, 1281, 1307
ShowLongTermArchiveList, 2215 SmartTags object (list), 1280, 1309
ShowMainFrame property (VBS), 2090 SmartTags property (VBS), 1796
ShowMessagesAtDate property (VBS), 2045 Sort property (VBS), 2046
ShowOperatorNotes, 1207 SortByTimeDirection property (VBS), 1797
ShowOverflowIndicator property (VBS), 2091 SortByTimeEnable property (VBS), 2011
ShowPeakValuePointer property (VBS), 1786 SortByTimeEnabled property (VBS), 1797
ShowPercentageAxis, 2216 SortOnColumnHeaderClick property (VBS), 2011
ShowPopupScreen, 1208 SortSequence property (VBS), 1797
ShowPosition property (VBS), 1786 SortTimeAscending property (VBS), 2012
ShowPropertyDialog, 2216 SortTimeEnable property (VBS), 2012
ShowRuler property (VBS), 1787 sqrt function, 174

WinCC Professional V13 SP2 – Programming reference


2262 System Manual, 03/2017, Online help printout
Index

srand function, 178 fsetpos function, 177


StartAngle property (VBS), 1798 ftell function, 177
StartLeft property (VBS), 2013 fwrite function, 177
StartLogging, 1211 getc function, 177
StartNextLog, 1212 putc function, 177
StartProgram, 124, 1212 remove function, 177
StartSequenceLog, 1212 rename function, 177
StartStopUpdate, 2222 rewind function, 177
StartStyle property (VBS), 1799 setbuf function, 177
StartTop property (VBS), 1799 setvbuf function, 177
StartValue property (VBS), 1799 tmpfile function, 176
StatusbarBackColor property (VBS), 1800 tmpnam function, 176
StatusbarElementAdd property (VBS), 1801 ungetc function, 177
StatusbarElementAutoSize property (VBS), 1801 vfprintf function, 177
StatusbarElementCount property (VBS), 1802 vsprintf function, 177
StatusbarElementIconId property (VBS), 1803 stdlib functions
StatusbarElementID property (VBS), 1803 abort function, 178
StatusbarElementIndex property (VBS), 1804 abs function, 177
StatusbarElementName property (VBS), 1805 atof function, 177
StatusbarElementRemove property (VBS), 1805 atoi function, 177
StatusbarElementRename property (VBS), 1806 atol function, 178
StatusbarElements property (VBS), 1806 bsearch function, 178
StatusbarElementTooltipText property (VBS), 1807 calloc function, 178
StatusbarElementUserDefined property (VBS), 1807 div function, 177
StatusbarElementVisible property (VBS), 1808 exit function, 178
StatusbarElementWidth property (VBS), 1808 free function, 178
StatusbarFontColor property (VBS), 1809 getenv function, 177
StatusbarShowArchiveName property (VBS), 2092 labs function, 178
StatusbarShowColumn property (VBS), 2092 ldiv function, 177
StatusbarShowRecord property (VBS), 2093 malloc function, 178
StatusbarShowRow property (VBS), 2093 qsort function, 178
StatusbarShowText property (VBS), 2094 rand function, 178
StatusbarShowTooltips property (VBS), 1810 realloc function, 178
StatusbarText property (VBS), 1810 srand function, 178
StatusbarUseBackColor property (VBS), 1811 strtod function, 177
StatusbarVisible property (VBS), 1812 strtol function, 178
StatusForce object, 1458 strtoul function, 178
stdio functions system function, 178
clearerr function, 177 Stop method, 2223
fclose function, 176 StopLogging, 1214
feof function, 176 StopRuntime, 125, 1215, 1248
ferror function, 176 strcat function, 178
fflush function, 176 strchr function, 178
fgetc function, 176 strcmp function, 179
fgetpos function, 176 strcpy function, 178
fgets function, 176 strcspn function, 179
fopen function, 176 strerror function, 178
fputc function, 177 strftime function, 179
fputs function, 177 String functions
fread function, 177 strcat function, 178
freopen function, 176 strchr function, 178
fseek function, 177 strcmp function, 179

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2263
Index

strcpy function, 178 CloseAllLogs, 1142


strcspn function, 179 ControlSmartServer, 1143
strerror function, 178 ControlWebServer, 1144
strlen function, 179 DecreaseTag, 29, 1146, 1221
strncat function, 178 DeleteDataRecord, 1139
strncmp function, 179 EditAlarm, 1147
strncpy function, 178 Encode, 1147
strpbrk function, 178 EncodeEx, 1148
strrchr function, 178 EstablishPROFIsafe, 1149
strspn function, 179 ExportDataRecords, 1150
strstr function, 178 ExportDataRecordsWithChecksum, 1152
strtok function, 178 ExportImportUserAdministration, 1155, 1222
strlen function, 179 GetBrightness, 1155
strncat function, 178 GetDataRecordFromPLC, 1156
strncmp function, 179 GetDataRecordName, 1158
strncpy function, 178 GetDataRecordTagsFromPLC, 1159
strpbrk function, 178 GetGroupNumber, 1160
strrchr function, 178 GetPassword, 1161
strspn function, 179 GetUserName, 1161
strstr function, 178 GoToEnd, 1162
strtod function, 177 GoToHome, 1162
strtok function, 178 ImportDataRecords, 1163
strtol function, 178 ImportDataRecordsWithChecksum, 1165
strtoul function, 178 IncreaseTag, 71, 1166, 1223
Style property (VBS), 1812 InvertBit, 76, 1169, 1226
StyleSettings property (VBS), 1813, 2026 InvertBitInTag, 77, 1170, 1227
SwapDimensionsWithOrientation property InvertLinearScaling, 74, 1167, 1224
(VBS), 2094 LinearScaling, 79, 1171, 1228
SwapFirstWithLastConnection property (VBS), 1813 LoadDataRecord, 1172
Switch object, 1460 Logoff, 1173
SymbolicIOField object, 1463 Logon, 1174
SymbolLibrary object, 1468 LookupText, 1174
system function, 178 NotifyUserAction, 1175
SafelyRemoveHardware, OpenAllLogs, 1177
SetStart at boot, OpenCommandPrompt, 1178
WinACMPGetVersion, OpenControlPanelDialog, 1178
WinACMPSetStartMode, OpenInternetExplorer, 1179
System functions OpenScreenKeyboard, 1180
AcknowledgeAlarm, 1129 OpenTaskManager, 1180
ActivatePreviousScreen, 1129 PageDown, 1181
ActivateScreen, 25, 1130, 1218 PageUp, 1181
ActivateScreenByNumber, 1131 PrintReport, 1182
ActivateScreenInScreenWindow, 26, 1220 PrintScreen, 1183
ActivateSystemDiagnosticsView, 1132 ResetBit, 82, 1184, 1229
ArchiveLogFile, 1133 ResetBitInTag, 82, 1184, 1230
BackupRAMFileSystem, 1135 SaveDataRecord, 1186
CalibrateTouchScreen, 1135 SendEMail, 1188
ChangeConnection, 1136 SetAcousticSignal, 1189
ClearAlarmBuffer, 1138 SetAlarmReportMode, 1189
ClearAlarmBufferProTool, 1139 SetAndGetBrightness, 1190
ClearDataRecordMemory, 1140 SetBit, 84, 1191, 1231
ClearLog, 1142 SetBitInTag, 84, 1192, 1232

WinCC Professional V13 SP2 – Programming reference


2264 System Manual, 03/2017, Online help printout
Index

SetBrightness, 1193 Tag


SetConnectionMode, 1194 Quality codes, 196
SetDataRecordTagsToPLC, 1195 Tag object, 1310
SetDataRecordToPLC, 1196 TagPrefix property (VBS), 1819
SetDaylightSavingTime, 1197 Tags, 1313, 1314
SetDeviceMode, 1198 Tags object (list), 1314
SetDisplayMode, 1198 tan function, 174
SetLanguage, 1199 tanh function, 174
SetPropertyByConstant, 93, 1234 Template property (VBS), 1821
SetPropertyByProperty, 95, 1235 TerminatePROFIsafe, 1216
SetPropertyByTag, 96, 1237 Text property (VBS), 1822
SetPropertyByTagIndirect, 98, 1238 TextField object, 1477
SetRecipeTags, 1201 TextList property (VBS), 1823
SetScreenKeyboardMode, 1202 TextOff property (VBS), 1823
SetTag, 116, 1203, 1240 TextOn property (VBS), 1824
SetTagByProperty, 117, 1241 TextOrientation property (VBS), 1825
SetTagIndirect, 120, 1243 ThumbBackColor property (VBS), 1825, 1827
SetTagIndirectByProperty, 119, 120, 1242, 1244 TicksColor property (VBS), 1826
SetTagIndirectByTagIndirect, 122, 1245 time function, 179
SetTagIndirectWithOperatorInputAlarm, 123, time functions
1246 asctime function, 179
SetTagWithOperatorInputAlarm, 123, 1247 ctime function, 179
ShowAlarmWindow, 1206 difftime function, 179
ShowLogonDialog, 1248 gmtime function, 179
ShowOperatorNotes, 1207 localtime function, 179
ShowPopupScreen, 1208 mktime function, 179
ShowSlideInScreen, 1208 strftime function, 179
ShowSoftwareVersion, 1209 time function, 179
ShowSystemAlarm, 1210 TimeAxisBeginTime(i) property (VBS), 1827
ShowSystemDiagnosticsWindow, 1210 TimeAxisEndTime property (VBS), 1828
StartLogging, 1211 TimeAxisLabel(i) property (VBS), 1828
StartNextLog, 1212 TimeAxisRange property (VBS), 1829
StartProgram, 1212 TimeAxisShowGridLines(i) property (VBS), 2013
StopLogging, 1214 TimeAxisShowLargeIncrements(i) property
StopRuntime, 125, 1215, 1248 (VBS), 2095
TerminatePROFIsafe, 1216 TimeAxisShowSmallIncrements(i) property
SystemDiagnoseView object, 1470 (VBS), 2095
SystemDiagnoseWindow object, 1473 TimeAxisTimeFormat(i) property (VBS), 1829
TimeBase property (VBS), 1829
TimeColumnActualize property (VBS), 1830
T TimeColumnAdd property (VBS), 1831
TimeColumnAlignment property (VBS), 1831
TableBackColor property (VBS), 1814
TimeColumnAlignment(i) property (VBS), 1832
TableColor property (VBS), 1815
TimeColumnBackColor property (VBS), 1832
TableColor2 property (VBS), 1815
TimeColumnBeginTime property (VBS), 1833
TableFocusOnButtonCommand property
TimeColumnCaption property (VBS), 1833
(VBS), 2046
TimeColumnCount property (VBS), 1834
TableForeColor property (VBS), 1816
TimeColumnDateFormat property (VBS), 1834
TableForeColor2 property (VBS), 1817
TimeColumnEndTime property (VBS), 1835
TableGridLineColor property (VBS), 1817
TimeColumnForeColor property (VBS), 1835
TableHeaderBackColor property (VBS), 1818
TimeColumnFormat(i) property (VBS), 2014
TableHeaderForeColor property (VBS), 1819
TimeColumnHideText property (VBS), 1836
TableView object, 1409

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2265
Index

TimeColumnHideTitleText property (VBS), 1836 ToolbarButtonAuthorization property (VBS), 1864


TimeColumnIndex property (VBS), 1837 ToolbarButtonBeginGroup property (VBS), 1859
TimeColumnLength property (VBS), 1837 ToolbarButtonCount property (VBS), 1860
TimeColumnMeasurePoints property (VBS), 1837 ToolbarButtonEnabled property (VBS), 1861
TimeColumnName property (VBS), 1838 ToolbarButtonHotKey property (VBS), 1861
TimeColumnRangeType property (VBS), 1838 ToolbarButtonID property (VBS), 1862
TimeColumnRemove property (VBS), 1839 ToolbarButtonIndex property (VBS), 1862
TimeColumnRename property (VBS), 1839 ToolbarButtonLocked property (VBS), 1863
TimeColumnRepos property (VBS), 1840 ToolbarButtonName property (VBS), 1864
TimeColumnShowDate property (VBS), 1840 ToolbarButtonRemove property (VBS), 1865
TimeColumnShowIcon property (VBS), 1841 ToolbarButtonRename property (VBS), 1865
TimeColumnShowTitleIcon property (VBS), 1841 ToolbarButtonRepos property (VBS), 1866
TimeColumnSort property (VBS), 1842 ToolbarButtonTooltipText property (VBS), 1866
TimeColumnSortIndex property (VBS), 1842 ToolbarButtonUserDefined property (VBS), 1867
TimeColumnTimeFormat property (VBS), 1843 ToolbarShowTooltips property (VBS), 1868
TimeColumnTimeRangeBase property (VBS), 1843 ToolbarUseBackColor property (VBS), 1868
TimeColumnTimeRangeFactor property (VBS), 1844 ToolbarUseHotKeys property (VBS), 1869
TimeColumnUseValueColumnColors property ToolbarVisible property (VBS), 1869
(VBS), 1844 ToolTipText property (VBS), 1870
TimeColumnVisible property (VBS), 1845 Top property (VBS), 1871
TimeJumpColor(i) property (VBS), 2096 TopOffset property (VBS), 1873
TimeJumpEnabled(i) property (VBS), 2096 Total property (VBS), 1874
TimeOverlapColor(i) property (VBS), 2097 toupper function, 173
TimeOverlapEnabled(i) property (VBS), 2097 Trace methods, 2223
TimeRangeBase(i) property (VBS), 2046 Transparency property (VBS), 1874
TimeRangeFactor(i) property (VBS), 2047 TransparentColor property (VBS), 1876
TitleColor property (VBS), 2015 TransparentColorDeactivatedPicture property
TitleCut property (VBS), 1846 (VBS), 1876
TitleDarkShadowColor property (VBS), 1847 TransparentColorPictureOff property (VBS), 1877
TitleForeColor property (VBS), 1848 TransparentColorPictureOn property (VBS), 1878
TitleGridLineColor property (VBS), 1848 TrendActualize property (VBS), 1878
TitleLightShadowColor property (VBS), 1849 TrendAdd property (VBS), 1879
TitleSort property (VBS), 1850 TrendBeginTime property (VBS), 1879
TitleStyle property (VBS), 1850 TrendColor property (VBS), 1880
tmpfile function, 176 TrendCount property (VBS), 1880
tmpnam function, 176 TrendEndTime property (VBS), 1881
Toggle property (VBS), 1851 TrendExtendedColorSet property (VBS), 1881
Tolerance property (VBS), 1851 TrendFill property (VBS), 1882
ToleranceColor property (VBS), 1852 TrendFillColor property (VBS), 1882
ToleranceLowerLimit property (VBS), 1852 TrendIndex property (VBS), 1883
ToleranceLowerLimitColor property (VBS), 1853 TrendIndicatorColor property (VBS), 1884
ToleranceLowerLimitEnabled property (VBS), 1854 TrendLabel property (VBS), 1884
ToleranceLowerLimitRelative property (VBS), 1854 TrendLineStyle property (VBS), 1885
ToleranceUpperLimit property (VBS), 1855 TrendLineType property (VBS), 1885
ToleranceUpperLimitColor property (VBS), 1855 TrendLineWidth property (VBS), 1886
ToleranceUpperLimitEnabled property (VBS), 1856 TrendLowerLimit property (VBS), 1886
ToleranceUpperLimitRelative property (VBS), 1856 TrendLowerLimitColor property (VBS), 1887
tolower function, 173 TrendLowerLimitColoring property (VBS), 1887
ToolbarAlignment property (VBS), 1857 TrendMeasurePoints property (VBS), 1888
ToolbarBackColor property (VBS), 1858 TrendName property (VBS), 1888
ToolbarButtonActive property (VBS), 1858 TrendPointColor property (VBS), 1889
ToolbarButtonAdd property (VBS), 1859 TrendPointStyle property (VBS), 1889

WinCC Professional V13 SP2 – Programming reference


2266 System Manual, 03/2017, Online help printout
Index

TrendPointWidth property (VBS), 1890


TrendProvider property (VBS), 1890
TrendRangeType property (VBS), 1891 U
TrendRemove property (VBS), 1892
uaAddArchive, 128
TrendRename property (VBS), 1892
uaAddField, 129
TrendRepos property (VBS), 1893
uaArchiveClose, 130
TrendRulerControl, 1480
uaArchiveDelete, 130
TrendSelectTagNameX property (VBS), 1893
uaArchiveExport, 131
TrendSelectTagNameY property (VBS), 1894
uaArchiveGetCount, 132
TrendTag property (VBS), 2016
uaArchiveGetFieldLength, 133
TrendTagNameX property (VBS), 1894
uaArchiveGetFieldName, 133
TrendTagNameY property (VBS), 1895
uaArchiveGetFields, 134
TrendTimeRangeBase property (VBS), 1895
uaArchiveGetFieldType, 135
TrendTimeRangeFactor property (VBS), 1896
uaArchiveGetFieldValueDate, 135
TrendTrendWindow property (VBS), 1896
uaArchiveGetFieldValueDouble, 136
TrendUncertainColor property (VBS), 1897
uaArchiveGetFieldValueFloat, 137
TrendUncertainColoring property (VBS), 1897
uaArchiveGetFieldValueLong, 138
TrendUpperLimit property (VBS), 1898
uaArchiveGetFieldValueString, 138
TrendUpperLimitColor property (VBS), 1898
uaArchiveGetFilter, 139
TrendUpperLimitColoring property (VBS), 1899
uaArchiveGetID, 140
TrendView object, 1488
uaArchiveGetName, 140
TrendVisible property (VBS), 1899
uaArchiveGetSort, 141
TrendWindowAdd property (VBS), 1900
uaArchiveImport, 142, 949
TrendWindowCoarseGrid property (VBS), 1900
uaArchiveInsert, 143
TrendWindowCoarseGridColor property (VBS), 1901
uaArchiveMoveFirst, 143
TrendWindowFineGrid property (VBS), 1902
uaArchiveMoveLast, 144
TrendWindowFineGridColor property (VBS), 1902
uaArchiveMoveNext, 145
TrendWindowForegroundTrendGrid property
uaArchiveMovePrevious, 145
(VBS), 1903
uaArchiveOpen, 146
TrendWindowGridInTrendColor property
uaArchiveReadTagValues, 147
(VBS), 1903
uaArchiveReadTagValuesByName, 148
TrendWindowHorizontalGrid property (VBS), 1904
uaArchiveRequery, 149
TrendWindowIndex property (VBS), 1904
uaArchiveSetFieldValueDate, 149
TrendWindowName property (VBS), 1905
uaArchiveSetFieldValueDouble, 150
TrendWindowRemove property (VBS), 1905
uaArchiveSetFieldValueFloat, 151
TrendWindowRename property (VBS), 1905
uaArchiveSetFieldValueLong, 152
TrendWindowRepos property (VBS), 1906
uaArchiveSetFieldValueString, 153
TrendWindowRulerColor property (VBS), 1906
uaArchiveSetFilter, 154
TrendWindowRulerLayer property (VBS), 1907
uaArchiveSetSort, 154
TrendWindowRulerStyle property (VBS), 1908
uaArchiveUpdate, 155, 951
TrendWindowRulerWidth property (VBS), 1908
uaArchiveWriteTagValues, 156
TrendWindowSpacePortion property (VBS), 1909
uaArchiveWriteTagValuesByName, 157
TrendWindowVerticalGrid property (VBS), 1909
uaConnect, 157, 931
TrendWindowVisible property (VBS), 1910
uaDisconnect, 158, 933
TrendXAxis property (VBS, 1910
uaGetArchive, 159
TrendYAxis property (VBS, 1911
uaGetField, 159
TriggerOperatorEvent, 127
uaGetLastError, 160
TubeArcObject, 1491
uaGetLastHResult, 162
TubeDoubleTeeObject, 1493
uaGetNumArchives, 163
TubePolyline, 1495
uaGetNumFields, 163
TubeTeeObject, 1497
uaQueryArchive, 164, 934
Type property (VBS), 2098
uaQueryArchiveByName, 165, 936

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2267
Index

UaQueryConfiguration, 166, 938 UseTransparentColorPictureOff property


uaReleaseArchive, 166, 939 (VBS), 1922
uaReleaseConfiguration, 167 UseTransparentColorPictureOn property
uaRemoveAllArchives, 168 (VBS), 1922
uaRemoveAllFields, 168 UseTrendNameAsLabel property (VBS), 1923
uaRemoveArchive, 169 UV_ColumnWidth_AKZ property (VBS), 1923
uaRemoveField, 170 UV_ColumnWidth_Descriptor property (VBS), 1923
uaSetArchive, 171 UV_ColumnWidth_InstallationDate property
uaSetField, 171 (VBS), 1924
UncertainStateColor(i) property (VBS), 2018 UV_ColumnWidth_LADDR property (VBS), 1924
UncertainStateEnabled(i) property (VBS), 2019 UV_ColumnWidth_Name property (VBS), 1924
ungetc function, 177 UV_ColumnWidth_OKZ property (VBS), 1924
UnhideAlarm, 2224 UV_ColumnWidth_OperationState property
Unit property (VBS), 1911 (VBS), 1924
UnitColor property (VBS), 1912 UV_ColumnWidth_OrderID property (VBS), 1924
UnitText property (VBS), 1912 UV_ColumnWidth_ProfileID property (VBS), 1924
UnitTop property (VBS), 1913 UV_ColumnWidth_Rack property (VBS), 1925
UnlockAlarm, 2224 UV_ColumnWidth_Slot property (VBS), 1925
UpdateEnable property (VBS), 2020 UV_ColumnWidth_SoftwareRevision property
UpperLimit property (VBS), 1913 (VBS), 1925
UpperLimitColor(i) property (VBS), 2020 UV_ColumnWidth_SpecificProfileData property
UpperLimitEnabled(i) property (VBS), 2021 (VBS), 1925
UpperLimitValue(i) property (VBS), 2021 UV_ColumnWidth_State property (VBS), 1925
UseAllServers property (VBS), 2022 UV_ColumnWidth_Station property (VBS), 1925
UseBarBorderConstraints property (VBS), 2099 UV_ColumnWidth_SubAddress property
Used property (VBS), 1914 (VBS), 1925
UseDesignColorSchema property (VBS), 1914 UV_ColumnWidth_SubSlot property (VBS), 1926
UseDesignShadowSettings property (VBS), 1916 UV_ColumnWidth_SubSystem property (VBS), 1926
UsedPercent property (VBS), 1917 UV_ColumnWidth_Type property (VBS), 1926
UseEffectiveProcessValue property (VBS), 2099 UV_ShowItem_AKZ property (VBS), 1926
UseEyponentialFormat property (VBS), 1918 UV_ShowItem_Descriptor property (VBS), 1926
UseFlashTransparentColor property (VBS), 1918 UV_ShowItem_InstallationDate property
UseGDI property (VBS), 2100 (VBS), 1926
UseMeasurePoints(i) property (VBS), 2100 UV_ShowItem_LADDR property (VBS), 1926
UseMessageColor property (VBS), 1919 UV_ShowItem_Name property (VBS), 1927
UseMultipleLimits property (VBS), 2101 UV_ShowItem_OKZ property (VBS), 1927
UserArchiveControl object, 1499 UV_ShowItem_OperationState property (VBS), 1927
UserArchiveNumberOfValues(i) property UV_ShowItem_OrderID property (VBS), 1927
(VBS), 2103 UV_ShowItem_ProfileID property (VBS), 1927
UserArchiveStartId(i) property (VBS), 2104 UV_ShowItem_Rack property (VBS), 1927
UserView object, 1506 UV_ShowItem_Slot property (VBS), 1927
UseScaleConstraints property (VBS), 2101 UV_ShowItem_SoftwareRevision property
UseScaledBarBorder property (VBS), 2102 (VBS), 1928
UseSelectedTitleColor property (VBS), 1919 UV_ShowItem_SpecificProfileData property
UseSeparateDiagrams property (VBS), 2102 (VBS), 1928
UseSimplePresicionOffset property (VBS), 2103 UV_ShowItem_State property (VBS), 1928
UseTableColor2 property (VBS), 1920 UV_ShowItem_Station property (VBS), 1928
UseTagLimitColors property (VBS), 1920 UV_ShowItem_SubAddress property (VBS), 1928
UseTimeRange(i) property (VBS), 2048 UV_ShowItem_SubSlot property (VBS), 1928
UseTransparentColor property (VBS), 1921 UV_ShowItem_SubSystem property (VBS), 1928
UseTransparentColorDeactivatedPicture property UV_ShowItem_Type property (VBS), 1929
(VBS), 1921

WinCC Professional V13 SP2 – Programming reference


2268 System Manual, 03/2017, Online help printout
Index

WinCC
WinCC MediaControl, 1402
V WindowCloseEnabled property (VBS), 1946
WindowMaximizeEnabled property (VBS), 1946
ValidateFormatPattern property (VBS), 2049
WindowMovingEnabled property (VBS), 1947
ValueAxisAutorange(i) property (VBS), 1930
WindowOnTop property (VBS), 1947
ValueAxisBegin(i) property (VBS), 2049
WindowSizingEnabled property (VBS), 1948
ValueAxisDecimalPrecision(i) property (VBS), 2023
WindowSlider object, 1508
ValueAxisEnd(i) property (VBS), 2050
WindowsStyle property (VBS), 1948
ValueAxisGridLineInterval(i) property (VBS), 2105
WLanQualityView object, 1511
ValueAxisLabel(i) property (VBS), 1930
WriteTag, 2229
ValueAxisLargeIncrementSize(i) property
(VBS), 2106
ValueAxisScalingType(i) property (VBS), 1931
ValueAxisShowGridLines(i) property (VBS), 2024
X
ValueAxisShowLargeIncrements(i) property XAxisAdd property (VBS), 1949
(VBS), 2106 XAxisAlignment(VBS), 1949
ValueAxisShowSmallIncrements(i) property XAxisAutoPrecisions property (VBS), 1950
(VBS), 2107 XAxisAutoRange(i) property (VBS), 1950
ValueColumnAlignment(i) property (VBS), 1931 XAxisBegin(i) property (VBS), 2026
ValueColumnPrecision(i) property (VBS), 2025 XAxisBeginValue property (VBS), 1951
VBS XAxisColor property (VBS), 1951
Object model, 1271 XAxisCount property (VBS), 1952
Reference, 1271 XAxisDecimalPrecision(i) property (VBS), 2108
VerticalAlignment property (VBS), 1932 XAxisEnd(i) property (VBS), 2027
VerticalGridLines property (VBS), 1933 XAxisEndValue property (VBS), 1952
VerticalScrollBarPosition property (VBS), 1933 XAxisExponentialFormat property (VBS), 1953
vfprintf function, 177 XAxisGridLineInterval(i) property (VBS), 2109
ViewOnly property (VBS), 1934 XAxisIndex property (VBS), 1953
Visible property (VBS), 1934 XAxisInTrendColor property (VBS), 1954
vsprintf function, 177 XAxisLabel(i) property (VBS), 1954
XAxisLargeIncrementSize(i) property (VBS), 2109
XAxisMode(i) property (VBS), 2110
W XAxisName property (VBS), 1955
XAxisPrecisions property (VBS), 1955
Warning property (VBS), 1936
XAxisRemove property (VBS), 1955
WarningColor property (VBS), 1937
XAxisRepos property (VBS), 1956
WarningLowerLimit property (VBS), 1937
XAxisScalingType(i) property (VBS), 1956
WarningLowerLimitColor property (VBS), 1938
XAxisShowGridLines(i) property (VBS), 2027
WarningLowerLimitEnabled property (VBS), 1939
XAxisShowLargeIncrements(i) property (VBS), 2110
WarningLowerLimitRelative property (VBS), 1939
XAxisShowSmallIncrements(i) property (VBS), 2111
WarningRangeColor property (VBS), 1940
XAxisSmallIncrementSize(i) property (VBS), 2111
WarningRangeStart property (VBS), 1940
XAxisTrendWindow property (VBS), 1957
WarningRangeVisible property (VBS), 1941
XAxisVisible property (VBS), 1957
WarningUpperLimit property (VBS), 1942
XDataLogTag(i) property (VBS), 2112
WarningUpperLimitColor property (VBS), 1942
XOnlineTag(i) property (VBS), 2112
WarningUpperLimitEnabled property (VBS), 1943
WarningUpperLimitRelative property (VBS), 1943
Width property (VBS), 1944
WinACMPGetVersion, 1216
Y
WinACMPSetStart at boot, 1217 YAxisAdd property (VBS), 1958
WinACMPSetStartMode, 1218 YAxisAlignment property (VBS), 1958
WinACSetStartMode, 1218 YAxisAutoPrecisions property (VBS), 1959

WinCC Professional V13 SP2 – Programming reference


System Manual, 03/2017, Online help printout 2269
Index

YAxisAutoRange property (VBS), 1959


YAxisBeginValue property (VBS), 1960
YAxisColor property (VBS), 1960
YAxisCount property (VBS), 1961
YAxisEndValue property (VBS), 1961
YAxisExponentialFormat property (VBS), 1961
YAxisIndex property (VBS), 1962
YAxisInTrendColor property (VBS), 1962
YAxisLabel property (VBS), 1963
YAxisName property (VBS), 1963
YAxisPrecisions property (VBS), 1964
YAxisRemove property (VBS), 1964
YAxisRename property (VBS), 1965
YAxisRepos property (VBS), 1965
YAxisScalingType property (VBS), 1966
YAxisTrendWindow property (VBS), 1966
YAxisVisible property (VBS), 1967
YDataLogTag(i) property (VBS), 2113
YOnlineTag(i) property (VBS), 2114

Z
ZeroPoint property (VBS), 1967
ZoneLabelView object, 1512
ZoneQualityView object, 1513
Zoomable property (VBS), 2051
ZoomArea, 2229
ZoomFactor property (VBS), 1968
ZoomInOut, 2230
ZoomInOutTime, 2230
ZoomInOutValues, 2231
ZoomInOutX, 2231
ZoomInOutY, 2232
ZoomMove, 2232

WinCC Professional V13 SP2 – Programming reference


2270 System Manual, 03/2017, Online help printout

You might also like